mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Added Gwafa Hazid, Profiteer checks in canBlock and canAttack.
This commit is contained in:
@@ -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());
|
||||||
|
|||||||
Reference in New Issue
Block a user