mirror of
https://github.com/correl/mage.git
synced 2024-11-24 19:19:56 +00:00
[J22] Implement Auntie Blyte, Bad Influence
This commit is contained in:
parent
f959b87cdc
commit
9ad0195d18
2 changed files with 98 additions and 0 deletions
97
Mage.Sets/src/mage/cards/a/AuntieBlyteBadInfluence.java
Normal file
97
Mage.Sets/src/mage/cards/a/AuntieBlyteBadInfluence.java
Normal file
|
@ -0,0 +1,97 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.RemoveVariableCountersSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.GetXValue;
|
||||
import mage.abilities.dynamicvalue.common.SavedDamageValue;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class AuntieBlyteBadInfluence extends CardImpl {
|
||||
|
||||
public AuntieBlyteBadInfluence(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.DEVIL);
|
||||
this.subtype.add(SubType.ADVISOR);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Whenever a source you control deals damage to you, put that many +1/+1 counters on Auntie Blyte, Bad Influence.
|
||||
this.addAbility(new AuntieBlyteBadInfluenceTriggeredAbility());
|
||||
|
||||
// {1}{R}, {T}, Remove X +1/+1 counters from Auntie Blyte: It deals X damage to any target.
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new DamageTargetEffect(GetXValue.instance, "it"), new ManaCostsImpl<>("{1}{R}")
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new RemoveVariableCountersSourceCost(CounterType.P1P1.createInstance()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private AuntieBlyteBadInfluence(final AuntieBlyteBadInfluence card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AuntieBlyteBadInfluence copy() {
|
||||
return new AuntieBlyteBadInfluence(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AuntieBlyteBadInfluenceTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
AuntieBlyteBadInfluenceTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new AddCountersSourceEffect(
|
||||
CounterType.P1P1.createInstance(0), SavedDamageValue.MANY, false
|
||||
));
|
||||
setTriggerPhrase("Whenever a source you control deals damage to you, ");
|
||||
}
|
||||
|
||||
private AuntieBlyteBadInfluenceTriggeredAbility(final AuntieBlyteBadInfluenceTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AuntieBlyteBadInfluenceTriggeredAbility copy() {
|
||||
return new AuntieBlyteBadInfluenceTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.DAMAGED_PLAYER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (isControlledBy(event.getTargetId()) && isControlledBy(game.getControllerId(event.getSourceId()))) {
|
||||
this.getEffects().setValue("damage", event.getAmount());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -62,6 +62,7 @@ public final class Jumpstart2022 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Assembly-Worker", 755, Rarity.COMMON, mage.cards.a.AssemblyWorker.class));
|
||||
cards.add(new SetCardInfo("Attended Healer", 152, Rarity.UNCOMMON, mage.cards.a.AttendedHealer.class));
|
||||
cards.add(new SetCardInfo("Augury Owl", 273, Rarity.COMMON, mage.cards.a.AuguryOwl.class));
|
||||
cards.add(new SetCardInfo("Auntie Blyte, Bad Influence", 30, Rarity.MYTHIC, mage.cards.a.AuntieBlyteBadInfluence.class));
|
||||
cards.add(new SetCardInfo("Auramancer", 153, Rarity.COMMON, mage.cards.a.Auramancer.class));
|
||||
cards.add(new SetCardInfo("Avalanche Caller", 274, Rarity.UNCOMMON, mage.cards.a.AvalancheCaller.class));
|
||||
cards.add(new SetCardInfo("Avenger of Zendikar", 629, Rarity.MYTHIC, mage.cards.a.AvengerOfZendikar.class));
|
||||
|
|
Loading…
Reference in a new issue