use method from MagicPermanent directly

master
melvin 2013-01-20 10:32:04 +08:00
parent ebd9612dfe
commit 1fc8163069
3 changed files with 5 additions and 5 deletions

View File

@ -36,7 +36,7 @@ public class Artifact_Mutation {
public void doAction(final MagicPermanent permanent) {
game.doAction(new MagicChangeStateAction(permanent,MagicPermanentState.CannotBeRegenerated,true));
game.doAction(new MagicDestroyAction(permanent));
int amount = permanent.getCardDefinition().getConvertedCost();
int amount = permanent.getConvertedCost();
for (;amount>0;amount--) {
game.doAction(new MagicPlayTokenAction(
event.getPlayer(),

View File

@ -46,7 +46,7 @@ public class Hoard_Smelter_Dragon {
game.doAction(new MagicDestroyAction(permanent));
game.doAction(new MagicChangeTurnPTAction(
event.getPermanent(),
permanent.getCardDefinition().getConvertedCost(),
permanent.getConvertedCost(),
0));
}
});

View File

@ -25,7 +25,7 @@ public class Karn__Silver_Golem {
static final MagicStatic PT = new MagicStatic(MagicLayer.SetPT, MagicStatic.UntilEOT) {
@Override
public void modPowerToughness(final MagicPermanent source,final MagicPermanent permanent,final MagicPowerToughness pt) {
final int cmc = permanent.getCardDefinition().getConvertedCost();
final int cmc = permanent.getConvertedCost();
pt.set(cmc,cmc);
}
};
@ -39,8 +39,8 @@ public class Karn__Silver_Golem {
@Override
protected int getTargetScore(final MagicGame game,final MagicPlayer player,final MagicPermanent permanent) {
final MagicPowerToughness pt=permanent.getPowerToughness();
final int power = permanent.getCardDefinition().getConvertedCost();
final int toughness = permanent.getCardDefinition().getConvertedCost();
final int power = permanent.getConvertedCost();
final int toughness = permanent.getConvertedCost();
final int score = (pt.power()-power)*2+(pt.toughness()-toughness);
return permanent.getController() == player ? -score:score;
}