mirror of
https://github.com/magefree/mage.git
synced 2026-01-09 20:32:06 -08:00
[refactoring] Small change to SimpleManaAbility (please review)
This commit is contained in:
parent
c611983f57
commit
faa106b3c3
30 changed files with 50 additions and 64 deletions
|
|
@ -42,14 +42,13 @@ public class AddManaOfAnyColorEffect extends ManaEffect<AddManaOfAnyColorEffect>
|
|||
protected int amount;
|
||||
|
||||
public AddManaOfAnyColorEffect() {
|
||||
super();
|
||||
this.amount = 1;
|
||||
staticText = "add one mana of any color to your mana pool";
|
||||
this(1);
|
||||
}
|
||||
|
||||
public AddManaOfAnyColorEffect(final int amount) {
|
||||
super();
|
||||
this.amount = amount;
|
||||
this.staticText = "add " + amount + " mana of any color to your mana pool";
|
||||
}
|
||||
|
||||
public AddManaOfAnyColorEffect(final AddManaOfAnyColorEffect effect) {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,9 @@
|
|||
package mage.abilities.mana;
|
||||
|
||||
import mage.Constants.Zone;
|
||||
import mage.Mana;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.effects.common.BasicManaEffect;
|
||||
import mage.abilities.effects.common.ManaEffect;
|
||||
|
||||
/**
|
||||
|
|
@ -42,6 +44,11 @@ public class SimpleManaAbility extends ManaAbility<SimpleManaAbility> {
|
|||
super(zone, effect, cost);
|
||||
}
|
||||
|
||||
public SimpleManaAbility(Zone zone, Mana mana, Cost cost) {
|
||||
super(zone, new BasicManaEffect(mana), cost);
|
||||
this.netMana = mana.copy();
|
||||
}
|
||||
|
||||
public SimpleManaAbility(final SimpleManaAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ import mage.Constants.Zone;
|
|||
import mage.MageInt;
|
||||
import mage.Mana;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.effects.common.BasicManaEffect;
|
||||
import mage.abilities.mana.SimpleManaAbility;
|
||||
|
||||
/**
|
||||
|
|
@ -49,7 +48,7 @@ public class EldraziSpawnToken extends Token {
|
|||
subtype.add("Spawn");
|
||||
power = new MageInt(0);
|
||||
toughness = new MageInt(1);
|
||||
addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.ColorlessMana), new SacrificeSourceCost()));
|
||||
addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.ColorlessMana, new SacrificeSourceCost()));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue