function init(hero) {
    hero.setName("The Human Torch");
	hero.setVersion ("Movies");
    hero.setTier(6);

    hero.setChestplate("item.superhero_armor.piece.chestpiece");
    hero.setLeggings("item.superhero_armor.piece.pants");
    hero.setBoots("item.superhero_armor.piece.boots");
	
	
    hero.addPowers("soulhp:human_torch");
	
    hero.addKeyBind("AIM", "Flame Blast", 1);
    hero.addKeyBind("FLAME_ON", "Flame On!", 2);

    hero.addAttribute("FALL_RESISTANCE", 8.0, 0);
    hero.addAttribute("JUMP_HEIGHT", 2.0, 0);
    hero.addAttribute("PUNCH_DAMAGE", 3.0, 0);
    hero.addAttribute("SPRINT_SPEED", 0.30, 1);

    hero.addAttributeProfile("INACTIVE", inactiveProfile);
    hero.addAttributeProfile("ACTIVE", activeProfile);
    hero.setAttributeProfile(getAttributeProfile);
    hero.setModifierEnabled(isModifierEnabled);
	hero.setTierOverride(getTierOverride);
    hero.setKeyBindEnabled(isKeyBindEnabled);
	
	hero.supplyFunction("canAim", canAim);
}


function inactiveProfile(profile) {
    profile.revokeAugments();
}

function activeProfile(profile) {
    profile.addAttribute("PUNCH_DAMAGE", 7.5, 0);
    profile.addAttribute("SPRINT_SPEED", 0.9, 1);
    profile.inheritDefaults();
}

function getAttributeProfile(entity) {
    if (!entity.getData("soulhp:dyn/torch")) {
        return "INACTIVE";
    }
    else if (entity.getData("soulhp:dyn/torch")) {
        return "ACTIVE";
    }
    return true;
}

function isModifierEnabled(entity, modifier) {
	
	if (modifier.name() == "fiskheroes:regeneration") {
        return (entity.getData("soulhp:dyn/torch"));
    }
	else if (modifier.name() == "fiskheroes:propelled_flight") {
        return (entity.getData("soulhp:dyn/torch"));
    }
	else if (modifier.name() == "fiskheroes:fire_immunity") {
        return (entity.getData("soulhp:dyn/torch"));
    }
    else if (modifier.name() == "fiskheroes:flame_blast") {
        return (entity.getData("soulhp:dyn/torch"));
    }
    else if (modifier.name() == "fiskheroes:damage_weakness") {
        return (entity.getData("soulhp:dyn/torch"));
    }
    else if (modifier.name() == "fiskheroes:fireball") {
        return (entity.getData("soulhp:dyn/torch"));
    }
	return true;
}

function getTierOverride(entity) {
    return entity.getData("soulhp:dyn/torch") ? 6 : 0;
}

function isKeyBindEnabled(entity, keyBind) {

    switch (keyBind) {
    case "AIM":
        return (entity.getData("soulhp:dyn/torch"));
    default:
        return true;
    }
}

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