mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Added rule parameter to BlocksOrBecomesBlockedByCreatureTriggeredAbility.
This commit is contained in:
parent
40b4ab272b
commit
e255db67e7
1 changed files with 11 additions and 0 deletions
|
@ -40,12 +40,20 @@ import mage.target.targetpointer.FixedTarget;
|
|||
*/
|
||||
public class BlocksOrBecomesBlockedByCreatureTriggeredAbility extends TriggeredAbilityImpl<BlocksOrBecomesBlockedByCreatureTriggeredAbility> {
|
||||
|
||||
protected String rule;
|
||||
|
||||
public BlocksOrBecomesBlockedByCreatureTriggeredAbility(Effect effect, boolean optional) {
|
||||
this(effect, optional, null);
|
||||
}
|
||||
|
||||
public BlocksOrBecomesBlockedByCreatureTriggeredAbility(Effect effect, boolean optional, String rule) {
|
||||
super(Zone.BATTLEFIELD, effect, optional);
|
||||
this.rule = rule;
|
||||
}
|
||||
|
||||
public BlocksOrBecomesBlockedByCreatureTriggeredAbility(final BlocksOrBecomesBlockedByCreatureTriggeredAbility ability) {
|
||||
super(ability);
|
||||
this.rule = ability.rule;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -69,6 +77,9 @@ public class BlocksOrBecomesBlockedByCreatureTriggeredAbility extends TriggeredA
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
if (rule != null) {
|
||||
return rule;
|
||||
}
|
||||
return "Whenever {this} blocks or becomes blocked by a creature, " + super.getRule();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue