Suspend Fix

So it looks like Suspend needed a bit more of an update since I wrote the Restrictions recently. I updated a block of code to take this into account and tested to confirm the fix works.
However, my codebase right now is a wreck, I don't want to just submit this blind, and I can't really revert my code down just for this fix. So if someone could merge this in, and do a quick test with Lotus Bloom, and then submit for me that'd be great.
The change was only in canPlay() but I'll copy the whole function so it can be easier to find.
However, my codebase right now is a wreck, I don't want to just submit this blind, and I can't really revert my code down just for this fix. So if someone could merge this in, and do a quick test with Lotus Bloom, and then submit for me that'd be great.
The change was only in canPlay() but I'll copy the whole function so it can be easier to find.
- Code: Select all
public static SpellAbility ability_suspend(final Card sourceCard, final String suspendCost, final int suspendCounters) {
// be careful with Suspend ability, it will not hit the stack
final SpellAbility suspend = new Ability_Static(sourceCard, suspendCost) {
private static final long serialVersionUID = 21625903128384507L;
@Override
public boolean canPlay(){
if (!(getRestrictions().canPlay(sourceCard, this)))
return false;
if (sourceCard.isInstant())
return true;
return Phase.canCastSorcery(sourceCard.getOwner());
}
@Override
public boolean canPlayAI() {
return false;
}
@Override
public void resolve() {
AllZone.GameAction.exile(sourceCard);
sourceCard.addCounter(Counters.TIME, suspendCounters);
}
};
suspend.setDescription("Suspend " +suspendCounters + ": "+ suspendCost);
suspend.setStackDescription(sourceCard.getName() + " suspending for " + suspendCounters + " turns.)");
suspend.getRestrictions().setActivateZone(Constant.Zone.Hand);
return suspend;
}//ability_suspend()