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,17 +24,19 @@ 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);
|
||||||
if (e instanceof Player) {
|
for (GameEntity e : def) {
|
||||||
Player attackPl = (Player) e;
|
if (e instanceof Player) {
|
||||||
if (!game.getPhaseHandler().isPlayerTurn(attackPl)) { // CR 506.2
|
Player attackPl = (Player) e;
|
||||||
entityList.add(e);
|
if (!game.getPhaseHandler().isPlayerTurn(attackPl)) { // CR 506.2
|
||||||
}
|
entityList.add(e);
|
||||||
} else if (e instanceof Card) {
|
}
|
||||||
Card attackPW = (Card) e;
|
} else if (e instanceof Card) {
|
||||||
if (!game.getPhaseHandler().isPlayerTurn(attackPW.getController())) { // CR 506.2
|
Card attackPW = (Card) e;
|
||||||
entityList.add(e);
|
if (!game.getPhaseHandler().isPlayerTurn(attackPW.getController())) { // CR 506.2
|
||||||
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user