mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
- Added Price of Glory
This commit is contained in:
@@ -176,6 +176,17 @@ public class AiController {
|
||||
return spellAbilities;
|
||||
}
|
||||
|
||||
private boolean checkCurseEffects() {
|
||||
for (final Card c : game.getCardsIn(ZoneType.Battlefield)) {
|
||||
for (Trigger t : c.getTriggers()) {
|
||||
if (t.getMapParams().containsKey("CurseNonActive")
|
||||
&& !player.equals(game.getPhaseHandler().getPlayerTurn())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean checkETBEffects(final Card card, final SpellAbility sa, final ApiType api) {
|
||||
boolean rightapi = false;
|
||||
@@ -631,6 +642,9 @@ public class AiController {
|
||||
card.setSVar("PayX", Integer.toString(xPay));
|
||||
}
|
||||
}
|
||||
if (checkCurseEffects()) {
|
||||
return AiPlayDecision.CurseEffects;
|
||||
}
|
||||
if( sa instanceof SpellPermanent ) {
|
||||
ManaCost mana = sa.getPayCosts().getTotalMana();
|
||||
if (mana.countX() > 0) {
|
||||
|
||||
@@ -16,5 +16,6 @@ public enum AiPlayDecision {
|
||||
WouldDestroyOtherPlaneswalker,
|
||||
WouldBecomeZeroToughnessCreature,
|
||||
WouldDestroyWorldEnchantment,
|
||||
BadEtbEffects;
|
||||
BadEtbEffects,
|
||||
CurseEffects;
|
||||
}
|
||||
Reference in New Issue
Block a user