
function init(hero) {
    hero.setName("Human Torch");
    hero.setTier(6);
    
    hero.setHelmet("item.superhero_armor.piece.helmet");
    hero.setChestplate("item.superhero_armor.piece.chestpiece");
    hero.setLeggings("item.superhero_armor.piece.pants");
    hero.setBoots("item.superhero_armor.piece.boots");
    
    hero.addPowers("pack:cosmicfire");
   
    hero.addAttribute("WEAPON_DAMAGE", 1, 0);
    hero.addAttribute("FALL_RESISTANCE", 5.0, 0);
    hero.addAttribute("JUMP_HEIGHT", 0.8, 0);
    hero.addAttribute("PUNCH_DAMAGE", 6, 0);
    hero.addAttribute("SPRINT_SPEED", 0.45, 1);
    
	 hero.addKeyBind("AIM", "Flame Blast", 1);
    
    hero.setHasProperty(hasProperty);
    hero.supplyFunction("canAim", canAim);
    
    hero.setDamageProfile(getDamageProfile);
    hero.addDamageProfile("FLAME_PUNCH", {
        "types": {
            "BLUNT": 1.0,
            "FIRE": 0.4
        },
        "properties": {
            "HEAT_TRANSFER": 40,
            "IGNITE": 2
        }
    });
    
    hero.addSoundEvent("MASK_OPEN", "fiskheroes:flame_off");
    hero.addSoundEvent("MASK_CLOSE", "fiskheroes:flame_on");
}

function getDamageProfile(entity) {
    return entity.getHeldItem().isEmpty() ? "FLAME_PUNCH" : null;
}

function hasProperty(entity, property) {
    return property == "MASK_TOGGLE";
}

function canAim(entity) {
    return entity.getHeldItem().isEmpty() && !entity.getData("fiskheroes:jetpacking");
}
