forked from External/mage
Merge pull request #1820 from drmDev/master
Oracle Text fixes. NPE fixes
This commit is contained in:
commit
e57f5cc12f
8 changed files with 45 additions and 27 deletions
|
|
@ -28,9 +28,6 @@
|
|||
package mage.sets.darkascension;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
|
|
@ -39,6 +36,9 @@ import mage.abilities.decorator.ConditionalTriggeredAbility;
|
|||
import mage.abilities.effects.common.TransformSourceEffect;
|
||||
import mage.abilities.keyword.TransformAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -49,9 +49,9 @@ public class MondronenShaman extends CardImpl {
|
|||
public MondronenShaman(UUID ownerId) {
|
||||
super(ownerId, 98, "Mondronen Shaman", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{R}");
|
||||
this.expansionSetCode = "DKA";
|
||||
this.subtype.add("Human");
|
||||
this.subtype.add("Werewolf");
|
||||
this.subtype.add("Human");
|
||||
this.subtype.add("Shaman");
|
||||
this.subtype.add("Werewolf");
|
||||
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(2);
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public class NivixAerieOfTheFiremind extends CardImpl {
|
|||
// {tap}: Add {C} to your mana pool.
|
||||
this.addAbility(new ColorlessManaAbility());
|
||||
|
||||
// {2}{U}{R}, {tap}: Exile the top card of your library. Until your next turn, you may cast that card if it's an instant or sorcery.
|
||||
// {2}{U}{R}, {tap}: Exile the top card of your library. Until your next turn, you may cast that card if it's an instant or sorcery card.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new NivixAerieOfTheFiremindEffect(), new ManaCostsImpl<>("{2}{U}{R}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
|
|
@ -82,7 +82,7 @@ class NivixAerieOfTheFiremindEffect extends OneShotEffect {
|
|||
|
||||
NivixAerieOfTheFiremindEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "Exile the top card of your library. Until your next turn, you may cast that card if it's an instant or sorcery";
|
||||
this.staticText = "Exile the top card of your library. Until your next turn, you may cast that card if it's an instant or sorcery card";
|
||||
}
|
||||
|
||||
NivixAerieOfTheFiremindEffect(final NivixAerieOfTheFiremindEffect effect) {
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ public class AnafenzaTheForemost extends CardImpl {
|
|||
ability.addTarget(new TargetControlledCreaturePermanent(filter));
|
||||
this.addAbility(ability);
|
||||
|
||||
// If a creature card would be put into an opponent's graveyard from anywhere, exile it instead.
|
||||
// If a nontoken creature an opponent owns would die or a creature card not on the battlefield would be put into an opponent's graveyard, exile that card instead.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AnafenzaTheForemostEffect()));
|
||||
}
|
||||
|
||||
|
|
@ -98,7 +98,7 @@ class AnafenzaTheForemostEffect extends ReplacementEffectImpl {
|
|||
|
||||
public AnafenzaTheForemostEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
staticText = "If a creature card would be put into an opponent's graveyard from anywhere, exile it instead";
|
||||
staticText = "If a nontoken creature an opponent owns would die or a creature card not on the battlefield would be put into an opponent's graveyard, exile that card instead";
|
||||
}
|
||||
|
||||
public AnafenzaTheForemostEffect(final AnafenzaTheForemostEffect effect) {
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ public class RealityAcid extends CardImpl {
|
|||
ability = new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.TIME.createInstance(3)));
|
||||
ability.setRuleVisible(false);
|
||||
this.addAbility(ability);
|
||||
this.addAbility(new VanishingUpkeepAbility(3));
|
||||
this.addAbility(new VanishingUpkeepAbility(3, "aura"));
|
||||
this.addAbility(new VanishingSacrificeAbility());
|
||||
|
||||
// When Reality Acid leaves the battlefield, enchanted permanent's controller sacrifices it.
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
*/
|
||||
package mage.sets.shadowsoverinnistrad;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.OnEventTriggeredAbility;
|
||||
|
|
@ -87,13 +88,21 @@ class CrawlingSensationTriggeredAbility extends TriggeredAbilityImpl {
|
|||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
ZoneChangeGroupEvent zEvent = (ZoneChangeGroupEvent) event;
|
||||
if (Zone.GRAVEYARD == zEvent.getToZone()) {
|
||||
if (zEvent != null && Zone.GRAVEYARD == zEvent.getToZone() && zEvent.getCards() != null) {
|
||||
Integer usedOnTurn = (Integer) game.getState().getValue("usedOnTurn" + getOriginalId());
|
||||
if (usedOnTurn == null || usedOnTurn < game.getTurnNum()) {
|
||||
for (Card card : zEvent.getCards()) {
|
||||
if (card.getOwnerId().equals(getControllerId()) && card.getCardType().contains(CardType.LAND)) {
|
||||
game.getState().setValue("usedOnTurn" + getOriginalId(), game.getTurnNum());
|
||||
return true;
|
||||
for (Card card : zEvent.getCards()) {
|
||||
if (card != null) {
|
||||
UUID cardOwnerId = card.getOwnerId();
|
||||
List<CardType> cardType = card.getCardType();
|
||||
|
||||
if (cardOwnerId != null
|
||||
&& card.getOwnerId().equals(getControllerId())
|
||||
&& cardType != null
|
||||
&& card.getCardType().contains(CardType.LAND)) {
|
||||
game.getState().setValue("usedOnTurn" + getOriginalId(), game.getTurnNum());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,15 +107,17 @@ class TheGitrogMonsterTriggeredAbility extends TriggeredAbilityImpl {
|
|||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
ZoneChangeGroupEvent zEvent = (ZoneChangeGroupEvent) event;
|
||||
if (Zone.GRAVEYARD == zEvent.getToZone() && zEvent.getCards() != null) {
|
||||
if (zEvent != null && Zone.GRAVEYARD == zEvent.getToZone() && zEvent.getCards() != null) {
|
||||
for (Card card : zEvent.getCards()) {
|
||||
UUID cardOwnerId = card.getOwnerId();
|
||||
List<CardType> cardType = card.getCardType();
|
||||
if (cardOwnerId != null
|
||||
&& card.getOwnerId().equals(getControllerId())
|
||||
&& cardType != null
|
||||
&& cardType.contains(CardType.LAND)) {
|
||||
return true;
|
||||
if (card != null) {
|
||||
UUID cardOwnerId = card.getOwnerId();
|
||||
List<CardType> cardType = card.getCardType();
|
||||
if (cardOwnerId != null
|
||||
&& card.getOwnerId().equals(getControllerId())
|
||||
&& cardType != null
|
||||
&& cardType.contains(CardType.LAND)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,10 +13,18 @@ import mage.util.CardUtil;
|
|||
public class VanishingUpkeepAbility extends BeginningOfUpkeepTriggeredAbility {
|
||||
|
||||
private int vanishingAmount;
|
||||
private String permanentType;
|
||||
|
||||
public VanishingUpkeepAbility(int vanishingEffect) {
|
||||
super(new VanishingEffect(), TargetController.YOU, false);
|
||||
this.vanishingAmount = vanishingEffect;
|
||||
this.permanentType = "creature";
|
||||
}
|
||||
|
||||
public VanishingUpkeepAbility(int vanishingEffect, String permanentType) {
|
||||
super(new VanishingEffect(), TargetController.YOU, false);
|
||||
this.vanishingAmount = vanishingEffect;
|
||||
this.permanentType = permanentType;
|
||||
}
|
||||
|
||||
public VanishingUpkeepAbility(final VanishingUpkeepAbility ability) {
|
||||
|
|
@ -33,11 +41,11 @@ public class VanishingUpkeepAbility extends BeginningOfUpkeepTriggeredAbility {
|
|||
public String getRule() {
|
||||
if(vanishingAmount > 0) {
|
||||
return "Vanishing " + vanishingAmount
|
||||
+ " <i>(This permanent enters the battlefield with " + CardUtil.numberToText(vanishingAmount)
|
||||
+ " <i>(This " + permanentType + " enters the battlefield with " + CardUtil.numberToText(vanishingAmount)
|
||||
+ " time counters on it. At the beginning of your upkeep, remove a time counter from it. When the last is removed, sacrifice it.)</i>";
|
||||
}
|
||||
else {
|
||||
return "Vanishing <i>(At the beginning of your upkeep, remove a time counter from this permanent. When the last is removed, sacrifice it.)</i>";
|
||||
return "Vanishing <i>(At the beginning of your upkeep, remove a time counter from this " + permanentType + ". When the last is removed, sacrifice it.)</i>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ package mage.game.permanent.token;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.constants.CardType;
|
||||
|
||||
|
|
@ -44,7 +43,7 @@ public class InsectToken extends Token {
|
|||
final static private List<String> tokenImageSets = new ArrayList<>();
|
||||
|
||||
static {
|
||||
tokenImageSets.addAll(Arrays.asList("M10", "MM2"));
|
||||
tokenImageSets.addAll(Arrays.asList("M10", "MM2", "SOI"));
|
||||
}
|
||||
|
||||
public InsectToken() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue