mirror of
https://github.com/magefree/mage.git
synced 2025-12-29 23:12:10 -08:00
[LTR] Implement Denethor, Ruling Steward
This commit is contained in:
parent
b09111a8e5
commit
38b7f9e5f5
5 changed files with 107 additions and 25 deletions
|
|
@ -0,0 +1,35 @@
|
|||
package mage.abilities.condition.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.hint.ConditionHint;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.game.Game;
|
||||
import mage.watchers.common.CreaturesDiedWatcher;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public enum CreatureDiedControlledCondition implements Condition {
|
||||
instance;
|
||||
private static final Hint hint = new ConditionHint(
|
||||
instance, "A creature died under your control this turn"
|
||||
);
|
||||
|
||||
public static Hint getHint() {
|
||||
return hint;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return game
|
||||
.getState()
|
||||
.getWatcher(CreaturesDiedWatcher.class)
|
||||
.getAmountOfCreaturesDiedThisTurnByOwner(source.getControllerId()) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "a creature died under your control this turn";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue