mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
StaticAbilityMustAttack improve getDefinedEntities
This commit is contained in:
@@ -24,8 +24,9 @@ public class StaticAbilityMustAttack {
|
|||||||
}
|
}
|
||||||
if (stAb.matchesValidParam(stAb.getParam("ValidCreature"), attacker)) {
|
if (stAb.matchesValidParam(stAb.getParam("ValidCreature"), attacker)) {
|
||||||
if (stAb.hasParam("MustAttack")) {
|
if (stAb.hasParam("MustAttack")) {
|
||||||
GameEntity e = AbilityUtils.getDefinedEntities(attacker, stAb.getParam("MustAttack"),
|
List<GameEntity> def = AbilityUtils.getDefinedEntities(stAb.getHostCard(),
|
||||||
stAb).get(0);
|
stAb.getParam("MustAttack"), stAb);
|
||||||
|
for (GameEntity e : def) {
|
||||||
if (e instanceof Player) {
|
if (e instanceof Player) {
|
||||||
Player attackPl = (Player) e;
|
Player attackPl = (Player) e;
|
||||||
if (!game.getPhaseHandler().isPlayerTurn(attackPl)) { // CR 506.2
|
if (!game.getPhaseHandler().isPlayerTurn(attackPl)) { // CR 506.2
|
||||||
@@ -37,6 +38,7 @@ public class StaticAbilityMustAttack {
|
|||||||
entityList.add(e);
|
entityList.add(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else { // if the list is only the attacker, the attacker must attack, but no specific entity
|
} else { // if the list is only the attacker, the attacker must attack, but no specific entity
|
||||||
entityList.add(attacker);
|
entityList.add(attacker);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user