mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
ComputerUtilCombat : fix mustAttack check
This commit is contained in:
@@ -114,8 +114,12 @@ public class ComputerUtilCombat {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!StaticAbilityMustAttack.entitiesMustAttack(attacker).contains(defender)) {
|
||||
return false;
|
||||
final List<GameEntity> mustAttackEnts = StaticAbilityMustAttack.entitiesMustAttack(attacker);
|
||||
//if it contains only attacker, it only has a non-specific must attack
|
||||
if (mustAttackEnts.size() > 1 || (mustAttackEnts.size() == 1 && mustAttackEnts.get(0) != attacker)) {
|
||||
if (!mustAttackEnts.contains(defender)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO this should be a factor but needs some alignment with AttachAi
|
||||
|
||||
Reference in New Issue
Block a user