mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
[AFR] Implemented Werewolf Pack Leader
This commit is contained in:
parent
a76d6e8c24
commit
357c263cb6
2 changed files with 94 additions and 0 deletions
93
Mage.Sets/src/mage/cards/w/WerewolfPackLeader.java
Normal file
93
Mage.Sets/src/mage/cards/w/WerewolfPackLeader.java
Normal file
|
@ -0,0 +1,93 @@
|
|||
package mage.cards.w;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.keyword.PackTacticsAbility;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class WerewolfPackLeader extends CardImpl {
|
||||
|
||||
public WerewolfPackLeader(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}{G}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.WEREWOLF);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Pack tactics — Whenever Werewolf Pack Leader attacks, if you attacked with creatures with total power 6 or greater this combat, draw a card.
|
||||
this.addAbility(new PackTacticsAbility(new DrawCardSourceControllerEffect(1)));
|
||||
|
||||
// {3}{G}: Until end of turn, Werewolf Pack Leader has base power and toughness 5/3, gains trample, and isn't a Human.
|
||||
this.addAbility(new SimpleActivatedAbility(new WerewolfPackLeaderEffect(), new ManaCostsImpl<>("{3}{G}")));
|
||||
}
|
||||
|
||||
private WerewolfPackLeader(final WerewolfPackLeader card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WerewolfPackLeader copy() {
|
||||
return new WerewolfPackLeader(this);
|
||||
}
|
||||
}
|
||||
|
||||
class WerewolfPackLeaderEffect extends ContinuousEffectImpl {
|
||||
|
||||
WerewolfPackLeaderEffect() {
|
||||
super(Duration.EndOfTurn, Outcome.Benefit);
|
||||
staticText = "until end of turn, {this} has base power and toughness 5/3, gains trample, and isn't a Human";
|
||||
}
|
||||
|
||||
private WerewolfPackLeaderEffect(final WerewolfPackLeaderEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WerewolfPackLeaderEffect copy() {
|
||||
return new WerewolfPackLeaderEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
|
||||
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
|
||||
if (permanent == null) {
|
||||
discard();
|
||||
return false;
|
||||
}
|
||||
switch (layer) {
|
||||
case TypeChangingEffects_4:
|
||||
permanent.removeSubType(game, SubType.HUMAN);
|
||||
return true;
|
||||
case AbilityAddingRemovingEffects_6:
|
||||
permanent.addAbility(TrampleAbility.getInstance(), source.getSourceId(), game);
|
||||
return true;
|
||||
case PTChangingEffects_7:
|
||||
if (sublayer == SubLayer.ModifyPT_7c) {
|
||||
permanent.getPower().setValue(5);
|
||||
permanent.getToughness().setValue(3);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -74,6 +74,7 @@ public final class AdventuresInTheForgottenRealms extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Tiamat", 235, Rarity.MYTHIC, mage.cards.t.Tiamat.class));
|
||||
cards.add(new SetCardInfo("Trelasarra Moon Dancer", 236, Rarity.UNCOMMON, mage.cards.t.TrelasarraMoonDancer.class));
|
||||
cards.add(new SetCardInfo("Vorpal Sword", 124, Rarity.RARE, mage.cards.v.VorpalSword.class));
|
||||
cards.add(new SetCardInfo("Werewolf Pack Leader", 211, Rarity.RARE, mage.cards.w.WerewolfPackLeader.class));
|
||||
cards.add(new SetCardInfo("You Come to a River", 83, Rarity.COMMON, mage.cards.y.YouComeToARiver.class));
|
||||
cards.add(new SetCardInfo("You Find the Villains' Lair", 84, Rarity.COMMON, mage.cards.y.YouFindTheVillainsLair.class));
|
||||
cards.add(new SetCardInfo("You Hear Something on Watch", 42, Rarity.COMMON, mage.cards.y.YouHearSomethingOnWatch.class));
|
||||
|
|
Loading…
Reference in a new issue