function init(hero) {
    hero.setName("Harley Quinn");
	hero.setVersion("Comics");
    hero.setTier(1);

    hero.setHelmet("Head");
    hero.setChestplate("Torso");
    hero.setLeggings("Legs");
    hero.setBoots("Roller Skates");

    hero.addPowers("skarredheroes:roller_skates", "skarredheroes:mallet");

    hero.addAttribute("PUNCH_DAMAGE", 3.0, 0);
    hero.addAttribute("WEAPON_DAMAGE", 3.5, 0);
    hero.addAttribute("JUMP_HEIGHT", 1.0, 0);
    hero.addAttribute("FALL_RESISTANCE", 6.0, 0);
    hero.addAttribute("SPRINT_SPEED", 0.2, 1);


    var speed = [-0.6, -0.4, -0.3, -0.2, 0];
    for (var i=0; i<=4;i++) {
        hero.addAttributeProfile("ROLLER_SKATES_T" + i, (profile) => {
            profile.addAttribute("BASE_SPEED_LEVELS", 1, 0);
            profile.addAttribute("SPRINT_SPEED", speed[i], 1);
        });
    }

    hero.addKeyBind("BLADE", "Equip/Unequip Mallet", 1);
	
    hero.addSoundEvent("PUNCH", "skarredheroes:mallet_hit");
	
    hero.addAttributeProfile("MALLET", malletProfile);
    hero.setAttributeProfile(getProfile);
    hero.setDamageProfile(getDMGProfile);
    hero.addDamageProfile("MALLET", {"types": {"BLUNT": 0.25}});
	
    hero.setTickHandler((entity, manager) => {   
        manager.incrementData(entity, "fiskheroes:dyn/speed_sprint_timer", 4, entity.isSprinting());
        if (entity.getData("fiskheroes:speeding") != entity.isSprinting()) {
            manager.setData(entity, "fiskheroes:speeding", entity.isSprinting());
        }
    });
}

function malletProfile(profile) {
    profile.inheritDefaults();
    profile.addAttribute("PUNCH_DAMAGE", 6.8, 0);
}

function getProfile(entity) {
    if (entity.getData("skarredheroes:dyn/roller_tierOne") < 1 && entity.isSprinting()) {
        return "ROLLER_SKATES_T0";
	} else if (entity.getData("skarredheroes:dyn/roller_tierOne") == 1 && entity.getData("skarredheroes:dyn/roller_tierTwo") < 1) {
        return "ROLLER_SKATES_T1";
    } else if (entity.getData("skarredheroes:dyn/roller_tierTwo") == 1 && entity.getData("skarredheroes:dyn/roller_tierThree") < 1) {
        return "ROLLER_SKATES_T2";
    } else if (entity.getData("skarredheroes:dyn/roller_tierThree") == 1 && entity.getData("skarredheroes:dyn/roller_tierFour") < 1) {
        return "ROLLER_SKATES_T3";
    } else if (entity.getData("skarredheroes:dyn/roller_tierFour") == 1) {
        return "ROLLER_SKATES_T4";
    }

    return entity.getData("fiskheroes:blade") ? "MALLET" : null;
}

function getDMGProfile(entity) {
    return entity.getData("fiskheroes:blade") ? "MALLET" : null;
}
