mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Fixed possible null pointer error for changeCost in Abilities that have 0 for mana cost.
- Fixed logic for uncastable spells. Now will only prevent spells that do not have a mana cost from being played.
This commit is contained in:
@@ -152,7 +152,8 @@ public class Ability_Cost {
|
||||
}
|
||||
|
||||
public void changeCost(SpellAbility sa){
|
||||
manaCost = AllZone.GameAction.GetSpellCostChange(sa).toString();
|
||||
if (manaCost != "0")
|
||||
manaCost = AllZone.GameAction.GetSpellCostChange(sa).toString();
|
||||
}
|
||||
|
||||
public String toString()
|
||||
|
||||
@@ -3114,7 +3114,7 @@ public class GameAction {
|
||||
|
||||
for(SpellAbility sa:abilities) {
|
||||
// for uncastables like lotus bloom, check if manaCost is blank
|
||||
if(sa.canPlay() && !sa.getManaCost().equals("")) {
|
||||
if(sa.canPlay() && (!sa.isSpell() || !sa.getManaCost().equals(""))) {
|
||||
choices.add(sa.toString());
|
||||
map.put(sa.toString(), sa);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user