This commit is contained in:
BetaSteward 2011-02-22 21:44:42 -05:00
commit 8fcd50042e
13 changed files with 41 additions and 33 deletions

View file

@ -90,8 +90,8 @@ class MartialCoupEffect extends OneShotEffect<MartialCoupEffect> {
@Override
public boolean apply(Game game, Ability source) {
int amount = 0;
if (source.getManaCosts().getVariableCosts().size() > 0) {
amount = source.getManaCosts().getVariableCosts().get(0).getAmount();
if (source.getManaCostsToPay().getVariableCosts().size() > 0) {
amount = source.getManaCostsToPay().getVariableCosts().get(0).getAmount();
}
if (amount > 4) {

View file

@ -93,7 +93,7 @@ class EarthquakeEffect extends OneShotEffect<EarthquakeEffect> {
@Override
public boolean apply(Game game, Ability source) {
int amount = source.getManaCosts().getVariableCosts().get(0).getAmount();
int amount = source.getManaCostsToPay().getVariableCosts().get(0).getAmount();
for (Permanent permanent: game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) {
permanent.damage(amount, source.getId(), game, true, false);

View file

@ -91,7 +91,7 @@ class FireballEffect extends OneShotEffect<FireballEffect> {
@Override
public boolean apply(Game game, Ability source) {
int numTargets = source.getTargets().get(0).getTargets().size();
int damage = source.getManaCosts().getVariableCosts().get(0).getAmount();
int damage = source.getManaCostsToPay().getVariableCosts().get(0).getAmount();
if (numTargets > 0) {
int damagePer = damage/numTargets;
if (damagePer > 0) {

View file

@ -84,7 +84,7 @@ class MindSpringEffect extends OneShotEffect<MindSpringEffect> {
@Override
public boolean apply(Game game, Ability source) {
int amount = source.getManaCosts().getVariableCosts().get(0).getAmount();
int amount = source.getManaCostsToPay().getVariableCosts().get(0).getAmount();
Player player = game.getPlayer(source.getControllerId());
if (player != null) {
player.drawCards(amount, game);

View file

@ -99,7 +99,7 @@ public class ProteanHydra extends CardImpl<ProteanHydra> {
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(source.getSourceId());
if (permanent != null) {
int amount = source.getManaCosts().getVariableCosts().get(0).getAmount();
int amount = source.getManaCostsToPay().getVariableCosts().get(0).getAmount();
permanent.addCounters(new PlusOneCounter(amount));
}
return true;

View file

@ -102,8 +102,8 @@ class VengefulArchonEffect extends PreventionEffectImpl<VengefulArchonEffect> {
@Override
public void init(Ability source, Game game) {
super.init(source, game);
if (source.getManaCosts().getVariableCosts().size() > 0)
amount = source.getManaCosts().getVariableCosts().get(0).getAmount();
if (source.getManaCostsToPay().getVariableCosts().size() > 0)
amount = source.getManaCostsToPay().getVariableCosts().get(0).getAmount();
}
@Override

View file

@ -76,7 +76,7 @@ class ExsanguinateEffect extends OneShotEffect<ExsanguinateEffect> {
@Override
public boolean apply(Game game, Ability source) {
int loseLife = 0;
int damage = source.getManaCosts().getVariableCosts().get(0).getAmount();
int damage = source.getManaCostsToPay().getVariableCosts().get(0).getAmount();
for (UUID opponentId : game.getOpponents(source.getControllerId())) {
loseLife += game.getPlayer(opponentId).loseLife(damage, game);
}

View file

@ -85,7 +85,7 @@ class SigilofDistinctionEffect extends OneShotEffect<SigilofDistinctionEffect> {
@Override
public boolean apply(Game game, Ability source) {
int amount = source.getManaCosts().getVariableCosts().get(0).getAmount();
int amount = source.getManaCostsToPay().getVariableCosts().get(0).getAmount();
Permanent p = game.getPermanent(source.getSourceId());
if (p != null) {
p.addCounters(CounterType.CHARGE.createInstance(amount));