mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
More visitors for keywords and merge duplicate keyword amount methods.
This commit is contained in:
@@ -857,7 +857,7 @@ public class AiAttackController {
|
||||
public final static int countExaltedBonus(final Player player) {
|
||||
int bonus = 0;
|
||||
for (Card c : player.getCardsIn(ZoneType.Battlefield)) {
|
||||
bonus += c.getKeywordAmount("Exalted");
|
||||
bonus += c.getAmountOfKeyword("Exalted");
|
||||
}
|
||||
|
||||
return bonus;
|
||||
|
||||
@@ -1140,7 +1140,7 @@ public class ComputerUtilCombat {
|
||||
//check Exalted only for the first attacker
|
||||
if (combat != null && combat.getAttackers().isEmpty()) {
|
||||
for (Card card : attacker.getController().getCardsIn(ZoneType.Battlefield)) {
|
||||
power += card.getKeywordAmount("Exalted");
|
||||
power += card.getAmountOfKeyword("Exalted");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1323,7 +1323,7 @@ public class ComputerUtilCombat {
|
||||
//check Exalted only for the first attacker
|
||||
if (combat != null && combat.getAttackers().isEmpty()) {
|
||||
for (Card card : attacker.getController().getCardsIn(ZoneType.Battlefield)) {
|
||||
toughness += card.getKeywordAmount("Exalted");
|
||||
toughness += card.getAmountOfKeyword("Exalted");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -362,8 +362,8 @@ public abstract class PumpAiBase extends SpellAbilityAi {
|
||||
|| !ph.getPhase().equals(PhaseType.COMBAT_DECLARE_ATTACKERS)) {
|
||||
return false;
|
||||
}
|
||||
int canBlockNum = 1 + card.getKeywordAmount("CARDNAME can block an additional creature.") +
|
||||
card.getKeywordAmount("CARDNAME can block an additional ninety-nine creatures.") * 99;
|
||||
int canBlockNum = 1 + card.getAmountOfKeyword("CARDNAME can block an additional creature.") +
|
||||
card.getAmountOfKeyword("CARDNAME can block an additional ninety-nine creatures.") * 99;
|
||||
int possibleBlockNum = 0;
|
||||
for (Card attacker : game.getCombat().getAttackers()) {
|
||||
if (CombatUtil.canBlock(attacker, card)) {
|
||||
|
||||
Reference in New Issue
Block a user