mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- Fixed AI using Idle Thoughts.
This commit is contained in:
@@ -103,6 +103,10 @@ public class DrawAi extends SpellAbilityAi {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sa.getConditions() != null && !sa.getConditions().areMet(sa) && sa.getSubAbility() == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Don't use draw abilities before main 2 if possible
|
// Don't use draw abilities before main 2 if possible
|
||||||
if (game.getPhaseHandler().getPhase().isBefore(PhaseType.MAIN2)
|
if (game.getPhaseHandler().getPhase().isBefore(PhaseType.MAIN2)
|
||||||
&& !sa.hasParam("ActivationPhases") && !ComputerUtil.castSpellInMain1(ai, sa)) {
|
&& !sa.hasParam("ActivationPhases") && !ComputerUtil.castSpellInMain1(ai, sa)) {
|
||||||
@@ -161,8 +165,7 @@ public class DrawAi extends SpellAbilityAi {
|
|||||||
//if (n)
|
//if (n)
|
||||||
|
|
||||||
// TODO: if xPaid and one of the below reasons would fail, instead of
|
// TODO: if xPaid and one of the below reasons would fail, instead of
|
||||||
// bailing
|
// bailing reduce toPay amount to acceptable level
|
||||||
// reduce toPay amount to acceptable level
|
|
||||||
|
|
||||||
if (tgt != null) {
|
if (tgt != null) {
|
||||||
// ability is targeted
|
// ability is targeted
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
Name:Idle Thoughts
|
Name:Idle Thoughts
|
||||||
ManaCost:3 U
|
ManaCost:3 U
|
||||||
Types:Enchantment
|
Types:Enchantment
|
||||||
A:AB$ Draw | Cost$ 2 | NumCards$ 1 | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ0 | SpellDescription$ Draw a card if you have no cards in hand.
|
A:AB$ Draw | Cost$ 2 | NumCards$ 1 | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ0 | References$ X | SpellDescription$ Draw a card if you have no cards in hand.
|
||||||
SVar:X:Count$InYourHand
|
SVar:X:Count$InYourHand
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/idle_thoughts.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/idle_thoughts.jpg
|
||||||
Oracle:{2}: Draw a card if you have no cards in hand.
|
Oracle:{2}: Draw a card if you have no cards in hand.
|
||||||
Reference in New Issue
Block a user