refactor: simplified code (related to 6bf8aedce7)

This commit is contained in:
Oleg Agafonov 2025-04-16 10:10:11 +04:00
parent 5bee368b81
commit c0c27c81fa
3 changed files with 21 additions and 42 deletions

View file

@ -238,9 +238,12 @@ public class SpellAbility extends ActivatedAbilityImpl {
@Override
public String getRule(boolean all) {
if (all) {
return new StringBuilder(super.getRule(all)).append(name).toString();
// show full rules, e.g. for hand
return super.getRule(true) + this.name;
} else {
// hide spell ability, e.g. for permanent
return super.getRule(false);
}
return super.getRule(false);
}
public String getName() {