-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TS: Implement Hunter-Seeker #12918 #21253
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be using an attack activity in theory as to make the activity sticky to moving actors, though they are made to respect fog and shroud
I think I will rework it into attack activity. After I read your comment I've realized that it will indeed not track moving targets, so that needs to be fixed and a custom attack activity is probably the way. |
Might want to make a new activity or something inheriting MoveAdjecentTo (or however it's called) |
if (target.Disposed || target.IsDead) | ||
SelectNewTarget(self); | ||
else | ||
self.Kill(self); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will fail if the target is loaded in a transport, or goes underground or something like that. Why is this not part of the activity? Isn't it already since the activity attacks? If not it should be, and then the activity can do the proper checks and re-queue a move activity as child if necessary or cancel itself (so that a new target is chosen).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the weapon fired by attack activity should explode the hunterseeker. At least that's how I understand the current self-destruting units work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume the same. We shouldn't need the self.Kill(self)
here then, right?
// Cancel non-forced targets when switching to a more restrictive stance if they are no longer valid for auto-targeting | ||
if (newStance > oldStance) | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is doing nothing?
/* Attack against targets that might not be visible (i.e. Hunter-Seeker) */ | ||
public class AttackIgnoringVisibility : Activity, IActivityNotifyStanceChanged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/* Attack against targets that might not be visible (i.e. Hunter-Seeker) */ | |
public class AttackIgnoringVisibility : Activity, IActivityNotifyStanceChanged | |
public class AttackIgnoringVisibility : Activity, IActivityNotifyStanceChanged |
That is Imho obvious from the name. That being said, can we not re-use one of the existing attack activities? This looks like a bunch duplicated code from a quick glance.
related #6478 |
Implements #12918
Implements random hunter seeker behavior by adding a trait and issuing move + suicide on idle command, if there is an existing target. I am not 100% if the spread on the weapon is correct and if it cant cause the explosion to kill multiple stacked units, but I could not think of any better way, since we have to target ground to attack targets in shroud.