PalladiumEvents.registerAnimations((event) => {
    event.register('heroes/plasmaflight', 2, (builder) => {

const progress_flight = animationUtil.getAnimationTimerAbilityValue(builder.getPlayer(), 'heroes:plasma_manipulation', 'Plasma_Flight_Anim', builder.getPartialTicks());
if (progress_flight > 0.0 && !builder.isFirstPerson()) {

    builder.get('right_arm').setZRot(0.2).setYRot(0.2).setXRot(0).animate('InOutCubic', progress_flight);

    builder.get('left_arm').setZRot(-0.2).setYRot(-0.2).setXRot(0).animate('InOutCubic', progress_flight);

    builder.get('right_leg').setZRot(0.1).setYRot(0.2).setXRot(0).animate('InOutCubic', progress_flight);

    builder.get('left_leg').setZRot(-0.1).setYRot(-0.2).setXRot(0).animate('InOutCubic', progress_flight);
}
    });
});

PalladiumEvents.registerAnimations((event) => {
    event.register('heroes/plasmaarmor', 2, (builder) => {

const progress_armor = animationUtil.getAnimationTimerAbilityValue(builder.getPlayer(), 'heroes:plasma_manipulation', 'Plasma_Armor_Anim', builder.getPartialTicks());
if (progress_armor > 0.0 && !builder.isFirstPerson()) {

    builder.get('head').setXRotDegrees(0).animate('InOutCubic', progress_armor);
    builder.get('chest').animate('InOutCubic', progress_armor);

                builder.get('right_arm')
                    .rotateY(builder.getModel().rightArm.zRot)
			  .setX(-6.3)
                    .animate('InOutCubic', progress_armor);

                builder.get('left_arm')
                    .rotateY(builder.getModel().leftArm.zRot)
			  .setX(6.5)
                    .animate('InOutCubic', progress_armor);

    builder.get('right_leg').rotateZ(0.05).setX(-2.5).animate('InOutCubic', progress_armor);

    builder.get('left_leg').rotateZ(-0.05).setX(2.5).animate('InOutCubic', progress_armor);



 	builder.get('body').setY(2.5).animate('InOutCubic', progress_armor);
}
    });
});

PalladiumEvents.registerAnimations((event) => {
    event.register('heroes/plasmahand', 2, (builder) => {

const progress = animationUtil.getAnimationTimerAbilityValue(builder.getPlayer(), 'heroes:plasma_manipulation', 'Plasma_Ball_Anim', builder.getPartialTicks());
if (progress > 0.0 && !builder.isFirstPerson()) {

    builder.get('right_arm').setXRotDegrees(0).setZRotDegrees(25).setYRotDegrees(0).animate('InOutCubic', progress);
}
        if (progress > 0.0 && builder.isFirstPerson()) {
            // do first-person animations
    builder.get('right_arm').setXRotDegrees(0).setYRotDegrees(25).setZRotDegrees(0).animate('InOutCubic', progress);
        } else {
            // do third-person animations
        }

const progress_plasma_cascade = animationUtil.getAnimationTimerAbilityValue(builder.getPlayer(), 'heroes:plasma_manipulation', 'Plasma_Cascade_Shoot', builder.getPartialTicks());
if (progress_plasma_cascade > 0.0 && !builder.isFirstPerson()) {

    builder.get('right_arm').rotateY(0).animate('InOutCubic', progress_plasma_cascade);
            const halfPi = 1.57079632679;
                builder.get('right_arm')
                    .setXRot(builder.getModel().head.xRot - halfPi)
                    .setYRot(builder.getModel().head.yRot)
                    .setZRot(builder.getModel().head.zRot)
                    .animate('InOutCubic', progress_plasma_cascade);

}
        if (progress_plasma_cascade > 0.0 && builder.isFirstPerson()) {
            // do first-person animations
    builder.get('right_arm').setXRotDegrees(-8.5).setYRotDegrees(-32.5).setZRotDegrees(-33).animate('InOutCubic', progress_plasma_cascade);
    builder.get('right_arm').setY(1).setX(-4).setZ(2).animate('InOutBack', progress_plasma_cascade);
        } else {
            // do third-person animations
        }
          if (abilityUtil.isEnabled(builder.getPlayer(), "heroes:plasma_manipulation", "Plasma_Cascade_Hand_Snap")) {
let animation = animationUtil.getAnimationTimerAbilityValue(builder.getPlayer(), 'heroes:plasma_manipulation', 'Plasma_Cascade_Hand_Snap', builder.getPartialTicks(),1, 3);
if (animation > 0 && !builder.isFirstPerson()) {
    builder.get('left_arm')
        .setXRotDegrees(-60)
        .setYRotDegrees(42)
        .setZRotDegrees(22)
        .animate('InOutCubic', animation);

}
}



    });
});


PalladiumEvents.registerAnimations((event) => {
    event.register('heroes/plasmahand_2', 2, (builder) => {


const progress_plasma_hit = animationUtil.getAnimationTimerAbilityValue(builder.getPlayer(), 'heroes:plasma_manipulation', 'Plasma_Ball_Hit', builder.getPartialTicks(), 2, 6);
if (progress_plasma_hit > 0.0 && !builder.isFirstPerson()) {

    builder.get('right_arm').rotateY(0).animate('InOutCubic', progress_plasma_hit);
            const halfPi = 1.57079632679;
                builder.get('right_arm')
                    .setXRot(builder.getModel().head.xRot - halfPi)
                    .setYRot(builder.getModel().head.yRot)
                    .setZRot(builder.getModel().head.zRot)
                    .animate('InOutCubic', progress_plasma_hit);

}
        if (progress_plasma_hit > 0.0 && builder.isFirstPerson()) {
            // do first-person animations
    builder.get('right_arm').setXRotDegrees(-8.5).setYRotDegrees(-32.5).setZRotDegrees(-33).animate('InOutCubic', progress_plasma_hit);
    builder.get('right_arm').setY(1).setX(-4).setZ(2).animate('InOutBack', progress_plasma_hit);
        } else {
            // do third-person animations
        }

const progress_plasma_shoot = animationUtil.getAnimationTimerAbilityValue(builder.getPlayer(), 'heroes:plasma_manipulation', 'Plasma_Ball_Shoot', builder.getPartialTicks(), 2, 6);
if (progress_plasma_shoot > 0.0 && !builder.isFirstPerson()) {

    builder.get('right_arm').rotateY(0).animate('InOutCubic', progress_plasma_shoot);
            const halfPi = 1.57079632679;
                builder.get('right_arm')
                    .setXRot(builder.getModel().head.xRot - halfPi)
                    .setYRot(builder.getModel().head.yRot)
                    .setZRot(builder.getModel().head.zRot)
                    .animate('InOutCubic', progress_plasma_shoot);

}
        if (progress_plasma_shoot > 0.0 && builder.isFirstPerson()) {
            // do first-person animations
    builder.get('right_arm').setXRotDegrees(-8.5).setYRotDegrees(-32.5).setZRotDegrees(-33).animate('InOutCubic', progress_plasma_shoot);
    builder.get('right_arm').setY(1).setX(-4).setZ(2).animate('InOutBack', progress_plasma_shoot);
        } else {
            // do third-person animations
        }

let animation_2 = animationUtil.getAnimationTimerAbilityValue(builder.getPlayer(), 'heroes:plasma_manipulation', 'Plasma_Cascade_Hand_Snap', builder.getPartialTicks(),3, 6);
if (animation_2 > 0 && !builder.isFirstPerson()) {
    builder.get('left_arm')
        .setXRotDegrees(-20)
        .setYRotDegrees(-67.5)
        .setZRotDegrees(-90)
        .animate('InOutCubic', animation_2);

}


    });
});