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

With StandGround command, catapults trying to attack units in the distances < MinAttackRange #4

Open
ipochto opened this issue Mar 17, 2020 · 1 comment

Comments

@ipochto
Copy link
Owner

ipochto commented Mar 17, 2020

Attack animation is played, but missile didn't throw. It makes sense if missile will be thrown and fly MinAttackRange, after that we have to calculate damage for resulting tile, and splash.

@ipochto
Copy link
Owner Author

ipochto commented Apr 2, 2020

Partly fixed (only prevent to play animation) in this 019c2d3 commit.

Still needed to implement for units with StandGround command (or bunkered):

if current automaticaly selected target is closer than MinAttackRange, calculate groundPos for attack ground in MinAttackRange distance. Only for units which can attack-ground && has a splash attack && can hit current target with splash. Else do not attack at all.

Also, think about: if target is building and it closer than MinAttackRange, attacker will "throw missile" not to the center of the building, but to a tile which is belong to this building and in MinAttackRange distance.

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

No branches or pull requests

1 participant