[AFR] Implemented Guild Thief

This commit is contained in:
Evan Kranzler 2021-06-29 20:28:34 -04:00
parent 01a30ca8b5
commit 48c2633eda
4 changed files with 77 additions and 8 deletions

View file

@ -60,6 +60,7 @@ public abstract class AbilityImpl implements Ability {
protected Zone zone;
protected String name;
protected AbilityWord abilityWord;
protected String flavorWord;
protected boolean usesStack = true;
protected boolean ruleAtTheTop = false;
protected boolean ruleVisible = true;
@ -117,6 +118,7 @@ public abstract class AbilityImpl implements Ability {
this.ruleAdditionalCostsVisible = ability.ruleAdditionalCostsVisible;
this.worksFaceDown = ability.worksFaceDown;
this.abilityWord = ability.abilityWord;
this.flavorWord = ability.flavorWord;
this.sourceObjectZoneChangeCounter = ability.sourceObjectZoneChangeCounter;
this.canFizzle = ability.canFizzle;
this.targetAdjuster = ability.targetAdjuster;
@ -800,8 +802,16 @@ public abstract class AbilityImpl implements Ability {
} else {
rule = ruleStart;
}
String prefix;
if (abilityWord != null) {
rule = "<i>" + abilityWord + "</i> &mdash; " + Character.toUpperCase(rule.charAt(0)) + rule.substring(1);
prefix = abilityWord.formatWord();
} else if (flavorWord != null) {
prefix = "<i>" + flavorWord + "</i> &mdash; ";
} else {
prefix = null;
}
if (prefix != null) {
rule = prefix + CardUtil.getTextWithFirstCharUpperCase(rule);
}
if (appendToRule != null) {
rule = rule.concat(appendToRule);
@ -1062,6 +1072,11 @@ public abstract class AbilityImpl implements Ability {
return this;
}
public Ability setFlavorWord(String flavorWord) {
this.flavorWord = flavorWord;
return this;
}
@Override
public String getGameLogMessage(Game game) {
if (game.isSimulation()) {