mirror of
https://github.com/magefree/mage.git
synced 2026-01-23 03:39:54 -08:00
Fixed cost modification order (Rule 601.2e) and added CostModificationType
This commit is contained in:
parent
d2f83b1ade
commit
3144409c2c
27 changed files with 222 additions and 28 deletions
|
|
@ -70,7 +70,7 @@ public class ArcaneMelee extends CardImpl<ArcaneMelee> {
|
|||
class ArcaneMeleeCostReductionEffect extends CostModificationEffectImpl<ArcaneMeleeCostReductionEffect> {
|
||||
|
||||
ArcaneMeleeCostReductionEffect ( ) {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.REDUCE_COST);
|
||||
staticText = "Instant and sorcery spells cost {2} less to cast";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ public class HeraldOfWar extends CardImpl<HeraldOfWar> {
|
|||
class HeraldOfWarCostReductionEffect extends CostModificationEffectImpl<HeraldOfWarCostReductionEffect> {
|
||||
|
||||
HeraldOfWarCostReductionEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.REDUCE_COST);
|
||||
staticText = "Angel spells and Human spells you cast cost {1} less to cast for each +1/+1 counter on Herald of War";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -76,13 +76,13 @@ public class KentaroTheSmilingCat extends CardImpl<KentaroTheSmilingCat> {
|
|||
return new KentaroTheSmilingCat(this);
|
||||
}
|
||||
|
||||
|
||||
//TODO : change CostModification to AlternativCost
|
||||
private class KentaroTheSmilingCatCostReductionEffect extends CostModificationEffectImpl<KentaroTheSmilingCatCostReductionEffect> {
|
||||
|
||||
private static final String effectText = "You may pay {X} rather than pay the mana cost for Samurai spells you cast, where X is that spell's converted mana cost";
|
||||
|
||||
KentaroTheSmilingCatCostReductionEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.SET_COST);
|
||||
staticText = effectText;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ public class ThaliaGuardianOfThraben extends CardImpl<ThaliaGuardianOfThraben> {
|
|||
class ThaliaGuardianOfThrabenCostReductionEffect extends CostModificationEffectImpl<ThaliaGuardianOfThrabenCostReductionEffect> {
|
||||
|
||||
ThaliaGuardianOfThrabenCostReductionEffect ( ) {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.INCREASE_COST);
|
||||
staticText = "Noncreature spells cost {1} more to cast";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.repository.CardRepository;
|
||||
import mage.choices.Choice;
|
||||
import mage.choices.ChoiceImpl;
|
||||
import mage.constants.CostModificationType;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
|
|
@ -170,7 +171,7 @@ class CouncilOfTheAbsoluteReplacementEffect extends ReplacementEffectImpl<Counci
|
|||
class CouncilOfTheAbsoluteCostReductionEffect extends CostModificationEffectImpl<CouncilOfTheAbsoluteCostReductionEffect> {
|
||||
|
||||
public CouncilOfTheAbsoluteCostReductionEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.REDUCE_COST);
|
||||
this.staticText = "Spells with the chosen name cost 2 less for you to cast";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -70,12 +70,14 @@ public class RooftopStorm extends CardImpl<RooftopStorm> {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
//TODO : change to alternativCost
|
||||
class RooftopStormCostReductionEffect extends CostModificationEffectImpl<RooftopStormCostReductionEffect> {
|
||||
|
||||
private static final String effectText = "You may pay {0} rather than pay the mana cost for Zombie creature spells you cast";
|
||||
|
||||
RooftopStormCostReductionEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.REDUCE_COST);
|
||||
staticText = effectText;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ public class Omniscience extends CardImpl<Omniscience> {
|
|||
class OmniscienceEffect extends CostModificationEffectImpl<OmniscienceEffect> {
|
||||
|
||||
public OmniscienceEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.PlayForFree);
|
||||
super(Duration.WhileOnBattlefield, Outcome.PlayForFree, CostModificationType.SET_COST);
|
||||
this.staticText = "You may cast nonland cards from your hand without paying their mana costs";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.effects.CostModificationEffectImpl;
|
||||
import mage.abilities.effects.common.cost.SpellsCostReductionEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CostModificationType;
|
||||
import mage.constants.Duration;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
|
@ -95,7 +96,7 @@ class GrandArbiterAugustinIVCostIncreaseEffect extends CostModificationEffectImp
|
|||
private static final String effectText = "Spells your opponents cast cost {1} more to cast";
|
||||
|
||||
GrandArbiterAugustinIVCostIncreaseEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.INCREASE_COST);
|
||||
staticText = effectText;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ public class DefenseGrid extends CardImpl<DefenseGrid> {
|
|||
class DefenseGridCostModificationEffect extends CostModificationEffectImpl<DefenseGridCostModificationEffect> {
|
||||
|
||||
DefenseGridCostModificationEffect ( ) {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.INCREASE_COST);
|
||||
staticText = "Each spell costs {3} more to cast except during its controller's turn";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ import mage.target.Target;
|
|||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CostModificationType;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -89,7 +90,7 @@ class ElderwoodScionCostReductionEffect extends CostModificationEffectImpl<Elder
|
|||
private static final String effectText = "Spells you cast that target {this} cost {2} less to cast";
|
||||
|
||||
ElderwoodScionCostReductionEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.REDUCE_COST);
|
||||
staticText = effectText;
|
||||
}
|
||||
|
||||
|
|
@ -132,7 +133,7 @@ class ElderwoodScionCostReductionEffect2 extends CostModificationEffectImpl<Elde
|
|||
private static final String effectText = "Spells your opponents cast that target Elderwood Scion cost {2} more to cast";
|
||||
|
||||
ElderwoodScionCostReductionEffect2() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.INCREASE_COST);
|
||||
staticText = effectText;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ import mage.players.Player;
|
|||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CostModificationType;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -115,7 +116,7 @@ class AdjustingCostsAbility extends SimpleStaticAbility implements AdjustingSour
|
|||
class AdjustingCostsEffect extends CostModificationEffectImpl<AdjustingCostsEffect> {
|
||||
|
||||
public AdjustingCostsEffect() {
|
||||
super(Duration.Custom, Outcome.Benefit);
|
||||
super(Duration.Custom, Outcome.Benefit, CostModificationType.REDUCE_COST);
|
||||
}
|
||||
|
||||
public AdjustingCostsEffect(final AdjustingCostsEffect effect) {
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ class RakdosLordOfRiotsCost extends CostImpl<RakdosLordOfRiotsCost> {
|
|||
class RakdosLordOfRiotsCostReductionEffect extends CostModificationEffectImpl<RakdosLordOfRiotsCostReductionEffect> {
|
||||
|
||||
RakdosLordOfRiotsCostReductionEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.REDUCE_COST);
|
||||
staticText = "Creature spells you cast cost {1} less to cast for each 1 life your opponents have lost this turn";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ import mage.abilities.effects.CostModificationEffectImpl;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.choices.ChoiceImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.CostModificationType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
|
|
@ -80,7 +81,7 @@ class TrainingGroundsEffect extends CostModificationEffectImpl<TrainingGroundsEf
|
|||
}
|
||||
|
||||
public TrainingGroundsEffect() {
|
||||
super(Duration.Custom, Outcome.Benefit);
|
||||
super(Duration.Custom, Outcome.Benefit, CostModificationType.REDUCE_COST);
|
||||
staticText = effectText;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ class SemblanceAnvilCostReductionEffect extends CostModificationEffectImpl<Sembl
|
|||
private static final String effectText = "Spells you cast that share a card type with the exiled card cost {2} less to cast";
|
||||
|
||||
SemblanceAnvilCostReductionEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.REDUCE_COST);
|
||||
staticText = effectText;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ public class LocketOfYesterdays extends CardImpl<LocketOfYesterdays> {
|
|||
class LocketOfYesterdaysCostReductionEffect extends CostModificationEffectImpl<LocketOfYesterdaysCostReductionEffect> {
|
||||
|
||||
LocketOfYesterdaysCostReductionEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.REDUCE_COST);
|
||||
staticText = "Spells you cast cost {1} less to cast for each card with the same name as that spell in your graveyard";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ import mage.filter.FilterSpell;
|
|||
*/
|
||||
public class HelmOfAwakening extends CardImpl<HelmOfAwakening> {
|
||||
|
||||
|
||||
public HelmOfAwakening(UUID ownerId) {
|
||||
super(ownerId, 145, "Helm of Awakening", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||
this.expansionSetCode = "VIS";
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ public class LodestoneGolem extends CardImpl<LodestoneGolem> {
|
|||
class LodestoneGolemCostReductionEffect extends CostModificationEffectImpl<LodestoneGolemCostReductionEffect> {
|
||||
|
||||
LodestoneGolemCostReductionEffect ( ) {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.INCREASE_COST);
|
||||
staticText = "Nonartifact spells cost {1} more to cast";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ class StoneIdolTrapCostReductionEffect extends CostModificationEffectImpl<StoneI
|
|||
filter.add(new AttackingPredicate());
|
||||
}
|
||||
public StoneIdolTrapCostReductionEffect() {
|
||||
super(Duration.WhileOnStack, Outcome.Benefit);
|
||||
super(Duration.WhileOnStack, Outcome.Benefit, CostModificationType.REDUCE_COST);
|
||||
staticText = "{this} costs {1} less to cast for each attacking creature";
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue