Mines weapon type & weapon proximity triggers#7461
Open
MjnMixael wants to merge 11 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds mines as a new weapon type that sit stationary and have unlimited life. Mines are also plotted on radar and are destroyable like bombs. Because these are a true weapon type they can take advantage of all the other various weapon features to come up with all kinds of new weapon ideas.
This PR also adds a proximity system for triggering detonations that is generalized and fixes #2235 while we're here. Proximity can be limited by IFF (hard set or comparative relation), Species, Type, and Class. Also includes a +Stealth Proximity Multiplier to scale proximity radius for stealth ships allowing stealth ships to get closer than others if desired. +Detonate Chance is also a feature here for probabilistic detonation per contact and is, I hope, multiplayer-deterministic.
Mine-specific ($MineInfo:)
+Sensors Range: / +Targetable Range: radar/HUD visibility tiers (distorted blip vs. fully targetable). -1 = always, 0 = never.
+Hitpoints: destructible HP (default 50)
+Chase Duration: on trigger, turn into a guided missile chasing the target for N seconds instead of detonating immediately (requires a homing flag)
+Detonates on Chase Timeout: at chase end, detonate vs. give up and return to stationary
+Chase Cooldown: re-arm delay after a non-detonating chase
Additionally new spawn behaviors have been added to reproduce BtA's mine design.
$Spawn Aimed: / $Spawn Aim Lead: spawn children fire toward the parent's homing target instead of into a random cone, with optional lead extrapolation.
AI ships will never choose mines as a weapon to use. An AI Profile flag is added to gate mine defensive behavior for safety.
AI: $ships intercept mines: profile flag
When set, AI ships autonomously engage hostile mines they can detect, with imminent-threat preemption (swap targets if a mine is about to detonate on them) and standoff distance scaled to the mine's proximity radius. Guards also defend their charges against mines.
Some scripting behavior is also added here with mines in mind like a proximity triggered hook and ability to arbitrarily detonate a weapon.