- Fixed ShuffleAi so that AI can cast spells like Ruin in Their Wake

This commit is contained in:
excessum
2016-02-27 04:07:20 +00:00
parent 3f1890ff62
commit c29f17e2b4

View File

@@ -29,28 +29,22 @@ public class ShuffleAi extends SpellAbilityAi {
@Override @Override
public boolean chkAIDrawback(SpellAbility sa, Player aiPlayer) { public boolean chkAIDrawback(SpellAbility sa, Player aiPlayer) {
return shuffleTargetAI(/*sa, false, false*/); return shuffleTargetAI(sa);
} }
private boolean shuffleTargetAI(final SpellAbility sa) {
private boolean shuffleTargetAI(/*final SpellAbility sa, final boolean primarySA, final boolean mandatory*/) { /*
return false; * Shuffle at the end of some other effect where we'd usually shuffle
* inside that effect, but can't for some reason.
*/
return sa.getParent() != null;
} // shuffleTargetAI() } // shuffleTargetAI()
@Override @Override
protected boolean doTriggerAINoCost(Player aiPlayer, SpellAbility sa, boolean mandatory) { protected boolean doTriggerAINoCost(Player aiPlayer, SpellAbility sa, boolean mandatory) {
if (!shuffleTargetAI(/*sa, false, mandatory*/)) { return shuffleTargetAI(sa);
return false;
}
return true;
} }
@Override @Override
public boolean confirmAction(Player player, SpellAbility sa, PlayerActionConfirmMode mode, String message) { public boolean confirmAction(Player player, SpellAbility sa, PlayerActionConfirmMode mode, String message) {
// ai could analyze parameter denoting the player to shuffle // ai could analyze parameter denoting the player to shuffle