[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:
Susucre 2023-08-31 01:15:56 +02:00 committed by GitHub
parent fe165f1fd0
commit 2a5dd4103c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 634 additions and 19 deletions

View file

@ -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

View file

@ -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

View file

@ -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);
}
}