mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
Add AtOppEOT logic to a couple lands that the AI misuses (#8839)
* - AtOppEOT is automatic now (also tweak the FlipACoinAi template to make use of it) * - AILogic$ Never is now generic.
This commit is contained in:
@@ -12,15 +12,13 @@ import forge.game.spellability.SpellAbility;
|
|||||||
public class FlipACoinAi extends SpellAbilityAi {
|
public class FlipACoinAi extends SpellAbilityAi {
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
* @see forge.card.abilityfactory.SpellAiLogic#checkApiLogic(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected AiAbilityDecision canPlay(Player ai, SpellAbility sa) {
|
protected AiAbilityDecision checkApiLogic(Player ai, SpellAbility sa) {
|
||||||
if (sa.hasParam("AILogic")) {
|
if (sa.hasParam("AILogic")) {
|
||||||
String ailogic = sa.getParam("AILogic");
|
String ailogic = sa.getParam("AILogic");
|
||||||
if (ailogic.equals("Never")) {
|
if (ailogic.equals("PhaseOut")) {
|
||||||
return new AiAbilityDecision(0, AiPlayDecision.CantPlayAi);
|
|
||||||
} else if (ailogic.equals("PhaseOut")) {
|
|
||||||
if (!ComputerUtil.predictThreatenedObjects(sa.getActivatingPlayer(), sa).contains(sa.getHostCard())) {
|
if (!ComputerUtil.predictThreatenedObjects(sa.getActivatingPlayer(), sa).contains(sa.getHostCard())) {
|
||||||
return new AiAbilityDecision(0, AiPlayDecision.CantPlayAi);
|
return new AiAbilityDecision(0, AiPlayDecision.CantPlayAi);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ ManaCost:no cost
|
|||||||
Types:Land Desert
|
Types:Land Desert
|
||||||
A:AB$ Mana | Cost$ T | Produced$ C | SpellDescription$ Add {C}.
|
A:AB$ Mana | Cost$ T | Produced$ C | SpellDescription$ Add {C}.
|
||||||
A:AB$ Mana | Cost$ T | Produced$ Any | Amount$ 1 | RestrictValid$ Spell.Mount | SpellDescription$ Add one mana of any color. Spend this mana only to cast a Mount spell.
|
A:AB$ Mana | Cost$ T | Produced$ Any | Amount$ 1 | RestrictValid$ Spell.Mount | SpellDescription$ Add one mana of any color. Spend this mana only to cast a Mount spell.
|
||||||
A:AB$ PeekAndReveal | Cost$ 3 T | PeekAmount$ 1 | RevealValid$ Card.Mount | RevealOptional$ True | RememberRevealed$ True | SubAbility$ DBChangeZone | SpellDescription$ Look at the top card of your library. If it's a Mount card, you may reveal it and put it into your hand. If you don't put it into your hand, you may put it on the bottom of your library.
|
A:AB$ PeekAndReveal | Cost$ 3 T | PeekAmount$ 1 | RevealValid$ Card.Mount | RevealOptional$ True | RememberRevealed$ True | SubAbility$ DBChangeZone | AILogic$ AtOppEOT | SpellDescription$ Look at the top card of your library. If it's a Mount card, you may reveal it and put it into your hand. If you don't put it into your hand, you may put it on the bottom of your library.
|
||||||
SVar:DBChangeZone:DB$ ChangeZone | Defined$ Remembered | Origin$ Library | Destination$ Hand | SubAbility$ DBChangeZone2
|
SVar:DBChangeZone:DB$ ChangeZone | Defined$ Remembered | Origin$ Library | Destination$ Hand | SubAbility$ DBChangeZone2
|
||||||
SVar:DBChangeZone2:DB$ ChangeZone | Optional$ True | Defined$ TopOfLibrary | Origin$ Library | Destination$ Library | LibraryPosition$ -1 | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ EQ0 | SubAbility$ DBCleanup
|
SVar:DBChangeZone2:DB$ ChangeZone | Optional$ True | Defined$ TopOfLibrary | Origin$ Library | Destination$ Library | LibraryPosition$ -1 | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ EQ0 | SubAbility$ DBCleanup
|
||||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ Name:The Gold Saucer
|
|||||||
ManaCost:no cost
|
ManaCost:no cost
|
||||||
Types:Land Town
|
Types:Land Town
|
||||||
A:AB$ Mana | Cost$ T | Produced$ C | SpellDescription$ Add {C}.
|
A:AB$ Mana | Cost$ T | Produced$ C | SpellDescription$ Add {C}.
|
||||||
A:AB$ FlipACoin | Cost$ 2 T | WinSubAbility$ DBToken | SpellDescription$ Flip a coin. If you win the flip, create a Treasure token.
|
A:AB$ FlipACoin | Cost$ 2 T | WinSubAbility$ DBToken | AILogic$ AtOppEOT | SpellDescription$ Flip a coin. If you win the flip, create a Treasure token.
|
||||||
SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenScript$ c_a_treasure_sac | TokenOwner$ You
|
SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenScript$ c_a_treasure_sac | TokenOwner$ You
|
||||||
A:AB$ Draw | Cost$ 3 T Sac<2/Artifact> | SpellDescription$ Draw a card.
|
A:AB$ Draw | Cost$ 3 T Sac<2/Artifact> | SpellDescription$ Draw a card.
|
||||||
DeckHas:Ability$Token
|
DeckHas:Ability$Token
|
||||||
|
|||||||
Reference in New Issue
Block a user