mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
[DSC] Implement Spiked Corridor // Torture Pit
This commit is contained in:
parent
bee3614f65
commit
91f61f3f66
2 changed files with 84 additions and 0 deletions
83
Mage.Sets/src/mage/cards/s/SpikedCorridorTorturePit.java
Normal file
83
Mage.Sets/src/mage/cards/s/SpikedCorridorTorturePit.java
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.common.UnlockThisDoorTriggeredAbility;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.RoomCard;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamagePlayerEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.token.DevilToken;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class SpikedCorridorTorturePit extends RoomCard {
|
||||
|
||||
public SpikedCorridorTorturePit(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, "{3}{R}", "{3}{R}");
|
||||
|
||||
// Spiked Corridor
|
||||
// When you unlock this door, create three 1/1 red Devil creature tokens with "When this token dies, it deals 1 damage to any target."
|
||||
this.getLeftHalfCard().addAbility(new UnlockThisDoorTriggeredAbility(
|
||||
new CreateTokenEffect(new DevilToken(), 3), false, true
|
||||
));
|
||||
|
||||
// Torture Pit
|
||||
// If a source you control would deal noncombat damage to an opponent, it deals that much damage plus 2 instead.
|
||||
this.getRightHalfCard().addAbility(new SimpleStaticAbility(new TorturePitEffect()));
|
||||
}
|
||||
|
||||
private SpikedCorridorTorturePit(final SpikedCorridorTorturePit card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SpikedCorridorTorturePit copy() {
|
||||
return new SpikedCorridorTorturePit(this);
|
||||
}
|
||||
}
|
||||
|
||||
class TorturePitEffect extends ReplacementEffectImpl {
|
||||
|
||||
TorturePitEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
staticText = "if a source you control would deal noncombat damage to an opponent, " +
|
||||
"it deals that much damage plus 2 instead";
|
||||
}
|
||||
|
||||
private TorturePitEffect(final TorturePitEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TorturePitEffect copy() {
|
||||
return new TorturePitEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.DAMAGE_PLAYER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
return !((DamagePlayerEvent) event).isCombatDamage()
|
||||
&& source.isControlledBy(game.getControllerId(event.getSourceId()))
|
||||
&& game.getOpponents(source.getControllerId()).contains(event.getTargetId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
event.setAmount(CardUtil.overflowInc(event.getAmount(), 2));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -268,6 +268,7 @@ public final class DuskmournHouseOfHorrorCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Sol Ring", 94, Rarity.UNCOMMON, mage.cards.s.SolRing.class));
|
||||
cards.add(new SetCardInfo("Solemn Simulacrum", 253, Rarity.RARE, mage.cards.s.SolemnSimulacrum.class));
|
||||
cards.add(new SetCardInfo("Sphere of Safety", 104, Rarity.UNCOMMON, mage.cards.s.SphereOfSafety.class));
|
||||
cards.add(new SetCardInfo("Spiked Corridor // Torture Pit", 28, Rarity.RARE, mage.cards.s.SpikedCorridorTorturePit.class));
|
||||
cards.add(new SetCardInfo("Spinerock Knoll", 300, Rarity.RARE, mage.cards.s.SpinerockKnoll.class));
|
||||
cards.add(new SetCardInfo("Spirit-Sister's Call", 232, Rarity.MYTHIC, mage.cards.s.SpiritSistersCall.class));
|
||||
cards.add(new SetCardInfo("Spiteful Visions", 233, Rarity.RARE, mage.cards.s.SpitefulVisions.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue