From 71a016ed998880a75f05dcbd3abb1daba3d51cba Mon Sep 17 00:00:00 2001 From: Cameron Merkel <44722506+Cguy7777@users.noreply.github.com> Date: Sat, 16 Mar 2024 17:28:54 -0500 Subject: [PATCH] [PIP] Implement Nerd Rage (#11950) --- Mage.Sets/src/mage/cards/n/NerdRage.java | 72 ++++++++++++++++++++++++ Mage.Sets/src/mage/sets/Fallout.java | 2 + 2 files changed, 74 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/n/NerdRage.java diff --git a/Mage.Sets/src/mage/cards/n/NerdRage.java b/Mage.Sets/src/mage/cards/n/NerdRage.java new file mode 100644 index 00000000000..e1a8568bd12 --- /dev/null +++ b/Mage.Sets/src/mage/cards/n/NerdRage.java @@ -0,0 +1,72 @@ +package mage.cards.n; + +import java.util.UUID; + +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.CardsInHandCondition; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect; +import mage.constants.*; +import mage.target.common.TargetCreaturePermanent; +import mage.abilities.effects.common.AttachEffect; +import mage.target.TargetPermanent; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; + +/** + * @author Cguy7777 + */ +public final class NerdRage extends CardImpl { + + public NerdRage(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + this.addAbility(new EnchantAbility(auraTarget)); + + // When Nerd Rage enters the battlefield, draw two cards. + this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(2))); + + // Enchanted creature has "You have no maximum hand size" and "Whenever this creature attacks, + // if you have ten or more cards in hand, it gets +10/+10 until end of turn." + SimpleStaticAbility noMaxHandSizeAbility = new SimpleStaticAbility(new MaximumHandSizeControllerEffect( + Integer.MAX_VALUE, + Duration.WhileOnBattlefield, + MaximumHandSizeControllerEffect.HandSizeModification.SET)); + ConditionalInterveningIfTriggeredAbility attacksBoostAbility = new ConditionalInterveningIfTriggeredAbility( + new AttacksTriggeredAbility(new BoostSourceEffect(10, 10, Duration.EndOfTurn)), + new CardsInHandCondition(ComparisonType.MORE_THAN, 9), + "Whenever {this} attacks, if you have ten or more cards in hand, it gets +10/+10 until end of turn."); + + Effect gainNoMaxHandSizeEffect = new GainAbilityAttachedEffect(noMaxHandSizeAbility, AttachmentType.AURA) + .setText("Enchanted creature has \"You have no maximum hand size\""); + Effect gainAttacksBoostEffect = new GainAbilityAttachedEffect(attacksBoostAbility, AttachmentType.AURA) + .setText("\"Whenever this creature attacks, if you have ten or more cards in hand, it gets +10/+10 until end of turn.\""); + + Ability ability = new SimpleStaticAbility(gainNoMaxHandSizeEffect); + ability.addEffect(gainAttacksBoostEffect.concatBy("and")); + this.addAbility(ability); + } + + private NerdRage(final NerdRage card) { + super(card); + } + + @Override + public NerdRage copy() { + return new NerdRage(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Fallout.java b/Mage.Sets/src/mage/sets/Fallout.java index 467bcadba18..858cbfbcdcc 100644 --- a/Mage.Sets/src/mage/sets/Fallout.java +++ b/Mage.Sets/src/mage/sets/Fallout.java @@ -157,6 +157,8 @@ public final class Fallout extends ExpansionSet { cards.add(new SetCardInfo("Myriad Landscape", 274, Rarity.UNCOMMON, mage.cards.m.MyriadLandscape.class)); cards.add(new SetCardInfo("Mystic Forge", 236, Rarity.RARE, mage.cards.m.MysticForge.class)); cards.add(new SetCardInfo("Mystic Monastery", 275, Rarity.UNCOMMON, mage.cards.m.MysticMonastery.class)); + cards.add(new SetCardInfo("Nerd Rage", 34, Rarity.UNCOMMON, mage.cards.n.NerdRage.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Nerd Rage", 562, Rarity.UNCOMMON, mage.cards.n.NerdRage.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Nesting Grounds", 276, Rarity.RARE, mage.cards.n.NestingGrounds.class)); cards.add(new SetCardInfo("Nomad Outpost", 277, Rarity.UNCOMMON, mage.cards.n.NomadOutpost.class)); cards.add(new SetCardInfo("Nuka-Cola Vending Machine", 137, Rarity.UNCOMMON, mage.cards.n.NukaColaVendingMachine.class));