extend("fiskheroes:hero_basic");
loadTextures({
   "layer1": "pack:nova_layer1",
    "layer2": "pack:nova_layer2",
	"stone": "pack:nova_glow"
});

var utils = implement("fiskheroes:external/utils");



function init(renderer) {
    parent.init(renderer);
    renderer.setLights((entity, renderLayer) => renderLayer == "CHESTPLATE" ? "stone" : null);

   
}

function initEffects(renderer) {
	

   utils.bindTrail(renderer, "pack:nova");
	
    utils.addCameraShake(renderer, 0.015, 1.5, "fiskheroes:flight_boost_timer");
    
    

	   utils.bindBeam(renderer, "fiskheroes:energy_projection", "fiskheroes:energy_projection", "rightArm", 0x524fff, [
        {  "firstPerson": [-3.75, 3.0, -8.0], "offset":  [0, 6.0, 0.0], "size": [3.5, 3.5] },
        {  "firstPerson": [3.75, 3.0, -8.0], "offset":  [0, 6.0, 0.0], "size": [3.5, 3.5], "anchor": "leftArm" }
    ]).setParticles(renderer.createResource("PARTICLE_EMITTER", "fiskheroes:impact_energy_projection"));
utils.setOpacityWithData(renderer, 0.5, 1.0, "fiskheroes:intangibility_timer");
    // Charged Beam   
	utils.bindParticles(renderer, "pack:nova").setCondition(entity => entity.getData("fiskheroes:flying"));
    utils.bindBeam(renderer, "fiskheroes:lightning_cast", "fiskheroes:lightning_cast", "rightArm", 0x0049FF, [
        { "firstPerson": [-8.0, 4.5, -10.0], "offset": [-0.5, 9.0, 0.0], "size": [0.75, 0.75] }
    ]);
}

function initAnimations(renderer) {
	    parent.initAnimations(renderer);
   parent.initAnimations(renderer);
    renderer.removeCustomAnimation("basic.BLOCKING");
    renderer.removeCustomAnimation("basic.CHARGED_BEAM");

    addAnimationWithData(renderer, "antimonitor.ANTIBLAST", "fiskheroes:aiming", "fiskheroes:beam_charge");
    utils.addFlightAnimation(renderer, "mmcw.FLIGHT", "fiskheroes:flight/default_arms_forward.anim.json");
    utils.addHoverAnimation(renderer, "mmcw.HOVER", "fiskheroes:flight/idle/neutral");
}
 


