mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Clean up
This commit is contained in:
@@ -346,9 +346,9 @@ public class CombatUtil {
|
||||
return attackCost;
|
||||
}
|
||||
|
||||
public static CardCollection getOptionAttackCostCreatures(final Player attacker) {
|
||||
public static CardCollection getOptionalAttackCostCreatures(final CardCollection attackers) {
|
||||
final CardCollection exerters = new CardCollection();
|
||||
for (final Card card : attacker.getCardsIn(ZoneType.STATIC_ABILITIES_SOURCE_ZONES)) {
|
||||
for (final Card card : attackers) {
|
||||
for (final StaticAbility stAb : card.getStaticAbilities()) {
|
||||
if (stAb.hasExertCost(card)) {
|
||||
exerters.add(card);
|
||||
|
||||
@@ -559,8 +559,8 @@ public class PhaseHandler implements java.io.Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
// Exert creatures here
|
||||
List<Card> possibleExerters = CombatUtil.getOptionAttackCostCreatures(whoDeclares);
|
||||
// CR 508.1g
|
||||
List<Card> possibleExerters = CombatUtil.getOptionalAttackCostCreatures(combat.getAttackers());
|
||||
if (!possibleExerters.isEmpty()) {
|
||||
possibleExerters = whoDeclares.getController().exertAttackers(possibleExerters);
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ import forge.game.card.CardCollectionView;
|
||||
import forge.game.card.CardLists;
|
||||
import forge.game.card.CardState;
|
||||
import forge.game.cost.Cost;
|
||||
import forge.game.cost.CostExert;
|
||||
import forge.game.phase.PhaseHandler;
|
||||
import forge.game.phase.PhaseType;
|
||||
import forge.game.player.Player;
|
||||
@@ -337,7 +338,7 @@ public class StaticAbility extends CardTraitBase implements IIdentifiable, Clone
|
||||
if (this.isSuppressed() || !getParam("Mode").equals("OptionalAttackCost") || !this.checkConditions()) {
|
||||
return false;
|
||||
}
|
||||
return StaticAbilityCantAttackBlock.getAttackCost(this, attacker, null) != null;
|
||||
return StaticAbilityCantAttackBlock.getAttackCost(this, attacker, null).hasSpecificCostType(CostExert.class);
|
||||
}
|
||||
|
||||
public final Cost getBlockCost(final Card blocker, final Card attacker) {
|
||||
|
||||
Reference in New Issue
Block a user