forked from External/mage
[WOE] Implement Ashiok, Wicked Manipulator (#10909)
* [WOE] Implement Ashiok, Wicket Manipulator * Add Ashiok's abilities * basic pay life replacement tests * many tests later * add warning on token expecting watcher * apply review * rework text generation
This commit is contained in:
parent
fe165f1fd0
commit
2a5dd4103c
15 changed files with 634 additions and 19 deletions
|
|
@ -76,7 +76,7 @@ public class Exile implements Serializable, Copyable<Exile> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Return exiled cards from specific player. Use it in effects to find all cards in range.
|
||||
* Return exiled cards owned by a specific player. Use it in effects to find all cards in range.
|
||||
*
|
||||
* @param game
|
||||
* @param fromPlayerId
|
||||
|
|
|
|||
|
|
@ -331,7 +331,7 @@ public class GameEvent implements Serializable {
|
|||
PLANESWALK, PLANESWALKED,
|
||||
PAID_CUMULATIVE_UPKEEP,
|
||||
DIDNT_PAY_CUMULATIVE_UPKEEP,
|
||||
LIFE_PAID,
|
||||
PAY_LIFE, LIFE_PAID,
|
||||
CASCADE_LAND,
|
||||
LEARN,
|
||||
//permanent events
|
||||
|
|
|
|||
|
|
@ -0,0 +1,52 @@
|
|||
package mage.game.permanent.token;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.BeginningOfCombatTriggeredAbility;
|
||||
import mage.abilities.condition.common.WasCardExiledThisTurnCondition;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.hint.ConditionHint;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.counters.CounterType;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public final class AshiokWickedManipulatorNightmareToken extends TokenImpl {
|
||||
|
||||
private static final Hint hint = new ConditionHint(WasCardExiledThisTurnCondition.instance);
|
||||
|
||||
/**
|
||||
* /!\ You need to add CardsExiledThisTurnWatcher to any card using this token
|
||||
*/
|
||||
public AshiokWickedManipulatorNightmareToken() {
|
||||
super("Nightmare Token", "1/1 black Nightmare creature tokens with \"At the beginning of combat on your turn, if a card was put into exile this turn, put a +1/+1 counter on this creature.\"");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setBlack(true);
|
||||
subtype.add(SubType.NIGHTMARE);
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new BeginningOfCombatTriggeredAbility(
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance()),
|
||||
TargetController.YOU,
|
||||
false
|
||||
),
|
||||
WasCardExiledThisTurnCondition.instance,
|
||||
"At the beginning of combat on your turn, if a card was put into exile "
|
||||
+ "this turn, put a +1/+1 counter on this creature."
|
||||
).addHint(hint));
|
||||
}
|
||||
|
||||
private AshiokWickedManipulatorNightmareToken(final AshiokWickedManipulatorNightmareToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public AshiokWickedManipulatorNightmareToken copy() {
|
||||
return new AshiokWickedManipulatorNightmareToken(this);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue