Added Gwafa Hazid, Profiteer checks in canBlock and canAttack.

This commit is contained in:
jendave
2011-08-06 05:39:08 +00:00
parent 4e1e9214b0
commit 09d0cbbeca

View File

@@ -235,6 +235,9 @@ public class CombatUtil {
if (attacker.getKeyword().contains("CARDNAME can't be blocked except by Walls and/or creatures with flying.") && if (attacker.getKeyword().contains("CARDNAME can't be blocked except by Walls and/or creatures with flying.") &&
!(blocker.getType().contains("Wall") || blocker.getKeyword().contains("Flying"))) return false; !(blocker.getType().contains("Wall") || blocker.getKeyword().contains("Flying"))) return false;
if (blocker.getCounters(Counters.BRIBERY) > 0 && isCardInPlay("Gwafa Hazid, Profiteer"))
return false;
return true; return true;
}//canBlock() }//canBlock()
@@ -301,6 +304,9 @@ public class CombatUtil {
|| oppControlsBlazingArchon(c) || c.getKeyword().contains("CARDNAME can't attack.") || oppControlsBlazingArchon(c) || c.getKeyword().contains("CARDNAME can't attack.")
|| c.getKeyword().contains("CARDNAME can't attack or block.")) return false; || c.getKeyword().contains("CARDNAME can't attack or block.")) return false;
if (c.getCounters(Counters.BRIBERY) > 0 && isCardInPlay("Gwafa Hazid, Profiteer"))
return false;
//if Card has Haste, Card.hasSickness() will return false //if Card has Haste, Card.hasSickness() will return false
return true; return true;
}//canAttack() }//canAttack()
@@ -762,6 +768,15 @@ public class CombatUtil {
else return false; else return false;
} }
public static boolean isCardInPlay(String card)
{
CardList all = new CardList();
all.addAll(AllZone.Human_Play.getCards());
all.addAll(AllZone.Computer_Play.getCards());
return all.containsName(card);
}
public static boolean isPeaceKeeperInPlay() { public static boolean isPeaceKeeperInPlay() {
CardList all = new CardList(); CardList all = new CardList();
all.addAll(AllZone.Human_Play.getCards()); all.addAll(AllZone.Human_Play.getCards());