mirror of
https://github.com/correl/mage.git
synced 2025-01-12 11:08:01 +00:00
[CMR] Implementeed Captain Vargus Wrath
This commit is contained in:
parent
3585853968
commit
7589d7d5aa
3 changed files with 91 additions and 1 deletions
89
Mage.Sets/src/mage/cards/c/CaptainVargusWrath.java
Normal file
89
Mage.Sets/src/mage/cards/c/CaptainVargusWrath.java
Normal file
|
@ -0,0 +1,89 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.watchers.common.CommanderPlaysCountWatcher;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class CaptainVargusWrath extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.PIRATE, "");
|
||||
|
||||
public CaptainVargusWrath(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}{R}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.ORC);
|
||||
this.subtype.add(SubType.PIRATE);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Whenever Captain Vargus Wrath attacks, Pirates you control get +1/+1 until end of turn for each time you've cast a commander from the command zone this game.
|
||||
this.addAbility(new AttacksTriggeredAbility(new BoostControlledEffect(
|
||||
CaptainVargusWrathValue.instance, CaptainVargusWrathValue.instance,
|
||||
Duration.EndOfTurn, filter, false, true
|
||||
), false, "Whenever {this} attacks, Pirates you control get +1/+1 until end of turn " +
|
||||
"for each time you've cast a commander from the command zone this game."
|
||||
));
|
||||
}
|
||||
|
||||
private CaptainVargusWrath(final CaptainVargusWrath card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CaptainVargusWrath copy() {
|
||||
return new CaptainVargusWrath(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum CaptainVargusWrathValue implements DynamicValue {
|
||||
instance;
|
||||
private static final Hint hint = new ValueHint(
|
||||
"Number of times you've cast a commander this game", instance
|
||||
);
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
Player player = game.getPlayer(sourceAbility.getControllerId());
|
||||
if (player == null) {
|
||||
return 0;
|
||||
}
|
||||
CommanderPlaysCountWatcher watcher = game.getState().getWatcher(CommanderPlaysCountWatcher.class);
|
||||
return watcher == null ? 0 : game
|
||||
.getCommandersIds(player, CommanderCardType.COMMANDER_OR_OATHBREAKER)
|
||||
.stream()
|
||||
.mapToInt(watcher::getPlaysCount)
|
||||
.sum();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CaptainVargusWrathValue copy() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "";
|
||||
}
|
||||
|
||||
public static Hint getHint() {
|
||||
return hint;
|
||||
}
|
||||
}
|
|
@ -77,7 +77,7 @@ public final class JeskaThriceReborn extends CardImpl {
|
|||
enum JeskaThriceRebornValue implements DynamicValue {
|
||||
instance;
|
||||
private static final Hint hint = new ValueHint(
|
||||
"Number of times you've cast a commander this turn", instance
|
||||
"Number of times you've cast a commander this game", instance
|
||||
);
|
||||
|
||||
@Override
|
||||
|
|
|
@ -90,6 +90,7 @@ public final class CommanderLegends extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Burning Anger", 166, Rarity.UNCOMMON, mage.cards.b.BurningAnger.class));
|
||||
cards.add(new SetCardInfo("Burnished Hart", 302, Rarity.UNCOMMON, mage.cards.b.BurnishedHart.class));
|
||||
cards.add(new SetCardInfo("Cage of Hands", 14, Rarity.COMMON, mage.cards.c.CageOfHands.class));
|
||||
cards.add(new SetCardInfo("Captain Vargus Wrath", 273, Rarity.UNCOMMON, mage.cards.c.CaptainVargusWrath.class));
|
||||
cards.add(new SetCardInfo("Captain's Call", 15, Rarity.COMMON, mage.cards.c.CaptainsCall.class));
|
||||
cards.add(new SetCardInfo("Cast Down", 112, Rarity.UNCOMMON, mage.cards.c.CastDown.class));
|
||||
cards.add(new SetCardInfo("Champion of the Flame", 167, Rarity.COMMON, mage.cards.c.ChampionOfTheFlame.class));
|
||||
|
|
Loading…
Reference in a new issue