From 3ae8b257d530a7aef637f0501465edc32c3b9ade Mon Sep 17 00:00:00 2001 From: Neil Gentleman Date: Sun, 16 Oct 2016 23:24:10 -0700 Subject: [PATCH] Budoka Pupil, etc: flipping is optional flag was being ignored in OnEventTriggerAbility constructor, and not set at all for the other cards. --- Mage.Sets/src/mage/cards/c/CallowJushi.java | 2 +- Mage.Sets/src/mage/cards/c/CunningBandit.java | 2 +- Mage.Sets/src/mage/cards/f/FaithfulSquire.java | 2 +- Mage.Sets/src/mage/cards/h/HiredMuscle.java | 2 +- .../abilities/common/OnEventTriggeredAbility.java | 12 ++++-------- 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/Mage.Sets/src/mage/cards/c/CallowJushi.java b/Mage.Sets/src/mage/cards/c/CallowJushi.java index 64336309448..680866b2a32 100644 --- a/Mage.Sets/src/mage/cards/c/CallowJushi.java +++ b/Mage.Sets/src/mage/cards/c/CallowJushi.java @@ -73,7 +73,7 @@ public class CallowJushi extends CardImpl { // At the beginning of the end step, if there are two or more ki counters on Callow Jushi, you may flip it. this.addAbility(new ConditionalTriggeredAbility( - new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new FlipSourceEffect(new JarakuTheInterloper())), + new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new FlipSourceEffect(new JarakuTheInterloper()), true), new SourceHasCounterCondition(CounterType.KI, 2, Integer.MAX_VALUE), "At the beginning of the end step, if there are two or more ki counters on {this}, you may flip it.")); } diff --git a/Mage.Sets/src/mage/cards/c/CunningBandit.java b/Mage.Sets/src/mage/cards/c/CunningBandit.java index a1dbc3f4872..1df46cfe346 100644 --- a/Mage.Sets/src/mage/cards/c/CunningBandit.java +++ b/Mage.Sets/src/mage/cards/c/CunningBandit.java @@ -73,7 +73,7 @@ public class CunningBandit extends CardImpl { // At the beginning of the end step, if there are two or more ki counters on Cunning Bandit, you may flip it. this.addAbility(new ConditionalTriggeredAbility( - new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new FlipSourceEffect(new AzamukiTreacheryIncarnate())), + new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new FlipSourceEffect(new AzamukiTreacheryIncarnate()), true), new SourceHasCounterCondition(CounterType.KI, 2, Integer.MAX_VALUE), "At the beginning of the end step, if there are two or more ki counters on {this}, you may flip it.")); } diff --git a/Mage.Sets/src/mage/cards/f/FaithfulSquire.java b/Mage.Sets/src/mage/cards/f/FaithfulSquire.java index b28238592b9..989a3ad6745 100644 --- a/Mage.Sets/src/mage/cards/f/FaithfulSquire.java +++ b/Mage.Sets/src/mage/cards/f/FaithfulSquire.java @@ -75,7 +75,7 @@ public class FaithfulSquire extends CardImpl { // At the beginning of the end step, if there are two or more ki counters on Faithful Squire, you may flip it this.addAbility(new ConditionalTriggeredAbility( - new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new FlipSourceEffect(new KaisoMemoryOfLoyalty())), + new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new FlipSourceEffect(new KaisoMemoryOfLoyalty()), true), new SourceHasCounterCondition(CounterType.KI, 2, Integer.MAX_VALUE), "At the beginning of the end step, if there are two or more ki counters on {this}, you may flip it.")); diff --git a/Mage.Sets/src/mage/cards/h/HiredMuscle.java b/Mage.Sets/src/mage/cards/h/HiredMuscle.java index 06b2c14d69c..964645e6611 100644 --- a/Mage.Sets/src/mage/cards/h/HiredMuscle.java +++ b/Mage.Sets/src/mage/cards/h/HiredMuscle.java @@ -74,7 +74,7 @@ public class HiredMuscle extends CardImpl { // At the beginning of the end step, if there are two or more ki counters on Hired Muscle, you may flip it. this.addAbility(new ConditionalTriggeredAbility( - new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new FlipSourceEffect(new Scarmaker())), + new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new FlipSourceEffect(new Scarmaker()), true), new SourceHasCounterCondition(CounterType.KI, 2, Integer.MAX_VALUE), "At the beginning of the end step, if there are two or more ki counters on {this}, you may flip it.")); } diff --git a/Mage/src/main/java/mage/abilities/common/OnEventTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/OnEventTriggeredAbility.java index c724b43fbe3..fbe6c32a91c 100644 --- a/Mage/src/main/java/mage/abilities/common/OnEventTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/OnEventTriggeredAbility.java @@ -42,18 +42,14 @@ public class OnEventTriggeredAbility extends TriggeredAbilityImpl { private final EventType eventType; private final String eventName; - private boolean allPlayers = false; + private final boolean allPlayers; public OnEventTriggeredAbility(EventType eventType, String eventName, Effect effect) { - super(Zone.BATTLEFIELD, effect); - this.eventType = eventType; - this.eventName = eventName; + this(eventType, eventName, effect, false); } public OnEventTriggeredAbility(EventType eventType, String eventName, Effect effect, boolean optional) { - super(Zone.BATTLEFIELD, effect, optional); - this.eventType = eventType; - this.eventName = eventName; + this(eventType, eventName, false, effect, optional); } public OnEventTriggeredAbility(EventType eventType, String eventName, boolean allPlayers, Effect effect) { @@ -61,7 +57,7 @@ public class OnEventTriggeredAbility extends TriggeredAbilityImpl { } public OnEventTriggeredAbility(EventType eventType, String eventName, boolean allPlayers, Effect effect, boolean optional) { - super(Zone.BATTLEFIELD, effect); + super(Zone.BATTLEFIELD, effect, optional); this.eventType = eventType; this.eventName = eventName; this.allPlayers = allPlayers;