mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
Merge branch 'master' into 'master'
Various minor AI flags and improvements. See merge request core-developers/forge!3057
This commit is contained in:
@@ -2,6 +2,7 @@ package forge.ai.ability;
|
|||||||
|
|
||||||
import forge.ai.SpellAbilityAi;
|
import forge.ai.SpellAbilityAi;
|
||||||
import forge.ai.SpellApiToAi;
|
import forge.ai.SpellApiToAi;
|
||||||
|
import forge.game.phase.PhaseHandler;
|
||||||
import forge.game.phase.PhaseType;
|
import forge.game.phase.PhaseType;
|
||||||
import forge.game.player.Player;
|
import forge.game.player.Player;
|
||||||
import forge.game.player.PlayerActionConfirmMode;
|
import forge.game.player.PlayerActionConfirmMode;
|
||||||
@@ -23,10 +24,17 @@ public class PeekAndRevealAi extends SpellAbilityAi {
|
|||||||
if (sa instanceof AbilityStatic) {
|
if (sa instanceof AbilityStatic) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ("Main2".equals(sa.getParam("AILogic"))) {
|
|
||||||
|
String logic = sa.getParamOrDefault("AILogic", "");
|
||||||
|
if ("Main2".equals(logic)) {
|
||||||
if (aiPlayer.getGame().getPhaseHandler().getPhase().isBefore(PhaseType.MAIN2)) {
|
if (aiPlayer.getGame().getPhaseHandler().getPhase().isBefore(PhaseType.MAIN2)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
} else if ("EndOfOppTurn".equals(logic)) {
|
||||||
|
PhaseHandler ph = aiPlayer.getGame().getPhaseHandler();
|
||||||
|
if (!(ph.getNextTurn() == aiPlayer && ph.is(PhaseType.END_OF_TURN))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// So far this only appears on Triggers, but will expand
|
// So far this only appears on Triggers, but will expand
|
||||||
// once things get converted from Dig + NoMove
|
// once things get converted from Dig + NoMove
|
||||||
|
|||||||
@@ -6,4 +6,5 @@ A:AB$ Dig | Cost$ 1 Sac<1/Creature> | DigNum$ 1 | ChangeNum$ All | DestinationZo
|
|||||||
SVar:DBEffect:DB$ Effect | StaticAbilities$ EffSModeContinuous | ExileOnMoved$ Exile | RememberObjects$ Remembered | SubAbility$ DBCleanup
|
SVar:DBEffect:DB$ Effect | StaticAbilities$ EffSModeContinuous | ExileOnMoved$ Exile | RememberObjects$ Remembered | SubAbility$ DBCleanup
|
||||||
SVar:EffSModeContinuous:Mode$ Continuous | EffectZone$ Command | Affected$ Card.IsRemembered | MayPlay$ True | AffectedZone$ Exile | Description$ You may play that card this turn.
|
SVar:EffSModeContinuous:Mode$ Continuous | EffectZone$ Command | Affected$ Card.IsRemembered | MayPlay$ True | AffectedZone$ Exile | Description$ You may play that card this turn.
|
||||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||||
|
SVar:AIPreference:SacCost$Creature.token,Creature.cmcLE1
|
||||||
Oracle:{1}, Sacrifice a creature: Exile the top card of your library. You may play that card this turn. (You still pay its costs. You can play a land this way only if you have an available land play remaining.)
|
Oracle:{1}, Sacrifice a creature: Exile the top card of your library. You may play that card this turn. (You still pay its costs. You can play a land this way only if you have an available land play remaining.)
|
||||||
|
|||||||
@@ -5,4 +5,8 @@ A:SP$ ChooseCard | Cost$ W | Choices$ Creature.YouCtrl,Planeswalker.YouCtrl | Su
|
|||||||
SVar:DBEffect:DB$ Effect | ReplacementEffects$ DamageEvent | SVars$ GideonSac | References$ DamageEvent,GideonSac | ExileOnMoved$ True | RememberObjects$ ChosenCard
|
SVar:DBEffect:DB$ Effect | ReplacementEffects$ DamageEvent | SVars$ GideonSac | References$ DamageEvent,GideonSac | ExileOnMoved$ True | RememberObjects$ ChosenCard
|
||||||
SVar:DamageEvent:Event$ DamageDone | ActiveZones$ Command | ValidTarget$ You,Permanent.YouCtrl | ReplaceWith$ GideonSac | Description$ All damage that would be dealt this turn to you and permanents you control is dealt to the chosen permanent instead (if it's still on the battlefield).
|
SVar:DamageEvent:Event$ DamageDone | ActiveZones$ Command | ValidTarget$ You,Permanent.YouCtrl | ReplaceWith$ GideonSac | Description$ All damage that would be dealt this turn to you and permanents you control is dealt to the chosen permanent instead (if it's still on the battlefield).
|
||||||
SVar:GideonSac:DB$ ReplaceEffect | VarName$ Affected | VarValue$ Remembered | VarType$ Card
|
SVar:GideonSac:DB$ ReplaceEffect | VarName$ Affected | VarValue$ Remembered | VarType$ Card
|
||||||
|
SVar:NeedsToPlayVar:Z GE1
|
||||||
|
SVar:Z:SVar$Z1/Plus.Z2
|
||||||
|
SVar:Z1:Count$Creature.YouCtrl
|
||||||
|
SVar:Z2:Count$Planeswalker.YouCtrl
|
||||||
Oracle:Choose a creature or planeswalker you control. All damage that would be dealt this turn to you and permanents you control is dealt to the chosen permanent instead (if it's still on the battlefield).
|
Oracle:Choose a creature or planeswalker you control. All damage that would be dealt this turn to you and permanents you control is dealt to the chosen permanent instead (if it's still on the battlefield).
|
||||||
|
|||||||
@@ -5,4 +5,5 @@ PT:3/3
|
|||||||
K:Vigilance
|
K:Vigilance
|
||||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigPumpAll | TriggerDescription$ When CARDNAME enters the battlefield, other creatures you control gain vigilance until end of turn.
|
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigPumpAll | TriggerDescription$ When CARDNAME enters the battlefield, other creatures you control gain vigilance until end of turn.
|
||||||
SVar:TrigPumpAll:DB$ PumpAll | ValidCards$ Creature.Other+YouCtrl | KW$ Vigilance
|
SVar:TrigPumpAll:DB$ PumpAll | ValidCards$ Creature.Other+YouCtrl | KW$ Vigilance
|
||||||
|
SVar:PlayMain1:TRUE
|
||||||
Oracle:Vigilance\nWhen Loxodon Sergeant enters the battlefield, other creatures you control gain vigilance until end of turn.
|
Oracle:Vigilance\nWhen Loxodon Sergeant enters the battlefield, other creatures you control gain vigilance until end of turn.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ Name:Vivien's Grizzly
|
|||||||
ManaCost:2 G
|
ManaCost:2 G
|
||||||
Types:Creature Bear Spirit
|
Types:Creature Bear Spirit
|
||||||
PT:2/3
|
PT:2/3
|
||||||
A:AB$ PeekAndReveal | Cost$ 3 G | AILogic$ EndofOppTurn | PeekAmount$ 1 | RevealValid$ Creature,Planeswalker | RevealOptional$ True | RememberRevealed$ True | SubAbility$ DBChangeZone | SpellDescription$ Look at the top card of your library. If it's a creature or planeswalker card, you may reveal it and put it into your hand. If you don't put the card into your hand, put it on the bottom of your library.
|
A:AB$ PeekAndReveal | Cost$ 3 G | AILogic$ EndOfOppTurn | PeekAmount$ 1 | RevealValid$ Creature,Planeswalker | RevealOptional$ True | RememberRevealed$ True | SubAbility$ DBChangeZone | SpellDescription$ Look at the top card of your library. If it's a creature or planeswalker card, you may reveal it and put it into your hand. If you don't put the card into your hand, put it on the bottom of your library.
|
||||||
SVar:DBChangeZone:DB$ ChangeZone | Defined$ TopOfLibrary | Origin$ Library | Destination$ Hand | ConditionDefined$ Remembered | ConditionPresent$ Creature,Planeswalker | ConditionCompare$ EQ1 | SubAbility$ DBBottom
|
SVar:DBChangeZone:DB$ ChangeZone | Defined$ TopOfLibrary | Origin$ Library | Destination$ Hand | ConditionDefined$ Remembered | ConditionPresent$ Creature,Planeswalker | ConditionCompare$ EQ1 | SubAbility$ DBBottom
|
||||||
SVar:DBBottom:DB$ ChangeZone | Defined$ TopOfLibrary | Origin$ Library | Destination$ Library | Shuffle$ False | ConditionDefined$ Remembered | ConditionPresent$ Creature,Planeswalker | ConditionCompare$ EQ0 | LibraryPosition$ -1 | SubAbility$ DBCleanup
|
SVar:DBBottom:DB$ ChangeZone | Defined$ TopOfLibrary | Origin$ Library | Destination$ Library | Shuffle$ False | ConditionDefined$ Remembered | ConditionPresent$ Creature,Planeswalker | ConditionCompare$ EQ0 | LibraryPosition$ -1 | SubAbility$ DBCleanup
|
||||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||||
|
|||||||
Reference in New Issue
Block a user