mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 04:42:07 -08:00
Some small improvements to text generation
This commit is contained in:
parent
fa587ce7b7
commit
ef5594cdd3
3 changed files with 17 additions and 9 deletions
|
|
@ -77,12 +77,20 @@ public class GainAbilityAttachedEffect extends ContinuousEffectImpl<GainAbilityA
|
|||
}
|
||||
|
||||
private void setText() {
|
||||
String prefix = "";
|
||||
if (attachmentType == AttachmentType.AURA)
|
||||
prefix = "Enchanted";
|
||||
else if (attachmentType == AttachmentType.EQUIPMENT)
|
||||
prefix = "Equipped";
|
||||
staticText = prefix + " creature gains " + ability.getRule();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (attachmentType == AttachmentType.AURA) {
|
||||
sb.append("Enchanted");
|
||||
} else if (attachmentType == AttachmentType.EQUIPMENT) {
|
||||
sb.append("Equipped");
|
||||
}
|
||||
sb.append(" creature ");
|
||||
if (duration == Duration.WhileOnBattlefield) {
|
||||
sb.append("has ");
|
||||
} else {
|
||||
sb.append("gains ");
|
||||
}
|
||||
sb.append(ability.getRule());
|
||||
staticText = sb.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue