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

TeleportCaptain maybe override AttackMoveKill #447

Open
jzy-chitong56 opened this issue Nov 24, 2024 · 6 comments
Open

TeleportCaptain maybe override AttackMoveKill #447

jzy-chitong56 opened this issue Nov 24, 2024 · 6 comments
Labels
question Further information is requested

Comments

@jzy-chitong56
Copy link
Contributor

jzy-chitong56 commented Nov 24, 2024

Do need prevent it TeleportCaptain override AttackMoveKill ??
and not send TeleportCaptain when Combat

change all like

      if CaptainInCombat(true) then
        call AttackMoveKill(target)
      elseif c_ally_total > 0 and not ally_override then
        call TeleportCaptain(GetUnitX(target), GetUnitY(target)) // Override hardcoded logic from attackmovekill which will help allies
      endif
@SMUnlimited
Copy link
Owner

TeleportCaptain is being used to override attackmovekill target so yes that is intentional. In team games the attackmovekill command is often ignored based on hardcoded logic. But teleport captain forces us to target the right location and ignore the team target.

I haven't seen any problems with how it is currently in games, have you seen otherwise?

@SMUnlimited SMUnlimited added the question Further information is requested label Nov 24, 2024
@jzy-chitong56
Copy link
Contributor Author

The main concern is that TeleportCaptain will send move commands, overwrite attack, and stop the unit's attacks.
Normal attacks should not be interrupted, as this will weaken the battle

@SMUnlimited
Copy link
Owner

I''m going to revert this or at least leave disabled as its it is just dancing between the two locations, while at least before it prefers one or the other. I think i need to create our own attackmove system for combat to avoid using the hardcoded function.

@jzy-chitong56
Copy link
Contributor Author

if true or
here why is true ?? if need elseif always can not run , just del this code

        if true or CaptainAtGoal() or (attack_length_counter == 0 and not CaptainInCombat(true)) or CaptainInCombat(true) or ally_override or c_ally_total == 0 then
          call AttackMoveKill(u) // Use existing troops
        elseif (c_ally_total > 0 and not ally_override) then
          call CaptainAttack(GetUnitX(u), GetUnitY(u)) // Override hardcoded logic with attackmovekill as ally targets will change the attackmovekill we wanted. Teleport ignores the ally control.
        endif  

1 similar comment
@jzy-chitong56
Copy link
Contributor Author

if true or
here why is true ?? if need elseif always can not run , just del this code

        if true or CaptainAtGoal() or (attack_length_counter == 0 and not CaptainInCombat(true)) or CaptainInCombat(true) or ally_override or c_ally_total == 0 then
          call AttackMoveKill(u) // Use existing troops
        elseif (c_ally_total > 0 and not ally_override) then
          call CaptainAttack(GetUnitX(u), GetUnitY(u)) // Override hardcoded logic with attackmovekill as ally targets will change the attackmovekill we wanted. Teleport ignores the ally control.
        endif  

@SMUnlimited
Copy link
Owner

I've disabled as it needs more work.

Ultimately needs to still do an attack move without going to help the allies. As all the alternative attack functions that don't attack the team target are not running an attack move.

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

No branches or pull requests

2 participants