add amount: its toughness

master
melvinzhang 2017-09-23 20:23:20 +08:00
parent e1d138588c
commit 5b6cd043a2
2 changed files with 15 additions and 0 deletions

View File

@ -118,6 +118,15 @@ public class MagicAmountFactory {
}
};
public static MagicAmount SN_Toughness =
new MagicAmount() {
@Override
public int getAmount(final MagicSource source, final MagicPlayer player) {
final MagicPermanent perm = (MagicPermanent)source;
return perm.getToughness();
}
};
public static MagicAmount LifeTotal =
new MagicAmount() {
@Override

View File

@ -45,6 +45,12 @@ public enum MagicAmountParser {
return MagicAmountFactory.SN_Power;
}
},
ItsToughness("(its|SN's) toughness") {
@Override
public MagicAmount toAmount(final Matcher arg) {
return MagicAmountFactory.SN_Toughness;
}
},
RNsPower("RN's power") {
@Override
public MagicAmount toAmount(final Matcher arg) {