mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
Remove superfluous addManaCost method (#11288)
* no need to specify mana cost, just add cost * handle all mana costs through addcost method only * eliminate another constructor * more constructor cleanup
This commit is contained in:
parent
4e2a5bd5a9
commit
d7afa37893
53 changed files with 153 additions and 338 deletions
|
|
@ -32,7 +32,7 @@ public class SpectacleAbility extends SpellAbility {
|
|||
|
||||
this.clearManaCosts();
|
||||
this.clearManaCostsToPay();
|
||||
this.addManaCost(spectacleCosts.copy());
|
||||
this.addCost(spectacleCosts.copy());
|
||||
|
||||
this.setRuleAtTheTop(true);
|
||||
this.rule = "Spectacle " + spectacleCosts.getText()
|
||||
|
|
@ -58,7 +58,7 @@ public class SpectacleAbility extends SpellAbility {
|
|||
@SuppressWarnings("unchecked")
|
||||
public boolean activate(Game game, boolean noMana) {
|
||||
if (super.activate(game, noMana)) {
|
||||
List<Integer> spectacleActivations = (ArrayList) game.getState().getValue(SPECTACLE_ACTIVATION_VALUE_KEY + getSourceId());
|
||||
List<Integer> spectacleActivations = (List<Integer>) game.getState().getValue(SPECTACLE_ACTIVATION_VALUE_KEY + getSourceId());
|
||||
if (spectacleActivations == null) {
|
||||
spectacleActivations = new ArrayList<>(); // zoneChangeCounter
|
||||
game.getState().setValue(SPECTACLE_ACTIVATION_VALUE_KEY + getSourceId(), spectacleActivations);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue