From 55a3b03c5e304845047f84ec2078a085df81f02d Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 27 May 2021 08:47:40 -0400 Subject: [PATCH] [MH2] Implemented Dragon's Rage Channeler --- .../mage/cards/d/DragonsRageChanneler.java | 69 +++++++++++++++++++ Mage.Sets/src/mage/cards/k/Kookus.java | 2 +- Mage.Sets/src/mage/sets/ModernHorizons2.java | 1 + .../combat/AttacksIfAbleSourceEffect.java | 2 +- 4 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/d/DragonsRageChanneler.java diff --git a/Mage.Sets/src/mage/cards/d/DragonsRageChanneler.java b/Mage.Sets/src/mage/cards/d/DragonsRageChanneler.java new file mode 100644 index 0000000000..e506d0f759 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DragonsRageChanneler.java @@ -0,0 +1,69 @@ +package mage.cards.d; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.condition.common.DeliriumCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.decorator.ConditionalRequirementEffect; +import mage.abilities.effects.common.combat.AttacksIfAbleSourceEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.effects.keyword.SurveilEffect; +import mage.abilities.hint.common.CardTypesInGraveyardHint; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.StaticFilters; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class DragonsRageChanneler extends CardImpl { + + public DragonsRageChanneler(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Whenever you cast a noncreature spell, surveil 1. + this.addAbility(new SpellCastControllerTriggeredAbility( + new SurveilEffect(1), StaticFilters.FILTER_SPELL_A_NON_CREATURE, false + )); + + // Delirium — As long as there are four or more card types among cards in your graveyard, Dragon's Rage Channeler gets +2/+2, has flying, and attacks each combat if able. + Ability ability = new SimpleStaticAbility(new ConditionalContinuousEffect( + new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield), + DeliriumCondition.instance, "as long as there are four or more " + + "card types among cards in your graveyard, {this} gets +2/+2" + )); + ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect( + FlyingAbility.getInstance(), Duration.WhileOnBattlefield + ), DeliriumCondition.instance, ", has flying")); + ability.addEffect(new ConditionalRequirementEffect( + new AttacksIfAbleSourceEffect(Duration.WhileOnBattlefield), + DeliriumCondition.instance, ", and attacks each combat if able" + )); + ability.setAbilityWord(AbilityWord.DELIRIUM); + this.addAbility(ability.addHint(CardTypesInGraveyardHint.YOU)); + } + + private DragonsRageChanneler(final DragonsRageChanneler card) { + super(card); + } + + @Override + public DragonsRageChanneler copy() { + return new DragonsRageChanneler(this); + } +} diff --git a/Mage.Sets/src/mage/cards/k/Kookus.java b/Mage.Sets/src/mage/cards/k/Kookus.java index ebb693b238..a3b4ada2e5 100644 --- a/Mage.Sets/src/mage/cards/k/Kookus.java +++ b/Mage.Sets/src/mage/cards/k/Kookus.java @@ -49,7 +49,7 @@ public final class Kookus extends CardImpl { // At the beginning of your upkeep, if you don't control a creature named Keeper of Kookus, Kookus deals 3 damage to you and attacks this turn if able. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new DamageControllerEffect(3), TargetController.YOU, false); - ability.addEffect(new AttacksIfAbleSourceEffect(Duration.EndOfTurn)); + ability.addEffect(new AttacksIfAbleSourceEffect(Duration.EndOfTurn, false)); this.addAbility(new ConditionalInterveningIfTriggeredAbility( ability, new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)), diff --git a/Mage.Sets/src/mage/sets/ModernHorizons2.java b/Mage.Sets/src/mage/sets/ModernHorizons2.java index 515a436b67..a8ab783e3c 100644 --- a/Mage.Sets/src/mage/sets/ModernHorizons2.java +++ b/Mage.Sets/src/mage/sets/ModernHorizons2.java @@ -44,6 +44,7 @@ public final class ModernHorizons2 extends ExpansionSet { cards.add(new SetCardInfo("Dakkon, Shadow Slayer", 192, Rarity.MYTHIC, mage.cards.d.DakkonShadowSlayer.class)); cards.add(new SetCardInfo("Darkmoss Bridge", 245, Rarity.COMMON, mage.cards.d.DarkmossBridge.class)); cards.add(new SetCardInfo("Diamond Lion", 225, Rarity.RARE, mage.cards.d.DiamondLion.class)); + cards.add(new SetCardInfo("Dragon's Rage Channeler", 232, Rarity.UNCOMMON, mage.cards.d.DragonsRageChanneler.class)); cards.add(new SetCardInfo("Drey Keeper", 194, Rarity.COMMON, mage.cards.d.DreyKeeper.class)); cards.add(new SetCardInfo("Drossforge Bridge", 246, Rarity.COMMON, mage.cards.d.DrossforgeBridge.class)); cards.add(new SetCardInfo("Extruder", 296, Rarity.UNCOMMON, mage.cards.e.Extruder.class)); diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/AttacksIfAbleSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/AttacksIfAbleSourceEffect.java index bf62c5c642..3ba95e8c66 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/combat/AttacksIfAbleSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/combat/AttacksIfAbleSourceEffect.java @@ -18,7 +18,7 @@ public class AttacksIfAbleSourceEffect extends RequirementEffect { boolean eachCombat; public AttacksIfAbleSourceEffect(Duration duration) { - this(duration, false); + this(duration, true); } public AttacksIfAbleSourceEffect(Duration duration, boolean eachCombat) {