- Whispers of the Muse, Treasure Trove: added AILogic$ AlwaysAtOppEOT as it's a more optimal default timing for this effect.

This commit is contained in:
Agetian
2017-09-01 07:56:42 +00:00
parent 7212698863
commit 346c4db3d9
4 changed files with 10 additions and 6 deletions

View File

@@ -356,7 +356,7 @@ public class CountersPutAi extends SpellAbilityAi {
PhaseHandler ph = ai.getGame().getPhaseHandler();
if ("AlwaysAtOppEOT".equals(sa.getParam("AILogic"))) {
if (ph.is(PhaseType.END_OF_TURN) && !ph.isPlayerTurn(ai)) {
if (ph.is(PhaseType.END_OF_TURN) && ph.getNextTurn().equals(ai)) {
return true;
}
}

View File

@@ -126,10 +126,14 @@ public class DrawAi extends SpellAbilityAi {
*/
@Override
protected boolean checkPhaseRestrictions(Player ai, SpellAbility sa, PhaseHandler ph) {
// LifeLessThan logic presupposes activation as soon as possible in an
// attempt to save the AI from dying
if (sa.hasParam("AILogic") && sa.getParam("AILogic").startsWith("LifeLessThan.")) {
String logic = sa.getParamOrDefault("AILogic", "");
if (logic.startsWith("LifeLessThan.")) {
// LifeLessThan logic presupposes activation as soon as possible in an
// attempt to save the AI from dying
return true;
} else if (logic.equals("AtEndOfOppTurn")) {
return ph.is(PhaseType.END_OF_TURN) && ph.getNextTurn().equals(ai);
}
// Don't use draw abilities before main 2 if possible

View File

@@ -1,6 +1,6 @@
Name:Treasure Trove
ManaCost:2 U U
Types:Enchantment
A:AB$ Draw | Cost$ 2 U U | NumCards$ 1 | SpellDescription$ Draw a card.
A:AB$ Draw | Cost$ 2 U U | NumCards$ 1 | AILogic$ AlwaysAtOppEOT | SpellDescription$ Draw a card.
SVar:Picture:http://www.wizards.com/global/images/magic/general/treasure_trove.jpg
Oracle:{2}{U}{U}: Draw a card.

View File

@@ -1,7 +1,7 @@
Name:Whispers of the Muse
ManaCost:U
Types:Instant
A:SP$ Draw | Cost$ U | NumCards$ 1 | SpellDescription$ Draw a card.
A:SP$ Draw | Cost$ U | NumCards$ 1 | AILogic$ AlwaysAtOppEOT | SpellDescription$ Draw a card.
K:Buyback 5
SVar:Picture:http://www.wizards.com/global/images/magic/general/whispers_of_the_muse.jpg
Oracle:Buyback {5} (You may pay an additional {5} as you cast this spell. If you do, put this card into your hand as it resolves.)\nDraw a card.