forked from External/mage
avoid casting to Card with dedicated method getSourceCardIfItStillExists
This commit is contained in:
parent
a90f226053
commit
d226b30592
40 changed files with 150 additions and 178 deletions
|
|
@ -12,6 +12,7 @@ import mage.abilities.effects.Effect;
|
|||
import mage.abilities.effects.Effects;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.icon.CardIcon;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.*;
|
||||
import mage.game.Controllable;
|
||||
import mage.game.Game;
|
||||
|
|
@ -580,6 +581,15 @@ public interface Ability extends Controllable, Serializable {
|
|||
*/
|
||||
MageObject getSourceObjectIfItStillExists(Game game);
|
||||
|
||||
|
||||
/**
|
||||
* See getSourceObjectIfItStillExists for details. Works with Card only.
|
||||
*
|
||||
* @param game
|
||||
* @return
|
||||
*/
|
||||
Card getSourceCardIfItStillExists(Game game);
|
||||
|
||||
/**
|
||||
* See getSourceObjectIfItStillExists for details. Works with Permanent only.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue