mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
[CLB] Implemented Vicious Battlerager
This commit is contained in:
parent
72f957583c
commit
01eb0cdfae
2 changed files with 76 additions and 0 deletions
75
Mage.Sets/src/mage/cards/v/ViciousBattlerager.java
Normal file
75
Mage.Sets/src/mage/cards/v/ViciousBattlerager.java
Normal file
|
@ -0,0 +1,75 @@
|
|||
package mage.cards.v;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BecomesBlockedByCreatureTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.TakeTheInitiativeEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ViciousBattlerager extends CardImpl {
|
||||
|
||||
public ViciousBattlerager(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
|
||||
|
||||
this.subtype.add(SubType.DWARF);
|
||||
this.subtype.add(SubType.BARBARIAN);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// When Vicious Battlerager enters the battlefield, you take the initiative.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new TakeTheInitiativeEffect()));
|
||||
|
||||
// Spiked Retribution — Whenever Vicious Battlerager becomes blocked by a creature, that creature's controller loses 5 life.
|
||||
this.addAbility(new BecomesBlockedByCreatureTriggeredAbility(
|
||||
new ViciousBattleragerEffect(), false
|
||||
).withFlavorWord("Spiked Retribution"));
|
||||
}
|
||||
|
||||
private ViciousBattlerager(final ViciousBattlerager card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ViciousBattlerager copy() {
|
||||
return new ViciousBattlerager(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ViciousBattleragerEffect extends OneShotEffect {
|
||||
|
||||
ViciousBattleragerEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "that creature's controller loses 5 life";
|
||||
}
|
||||
|
||||
private ViciousBattleragerEffect(final ViciousBattleragerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ViciousBattleragerEffect copy() {
|
||||
return new ViciousBattleragerEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return Optional.of(game.getPlayer(game.getControllerId(getTargetPointer().getFirst(game, source))))
|
||||
.filter(Objects::nonNull)
|
||||
.map(player -> player.loseLife(5, game, source, false) > 0)
|
||||
.orElse(false);
|
||||
}
|
||||
}
|
|
@ -276,6 +276,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Undermountain Adventurer", 260, Rarity.RARE, mage.cards.u.UndermountainAdventurer.class));
|
||||
cards.add(new SetCardInfo("Universal Solvent", 342, Rarity.COMMON, mage.cards.u.UniversalSolvent.class));
|
||||
cards.add(new SetCardInfo("Veteran Soldier", 48, Rarity.UNCOMMON, mage.cards.v.VeteranSoldier.class));
|
||||
cards.add(new SetCardInfo("Vicious Battlerager", 155, Rarity.COMMON, mage.cards.v.ViciousBattlerager.class));
|
||||
cards.add(new SetCardInfo("Viconia, Drow Apostate", 156, Rarity.UNCOMMON, mage.cards.v.ViconiaDrowApostate.class));
|
||||
cards.add(new SetCardInfo("Vrock", 157, Rarity.UNCOMMON, mage.cards.v.Vrock.class));
|
||||
cards.add(new SetCardInfo("Wand of Wonder", 204, Rarity.RARE, mage.cards.w.WandOfWonder.class));
|
||||
|
|
Loading…
Reference in a new issue