2 text 2 fixrious

This commit is contained in:
Evan Kranzler 2017-10-07 11:02:36 -04:00
parent 0075535650
commit 14107b3d55
83 changed files with 412 additions and 300 deletions

View file

@ -27,6 +27,7 @@
*/
package mage.abilities.effects.common;
import java.util.List;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
@ -45,7 +46,7 @@ public class GetEmblemEffect extends OneShotEffect {
public GetEmblemEffect(Emblem emblem) {
super(Outcome.Benefit);
this.emblem = emblem;
this.staticText = "You get an emblem with \"" + emblem.getAbilities().getRules(null) + '"';
this.staticText = "You get an emblem with \"" + +'"';
}
public GetEmblemEffect(final GetEmblemEffect effect) {
@ -68,4 +69,21 @@ public class GetEmblemEffect extends OneShotEffect {
return true;
}
public String getText() {
StringBuilder sb = new StringBuilder();
sb.append("You get an emblem with \"");
List<String> rules = emblem.getAbilities().getRules(null);
if (rules.size() == 1) {
sb.append(rules.get(0));
sb.append('"');
} else if (rules.size() == 2) {
for (String s : rules) {
sb.append(s);
sb.append("\" and \"");
}
sb.append('"');
}
sb.append('.');
return sb.toString();
}
}