function init(hero) {
    hero.setName("Shang chi(Ten rings)");
    hero.setTier(3);
    
    hero.setChestplate("item.superhero_armor.piece.chestpiece");
    
    hero.addPowers("fiskheroes:charged_punch", "fiskheroes:pain_resistance", "randomhero:fire_rings", "randomhero:fire_rings", "fiskheroes:near_invulnerability", "fiskheroes:leaping");
    hero.addAttribute("PUNCH_DAMAGE", 6.0, 0);
    hero.addAttribute("WEAPON_DAMAGE", 3.0, 0);
    hero.addAttribute("JUMP_HEIGHT", 2.5, 0);
    hero.addAttribute("FALL_RESISTANCE", 4.0, 0);
    hero.addAttribute("BASE_SPEED_LEVELS", 1.0, 0);
    
    hero.addKeyBind("CHARGED_PUNCH", "Ten rings", 1);
	
    hero.setModifierEnabled(isModifierEnabled);
    hero.addAttributeProfile("PUNCH", punchProfile);
    hero.addAttributeProfile("BLUNT", bluntProfile);
    hero.setAttributeProfile(getAttributeProfile);
}

function punchProfile(profile) {
    profile.inheritDefaults();
    profile.addAttribute("PUNCH_DAMAGE", 10.5, 0);
    profile.addAttribute("KNOCKBACK", 6.5, 0);
}

function bluntProfile(profile) {
    profile.inheritDefaults();
    profile.addAttribute("PUNCH_DAMAGE", 10.5, 0);
    profile.addAttribute("FALL_RESISTANCE", 3.5, 0);
    profile.addAttribute("BASE_SPEED", -0.2, 1);
}

function getAttributeProfile(entity) {
    return entity.getData("fiskheroes:punchmode") ? entity.getData("fiskheroes:punch_charged") ? "PUNCH" : "BLUNT" : null;
}

function isModifierEnabled(entity, modifier) {
    switch (modifier.name()) {
    case "fiskheroes:fireball":
        return !entity.getData("fiskheroes:punchmode");
    default:
        return true;
    }
}
