Getting stack ability in Stack objects.

This commit is contained in:
magenoxx 2011-03-08 10:19:34 +03:00
parent 333562f721
commit 115799564f
3 changed files with 10 additions and 0 deletions

View file

@ -329,4 +329,9 @@ public class Spell<T extends Spell<T>> implements StackObject, Card {
public boolean cast(Game game, Zone fromZone, SpellAbility ability, UUID controllerId) {
throw new UnsupportedOperationException("Unsupported operation");
}
public Ability getStackAbility() {
return this.ability;
}
}

View file

@ -302,4 +302,7 @@ public class StackAbility implements StackObject, Ability {
throw new UnsupportedOperationException("Not supported yet.");
}
public Ability getStackAbility() {
return ability;
}
}

View file

@ -28,6 +28,7 @@
package mage.game.stack;
import mage.abilities.Ability;
import mage.game.*;
import java.util.UUID;
import mage.MageObject;
@ -41,6 +42,7 @@ public interface StackObject extends MageObject {
public UUID getControllerId();
public void checkTriggers(GameEvent event, Game game);
public void counter(UUID sourceId, Game game);
public Ability getStackAbility();
@Override
public StackObject copy();
}