mirror of
https://github.com/magefree/mage.git
synced 2025-12-27 05:52:06 -08:00
[CLB] Implemented Sigil of Myrkul
This commit is contained in:
parent
0bcc79742d
commit
56e04087cc
3 changed files with 107 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package mage.abilities.common.delayed;
|
||||
|
||||
import mage.abilities.DelayedTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.constants.Duration;
|
||||
import mage.game.Game;
|
||||
|
|
@ -14,19 +15,26 @@ import java.util.Locale;
|
|||
public class ReflexiveTriggeredAbility extends DelayedTriggeredAbility {
|
||||
|
||||
private final String text;
|
||||
private final Condition condition;
|
||||
|
||||
public ReflexiveTriggeredAbility(Effect effect, boolean optional) {
|
||||
this(effect, optional, null);
|
||||
}
|
||||
|
||||
public ReflexiveTriggeredAbility(Effect effect, boolean optional, String text) {
|
||||
this(effect, optional, text, null);
|
||||
}
|
||||
|
||||
public ReflexiveTriggeredAbility(Effect effect, boolean optional, String text, Condition condition) {
|
||||
super(effect, Duration.EndOfTurn, true, optional);
|
||||
this.text = text;
|
||||
this.condition = condition;
|
||||
}
|
||||
|
||||
protected ReflexiveTriggeredAbility(final ReflexiveTriggeredAbility ability) {
|
||||
super(ability);
|
||||
this.text = ability.text;
|
||||
this.condition = ability.condition;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -48,6 +56,11 @@ public class ReflexiveTriggeredAbility extends DelayedTriggeredAbility {
|
|||
return text.substring(0, 1).toUpperCase(Locale.ENGLISH) + text.substring(1) + '.';
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkInterveningIfClause(Game game) {
|
||||
return condition == null || condition.apply(game, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReflexiveTriggeredAbility copy() {
|
||||
return new ReflexiveTriggeredAbility(this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue