forked from External/mage
[WOE] Implement Rowdy Research ; Implement Witchstalker Frenzy (#10985)
* add new DynamicValue * [WOE] Implement Rowdy Research * [WOE] Implement Witchstalker Frenzy
This commit is contained in:
parent
8de38bcde2
commit
5998f43f4d
4 changed files with 126 additions and 0 deletions
41
Mage.Sets/src/mage/cards/r/RowdyResearch.java
Normal file
41
Mage.Sets/src/mage/cards/r/RowdyResearch.java
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
package mage.cards.r;
|
||||
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.CreaturesThatAttackedThisTurnCount;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Susucr
|
||||
*/
|
||||
public final class RowdyResearch extends CardImpl {
|
||||
|
||||
public RowdyResearch(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{6}{U}");
|
||||
|
||||
// This spell costs {1} less to cast for each creature that attacked this turn.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.ALL, new SpellCostReductionSourceEffect(CreaturesThatAttackedThisTurnCount.instance)
|
||||
.setText("this spell costs {1} less to cast for each creature that attacked this turn")
|
||||
).addHint(CreaturesThatAttackedThisTurnCount.instance.getHint()).setRuleAtTheTop(true));
|
||||
|
||||
// Draw three cards.
|
||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(3));
|
||||
}
|
||||
|
||||
private RowdyResearch(final RowdyResearch card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RowdyResearch copy() {
|
||||
return new RowdyResearch(this);
|
||||
}
|
||||
}
|
||||
43
Mage.Sets/src/mage/cards/w/WitchstalkerFrenzy.java
Normal file
43
Mage.Sets/src/mage/cards/w/WitchstalkerFrenzy.java
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
package mage.cards.w;
|
||||
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.CreaturesThatAttackedThisTurnCount;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Susucr
|
||||
*/
|
||||
public final class WitchstalkerFrenzy extends CardImpl {
|
||||
|
||||
public WitchstalkerFrenzy(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{R}");
|
||||
|
||||
// This spell costs {1} less to cast for each creature that attacked this turn.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.ALL, new SpellCostReductionSourceEffect(CreaturesThatAttackedThisTurnCount.instance)
|
||||
.setText("this spell costs {1} less to cast for each creature that attacked this turn")
|
||||
).addHint(CreaturesThatAttackedThisTurnCount.instance.getHint()).setRuleAtTheTop(true));
|
||||
|
||||
// Witchstalker Frenzy deals 5 damage to target creature.
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(5));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
}
|
||||
|
||||
private WitchstalkerFrenzy(final WitchstalkerFrenzy card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WitchstalkerFrenzy copy() {
|
||||
return new WitchstalkerFrenzy(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -147,6 +147,7 @@ public final class WildsOfEldraine extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Rotisserie Elemental", 148, Rarity.RARE, mage.cards.r.RotisserieElemental.class));
|
||||
cards.add(new SetCardInfo("Rowan's Grim Search", 104, Rarity.COMMON, mage.cards.r.RowansGrimSearch.class));
|
||||
cards.add(new SetCardInfo("Rowan, Scion of War", 211, Rarity.MYTHIC, mage.cards.r.RowanScionOfWar.class));
|
||||
cards.add(new SetCardInfo("Rowdy Research", 312, Rarity.UNCOMMON, mage.cards.r.RowdyResearch.class));
|
||||
cards.add(new SetCardInfo("Royal Treatment", 183, Rarity.UNCOMMON, mage.cards.r.RoyalTreatment.class));
|
||||
cards.add(new SetCardInfo("Ruby, Daring Tracker", 212, Rarity.UNCOMMON, mage.cards.r.RubyDaringTracker.class));
|
||||
cards.add(new SetCardInfo("Scalding Viper", 235, Rarity.RARE, mage.cards.s.ScaldingViper.class));
|
||||
|
|
@ -208,6 +209,7 @@ public final class WildsOfEldraine extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Welcome to Sweettooth", 198, Rarity.UNCOMMON, mage.cards.w.WelcomeToSweettooth.class));
|
||||
cards.add(new SetCardInfo("Werefox Bodyguard", 39, Rarity.RARE, mage.cards.w.WerefoxBodyguard.class));
|
||||
cards.add(new SetCardInfo("Will, Scion of Peace", 218, Rarity.MYTHIC, mage.cards.w.WillScionOfPeace.class));
|
||||
cards.add(new SetCardInfo("Witchstalker Frenzy", 159, Rarity.UNCOMMON, mage.cards.w.WitchstalkerFrenzy.class));
|
||||
cards.add(new SetCardInfo("Woodland Acolyte", 241, Rarity.UNCOMMON, mage.cards.w.WoodlandAcolyte.class));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
package mage.abilities.dynamicvalue.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.game.Game;
|
||||
import mage.watchers.common.AttackedThisTurnWatcher;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public enum CreaturesThatAttackedThisTurnCount implements DynamicValue {
|
||||
instance;
|
||||
|
||||
private static final Hint hint = new ValueHint("Creatures that attacked this turn", instance);
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
AttackedThisTurnWatcher watcher = game.getState()
|
||||
.getWatcher(AttackedThisTurnWatcher.class);
|
||||
|
||||
return watcher == null ? 0 : watcher.getAttackedThisTurnCreatures().size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public DynamicValue copy() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "creatures that attacked this turn";
|
||||
}
|
||||
|
||||
public static Hint getHint() {
|
||||
return hint;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue