Open jzy-chitong56 opened 4 days ago
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?
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
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.
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
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
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.
Do need prevent it
TeleportCaptain
overrideAttackMoveKill
?? and not sendTeleportCaptain
when Combatchange all like