mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
- Fixed ShuffleAi so that AI can cast spells like Ruin in Their Wake
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user