extend("fiskheroes:hero_basic");
loadTextures({
	"curt": "tgheroes:lizard/connors",
	"beast": "tgheroes:lizard/lizard",
	"suit": "tgheroes:lizard/connors.tx.json",
    "segment": "tgheroes:lizard/segment",
	"tip": "tgheroes:lizard/tip"
});

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

function init(renderer) {
    parent.init(renderer);
    renderer.setTexture((entity, renderLayer) => {
		if (!entity.isDisplayStand()) {
            var timer = entity.getInterpolatedData("fiskheroes:dyn/giant_mode_timer");
            return timer == 0 ? "curt" : timer < 1 ? "suit" : "beast";
        }
        return "beast";
    });
	
    renderer.showModel("CHESTPLATE", "head", "headwear", "body", "rightArm", "leftArm", "rightLeg", "leftLeg");
    renderer.fixHatLayer("CHESTPLATE");
}

function initEffects(renderer) {
  
   var lizardsegment = utils.createModel(renderer, "tgheroes:lizardsegment", "segment");
   var lizardtip = utils.createModel(renderer, "tgheroes:lizardtip", "tip");
    var tentacles = renderer.bindProperty("fiskheroes:tentacles").setTentacles([
        { "offset": [2.0, -10.0, -2.0], "direction": [10.0, 0.0, -10.0] }

    ]);
    tentacles.anchor.set("body");
    tentacles.setSegmentModel(lizardsegment);
	tentacles.setHeadModel(lizardtip);
    tentacles.segmentLength = 1.0;
    tentacles.segments = 30;
	
}



