mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
Merge branch 'master' into 'master'
VentureAi timing tweaks, minor AI hint See merge request core-developers/forge!5525
This commit is contained in:
@@ -4,6 +4,8 @@ import com.google.common.collect.Lists;
|
||||
import forge.ai.AiPlayDecision;
|
||||
import forge.ai.PlayerControllerAi;
|
||||
import forge.ai.SpellAbilityAi;
|
||||
import forge.game.phase.PhaseHandler;
|
||||
import forge.game.phase.PhaseType;
|
||||
import forge.game.player.Player;
|
||||
import forge.game.player.PlayerActionConfirmMode;
|
||||
import forge.game.spellability.SpellAbility;
|
||||
@@ -15,7 +17,16 @@ import java.util.Map;
|
||||
public class VentureAi extends SpellAbilityAi {
|
||||
@Override
|
||||
protected boolean canPlayAI(Player aiPlayer, SpellAbility sa) {
|
||||
// TODO: is it ever a bad idea to venture into a dungeon?
|
||||
// If this has a mana cost, do it at opponent's EOT if able to prevent spending mana early; if sorcery, do it in Main2
|
||||
PhaseHandler ph = aiPlayer.getGame().getPhaseHandler();
|
||||
if (sa.getPayCosts().hasManaCost() || sa.getPayCosts().hasTapCost()) {
|
||||
if (SpellAbilityAi.isSorcerySpeed(sa)) {
|
||||
return ph.is(PhaseType.MAIN2, aiPlayer);
|
||||
} else {
|
||||
return ph.is(PhaseType.END_OF_TURN) && ph.getNextTurn() == aiPlayer;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,4 +4,5 @@ Types:Creature Orc Knight
|
||||
PT:4/4
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigPumpAll | TriggerDescription$ Beacon of Hope — When CARDNAME enters the battlefield, creatures you control get +1/+1 and gain vigilance until end of turn.
|
||||
SVar:TrigPumpAll:DB$ PumpAll | ValidCards$ Creature.YouCtrl | NumAtt$ +1 | NumDef$ +1 | KW$ Vigilance
|
||||
SVar:PlayMain1:TRUE
|
||||
Oracle:Beacon of Hope — When Devoted Paladin enters the battlefield, creatures you control get +1/+1 and gain vigilance until end of turn.
|
||||
|
||||
Reference in New Issue
Block a user