mirror of
https://github.com/correl/mage.git
synced 2024-11-14 19:19:32 +00:00
* Spell Contortion, Warleader's Helix - fixed wrong card text;
Removed unused getRules in cards code;
This commit is contained in:
parent
20fe92b98b
commit
fe3eda4944
4 changed files with 19 additions and 27 deletions
|
@ -4,6 +4,7 @@ package mage.cards.s;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.dynamicvalue.common.MultikickerCount;
|
||||
import mage.abilities.effects.common.CounterUnlessPaysEffect;
|
||||
|
@ -15,23 +16,21 @@ import mage.constants.CardType;
|
|||
import mage.target.TargetSpell;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public final class SpellContortion extends CardImpl {
|
||||
|
||||
public SpellContortion(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{U}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}");
|
||||
|
||||
|
||||
// Multikicker {1}{U}
|
||||
this.addAbility(new MultikickerAbility("{1}{U}"));
|
||||
|
||||
|
||||
// Counter target spell unless its controller pays {2}. Draw a card for each time Spell Contortion was kicked.
|
||||
this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(new GenericManaCost(2)));
|
||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(new MultikickerCount()));
|
||||
this.getSpellAbility().addTarget(new TargetSpell());
|
||||
|
||||
}
|
||||
|
||||
public SpellContortion(final SpellContortion card) {
|
||||
|
@ -42,11 +41,4 @@ public final class SpellContortion extends CardImpl {
|
|||
public SpellContortion copy() {
|
||||
return new SpellContortion(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getRules() {
|
||||
List<String> rules = new ArrayList<>();
|
||||
rules.add("Counter target spell unless its controller pays {2}. Draw a card for each time Spell Contortion was kicked.");
|
||||
return rules;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ package mage.cards.w;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -12,18 +13,16 @@ import mage.constants.CardType;
|
|||
import mage.target.common.TargetAnyTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public final class WarleadersHelix extends CardImpl {
|
||||
|
||||
public WarleadersHelix(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}{W}");
|
||||
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}{W}");
|
||||
|
||||
// Warleader's Helix deals 4 damage to any target and you gain 4 life.
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(4));
|
||||
this.getSpellAbility().addEffect(new GainLifeEffect(4));
|
||||
this.getSpellAbility().addEffect(new GainLifeEffect(4).setText("and you gain 4 life"));
|
||||
this.getSpellAbility().addTarget(new TargetAnyTarget());
|
||||
}
|
||||
|
||||
|
@ -35,11 +34,4 @@ public final class WarleadersHelix extends CardImpl {
|
|||
public WarleadersHelix copy() {
|
||||
return new WarleadersHelix(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getRules() {
|
||||
List<String> rules = new ArrayList<>();
|
||||
rules.add("Warleader's Helix deals 4 damage to any target and you gain 4 life.");
|
||||
return rules;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,15 +1,17 @@
|
|||
package mage.verify;
|
||||
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.keyword.MultikickerAbility;
|
||||
import mage.cards.*;
|
||||
import mage.cards.basiclands.BasicLand;
|
||||
import mage.cards.repository.CardRepository;
|
||||
import mage.cards.repository.CardScanner;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Constants;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.SuperType;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.TokenImpl;
|
||||
import mage.util.CardUtil;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
@ -381,9 +383,9 @@ public class VerifyCardDataTest {
|
|||
// check
|
||||
for (ExpansionSet.SetCardInfo card : set.getSetCardInfo()) {
|
||||
boolean cardHaveDoubleName = (doubleNames.getOrDefault(card.getName(), 0) > 1);
|
||||
boolean cardHaveVariousSetting = card.getGraphicInfo() == null ? false : card.getGraphicInfo().getUsesVariousArt();
|
||||
boolean cardHaveVariousSetting = card.getGraphicInfo() == null ? false : card.getGraphicInfo().getUsesVariousArt();
|
||||
|
||||
if(cardHaveDoubleName && !cardHaveVariousSetting) {
|
||||
if (cardHaveDoubleName && !cardHaveVariousSetting) {
|
||||
errorsList.add("error, founded double card names, but UsesVariousArt is not true: " + set.getCode() + " - " + set.getName() + " - " + card.getName() + " - " + card.getCardNumber());
|
||||
}
|
||||
}
|
||||
|
@ -625,6 +627,11 @@ public class VerifyCardDataTest {
|
|||
return;
|
||||
}
|
||||
|
||||
// special check: kicker ability must be in rules
|
||||
if (card.getAbilities().containsClass(MultikickerAbility.class) && !card.getRules().stream().anyMatch(rule -> rule.contains("Multikicker"))) {
|
||||
fail(card, "abilities", "card have Multikicker ability, but missing it in rules text");
|
||||
}
|
||||
|
||||
// spells have only 1 abilities
|
||||
if (card.isSorcery() || card.isInstant()) {
|
||||
return;
|
||||
|
|
|
@ -3,6 +3,7 @@ package mage.abilities.effects.common;
|
|||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.MultikickerCount;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
|
@ -51,7 +52,7 @@ public class DrawCardSourceControllerEffect extends OneShotEffect {
|
|||
private void setText() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
boolean oneCard = (amount instanceof StaticValue && amount.calculate(null, null, this) == 1)
|
||||
|| amount instanceof PermanentsOnBattlefieldCount || amount.toString().equals("1");
|
||||
|| amount instanceof PermanentsOnBattlefieldCount || amount.toString().equals("1") || amount.toString().equals("a");
|
||||
sb.append("draw ").append(oneCard ? "a" : CardUtil.numberToText(amount.toString())).append(" card");
|
||||
if (!oneCard) {
|
||||
sb.append('s');
|
||||
|
|
Loading…
Reference in a new issue