forked from External/mage
[BOK] reworked implementation of Shirei, Shizo's Caretaker and added test
This commit is contained in:
parent
2a00609918
commit
3cbfe4d623
13 changed files with 140 additions and 176 deletions
|
|
@ -1,11 +1,9 @@
|
|||
|
||||
package mage.abilities.condition.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.game.Game;
|
||||
|
||||
|
||||
/**
|
||||
* As long as the sourceId permanent is
|
||||
* on the battlefield, the condition is true.
|
||||
|
|
@ -13,18 +11,15 @@ import mage.game.Game;
|
|||
* @author LevelX2
|
||||
*/
|
||||
public enum SourceOnBattlefieldCondition implements Condition {
|
||||
|
||||
instance;
|
||||
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return (game.getPermanent(source.getSourceId()) != null);
|
||||
return source.getSourcePermanentIfItStillExists(game) != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "if {this} is on the battlefield";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue