forked from External/mage
Implemented Drakuseth, Maw of Flames
This commit is contained in:
parent
86bc4715df
commit
719c750bfe
2 changed files with 94 additions and 0 deletions
93
Mage.Sets/src/mage/cards/d/DrakusethMawOfFlames.java
Normal file
93
Mage.Sets/src/mage/cards/d/DrakusethMawOfFlames.java
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
package mage.cards.d;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetAnyTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class DrakusethMawOfFlames extends CardImpl {
|
||||
|
||||
public DrakusethMawOfFlames(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}{R}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.DRAGON);
|
||||
this.power = new MageInt(7);
|
||||
this.toughness = new MageInt(7);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Whenever Drakuseth, Maw of Flames attacks, it deals 4 damage to any target and 3 damage to each of up to two other targets.
|
||||
Ability ability = new AttacksTriggeredAbility(new DrakusethMawOfFlamesEffect(), false);
|
||||
ability.addTarget(new TargetAnyTarget().withChooseHint("to deal 4 damage"));
|
||||
ability.addTarget(new TargetAnyTarget(0, 2).withChooseHint("to deal 3 damage"));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private DrakusethMawOfFlames(final DrakusethMawOfFlames card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DrakusethMawOfFlames copy() {
|
||||
return new DrakusethMawOfFlames(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DrakusethMawOfFlamesEffect extends OneShotEffect {
|
||||
|
||||
DrakusethMawOfFlamesEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "it deals 4 damage to any target and 3 damage to each of up to two other targets.";
|
||||
}
|
||||
|
||||
private DrakusethMawOfFlamesEffect(final DrakusethMawOfFlamesEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DrakusethMawOfFlamesEffect copy() {
|
||||
return new DrakusethMawOfFlamesEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
damage(4, source.getTargets().get(0).getFirstTarget(), game, source);
|
||||
source.getTargets()
|
||||
.get(1)
|
||||
.getTargets()
|
||||
.stream()
|
||||
.forEach(targetId -> damage(3, targetId, game, source));
|
||||
return true;
|
||||
}
|
||||
|
||||
private static void damage(int damage, UUID targetId, Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(targetId);
|
||||
if (permanent != null) {
|
||||
permanent.damage(damage, source.getSourceId(), game);
|
||||
return;
|
||||
}
|
||||
Player player = game.getPlayer(targetId);
|
||||
if (player != null) {
|
||||
player.damage(damage, source.getSourceId(), game);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -114,6 +114,7 @@ public final class CoreSet2020 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Dismal Backwater", 245, Rarity.COMMON, mage.cards.d.DismalBackwater.class));
|
||||
cards.add(new SetCardInfo("Diviner's Lockbox", 225, Rarity.UNCOMMON, mage.cards.d.DivinersLockbox.class));
|
||||
cards.add(new SetCardInfo("Dragon Mage", 135, Rarity.UNCOMMON, mage.cards.d.DragonMage.class));
|
||||
cards.add(new SetCardInfo("Drakuseth, Maw of Flames", 136, Rarity.RARE, mage.cards.d.DrakusethMawOfFlames.class));
|
||||
cards.add(new SetCardInfo("Drawn from Dreams", 56, Rarity.RARE, mage.cards.d.DrawnFromDreams.class));
|
||||
cards.add(new SetCardInfo("Dread Presence", 96, Rarity.RARE, mage.cards.d.DreadPresence.class));
|
||||
cards.add(new SetCardInfo("Dungeon Geists", 57, Rarity.RARE, mage.cards.d.DungeonGeists.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue