mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Implemented Lavabrink Venturer
This commit is contained in:
parent
87b316aa65
commit
199fc37c32
2 changed files with 98 additions and 0 deletions
97
Mage.Sets/src/mage/cards/l/LavabrinkVenturer.java
Normal file
97
Mage.Sets/src/mage/cards/l/LavabrinkVenturer.java
Normal file
|
@ -0,0 +1,97 @@
|
|||
package mage.cards.l;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AsEntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.ChooseModeEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.DependencyType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterObject;
|
||||
import mage.filter.predicate.mageobject.ConvertedManaCostParityPredicate;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class LavabrinkVenturer extends CardImpl {
|
||||
|
||||
public LavabrinkVenturer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.SOLDIER);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// As Lavabrink Venturer enters the battlefield, choose odd or even.
|
||||
this.addAbility(new AsEntersBattlefieldAbility(
|
||||
new ChooseModeEffect("Odd or even?", "Odd", "Even")
|
||||
));
|
||||
|
||||
// Lavabrink Venturer has protection from each converted mana cost of the chosen value.
|
||||
this.addAbility(new SimpleStaticAbility(new LavabrinkVenturerEffect()));
|
||||
}
|
||||
|
||||
private LavabrinkVenturer(final LavabrinkVenturer card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LavabrinkVenturer copy() {
|
||||
return new LavabrinkVenturer(this);
|
||||
}
|
||||
}
|
||||
|
||||
class LavabrinkVenturerEffect extends GainAbilitySourceEffect {
|
||||
|
||||
private static final FilterObject oddFilter = new FilterObject("odd converted mana costs");
|
||||
private static final FilterObject evenFilter = new FilterObject("even converted mana costs");
|
||||
|
||||
static {
|
||||
oddFilter.add(ConvertedManaCostParityPredicate.ODD);
|
||||
evenFilter.add(ConvertedManaCostParityPredicate.EVEN);
|
||||
}
|
||||
|
||||
LavabrinkVenturerEffect() {
|
||||
super((Ability) null);
|
||||
this.addDependedToType(DependencyType.AddingAbility);
|
||||
staticText = "{this} has protection from each converted mana cost of the chosen value.";
|
||||
}
|
||||
|
||||
private LavabrinkVenturerEffect(final LavabrinkVenturerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
String choosenMode = (String) game.getState().getValue(source.getSourceId() + "_modeChoice");
|
||||
if (choosenMode == null) {
|
||||
return false;
|
||||
}
|
||||
Ability ability;
|
||||
switch (choosenMode) {
|
||||
case "Odd":
|
||||
this.ability = new ProtectionAbility(oddFilter);
|
||||
break;
|
||||
case "Even":
|
||||
this.ability = new ProtectionAbility(evenFilter);
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return super.apply(game, source);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LavabrinkVenturerEffect copy() {
|
||||
return new LavabrinkVenturerEffect(this);
|
||||
}
|
||||
}
|
|
@ -189,6 +189,7 @@ public final class IkoriaLairOfBehemoths extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Kogla, the Titan Ape", 162, Rarity.RARE, mage.cards.k.KoglaTheTitanApe.class));
|
||||
cards.add(new SetCardInfo("Labyrinth Raptor", 193, Rarity.RARE, mage.cards.l.LabyrinthRaptor.class));
|
||||
cards.add(new SetCardInfo("Lava Serpent", 124, Rarity.COMMON, mage.cards.l.LavaSerpent.class));
|
||||
cards.add(new SetCardInfo("Lavabrink Venturer", 19, Rarity.RARE, mage.cards.l.LavabrinkVenturer.class));
|
||||
cards.add(new SetCardInfo("Lead the Stampede", 163, Rarity.UNCOMMON, mage.cards.l.LeadTheStampede.class));
|
||||
cards.add(new SetCardInfo("Light of Hope", 20, Rarity.COMMON, mage.cards.l.LightOfHope.class));
|
||||
cards.add(new SetCardInfo("Lore Drakkis", 194, Rarity.UNCOMMON, mage.cards.l.LoreDrakkis.class));
|
||||
|
|
Loading…
Reference in a new issue