function init(hero) {
    hero.setName("Human Torch/Johnny Storm");
    hero.setTier(5);
    
    hero.setHelmet("Hair");
    hero.setChestplate("Chestplate");
    hero.setLeggings("Leggings");
    hero.setBoots("Boots");
    
	hero.addPowers("tgheroes:torch");
    hero.addAttribute("PUNCH_DAMAGE", 4.0, 0);
    hero.addAttribute("JUMP_HEIGHT", 1.0, 0);
    hero.addAttribute("FALL_RESISTANCE", 8.0, 0);
    hero.addAttribute("WEAPON_DAMAGE", 2.0, 0);
	hero.addAttribute("SPRINT_SPEED", 0.15, 1);
	
    hero.addKeyBind("AIM", "Fire", 2); 
	hero.addKeyBind("FLAMEON", "'Flame On'", 1);
	
	hero.setDamageProfile(entity => entity.getData("tgheroes:dyn/flame_on") && entity.getHeldItem().isEmpty() ? "FLAME_PUNCH" : null);
    hero.addDamageProfile("FLAME_PUNCH", {
        "types": {
            "BLUNT": 1.0,
            "FIRE": 1.0
        },
        "properties": {
            "HEAT_TRANSFER": 40,
            "IGNITE": 2
        }
    });
	
	hero.supplyFunction("canAim", canAim);
	hero.setKeyBindEnabled(isKeyBindEnabled);
	hero.setModifierEnabled(isModifierEnabled);
}
function canAim(entity) {
    return entity.getHeldItem().isEmpty() ;
}

function isKeyBindEnabled(entity, keyBind) {  
	switch (keyBind) {
	case "AIM":
        return entity.getData("tgheroes:dyn/flame_on");	
    default:
        return true;
    }
}

function isModifierEnabled(entity, modifier) {
    if (modifier.name() == "fiskheroes:controlled_flight") {
        return entity.getData("tgheroes:dyn/flame_on");	
	}
    return true;
}