Added modifyVisibility to FieldDef

AbilityGuard tweaks
This commit is contained in:
Vidal committed 2026-02-03 07:45:02 -03:00
1 parent fd85215592
commit c5822023a0
4 files changed
+42 -18

No files matched your search

@@ -450,17 +450,6 @@ public abstract class Ability implements IAbility {
this::getActiveAnimationName, this::setActiveAnimationName)
.tab("Effects"));
if (this instanceof AbilityGuard) {
defs.add(FieldDef.animSubGui("ability.counterAnimation",
() -> ((AbilityGuard) this).getCounterAnimationId(),
(id) -> ((AbilityGuard) this).setCounterAnimationId(id),
() -> ((AbilityGuard) this).getCounterAnimationName(),
(name) -> ((AbilityGuard) this).setCounterAnimationName(name))
.tab("Effects")
.visibleWhen(() -> ((AbilityGuard) this).canCounter())
);
}
TelegraphType tType = getTelegraphType();
if (tType != null && tType != TelegraphType.NONE) {
defs.add(FieldDef.section("ability.section.telegraph").tab("Effects")