[DSK] Implement Reluctant Role Model

This commit is contained in:
theelk801 2025-06-03 19:24:15 -04:00
parent 0575bb36d3
commit 199df969ef
2 changed files with 98 additions and 0 deletions

View file

@ -0,0 +1,95 @@
package mage.cards.r;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.abilityword.SurvivalAbility;
import mage.abilities.common.DiesThisOrAnotherTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.counter.AddCounterChoiceSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.counters.Counter;
import mage.counters.CounterType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.CounterAnyPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ReluctantRoleModel extends CardImpl {
private static final FilterPermanent filter = new FilterControlledCreaturePermanent();
static {
filter.add(CounterAnyPredicate.instance);
}
public ReluctantRoleModel(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.SURVIVOR);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// Survival -- At the beginning of your second main phase, if this creature is tapped, put a flying, lifelink, or +1/+1 counter on it.
this.addAbility(new SurvivalAbility(new AddCounterChoiceSourceEffect(
CounterType.FLYING, CounterType.LIFELINK, CounterType.P1P1
).setText("put a flying, lifelink, or +1/+1 counter on it")));
// Whenever this creature or another creature you control dies, if it had counters on it, put those counters on up to one target creature.
Ability ability = new DiesThisOrAnotherTriggeredAbility(
new ReluctantRoleModelEffect(), false, filter
).setApplyFilterOnSource(true);
ability.addTarget(new TargetCreaturePermanent(0, 1));
this.addAbility(ability);
}
private ReluctantRoleModel(final ReluctantRoleModel card) {
super(card);
}
@Override
public ReluctantRoleModel copy() {
return new ReluctantRoleModel(this);
}
}
class ReluctantRoleModelEffect extends OneShotEffect {
ReluctantRoleModelEffect() {
super(Outcome.Benefit);
staticText = "if it had counters on it, put those counters on up to one target creature";
}
private ReluctantRoleModelEffect(final ReluctantRoleModelEffect effect) {
super(effect);
}
@Override
public ReluctantRoleModelEffect copy() {
return new ReluctantRoleModelEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = (Permanent) getValue("creatureDied");
Permanent creature = game.getPermanent(getTargetPointer().getFirst(game, source));
if (permanent == null || creature == null) {
return false;
}
for (Counter counter : permanent.getCounters(game).values()) {
creature.addCounters(counter.copy(), source, game);
}
return true;
}
}

View file

@ -278,6 +278,9 @@ public final class DuskmournHouseOfHorror extends ExpansionSet {
cards.add(new SetCardInfo("Razorkin Needlehead", 153, Rarity.RARE, mage.cards.r.RazorkinNeedlehead.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Razorkin Needlehead", 347, Rarity.RARE, mage.cards.r.RazorkinNeedlehead.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Razortrap Gorge", 267, Rarity.COMMON, mage.cards.r.RazortrapGorge.class));
cards.add(new SetCardInfo("Reluctant Role Model", 26, Rarity.RARE, mage.cards.r.ReluctantRoleModel.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Reluctant Role Model", 289, Rarity.RARE, mage.cards.r.ReluctantRoleModel.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Reluctant Role Model", 303, Rarity.RARE, mage.cards.r.ReluctantRoleModel.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Resurrected Cultist", 115, Rarity.COMMON, mage.cards.r.ResurrectedCultist.class));
cards.add(new SetCardInfo("Rip, Spawn Hunter", 228, Rarity.RARE, mage.cards.r.RipSpawnHunter.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Rip, Spawn Hunter", 362, Rarity.RARE, mage.cards.r.RipSpawnHunter.class, NON_FULL_USE_VARIOUS));