mirror of
https://github.com/correl/mage.git
synced 2025-01-11 19:13:02 +00:00
As Foretold Implemented
* Final change to card casting code to support as foretold. Removed all of the "Can't cast cards with no mana cost" code from the earlier parts of the casting process and simplified it to just the PlayerImpl::canPlay check and one final check in the main AbilityImpl::activate code after alternative costs have been chosen.
This commit is contained in:
parent
c22a8f717e
commit
2b08d5a101
1 changed files with 11 additions and 0 deletions
|
@ -286,6 +286,17 @@ public abstract class AbilityImpl implements Ability {
|
|||
}
|
||||
}
|
||||
|
||||
// 117.6. Some mana costs contain no mana symbols. This represents an unpayable cost. An ability can
|
||||
// also have an unpayable cost if its cost is based on the mana cost of an object with no mana cost.
|
||||
// Attempting to cast a spell or activate an ability that has an unpayable cost is a legal action.
|
||||
// However, attempting to pay an unpayable cost is an illegal action.
|
||||
//
|
||||
// We apply this now, *AFTER* the user has made the choice to pay an alternative cost for the
|
||||
// spell. You can also still cast a spell with an unplayable cost by... not paying it's mana cost.
|
||||
if (getAbilityType() == AbilityType.SPELL && getManaCostsToPay().isEmpty() && !noMana) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 20121001 - 601.2b
|
||||
// If the spell has a variable cost that will be paid as it's being cast (such as an {X} in
|
||||
// its mana cost; see rule 107.3), the player announces the value of that variable.
|
||||
|
|
Loading…
Reference in a new issue