Skip to content
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 Attempt 2 #12918 #21381

Open
wants to merge 1 commit into
base: bleed
Choose a base branch
from

Conversation

tinix0
Copy link
Contributor

@tinix0 tinix0 commented Mar 31, 2024

Implements #12918
Implements random hunter seeker behavior by adding a trait thats issues a FlyAttack command on spawn, if there is a valid target. The new TargetType was added so that we can ignore the shroud while doing target validity checks and so that we do not have to reimplement a whole new attack activity for this.

Copy link
Member

@PunkPun PunkPun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall works fairly well. Could change the TrackedActor to ActorIgnoreVisibility. I feel like a new way of checking wether target is actor should be added to reduce changes of regressions.

I feel like vertical speed should be increased. It also flies like a plane; CanHover and CanSlide should be added to Aircraft of the hunter seeker

hs.mp4

return;

if (target == null || TargetIsInvalid())
SelectNewTarget(self);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why isn't doing this in OnBecomingIdle enough? Why again here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did mention it in the original PR as well #21253 (comment). Though it will probably not work correctly if there's no target on becoming idle

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC the issue was that Idle could fire before the attack tick so that is why it was done here, but I can double check.

{
target = self.World.Actors.Where(x => info.TargetRelationships.HasFlag(self.Owner.RelationshipWith(x.Owner)) && x.IsTargetableBy(self)).RandomOrDefault(self.World.SharedRandom);
if (target != null)
self.QueueActivity(false, new FlyAttack(self, Common.Traits.AttackSource.AutoTarget, Target.FromTrackedActor(target), forceAttack: false, null));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we just use Target.FromActor here and add another optional parameter to the constructor of FlyAttack? Problems in the warhead can be solved by adding a new field to DamageWarhead that toggles if visibility is required.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recalculating the target might be an issue where it will lose track of it since it is in a fog IIRC. But I will double check on this too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants