Fixed some GUI stuff and added animation to AbilityOrbDual

This commit is contained in:
Vidal committed 2026-02-03 15:27:28 -03:00
1 parent 2d47aa00d8
commit 87d511c38e
5 files changed
+602 -9

No files matched your search

@@ -414,10 +414,10 @@ public class AbilityBeamDual extends Ability {
.visibleWhen(this::isExplosive),
AbilityFieldDefs.effectsListField("ability.effects", this::getEffects, this::setEffects),
// Visual tab - Beam 1
FieldDef.section("ability.section.beam1").tab("ability.tab.visual"),
FieldDef.enumField("ability.anchorPoint", AnchorPoint.class,
() -> getAnchorPointEnum(0), v -> setAnchorPointEnum(0, v))
.tab("ability.tab.visual"),
FieldDef.section("ability.section.beam1").tab("ability.tab.visual"),
FieldDef.colorSubGui("ability.innerColor",
() -> getInnerColor(0), v -> setInnerColor(0, v))
.tab("ability.tab.visual"),
@@ -450,10 +450,10 @@ public class AbilityBeamDual extends Ability {
.range(0.1f, 100f).visibleWhen(() -> hasLightningEffect(0))
).tab("ability.tab.visual"),
// Visual tab - Beam 2
FieldDef.section("ability.section.beam2").tab("ability.tab.visual"),
FieldDef.enumField("ability.anchorPoint", AnchorPoint.class,
() -> getAnchorPointEnum(1), v -> setAnchorPointEnum(1, v))
.tab("ability.tab.visual"),
FieldDef.section("ability.section.beam2").tab("ability.tab.visual"),
FieldDef.colorSubGui("ability.innerColor",
() -> getInnerColor(1), v -> setInnerColor(1, v))
.tab("ability.tab.visual"),
@@ -424,10 +424,10 @@ public class AbilityDiscDual extends Ability {
.visibleWhen(this::isExplosive),
AbilityFieldDefs.effectsListField("ability.effects", this::getEffects, this::setEffects),
// Visual tab - Disc 1
FieldDef.section("ability.section.disc1").tab("ability.tab.visual"),
FieldDef.enumField("ability.anchorPoint", AnchorPoint.class,
() -> getAnchorPointEnum(0), v -> setAnchorPointEnum(0, v))
.tab("ability.tab.visual"),
FieldDef.section("ability.section.disc1").tab("ability.tab.visual"),
FieldDef.colorSubGui("ability.innerColor",
() -> getInnerColor(0), v -> setInnerColor(0, v))
.tab("ability.tab.visual"),
@@ -460,10 +460,10 @@ public class AbilityDiscDual extends Ability {
.range(0.1f, 10.0f).visibleWhen(() -> hasLightningEffect(0))
).tab("ability.tab.visual"),
// Visual tab - Disc 2
FieldDef.section("ability.section.disc2").tab("ability.tab.visual"),
FieldDef.enumField("ability.anchorPoint", AnchorPoint.class,
() -> getAnchorPointEnum(1), v -> setAnchorPointEnum(1, v))
.tab("ability.tab.visual"),
FieldDef.section("ability.section.disc2").tab("ability.tab.visual"),
FieldDef.colorSubGui("ability.innerColor",
() -> getInnerColor(1), v -> setInnerColor(1, v))
.tab("ability.tab.visual"),
@@ -29,7 +29,7 @@ public class AbilityOrbDual extends Ability {
// Ability-specific properties
private float orbSize = 1.0f;
private boolean dualFire= true;
private int dualFireDelay = 20;
private int dualFireDelay = 5;
// Data classes for energy properties
public final EnergyColorData[] colorData = new EnergyColorData[]{
@@ -61,8 +61,8 @@ public class AbilityOrbDual extends Ability {
this.telegraphType = TelegraphType.CIRCLE;
this.showTelegraph = true;
// Default built-in animation
this.windUpAnimationName = "Ability_BeamDual_Windup";
this.activeAnimationName = "Ability_BeamDual_Active";
this.windUpAnimationName = "Ability_OrbDual_Windup";
this.activeAnimationName = "Ability_OrbDual_Active";
}
@Override
@@ -484,10 +484,10 @@ public class AbilityOrbDual extends Ability {
FieldDef.floatField("gui.radius", this::getExplosionRadius, this::setExplosionRadius).visibleWhen(this::isExplosive),
AbilityFieldDefs.effectsListField("ability.effects", this::getEffects, this::setEffects),
// Visual tab - Orb 1
FieldDef.section("ability.section.orb1").tab("ability.tab.visual"),
FieldDef.enumField("ability.anchorPoint", AnchorPoint.class,
() -> getAnchorPointEnum(0), v -> setAnchorPointEnum(0, v))
.tab("ability.tab.visual"),
FieldDef.section("ability.section.orb1").tab("ability.tab.visual"),
FieldDef.colorSubGui("ability.innerColor",
() -> getInnerColor(0), v -> setInnerColor(0, v))
.tab("ability.tab.visual"),
@@ -520,10 +520,10 @@ public class AbilityOrbDual extends Ability {
.range(0.1f, 10.0f).visibleWhen(() -> hasLightningEffect(0))
).tab("ability.tab.visual"),
// Visual tab - Orb 2
FieldDef.section("ability.section.orb2").tab("ability.tab.visual"),
FieldDef.enumField("ability.anchorPoint", AnchorPoint.class,
() -> getAnchorPointEnum(1), v -> setAnchorPointEnum(1, v))
.tab("ability.tab.visual"),
FieldDef.section("ability.section.orb2").tab("ability.tab.visual"),
FieldDef.colorSubGui("ability.innerColor",
() -> getInnerColor(1), v -> setInnerColor(1, v))
.tab("ability.tab.visual"),
@@ -0,0 +1,266 @@
{
"Loop": 3,
"Speed": 1.0f,
"Frames": [
{
"ColorMarker": 16777215,
"Comment": "",
"Speed": 3.0f,
"FrameParts": [
{
"Pivot2": -6.0f,
"Part": "RIGHT_ARM",
"Rotation1": -80.0f,
"Rotation0": 0.0f,
"Pivot0": 3.0f,
"Pivot1": 2.0f,
"Rotation2": -45.0f
},
{
"Pivot2": -4.0f,
"Part": "HEAD",
"Rotation1": -37.0f,
"Rotation0": 56.0f,
"Pivot0": 2.0f,
"Pivot1": 3.0f,
"Rotation2": 0.0f
},
{
"Pivot2": 3.0f,
"Part": "LEFT_LEG",
"Rotation1": -25.0f,
"Rotation0": 25.0f,
"Pivot0": -1.0f,
"Pivot1": 0.0f,
"Rotation2": 0.0f
},
{
"Pivot2": 0.0f,
"Part": "LEFT_ARM",
"Rotation1": -202.0f,
"Rotation0": -75.0f,
"Pivot0": 1.0f,
"Pivot1": 2.0f,
"Rotation2": 37.0f
},
{
"Pivot2": -4.0f,
"Part": "BODY",
"Rotation1": -31.0f,
"Rotation0": 31.0f,
"Pivot0": 2.0f,
"Pivot1": 2.0f,
"Rotation2": 0.0f
},
{
"Pivot2": -1.0f,
"Part": "RIGHT_LEG",
"Rotation1": 0.0f,
"Rotation0": 0.0f,
"Pivot0": 0.0f,
"Pivot1": 0.0f,
"Rotation2": 0.0f
}
],
"Smooth": 0b,
"Duration": 2
},
{
"ColorMarker": 16777215,
"Comment": "",
"Speed": 2.0f,
"FrameParts": [
{
"Pivot2": 4.0f,
"Part": "RIGHT_ARM",
"Rotation1": 37.0f,
"Rotation0": -18.0f,
"Pivot0": 1.0f,
"Pivot1": 2.0f,
"Rotation2": 18.0f
},
{
"Pivot2": 3.0f,
"Part": "HEAD",
"Rotation1": 6.0f,
"Rotation0": -25.0f,
"Pivot0": 1.0f,
"Pivot1": 1.0f,
"Rotation2": 0.0f
},
{
"Pivot2": 0.0f,
"Part": "LEFT_LEG",
"Rotation1": -12.0f,
"Rotation0": 18.0f,
"Pivot0": 1.0f,
"Pivot1": 0.0f,
"Rotation2": -18.0f
},
{
"Pivot2": 0.0f,
"Part": "LEFT_ARM",
"Rotation1": 75.0f,
"Rotation0": -120.0f,
"Pivot0": -2.0f,
"Pivot1": -1.0f,
"Rotation2": 0.0f
},
{
"Pivot2": 3.0f,
"Part": "BODY",
"Rotation1": 18.0f,
"Rotation0": -12.0f,
"Pivot0": 1.0f,
"Pivot1": 1.0f,
"Rotation2": 0.0f
},
{
"Pivot2": 0.0f,
"Part": "RIGHT_LEG",
"Rotation1": 18.0f,
"Rotation0": 6.0f,
"Pivot0": 0.0f,
"Pivot1": 0.0f,
"Rotation2": 12.0f
}
],
"Smooth": 0b,
"Duration": 3
},
{
"ColorMarker": 16777215,
"Comment": "",
"Speed": 1.0f,
"FrameParts": [
{
"Pivot2": 4.0f,
"Part": "RIGHT_ARM",
"Rotation1": 37.0f,
"Rotation0": -18.0f,
"Pivot0": 1.0f,
"Pivot1": 2.0f,
"Rotation2": 18.0f
},
{
"Pivot2": 3.0f,
"Part": "HEAD",
"Rotation1": 6.0f,
"Rotation0": -25.0f,
"Pivot0": 1.0f,
"Pivot1": 1.0f,
"Rotation2": 0.0f
},
{
"Pivot2": 0.0f,
"Part": "LEFT_LEG",
"Rotation1": -12.0f,
"Rotation0": 18.0f,
"Pivot0": 1.0f,
"Pivot1": 0.0f,
"Rotation2": -18.0f
},
{
"Pivot2": 0.0f,
"Part": "LEFT_ARM",
"Rotation1": 75.0f,
"Rotation0": -120.0f,
"Pivot0": -2.0f,
"Pivot1": -1.0f,
"Rotation2": 0.0f
},
{
"Pivot2": 3.0f,
"Part": "BODY",
"Rotation1": 18.0f,
"Rotation0": -12.0f,
"Pivot0": 1.0f,
"Pivot1": 1.0f,
"Rotation2": 0.0f
},
{
"Pivot2": 0.0f,
"Part": "RIGHT_LEG",
"Rotation1": 18.0f,
"Rotation0": 6.0f,
"Pivot0": 0.0f,
"Pivot1": 0.0f,
"Rotation2": 12.0f
}
],
"Smooth": 0b,
"Duration": 3
},
{
"ColorMarker": 16777215,
"Comment": "",
"Speed": 0.25f,
"FrameParts": [
{
"Pivot2": 4.0f,
"Part": "RIGHT_ARM",
"Rotation1": 37.0f,
"Rotation0": -18.0f,
"Pivot0": 1.0f,
"Pivot1": 2.0f,
"Rotation2": 18.0f
},
{
"Pivot2": 3.0f,
"Part": "HEAD",
"Rotation1": 6.0f,
"Rotation0": -25.0f,
"Pivot0": 1.0f,
"Pivot1": 1.0f,
"Rotation2": 0.0f
},
{
"Pivot2": 0.0f,
"Part": "LEFT_LEG",
"Rotation1": -12.0f,
"Rotation0": 18.0f,
"Pivot0": 1.0f,
"Pivot1": 0.0f,
"Rotation2": -18.0f
},
{
"Pivot2": 0.0f,
"Part": "LEFT_ARM",
"Rotation1": 75.0f,
"Rotation0": -120.0f,
"Pivot0": -2.0f,
"Pivot1": -1.0f,
"Rotation2": 0.0f
},
{
"Pivot2": 3.0f,
"Part": "BODY",
"Rotation1": 18.0f,
"Rotation0": -12.0f,
"Pivot0": 1.0f,
"Pivot1": 1.0f,
"Rotation2": 0.0f
},
{
"Pivot2": 0.0f,
"Part": "RIGHT_LEG",
"Rotation1": 18.0f,
"Rotation0": 6.0f,
"Pivot0": 0.0f,
"Pivot1": 0.0f,
"Rotation2": 12.0f
}
],
"Smooth": 0b,
"Duration": 3
}
],
"CurrentFrameTime": 0,
"CurrentFrame": 3,
"Smooth": 0b,
"ID": 22,
"WhileAttacking": 1b,
"WhileWalking": 1b,
"Name": "Ability_OrbDual_Active",
"WhileStanding": 1b
}
@@ -0,0 +1,327 @@
{
"Loop": -1,
"Speed": 1.0f,
"Frames": [
{
"ColorMarker": 16777215,
"Comment": "",
"FrameParts": [
{
"Pivot2": 0.0f,
"Part": "RIGHT_ARM",
"Rotation1": -12.0f,
"Rotation0": -126.0f,
"Pivot0": 0.0f,
"Pivot1": 0.0f,
"Rotation2": -63.0f
},
{
"Pivot2": 3.0f,
"Part": "HEAD",
"Rotation1": 18.0f,
"Rotation0": -12.0f,
"Pivot0": -1.0f,
"Pivot1": 1.0f,
"Rotation2": 0.0f
},
{
"Pivot2": 3.0f,
"Part": "LEFT_LEG",
"Rotation1": -50.0f,
"Rotation0": 6.0f,
"Pivot0": 0.0f,
"Pivot1": 0.0f,
"Rotation2": 0.0f
},
{
"Pivot2": 6.0f,
"Part": "LEFT_ARM",
"Rotation1": -132.0f,
"Rotation0": -25.0f,
"Pivot0": -1.0f,
"Pivot1": 1.0f,
"Rotation2": -31.0f
},
{
"Pivot2": 3.0f,
"Part": "BODY",
"Rotation1": -31.0f,
"Rotation0": -12.0f,
"Pivot0": -1.0f,
"Pivot1": 1.0f,
"Rotation2": 0.0f
},
{
"Pivot2": -2.0f,
"Part": "RIGHT_LEG",
"Rotation1": 0.0f,
"Rotation0": 6.0f,
"Pivot0": 0.0f,
"Pivot1": 0.0f,
"Rotation2": 0.0f
}
],
"Duration": 15
},
{
"ColorMarker": 16777215,
"Comment": "",
"Speed": 0.5f,
"FrameParts": [
{
"Pivot2": 6.0f,
"Part": "RIGHT_ARM",
"Rotation1": 88.0f,
"Rotation0": -151.0f,
"Pivot0": 2.0f,
"Pivot1": 0.0f,
"Rotation2": -18.0f
},
{
"Pivot2": 3.0f,
"Part": "HEAD",
"Rotation1": 12.0f,
"Rotation0": -31.0f,
"Pivot0": 2.0f,
"Pivot1": 1.0f,
"Rotation2": 12.0f
},
{
"Pivot2": -2.0f,
"Part": "LEFT_LEG",
"Rotation1": 0.0f,
"Rotation0": 0.0f,
"Pivot0": -1.0f,
"Pivot1": 0.0f,
"Rotation2": 0.0f
},
{
"Pivot2": 0.0f,
"Part": "LEFT_ARM",
"Rotation1": -132.0f,
"Rotation0": -25.0f,
"Pivot0": 1.0f,
"Pivot1": 2.0f,
"Rotation2": -31.0f
},
{
"Pivot2": 3.0f,
"Part": "BODY",
"Rotation1": 50.0f,
"Rotation0": -18.0f,
"Pivot0": 2.0f,
"Pivot1": 1.0f,
"Rotation2": 0.0f
},
{
"Pivot2": 2.0f,
"Part": "RIGHT_LEG",
"Rotation1": 56.0f,
"Rotation0": 12.0f,
"Pivot0": -1.0f,
"Pivot1": 0.0f,
"Rotation2": 0.0f
}
],
"Smooth": 0b,
"Duration": 4
},
{
"ColorMarker": 16777215,
"Comment": "",
"Speed": 0.75f,
"FrameParts": [
{
"Pivot2": 6.0f,
"Part": "RIGHT_ARM",
"Rotation1": 88.0f,
"Rotation0": -151.0f,
"Pivot0": 2.0f,
"Pivot1": 0.0f,
"Rotation2": -18.0f
},
{
"Pivot2": 3.0f,
"Part": "HEAD",
"Rotation1": 12.0f,
"Rotation0": -31.0f,
"Pivot0": 2.0f,
"Pivot1": 1.0f,
"Rotation2": 12.0f
},
{
"Pivot2": -2.0f,
"Part": "LEFT_LEG",
"Rotation1": 0.0f,
"Rotation0": 0.0f,
"Pivot0": -1.0f,
"Pivot1": 0.0f,
"Rotation2": 0.0f
},
{
"Pivot2": 0.0f,
"Part": "LEFT_ARM",
"Rotation1": -132.0f,
"Rotation0": -25.0f,
"Pivot0": 1.0f,
"Pivot1": 2.0f,
"Rotation2": -31.0f
},
{
"Pivot2": 3.0f,
"Part": "BODY",
"Rotation1": 50.0f,
"Rotation0": -18.0f,
"Pivot0": 2.0f,
"Pivot1": 1.0f,
"Rotation2": 0.0f
},
{
"Pivot2": 2.0f,
"Part": "RIGHT_LEG",
"Rotation1": 56.0f,
"Rotation0": 12.0f,
"Pivot0": -1.0f,
"Pivot1": 0.0f,
"Rotation2": 0.0f
}
],
"Smooth": 0b,
"Duration": 4
},
{
"ColorMarker": 16777215,
"Comment": "",
"Speed": 1.0f,
"FrameParts": [
{
"Pivot2": 6.0f,
"Part": "RIGHT_ARM",
"Rotation1": 88.0f,
"Rotation0": -151.0f,
"Pivot0": 2.0f,
"Pivot1": 0.0f,
"Rotation2": -18.0f
},
{
"Pivot2": 3.0f,
"Part": "HEAD",
"Rotation1": 12.0f,
"Rotation0": -31.0f,
"Pivot0": 2.0f,
"Pivot1": 1.0f,
"Rotation2": 12.0f
},
{
"Pivot2": -2.0f,
"Part": "LEFT_LEG",
"Rotation1": 0.0f,
"Rotation0": 0.0f,
"Pivot0": -1.0f,
"Pivot1": 0.0f,
"Rotation2": 0.0f
},
{
"Pivot2": 0.0f,
"Part": "LEFT_ARM",
"Rotation1": -132.0f,
"Rotation0": -25.0f,
"Pivot0": 1.0f,
"Pivot1": 2.0f,
"Rotation2": -31.0f
},
{
"Pivot2": 3.0f,
"Part": "BODY",
"Rotation1": 50.0f,
"Rotation0": -18.0f,
"Pivot0": 2.0f,
"Pivot1": 1.0f,
"Rotation2": 0.0f
},
{
"Pivot2": 2.0f,
"Part": "RIGHT_LEG",
"Rotation1": 56.0f,
"Rotation0": 12.0f,
"Pivot0": -1.0f,
"Pivot1": 0.0f,
"Rotation2": 0.0f
}
],
"Smooth": 0b,
"Duration": 4
},
{
"ColorMarker": 16777215,
"Comment": "",
"Speed": 3.0f,
"FrameParts": [
{
"Pivot2": -6.0f,
"Part": "RIGHT_ARM",
"Rotation1": -80.0f,
"Rotation0": 0.0f,
"Pivot0": 3.0f,
"Pivot1": 2.0f,
"Rotation2": -45.0f
},
{
"Pivot2": -4.0f,
"Part": "HEAD",
"Rotation1": -37.0f,
"Rotation0": 56.0f,
"Pivot0": 2.0f,
"Pivot1": 3.0f,
"Rotation2": 0.0f
},
{
"Pivot2": 3.0f,
"Part": "LEFT_LEG",
"Rotation1": -25.0f,
"Rotation0": 25.0f,
"Pivot0": -1.0f,
"Pivot1": 0.0f,
"Rotation2": 0.0f
},
{
"Pivot2": 0.0f,
"Part": "LEFT_ARM",
"Rotation1": -202.0f,
"Rotation0": -75.0f,
"Pivot0": 1.0f,
"Pivot1": 2.0f,
"Rotation2": 37.0f
},
{
"Pivot2": -4.0f,
"Part": "BODY",
"Rotation1": -31.0f,
"Rotation0": 31.0f,
"Pivot0": 2.0f,
"Pivot1": 2.0f,
"Rotation2": 0.0f
},
{
"Pivot2": -1.0f,
"Part": "RIGHT_LEG",
"Rotation1": 0.0f,
"Rotation0": 0.0f,
"Pivot0": 0.0f,
"Pivot1": 0.0f,
"Rotation2": 0.0f
}
],
"Smooth": 0b,
"Duration": 3
}
],
"CurrentFrameTime": 0,
"CurrentFrame": 0,
"Smooth": 0b,
"ID": 21,
"WhileAttacking": 1b,
"WhileWalking": 1b,
"Name": "Ability_OrbDual_Windup",
"WhileStanding": 1b
}