diff --git a/Mage.Sets/src/mage/cards/c/ChandraFireOfKaladesh.java b/Mage.Sets/src/mage/cards/c/ChandraFireOfKaladesh.java index ca74218cf6..faaec1f1a1 100644 --- a/Mage.Sets/src/mage/cards/c/ChandraFireOfKaladesh.java +++ b/Mage.Sets/src/mage/cards/c/ChandraFireOfKaladesh.java @@ -31,6 +31,7 @@ import java.util.UUID; import mage.MageInt; import mage.ObjectColor; import mage.abilities.Ability; +import mage.abilities.Gender; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.condition.common.SourceDealtDamageCondition; @@ -38,7 +39,6 @@ import mage.abilities.costs.common.TapSourceCost; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.ExileAndReturnTransformedSourceEffect; -import mage.abilities.effects.common.ExileAndReturnTransformedSourceEffect.Gender; import mage.abilities.effects.common.UntapSourceEffect; import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; @@ -78,7 +78,7 @@ public class ChandraFireOfKaladesh extends CardImpl { // {T}: Chandra, Fire of Kaladesh deals 1 damage to target player. If Chandra has dealt 3 or more damage this turn, exile her, then return her to the battlefield transformed under her owner's control. this.addAbility(new TransformAbility()); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addEffect(new ConditionalOneShotEffect(new ExileAndReturnTransformedSourceEffect(Gender.FEMAL), new SourceDealtDamageCondition(3))); + ability.addEffect(new ConditionalOneShotEffect(new ExileAndReturnTransformedSourceEffect(Gender.FEMALE), new SourceDealtDamageCondition(3))); ability.addTarget(new TargetPlayer()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/j/JaceVrynsProdigy.java b/Mage.Sets/src/mage/cards/j/JaceVrynsProdigy.java index f5efda8059..4813343964 100644 --- a/Mage.Sets/src/mage/cards/j/JaceVrynsProdigy.java +++ b/Mage.Sets/src/mage/cards/j/JaceVrynsProdigy.java @@ -30,6 +30,7 @@ package mage.cards.j; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.Gender; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.condition.common.CardsInControllerGraveCondition; import mage.abilities.costs.common.TapSourceCost; @@ -37,7 +38,6 @@ import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.Effect; import mage.abilities.effects.common.DrawDiscardControllerEffect; import mage.abilities.effects.common.ExileAndReturnTransformedSourceEffect; -import mage.abilities.effects.common.ExileAndReturnTransformedSourceEffect.Gender; import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; diff --git a/Mage.Sets/src/mage/cards/k/KytheonHeroOfAkros.java b/Mage.Sets/src/mage/cards/k/KytheonHeroOfAkros.java index 968b0b7eed..bceb978d51 100644 --- a/Mage.Sets/src/mage/cards/k/KytheonHeroOfAkros.java +++ b/Mage.Sets/src/mage/cards/k/KytheonHeroOfAkros.java @@ -31,13 +31,13 @@ import java.util.UUID; import mage.MageInt; import mage.MageObjectReference; import mage.abilities.Ability; +import mage.abilities.Gender; import mage.abilities.common.EndOfCombatTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.condition.Condition; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.common.ExileAndReturnTransformedSourceEffect; -import mage.abilities.effects.common.ExileAndReturnTransformedSourceEffect.Gender; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.keyword.IndestructibleAbility; import mage.abilities.keyword.TransformAbility; diff --git a/Mage.Sets/src/mage/cards/l/LilianaHereticalHealer.java b/Mage.Sets/src/mage/cards/l/LilianaHereticalHealer.java index cb996b445b..a784534fbc 100644 --- a/Mage.Sets/src/mage/cards/l/LilianaHereticalHealer.java +++ b/Mage.Sets/src/mage/cards/l/LilianaHereticalHealer.java @@ -29,6 +29,7 @@ package mage.cards.l; import java.util.UUID; import mage.MageInt; +import mage.abilities.Gender; import mage.abilities.common.DiesCreatureTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.ExileAndReturnTransformedSourceEffect; @@ -75,7 +76,7 @@ public class LilianaHereticalHealer extends CardImpl { this.addAbility(LifelinkAbility.getInstance()); // Whenever another nontoken creature you control dies, exile Liliana Heretical Healer, then return her to the battlefield transformed under her owner's control. If you do, create a 2/2 black Zombie creature token. - this.addAbility(new DiesCreatureTriggeredAbility(new ExileAndReturnTransformedSourceEffect(ExileAndReturnTransformedSourceEffect.Gender.FEMAL, + this.addAbility(new DiesCreatureTriggeredAbility(new ExileAndReturnTransformedSourceEffect(Gender.FEMALE, new CreateTokenEffect(new ZombieToken())), false, filter)); } diff --git a/Mage.Sets/src/mage/cards/n/NissaVastwoodSeer.java b/Mage.Sets/src/mage/cards/n/NissaVastwoodSeer.java index 1bbadf731c..644aab496b 100644 --- a/Mage.Sets/src/mage/cards/n/NissaVastwoodSeer.java +++ b/Mage.Sets/src/mage/cards/n/NissaVastwoodSeer.java @@ -30,12 +30,12 @@ package mage.cards.n; import java.util.UUID; import mage.MageInt; import mage.abilities.CountType; +import mage.abilities.Gender; import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.common.ExileAndReturnTransformedSourceEffect; -import mage.abilities.effects.common.ExileAndReturnTransformedSourceEffect.Gender; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; @@ -76,7 +76,7 @@ public class NissaVastwoodSeer extends CardImpl { // Whenever a land enters the battlefield under your control, if you control seven or more lands, exile Nissa, then return her to the battlefield transformed under her owner's control. this.addAbility(new TransformAbility()); this.addAbility(new ConditionalTriggeredAbility( - new EntersBattlefieldControlledTriggeredAbility(new ExileAndReturnTransformedSourceEffect(Gender.FEMAL), new FilterLandPermanent()), + new EntersBattlefieldControlledTriggeredAbility(new ExileAndReturnTransformedSourceEffect(Gender.FEMALE), new FilterLandPermanent()), new PermanentsOnTheBattlefieldCondition(new FilterLandPermanent(), CountType.MORE_THAN, 6, true), "Whenever a land enters the battlefield under your control, if you control seven or more lands, exile {this}, then return her to the battlefield transformed under her owner's control.")); } diff --git a/Mage/src/main/java/mage/abilities/Gender.java b/Mage/src/main/java/mage/abilities/Gender.java new file mode 100644 index 0000000000..d7dd334967 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/Gender.java @@ -0,0 +1,26 @@ +package mage.abilities; + +/** + * Created by IGOUDT on 5-3-2017. + */ +public enum Gender { + MALE("his", "him"), FEMALE("her", "her"); + + String personalPronoun; + String possesivePronoun; + + Gender(String possessive, String personal) { + personalPronoun = personal; + possesivePronoun = possessive; + } + + public String getPersonalPronoun() { + return personalPronoun; + } + + public String getPossesivePronoun() { + return possesivePronoun; + } + + +} diff --git a/Mage/src/main/java/mage/abilities/effects/common/ExileAndReturnTransformedSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileAndReturnTransformedSourceEffect.java index e4ae7ecb0d..476ae10141 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ExileAndReturnTransformedSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ExileAndReturnTransformedSourceEffect.java @@ -6,6 +6,7 @@ package mage.abilities.effects.common; import mage.abilities.Ability; +import mage.abilities.Gender; import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; @@ -18,15 +19,10 @@ import mage.game.permanent.Permanent; import mage.players.Player; /** - * * @author LevelX2 */ public class ExileAndReturnTransformedSourceEffect extends OneShotEffect { - public static enum Gender { - - MALE, FEMAL - } protected Effect additionalEffect; @@ -41,8 +37,8 @@ public class ExileAndReturnTransformedSourceEffect extends OneShotEffect { public ExileAndReturnTransformedSourceEffect(Gender gender, Effect additionalEffect) { super(Outcome.Benefit); this.additionalEffect = additionalEffect; - this.staticText = "exile {this}, then return " + (gender.equals(Gender.MALE) ? "him" : "her") - + " to the battlefield transformed under " + (gender.equals(Gender.MALE) ? "his" : "her") + " owner's control"; + this.staticText = "exile {this}, then return " + gender.getPersonalPronoun() + + " to the battlefield transformed under " + gender.getPossesivePronoun() + " owner's control"; } public ExileAndReturnTransformedSourceEffect(final ExileAndReturnTransformedSourceEffect effect) {