mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Fix AI cheating with Avacyn's Judgement (#2853)
This commit is contained in:
@@ -1783,6 +1783,11 @@ public class AbilityUtils {
|
||||
return doXMath(Integer.parseInt(kicked ? sq[1] : sq[2]), expr, c, ctb);
|
||||
}
|
||||
|
||||
// Count$Madness.<True>.<False>
|
||||
if (sq[0].startsWith("Madness")) {
|
||||
return doXMath(calculateAmount(c, sq[sa.isMadness() ? 1 : 2], ctb), expr, c, ctb);
|
||||
}
|
||||
|
||||
//Count$HasNumChosenColors.<DefinedCards related to spellability>
|
||||
if (sq[0].contains("HasNumChosenColors")) {
|
||||
int sum = 0;
|
||||
@@ -2006,10 +2011,6 @@ public class AbilityUtils {
|
||||
final boolean isMulti = c.getColor().isMulticolor();
|
||||
return doXMath(Integer.parseInt(sq[isMulti ? 1 : 2]), expr, c, ctb);
|
||||
}
|
||||
// Count$Madness.<True>.<False>
|
||||
if (sq[0].startsWith("Madness")) {
|
||||
return doXMath(calculateAmount(c, sq[c.isMadness() ? 1 : 2], ctb), expr, c, ctb);
|
||||
}
|
||||
|
||||
// Count$Foretold.<True>.<False>
|
||||
if (sq[0].startsWith("Foretold")) {
|
||||
|
||||
@@ -314,6 +314,7 @@ public class PlayEffect extends SpellAbilityEffect {
|
||||
// only one mode can be used
|
||||
tgtSA = sa.getActivatingPlayer().getController().getAbilityToPlay(tgtCard, sas);
|
||||
}
|
||||
|
||||
// in case player canceled from choice dialog
|
||||
if (tgtSA == null) {
|
||||
if (wasFaceDown) {
|
||||
|
||||
@@ -4,7 +4,7 @@ Types:Creature Astartes Warlock
|
||||
PT:3/3
|
||||
A:AB$ Effect | PrecostDesc$ Gift of Chaos — | Cost$ 3 T | StaticAbilities$ GrantCascade | Triggers$ ExileEffect | SpellDescription$ The next noncreature spell you cast this turn has cascade. (When you cast that spell, exile cards from the top of your library until you exile a nonland card that costs less. You may cast it without paying its mana cost. Put the exiled cards on the bottom of your library in a random order.)
|
||||
SVar:GrantCascade:Mode$ Continuous | EffectZone$ Command | Affected$ Card.nonCreature+YouCtrl | AffectedZone$ Stack | AddKeyword$ Cascade | Description$ The next noncreature spell you cast this turn has cascade.
|
||||
SVar:ExileEffect:Mode$ SpellCast | EffectZone$ Command | Valid$ Card.nonCreature+YouCtrl | AffectedZone$ Stack | Execute$ RemoveEffect | Static$ True
|
||||
SVar:ExileEffect:Mode$ SpellCast | EffectZone$ Command | ValidCard$ Card.nonCreature+YouCtrl | AffectedZone$ Stack | Execute$ RemoveEffect | Static$ True
|
||||
SVar:RemoveEffect:DB$ ChangeZone | Origin$ Command | Destination$ Exile | Defined$ Self
|
||||
DeckHas:Keyword$Cascade
|
||||
Oracle:Gift of Chaos — {3}, {T}: The next noncreature spell you cast this turn has cascade. (When you cast that spell, exile cards from the top of your library until you exile a nonland card that costs less. You may cast it without paying its mana cost. Put the exiled cards on the bottom of your library in a random order.)
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:1 W
|
||||
Types:Creature Gnome Wizard
|
||||
PT:2/2
|
||||
K:Flash
|
||||
T:Mode$ ChangesZoneAll | ValidCards$ Land.OppCtrl | ValidCause$ !LandAbility | Destination$ Battlefield | TriggerZones$ Battlefield | ActivationLimit$ 1 | Execute$ TrigSearch | OptionalDecider$ You | TriggerDescription$ Mold Earth — Whenever one or more lands enter the battlefield under an opponent's control without being played, you may search your library for a Plains card, put it onto the battlefield tapped, then shuffle. Do this only once each turn.
|
||||
T:Mode$ ChangesZoneAll | ValidCards$ Land.OppCtrl | ValidCause$ !LandAbility | Destination$ Battlefield | TriggerZones$ Battlefield | ResolvedLimit$ 1 | Execute$ TrigSearch | OptionalDecider$ You | TriggerDescription$ Mold Earth — Whenever one or more lands enter the battlefield under an opponent's control without being played, you may search your library for a Plains card, put it onto the battlefield tapped, then shuffle. Do this only once each turn.
|
||||
SVar:TrigSearch:DB$ ChangeZone | Origin$ Library | Destination$ Battlefield | Tapped$ True | ChangeType$ Card.Plains | ChangeNum$ 1 | ShuffleNonMandatory$ True
|
||||
AI:RemoveDeck:Random
|
||||
Oracle:Flash\nMold Earth — Whenever one or more lands enter the battlefield under an opponent's control without being played, you may search your library for a Plains card, put it onto the battlefield tapped, then shuffle. Do this only once each turn.
|
||||
|
||||
@@ -4,5 +4,5 @@ Types:Enchantment Aura
|
||||
K:Enchant creature
|
||||
A:SP$ Attach | ValidTgts$ Creature | AILogic$ HighestEvaluation
|
||||
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigCopy | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of your upkeep, create a token that's a copy of enchanted creature.
|
||||
SVar:TrigCopy:DB$ CopyPermanent | Defined$ Enchanted | SpellDescription$ At the beginning of your upkeep, create a token that's a copy of enchanted creature.
|
||||
SVar:TrigCopy:DB$ CopyPermanent | Defined$ Enchanted
|
||||
Oracle:Enchant creature\nAt the beginning of your upkeep, create a token that's a copy of enchanted creature.
|
||||
|
||||
@@ -18,7 +18,7 @@ Types:Enchantment Aura
|
||||
K:Enchant creature
|
||||
A:SP$ Attach | ValidTgts$ Creature | TgtPrompt$ Select target creature | AILogic$ HighestEvaluation
|
||||
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigCopy | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of your upkeep, create a token that's a copy of enchanted creature, except it's a Spirit in addition to its other types.
|
||||
SVar:TrigCopy:DB$ CopyPermanent | Defined$ Enchanted | AddTypes$ Spirit | SpellDescription$ At the beginning of your upkeep, create a token that's a copy of enchanted creature, except it's a Spirit in addition to its other types.
|
||||
SVar:TrigCopy:DB$ CopyPermanent | Defined$ Enchanted | AddTypes$ Spirit
|
||||
R:Event$ Moved | ValidCard$ Card.Self | Destination$ Graveyard | ReplaceWith$ Exile | Description$ If CARDNAME would be put into a graveyard from anywhere, exile it instead.
|
||||
SVar:Exile:DB$ ChangeZone | Hidden$ True | Origin$ All | Destination$ Exile | Defined$ ReplacedCard
|
||||
Oracle:Enchant creature\nAt the beginning of your upkeep, create a token that's a copy of enchanted creature, except it's a Spirit in addition to its other types.\nIf Ghastly Mimicry would be put into a graveyard from anywhere, exile it instead.
|
||||
|
||||
@@ -4,7 +4,7 @@ Types:Creature Demon
|
||||
PT:3/3
|
||||
A:AB$ Effect | PrecostDesc$ Jolly Gutpipes — | Cost$ 2 T Sac<1/Creature> | StaticAbilities$ GrantCascade | Triggers$ ExileEffect | SpellDescription$ The next creature spell you cast this turn has cascade. (When you cast your next creature spell, exile cards from the top of your library until you exile a nonland card that costs less. You may cast it without paying its mana cost. Put the exiled cards on the bottom of your library in a random order.)
|
||||
SVar:GrantCascade:Mode$ Continuous | EffectZone$ Command | Affected$ Card.Creature+YouCtrl | AffectedZone$ Stack | Execute$ ExileEff | AddKeyword$ Cascade | Description$ The next noncreature spell you cast this turn has cascade.
|
||||
SVar:ExileEffect:Mode$ SpellCast | EffectZone$ Command | Valid$ Card.Creature+YouCtrl | AffectedZone$ Stack | Execute$ RemoveEffect | Static$ True
|
||||
SVar:ExileEffect:Mode$ SpellCast | EffectZone$ Command | ValidCard$ Card.Creature+YouCtrl | AffectedZone$ Stack | Execute$ RemoveEffect | Static$ True
|
||||
SVar:RemoveEffect:DB$ ChangeZone | Origin$ Command | Destination$ Exile | Defined$ Self
|
||||
DeckHas:Keyword$Cascade & Ability$Sacrifice
|
||||
Oracle:Jolly Gutpipes — {2}, {T}, Sacrifice a creature: The next creature spell you cast this turn has cascade. (When you cast your next creature spell, exile cards from the top of your library until you exile a nonland card that costs less. You may cast it without paying its mana cost. Put the exiled cards on the bottom of your library in a random order.)
|
||||
|
||||
Reference in New Issue
Block a user