mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
[DSK] Implement The Rollercrusher Ride (#13084)
* [DSK] Implement The Rollercrusher Ride * Use overflowMultiply()
This commit is contained in:
parent
1efa094564
commit
0a25dbe6e8
2 changed files with 96 additions and 0 deletions
93
Mage.Sets/src/mage/cards/t/TheRollercrusherRide.java
Normal file
93
Mage.Sets/src/mage/cards/t/TheRollercrusherRide.java
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.DeliriumCondition;
|
||||
import mage.abilities.dynamicvalue.common.GetXValue;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.hint.common.CardTypesInGraveyardHint;
|
||||
import mage.constants.*;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamageEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.targetadjustment.TargetsCountAdjuster;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
* @author Cguy7777
|
||||
*/
|
||||
public final class TheRollercrusherRide extends CardImpl {
|
||||
|
||||
public TheRollercrusherRide(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{X}{2}{R}");
|
||||
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
|
||||
// Delirium -- If a source you control would deal noncombat damage to a permanent or player while there are four or more card types among cards in your graveyard,
|
||||
// it deals double that damage instead.
|
||||
this.addAbility(new SimpleStaticAbility(new TheRollercrusherRideEffect())
|
||||
.setAbilityWord(AbilityWord.DELIRIUM)
|
||||
.addHint(CardTypesInGraveyardHint.YOU));
|
||||
|
||||
// When The Rollercrusher Ride enters, it deals X damage to each of up to X target creatures.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(GetXValue.instance)
|
||||
.setText("it deals X damage to each of up to X target creatures"));
|
||||
ability.addTarget(new TargetCreaturePermanent(0, 0));
|
||||
ability.setTargetAdjuster(new TargetsCountAdjuster(GetXValue.instance));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private TheRollercrusherRide(final TheRollercrusherRide card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TheRollercrusherRide copy() {
|
||||
return new TheRollercrusherRide(this);
|
||||
}
|
||||
}
|
||||
|
||||
class TheRollercrusherRideEffect extends ReplacementEffectImpl {
|
||||
|
||||
TheRollercrusherRideEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
staticText = "if a source you control would deal noncombat damage to a permanent or player " +
|
||||
"while there are four or more card types among cards in your graveyard, " +
|
||||
"it deals double that damage instead";
|
||||
}
|
||||
|
||||
private TheRollercrusherRideEffect(final TheRollercrusherRideEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.DAMAGE_PERMANENT
|
||||
|| event.getType() == GameEvent.EventType.DAMAGE_PLAYER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
return source.isControlledBy(game.getControllerId(event.getSourceId()))
|
||||
&& !((DamageEvent) event).isCombatDamage()
|
||||
&& DeliriumCondition.instance.apply(game, source);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
event.setAmount(CardUtil.overflowMultiply(event.getAmount(), 2));
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TheRollercrusherRideEffect copy() {
|
||||
return new TheRollercrusherRideEffect(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -216,6 +216,9 @@ public final class DuskmournHouseOfHorror extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Terramorphic Expanse", 269, Rarity.COMMON, mage.cards.t.TerramorphicExpanse.class));
|
||||
cards.add(new SetCardInfo("The Jolly Balloon Man", 219, Rarity.RARE, mage.cards.t.TheJollyBalloonMan.class));
|
||||
cards.add(new SetCardInfo("The Mindskinner", 66, Rarity.RARE, mage.cards.t.TheMindskinner.class));
|
||||
cards.add(new SetCardInfo("The Rollercrusher Ride", 155, Rarity.MYTHIC, mage.cards.t.TheRollercrusherRide.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("The Rollercrusher Ride", 298, Rarity.MYTHIC, mage.cards.t.TheRollercrusherRide.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("The Rollercrusher Ride", 317, Rarity.MYTHIC, mage.cards.t.TheRollercrusherRide.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("The Swarmweaver", 236, Rarity.RARE, mage.cards.t.TheSwarmweaver.class));
|
||||
cards.add(new SetCardInfo("The Wandering Rescuer", 41, Rarity.MYTHIC, mage.cards.t.TheWanderingRescuer.class));
|
||||
cards.add(new SetCardInfo("Thornspire Verge", 270, Rarity.RARE, mage.cards.t.ThornspireVerge.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue