

PalladiumEvents.registerAnimations((event) => {
    event.register('heroes/geo_armor', 15, (builder) => {
let animation_geo = animationUtil.getAnimationTimerAbilityValue(builder.getPlayer(), 'heroes:geokinetic_armor', 'Geo_Block_Abil', builder.getPartialTicks());
if (animation_geo > 0 && !builder.isFirstPerson()) {
    builder.get('right_arm')
        .setXRotDegrees(-85)
        .setYRotDegrees(-50)
        .setZRotDegrees(-70)
        .animate('InOutCubic', animation_geo);

    builder.get('left_arm')
        .setXRotDegrees(-85)
        .setYRotDegrees(50)
        .setZRotDegrees(70)
        .animate('InOutCubic', animation_geo);

}
 if (animation_geo > 0.0 && builder.isFirstPerson()) {
            // do first-person animations
    builder.get('right_arm').setXRotDegrees(-55).setYRotDegrees(15).setZRotDegrees(0).setY(1).setZ(-3).animate('InOutCubic', animation_geo);
    builder.get('left_arm').setXRotDegrees(-55).setYRotDegrees(-15).setZRotDegrees(0).setY(1).setZ(-3).animate('InOutCubic', animation_geo);
        } else {
            // do third-person animations
        }
    });
});





PalladiumEvents.registerAnimations((event) => {
    event.register('heroes/speed_barrage_1', 15, (builder) => {
		if (abilityUtil.isEnabled(builder.getPlayer(), "heroes:augmented_movement_potential", "Barrage_1")) {
		if (!builder.isFirstPerson()) {
            const halfPi = 1.57079632679;

                builder.get('left_arm')
                    .setXRot(builder.getModel().head.xRot - halfPi)
                    .setYRot(builder.getModel().head.yRot)
                    .setZRot(builder.getModel().head.zRot)
		     .translateZ(2)
		     .translateY(4)
		     .translateX(6);
                builder.get('right_arm')
                    .setXRot(builder.getModel().head.xRot - halfPi)
                    .setYRot(builder.getModel().head.yRot)
                    .setZRot(builder.getModel().head.zRot)
		     .translateZ(-5)
		     .translateY(-2)
		     .translateX(-6);
	}
	if (builder.isFirstPerson()) {

    builder.get('right_arm').setXRotDegrees(-8.5).setYRotDegrees(-32.5).setZRotDegrees(-33).setY(-4).setX(-4).setZ(2);

    builder.get('left_arm').setXRotDegrees(-8.5).setYRotDegrees(32.5).setZRotDegrees(33).setY(1).setX(5).setZ(4);
	}
		}
	    });
});

PalladiumEvents.registerAnimations((event) => {
    event.register('heroes/speed_barrage_2', 15, (builder) => {
		
		if (abilityUtil.isEnabled(builder.getPlayer(), "heroes:augmented_movement_potential", "Barrage_2")) {
		if (!builder.isFirstPerson()) {
            const halfPi = 1.57079632679;

                builder.get('left_arm')
                    .setXRot(builder.getModel().head.xRot - halfPi)
                    .setYRot(builder.getModel().head.yRot)
                    .setZRot(builder.getModel().head.zRot)
		     .translateZ(-5)
		     .translateY(-2)
		     .translateX(6);
                builder.get('right_arm')
                    .setXRot(builder.getModel().head.xRot - halfPi)
                    .setYRot(builder.getModel().head.yRot)
                    .setZRot(builder.getModel().head.zRot)
		     .translateZ(2)
		     .translateY(4)
		     .translateX(-6);
	}
	if (builder.isFirstPerson()) {

    builder.get('right_arm').setXRotDegrees(-8.5).setYRotDegrees(-32.5).setZRotDegrees(-33).setY(1).setX(-4).setZ(2);

    builder.get('left_arm').setXRotDegrees(-8.5).setYRotDegrees(32.5).setZRotDegrees(33).setY(-4).setX(5).setZ(4);
	}
		}

	    });
});

PalladiumEvents.registerAnimations((event) => {
    event.register('heroes/speed_barrage_3', 15, (builder) => {
		
		if (abilityUtil.isEnabled(builder.getPlayer(), "heroes:augmented_movement_potential", "Barrage_3")) {
		if (!builder.isFirstPerson()) {
            const halfPi = 1.57079632679;

                builder.get('left_arm')
                    .setXRot(builder.getModel().head.xRot - halfPi)
                    .setYRot(builder.getModel().head.yRot)
                    .setZRot(builder.getModel().head.zRot)
		     .translateZ(2)
		     .translateY(4)
		     .translateX(6);
                builder.get('right_arm')
                    .setXRot(builder.getModel().head.xRot - halfPi)
                    .setYRot(builder.getModel().head.yRot)
                    .setZRot(builder.getModel().head.zRot)
		     .translateZ(-5)
		     .translateY(-2)
		     .translateX(-6);
	}
	if (builder.isFirstPerson()) {
    builder.get('right_arm').setXRotDegrees(-8.5).setYRotDegrees(-32.5).setZRotDegrees(-33).setY(-4).setX(-4).setZ(2);

    builder.get('left_arm').setXRotDegrees(-8.5).setYRotDegrees(32.5).setZRotDegrees(33).setY(1).setX(5).setZ(4);
	}
		}
	    });
});

PalladiumEvents.registerAnimations((event) => {
    event.register('heroes/speed_barrage_4', 15, (builder) => {
		
		if (abilityUtil.isEnabled(builder.getPlayer(), "heroes:augmented_movement_potential", "Barrage_4")) {
		if (!builder.isFirstPerson()) {
            const halfPi = 1.57079632679;

                builder.get('left_arm')
                    .setXRot(builder.getModel().head.xRot - halfPi)
                    .setYRot(builder.getModel().head.yRot)
                    .setZRot(builder.getModel().head.zRot)
		     .translateZ(-5)
		     .translateY(-2)
		     .translateX(6);
                builder.get('right_arm')
                    .setXRot(builder.getModel().head.xRot - halfPi)
                    .setYRot(builder.getModel().head.yRot)
                    .setZRot(builder.getModel().head.zRot)
		     .translateZ(2)
		     .translateY(4)
		     .translateX(-6);
	}
	if (builder.isFirstPerson()) {

    builder.get('right_arm').setXRotDegrees(-8.5).setYRotDegrees(-32.5).setZRotDegrees(-33).setY(1).setX(-4).setZ(2);

    builder.get('left_arm').setXRotDegrees(-8.5).setYRotDegrees(32.5).setZRotDegrees(33).setY(-4).setX(5).setZ(4);
	}
		}
	    });
});
PalladiumEvents.registerAnimations((event) => {
    event.register('heroes/ocular_power', 15, (builder) => {
if (abilityUtil.isEnabled(builder.getPlayer(), "heroes:ocular_psychogenesis", "Reflex_Dodge_Type_1")) {
let animation_dodge = animationUtil.getAnimationTimerAbilityValue(builder.getPlayer(), 'heroes:ocular_psychogenesis', 'Reflex_Dodge_Anim_Frames', builder.getPartialTicks());
if (animation_dodge > 0 && !builder.isFirstPerson()) {
    builder.get('body')
        .rotateYDegrees(-45).moveZ(1).moveX(-4).animate('easeOutBack', animation_dodge);
		builder.get('head')
    .setX(0)
    .setY(2)
    .setZ(4).animate('InOutCubic', animation_dodge);

builder.get('chest')
    .setX(0)
    .setY(1)
    .setZ(4)
    .setXRotDegrees(-20).animate('InOutCubic', animation_dodge);

builder.get('right_arm')
    .setX(-5)
    .setY(3)
    .setZ(4)
    .setXRotDegrees(-9)
    .setYRotDegrees(3)
    .setZRotDegrees(19).animate('InOutCubic', animation_dodge);

builder.get('left_arm')
    .setX(5)
    .setY(3)
    .setZ(3)
    .setXRotDegrees(-45)
    .setZRotDegrees(-22.5).animate('InOutCubic', animation_dodge);

builder.get('right_leg')
    .setXRotDegrees(-2)
    .setYRotDegrees(18)
    .setZRotDegrees(1.5).animate('InOutCubic', animation_dodge);

builder.get('left_leg')
    .setXRotDegrees(7.5)
    .setYRotDegrees(-10)
    .setZRotDegrees(-1).animate('InOutCubic', animation_dodge);
		}
}
if (abilityUtil.isEnabled(builder.getPlayer(), "heroes:ocular_psychogenesis", "Reflex_Dodge_Type_2")) {
let animation_dodge = animationUtil.getAnimationTimerAbilityValue(builder.getPlayer(), 'heroes:ocular_psychogenesis', 'Reflex_Dodge_Anim_Frames', builder.getPartialTicks());
if (animation_dodge > 0 && !builder.isFirstPerson()) {
    builder.get('body')
        .rotateYDegrees(45).moveZ(-1).moveX(4).animate('easeOutBack', animation_dodge);
	builder.get('head')
    .setX(0)
    .setY(2)
    .setZ(4).animate('InOutCubic', animation_dodge);

builder.get('chest')
    .setX(0)
    .setY(1)
    .setZ(4)
    .setXRotDegrees(-20).animate('InOutCubic', animation_dodge);

builder.get('right_arm')
    .setX(-5)
    .setY(3)
    .setZ(3)
    .setXRotDegrees(-45)
    .setYRotDegrees(3)
    .setZRotDegrees(22.5).animate('InOutCubic', animation_dodge);

builder.get('left_arm')
    .setX(5)
    .setY(3)
    .setZ(4)
    .setXRotDegrees(-9)
    .setYRotDegrees(-3)
    .setZRotDegrees(-20).animate('InOutCubic', animation_dodge);

builder.get('right_leg')
    .setXRotDegrees(7.5)
    .setYRotDegrees(10)
    .setZRotDegrees(1).animate('InOutCubic', animation_dodge);

builder.get('left_leg')
    .setXRotDegrees(-2)
    .setYRotDegrees(-18)
    .setZRotDegrees(-1.5).animate('InOutCubic', animation_dodge);
		}
}

    });
});

PalladiumEvents.registerAnimations((event) => {
    event.register('heroes/danger_sense', 15, (builder) => {
if (abilityUtil.isEnabled(builder.getPlayer(), "heroes:danger_sense", "Reflex_Dodge_Type_1")) {
let animation_dodge = animationUtil.getAnimationTimerAbilityValue(builder.getPlayer(), 'heroes:danger_sense', 'Reflex_Dodge_Anim', builder.getPartialTicks());
if (animation_dodge > 0 && !builder.isFirstPerson()) {
    builder.get('body')
        .rotateYDegrees(-45).moveZ(1).moveX(-4).animate('easeOutBack', animation_dodge);
		builder.get('right_arm')
    .setXRotDegrees(-44)
    .setYRotDegrees(-26)
    .setZRotDegrees(-3).animate('InOutCubic', animation_dodge);

builder.get('left_arm')
    .setXRotDegrees(20)
    .setYRotDegrees(-4)
    .setZRotDegrees(-4).animate('InOutCubic', animation_dodge);

builder.get('right_leg')
    .setXRotDegrees(7.5)
    .setYRotDegrees(5)
    .setZRotDegrees(0).animate('InOutCubic', animation_dodge);

builder.get('left_leg')
    .setXRotDegrees(-5)
    .setYRotDegrees(7.5)
    .setZRotDegrees(0).animate('InOutCubic', animation_dodge);
		}
}
if (abilityUtil.isEnabled(builder.getPlayer(), "heroes:danger_sense", "Reflex_Dodge_Type_2")) {
let animation_dodge = animationUtil.getAnimationTimerAbilityValue(builder.getPlayer(), 'heroes:danger_sense', 'Reflex_Dodge_Anim', builder.getPartialTicks());
if (animation_dodge > 0 && !builder.isFirstPerson()) {
    builder.get('body')
        .rotateYDegrees(45).moveZ(-1).moveX(4).animate('easeOutBack', animation_dodge);
		builder.get('right_arm')
    .setXRotDegrees(20)
    .setYRotDegrees(4)
    .setZRotDegrees(4).animate('InOutCubic', animation_dodge);

builder.get('left_arm')
    .setXRotDegrees(-44)
    .setYRotDegrees(26)
    .setZRotDegrees(3).animate('InOutCubic', animation_dodge);

builder.get('right_leg')
    .setXRotDegrees(-5)
    .setYRotDegrees(-7.5)
    .setZRotDegrees(0).animate('InOutCubic', animation_dodge);

builder.get('left_leg')
    .setXRotDegrees(7.5)
    .setYRotDegrees(-5)
    .setZRotDegrees(0).animate('InOutCubic', animation_dodge);
		}
}

    });
});

PalladiumEvents.registerAnimations((event) => {
    event.register('heroes/augmented_movement_potential', 15, (builder) => {
if (abilityUtil.isEnabled(builder.getPlayer(), "heroes:augmented_movement_potential", "Reflex_Dodge_Type_1")) {
let animation_dodge = animationUtil.getAnimationTimerAbilityValue(builder.getPlayer(), 'heroes:augmented_movement_potential', 'Reflex_Dodge_Anim', builder.getPartialTicks());
if (animation_dodge > 0 && !builder.isFirstPerson()) {
    builder.get('body')
        .rotateYDegrees(-45).moveZ(1).moveX(-4).animate('easeOutBack', animation_dodge);
		builder.get('right_arm')
    .setXRotDegrees(-44)
    .setYRotDegrees(-26)
    .setZRotDegrees(-3).animate('InOutCubic', animation_dodge);

builder.get('left_arm')
    .setXRotDegrees(20)
    .setYRotDegrees(-4)
    .setZRotDegrees(-4).animate('InOutCubic', animation_dodge);

builder.get('right_leg')
    .setXRotDegrees(7.5)
    .setYRotDegrees(5)
    .setZRotDegrees(0).animate('InOutCubic', animation_dodge);

builder.get('left_leg')
    .setXRotDegrees(-5)
    .setYRotDegrees(7.5)
    .setZRotDegrees(0).animate('InOutCubic', animation_dodge);
		}
}
if (abilityUtil.isEnabled(builder.getPlayer(), "heroes:augmented_movement_potential", "Reflex_Dodge_Type_2")) {
let animation_dodge = animationUtil.getAnimationTimerAbilityValue(builder.getPlayer(), 'heroes:augmented_movement_potential', 'Reflex_Dodge_Anim', builder.getPartialTicks());
if (animation_dodge > 0 && !builder.isFirstPerson()) {
    builder.get('body')
        .rotateYDegrees(45).moveZ(-1).moveX(4).animate('easeOutBack', animation_dodge);
		builder.get('right_arm')
    .setXRotDegrees(20)
    .setYRotDegrees(4)
    .setZRotDegrees(4).animate('InOutCubic', animation_dodge);

builder.get('left_arm')
    .setXRotDegrees(-44)
    .setYRotDegrees(26)
    .setZRotDegrees(3).animate('InOutCubic', animation_dodge);

builder.get('right_leg')
    .setXRotDegrees(-5)
    .setYRotDegrees(-7.5)
    .setZRotDegrees(0).animate('InOutCubic', animation_dodge);

builder.get('left_leg')
    .setXRotDegrees(7.5)
    .setYRotDegrees(-5)
    .setZRotDegrees(0).animate('InOutCubic', animation_dodge);
		}
}

    });
});


PalladiumEvents.registerAnimations((event) => {
    event.register('heroes/wall_run', 15, (builder) => {
		
          if (abilityUtil.isEnabled(builder.getPlayer(), "heroes:augmented_movement_potential", "Wall_Run")) {
		if (!builder.isFirstPerson()) {
	builder.get('head').setXRotDegrees(0);
	builder.get('body').setXRotDegrees(90).setYRotDegrees(0).setZRotDegrees(0);
      builder.get('body').translateX(0).translateY(15).translateZ(-5);

	}
}

          if (abilityUtil.isEnabled(builder.getPlayer(), "heroes:augmented_movement_potential", "Wall_Run_1")) {
		if (!builder.isFirstPerson()) {
	builder.get('left_arm').setXRotDegrees(45).setYRotDegrees(0).setZRotDegrees(0);
	builder.get('right_leg').setXRotDegrees(45).setYRotDegrees(0).setZRotDegrees(0);
	builder.get('right_arm').setXRotDegrees(-45).setYRotDegrees(0).setZRotDegrees(0);
	builder.get('left_leg').setXRotDegrees(-45).setYRotDegrees(0).setZRotDegrees(0);

	}
}
          if (abilityUtil.isEnabled(builder.getPlayer(), "heroes:augmented_movement_potential", "Wall_Run_2")) {
		if (!builder.isFirstPerson()) {
	builder.get('left_arm').setXRotDegrees(0).setYRotDegrees(0).setZRotDegrees(0);
	builder.get('right_leg').setXRotDegrees(0).setYRotDegrees(0).setZRotDegrees(0);
	builder.get('right_arm').setXRotDegrees(0).setYRotDegrees(0).setZRotDegrees(0);
	builder.get('left_leg').setXRotDegrees(0).setYRotDegrees(0).setZRotDegrees(0);

	}
}
          if (abilityUtil.isEnabled(builder.getPlayer(), "heroes:augmented_movement_potential", "Wall_Run_3")) {
		if (!builder.isFirstPerson()) {
	builder.get('left_arm').setXRotDegrees(-45).setYRotDegrees(0).setZRotDegrees(0);
	builder.get('right_leg').setXRotDegrees(-45).setYRotDegrees(0).setZRotDegrees(0);
	builder.get('right_arm').setXRotDegrees(45).setYRotDegrees(0).setZRotDegrees(0);
	builder.get('left_leg').setXRotDegrees(45).setYRotDegrees(0).setZRotDegrees(0);

	}
}

    });
});