mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
small change in gender enum
This commit is contained in:
parent
80814b457c
commit
6d4c388c5e
7 changed files with 37 additions and 14 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
@ -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."));
|
||||
}
|
||||
|
|
26
Mage/src/main/java/mage/abilities/Gender.java
Normal file
26
Mage/src/main/java/mage/abilities/Gender.java
Normal file
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue