function init(hero) {
    hero.setName("Wild Dog /CW");
    hero.setTier(5);
    
    hero.setHelmet("item.superhero_armor.piece.mask");
    hero.setChestplate("item.superhero_armor.piece.chestpiece");
    hero.setLeggings("item.superhero_armor.piece.pants");
    hero.setBoots("item.superhero_armor.piece.boots");

    hero.addPowers("fiskheroes:enhanced_reflexes", "cwheropack:pistol_gun");
    hero.addAttribute("FALL_RESISTANCE", 0.45, 1);
    hero.addAttribute("WEAPON_DAMAGE", 3.0, 0);
    hero.addAttribute("PUNCH_DAMAGE", 5.30, 0);
    hero.addAttribute("SPRINT_SPEED", 0.3, 1);
    
    hero.addKeyBind("AIM", "Aim", 1);
    
    hero.setDefaultScale(0.99);

    hero.setRuleValueModifier(ruleModifier);
    hero.setModifierEnabled(isModifierEnabled);
    hero.supplyFunction("canAim", canAim);
}

function ruleModifier(entity, rule) {
    if (rule.name() == "fiskheroes:cooldown_energyblast") {
        return 7.0;
    }
    return null;
}

function isModifierEnabled(entity, modifier) {
	if (modifier == "fiskheroes:energy_blast") {
        return entity.getData("fiskheroes:aimed_timer") >= 1;
	}
	return true;
}

function canAim(entity) {
    return entity.getHeldItem().name() == "fiskheroes:rip_hunters_gun" || entity.getHeldItem().name() == "fiskheroes:chronos_rifle" || entity.getHeldItem().isEmpty();
}