forked from External/mage
moved {this} and {source} replacement to server
This commit is contained in:
parent
5bdfd1b467
commit
c8db6ba350
13 changed files with 62 additions and 52 deletions
|
|
@ -47,7 +47,7 @@ public class StackAbilityView extends CardView {
|
|||
this.sourceName = sourceName;
|
||||
this.sourceCard = sourceCard;
|
||||
this.rules = new ArrayList<String>();
|
||||
rules.add(formatRule(ability.getRule()));
|
||||
rules.add(ability.getRule(sourceName));
|
||||
this.power = ability.getPower().toString();
|
||||
this.toughness = ability.getToughness().toString();
|
||||
this.loyalty = ability.getLoyalty().toString();
|
||||
|
|
@ -60,13 +60,6 @@ public class StackAbilityView extends CardView {
|
|||
setTargets(ability.getTargets());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String formatRule(String rule) {
|
||||
String newRule = rule.replace("{this}", this.sourceName);
|
||||
newRule.replace("{source}", this.sourceName);
|
||||
return newRule;
|
||||
}
|
||||
|
||||
public CardView getSourceCard() {
|
||||
return this.sourceCard;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue