mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
[MOM] Implement City on Fire
This commit is contained in:
parent
de81ee156b
commit
b363cbe6a0
2 changed files with 77 additions and 0 deletions
76
Mage.Sets/src/mage/cards/c/CityOnFire.java
Normal file
76
Mage.Sets/src/mage/cards/c/CityOnFire.java
Normal file
|
@ -0,0 +1,76 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.keyword.ConvokeAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class CityOnFire extends CardImpl {
|
||||
|
||||
public CityOnFire(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{5}{R}{R}{R}");
|
||||
|
||||
// Convoke
|
||||
this.addAbility(new ConvokeAbility());
|
||||
|
||||
// If a source you control would deal damage to a permanent or player, it deals triple that damage instead.
|
||||
this.addAbility(new SimpleStaticAbility(new CityOnFireEffect()));
|
||||
}
|
||||
|
||||
private CityOnFire(final CityOnFire card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CityOnFire copy() {
|
||||
return new CityOnFire(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CityOnFireEffect extends ReplacementEffectImpl {
|
||||
|
||||
CityOnFireEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Damage);
|
||||
staticText = "If a source you control would deal damage " +
|
||||
"to a permanent or player, it deals triple that damage instead";
|
||||
}
|
||||
|
||||
private CityOnFireEffect(final CityOnFireEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CityOnFireEffect copy() {
|
||||
return new CityOnFireEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType().equals(GameEvent.EventType.DAMAGE_PLAYER)
|
||||
|| event.getType().equals(GameEvent.EventType.DAMAGE_PERMANENT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
return game.getControllerId(event.getSourceId()).equals(source.getControllerId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
event.setAmount(CardUtil.overflowMultiply(event.getAmount(), 3));
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -27,6 +27,7 @@ public final class MarchOfTheMachine extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Boon-Bringer Valkyrie", 9, Rarity.RARE, mage.cards.b.BoonBringerValkyrie.class));
|
||||
cards.add(new SetCardInfo("Chandra, Hope's Beacon", 134, Rarity.MYTHIC, mage.cards.c.ChandraHopesBeacon.class));
|
||||
cards.add(new SetCardInfo("Chrome Host Hulk", 188, Rarity.UNCOMMON, mage.cards.c.ChromeHostHulk.class));
|
||||
cards.add(new SetCardInfo("City on Fire", 135, Rarity.RARE, mage.cards.c.CityOnFire.class));
|
||||
cards.add(new SetCardInfo("Cragsmasher Yeti", 333, Rarity.COMMON, mage.cards.c.CragsmasherYeti.class));
|
||||
cards.add(new SetCardInfo("Deadly Derision", 99, Rarity.COMMON, mage.cards.d.DeadlyDerision.class));
|
||||
cards.add(new SetCardInfo("Dismal Backwater", 269, Rarity.COMMON, mage.cards.d.DismalBackwater.class));
|
||||
|
|
Loading…
Reference in a new issue