forked from External/mage
[PIP] Implement Strong, the Brutish Thespian (#13359)
This commit is contained in:
parent
91a648c50d
commit
ecbab0da9b
4 changed files with 93 additions and 6 deletions
78
Mage.Sets/src/mage/cards/s/StrongTheBrutishThespian.java
Normal file
78
Mage.Sets/src/mage/cards/s/StrongTheBrutishThespian.java
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DealtDamageToSourceTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||
import mage.abilities.effects.common.counter.AddCountersPlayersEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.WardAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class StrongTheBrutishThespian extends CardImpl {
|
||||
public StrongTheBrutishThespian(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{G}");
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.addSubType(SubType.MUTANT);
|
||||
this.addSubType(SubType.BERSERKER);
|
||||
|
||||
this.power = new MageInt(7);
|
||||
this.toughness = new MageInt(7);
|
||||
|
||||
// Ward {2}
|
||||
this.addAbility(new WardAbility(new ManaCostsImpl<>("{2}")));
|
||||
|
||||
// Enrage - Whenever strong is dealt damage, you get three rad counters and put three +1/+1 counters on Strong.
|
||||
Ability enrageAbility = new DealtDamageToSourceTriggeredAbility(new AddCountersPlayersEffect(CounterType.RAD.createInstance(3), TargetController.YOU), false, true);
|
||||
enrageAbility.addEffect(new AddCountersSourceEffect(CounterType.P1P1.createInstance(3)).setText("put three +1/+1 counters on Strong"));
|
||||
this.addAbility(enrageAbility);
|
||||
|
||||
// You gain life rather than lose life from radiation.
|
||||
Ability healAbility = new SimpleStaticAbility(new StrongTheBrutishThespianHealEffect().setText("You gain life rather than lose life from radiation."));
|
||||
this.addAbility(healAbility);
|
||||
}
|
||||
|
||||
public StrongTheBrutishThespian(StrongTheBrutishThespian card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StrongTheBrutishThespian copy() {
|
||||
return new StrongTheBrutishThespian(this);
|
||||
}
|
||||
|
||||
class StrongTheBrutishThespianHealEffect extends ContinuousRuleModifyingEffectImpl {
|
||||
|
||||
protected StrongTheBrutishThespianHealEffect() {
|
||||
super(Duration.Custom, Outcome.Benefit);
|
||||
}
|
||||
|
||||
public StrongTheBrutishThespianHealEffect(StrongTheBrutishThespianHealEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StrongTheBrutishThespianHealEffect copy() {
|
||||
return new StrongTheBrutishThespianHealEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.RADIATION_GAIN_LIFE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
return event.getPlayerId().equals(source.getControllerId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -835,10 +835,10 @@ public final class Fallout extends ExpansionSet {
|
|||
//cards.add(new SetCardInfo("Strong Back", 611, Rarity.RARE, mage.cards.s.StrongBack.class, NON_FULL_USE_VARIOUS));
|
||||
//cards.add(new SetCardInfo("Strong Back", 83, Rarity.RARE, mage.cards.s.StrongBack.class, NON_FULL_USE_VARIOUS));
|
||||
//cards.add(new SetCardInfo("Strong Back", 930, Rarity.RARE, mage.cards.s.StrongBack.class, NON_FULL_USE_VARIOUS));
|
||||
//cards.add(new SetCardInfo("Strong, the Brutish Thespian", 403, Rarity.RARE, mage.cards.s.StrongTheBrutishThespian.class, NON_FULL_USE_VARIOUS));
|
||||
//cards.add(new SetCardInfo("Strong, the Brutish Thespian", 612, Rarity.RARE, mage.cards.s.StrongTheBrutishThespian.class, NON_FULL_USE_VARIOUS));
|
||||
//cards.add(new SetCardInfo("Strong, the Brutish Thespian", 84, Rarity.RARE, mage.cards.s.StrongTheBrutishThespian.class, NON_FULL_USE_VARIOUS));
|
||||
//cards.add(new SetCardInfo("Strong, the Brutish Thespian", 931, Rarity.RARE, mage.cards.s.StrongTheBrutishThespian.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Strong, the Brutish Thespian", 403, Rarity.RARE, mage.cards.s.StrongTheBrutishThespian.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Strong, the Brutish Thespian", 612, Rarity.RARE, mage.cards.s.StrongTheBrutishThespian.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Strong, the Brutish Thespian", 84, Rarity.RARE, mage.cards.s.StrongTheBrutishThespian.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Strong, the Brutish Thespian", 931, Rarity.RARE, mage.cards.s.StrongTheBrutishThespian.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Struggle for Project Purity", 380, Rarity.RARE, mage.cards.s.StruggleForProjectPurity.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Struggle for Project Purity", 39, Rarity.RARE, mage.cards.s.StruggleForProjectPurity.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Struggle for Project Purity", 567, Rarity.RARE, mage.cards.s.StruggleForProjectPurity.class, NON_FULL_USE_VARIOUS));
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import mage.counters.CounterType;
|
|||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.command.Emblem;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
|
|
@ -106,8 +107,13 @@ class RadiationEffect extends OneShotEffect {
|
|||
Cards milled = player.millCards(amount, source, game);
|
||||
int countNonLand = milled.count(StaticFilters.FILTER_CARD_NON_LAND, player.getId(), source, game);
|
||||
if (countNonLand > 0) {
|
||||
// TODO: support gaining life instead with [[Strong, the Brutish Thespian]]
|
||||
player.loseLife(countNonLand, game, source, false);
|
||||
GameEvent event = new GameEvent(GameEvent.EventType.RADIATION_GAIN_LIFE, null, source, player.getId(), amount, false);
|
||||
if (game.replaceEvent(event)) {
|
||||
player.gainLife(countNonLand, game, source);
|
||||
} else {
|
||||
player.loseLife(countNonLand, game, source, false);
|
||||
}
|
||||
|
||||
player.loseCounters(CounterType.RAD.getName(), countNonLand, source, game);
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -672,6 +672,9 @@ public class GameEvent implements Serializable {
|
|||
playerId player who gave the gift
|
||||
*/
|
||||
GAVE_GIFT,
|
||||
/* rad counter life loss/gain effect
|
||||
*/
|
||||
RADIATION_GAIN_LIFE,
|
||||
// custom events - must store some unique data to track
|
||||
CUSTOM_EVENT;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue