mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
* Overload - Fixed that cmc of spells cast with overload were calculated wrongly with the overload costs.
This commit is contained in:
parent
60a3ced53a
commit
9221e4eb64
6 changed files with 173 additions and 34 deletions
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.abilities.keyword;
|
||||
|
||||
import mage.abilities.SpellAbility;
|
||||
|
|
@ -35,38 +34,37 @@ import mage.cards.Card;
|
|||
import mage.constants.SpellAbilityType;
|
||||
import mage.constants.TimingRule;
|
||||
|
||||
|
||||
/**
|
||||
* 702.94. Overload
|
||||
*
|
||||
* 702.94a. Overload is a keyword that represents two static abilities: one that
|
||||
* functions from any zone in which the spell with overload can be cast and
|
||||
* another that functions while the card is on the stack. Overload [cost] means
|
||||
* "You may choose to pay [cost] rather than pay this spell's mana cost" and
|
||||
* "If you chose to pay this spell's overload cost, change its text by replacing
|
||||
* all instances of the word 'target' with the word 'each.'" Using the overload
|
||||
* ability follows the rules for paying alternative costs in rules 601.2b and 601.2e-g.
|
||||
* "You may choose to pay [cost] rather than pay this spell's mana cost" and "If
|
||||
* you chose to pay this spell's overload cost, change its text by replacing all
|
||||
* instances of the word 'target' with the word 'each.'" Using the overload
|
||||
* ability follows the rules for paying alternative costs in rules 601.2b and
|
||||
* 601.2e-g.
|
||||
*
|
||||
* 702.94b. If a player chooses to pay the overload cost of a spell, that spell
|
||||
* won't require any targets. It may affect objects that couldn't be chosen as
|
||||
* legal targets if the spell were cast without its overload cost being paid.
|
||||
*
|
||||
* 702.94c. Overload's second ability creates a text-changing effect. See rule
|
||||
* 612, "Text-Changing Effects."
|
||||
* 612, "Text-Changing Effects."
|
||||
*
|
||||
* @author LevelX2
|
||||
*
|
||||
*/
|
||||
|
||||
public class OverloadAbility extends SpellAbility {
|
||||
|
||||
public OverloadAbility(Card card,Effect effect, ManaCosts costs) {
|
||||
public OverloadAbility(Card card, Effect effect, ManaCosts costs) {
|
||||
this(card, effect, costs, TimingRule.INSTANT);
|
||||
this.spellAbilityType = SpellAbilityType.BASE_ALTERNATE;
|
||||
}
|
||||
|
||||
public OverloadAbility(Card card,Effect effect, ManaCosts costs, TimingRule timingRule) {
|
||||
public OverloadAbility(Card card, Effect effect, ManaCosts costs, TimingRule timingRule) {
|
||||
super(costs, card.getName() + " with overload");
|
||||
this.spellAbilityType = SpellAbilityType.BASE_ALTERNATE;
|
||||
this.addEffect(effect);
|
||||
this.timing = timingRule;
|
||||
}
|
||||
|
|
@ -87,7 +85,7 @@ public class OverloadAbility extends SpellAbility {
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Overload " + getManaCostsToPay().getText()+ " <i>(You may cast this spell for its overload cost. If you do, change its text by replacing all instances of \"target\" with \"each.\")</i>";
|
||||
return "Overload " + getManaCostsToPay().getText() + " <i>(You may cast this spell for its overload cost. If you do, change its text by replacing all instances of \"target\" with \"each.\")</i>";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,6 +36,11 @@ import mage.filter.predicate.permanent.AnotherPredicate;
|
|||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
* 701.32. Support
|
||||
*
|
||||
* 701.32a “Support N” on a permanent means “Put a +1/+1 counter on each of up
|
||||
* to N other target creatures.” “Support N” on an instant or sorcery spell
|
||||
* means “Put a +1/+1 counter on each of up to N target creatures.”
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue