function init(hero) {
    hero.setName("Harley Quinn");
	hero.setVersion("item.superhero_armor.version.comics");
    hero.setTier(1);

    hero.setHelmet("Head");
    hero.setChestplate("Torso");
    hero.setLeggings("Legs");
    hero.setBoots("Roller Skates");
    hero.addPrimaryEquipment("fisktag:weapon{WeaponType:skarlet:pop_gun}", true, item => item.nbt().getString("WeaponType") == 'skarlet:pop_gun');
    hero.addPrimaryEquipment("fisktag:weapon{WeaponType:skarlet:mallet}", true, item => item.nbt().getString("WeaponType") == 'skarlet:mallet');

    hero.addPowers("skarlet:roller_skates");

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

    hero.addKeyBind("AIM", "key.aim", -1);
    hero.addKeyBind("GUN_RELOAD", "key.reload", 1);

    hero.setAttributeProfile(getProfile);
    hero.setKeyBindEnabled((entity, keyBind) => keyBind != "GUN_RELOAD" || (entity.getHeldItem().nbt().getString("WeaponType") == "skarlet:pop_gun" || entity.getHeldItem().isGun()) && !entity.getData("fiskheroes:aiming"));
    hero.setHasPermission((entity, permission) => permission == "USE_GUN");
    hero.supplyFunction("canAim", entity => {
        var gun = entity.getHeldItem().nbt().getString("WeaponType");
        return (gun == "skarlet:pop_gun" || entity.getHeldItem().isGun());
    });
    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.addSoundEvent("PUNCH", "skarlet:mallet_hit");
	
    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 getProfile(entity) {
    if (entity.getData("skarlet:dyn/roller_tierOne") < 1 && entity.isSprinting() && entity.isOnGround()) {
        return "ROLLER_SKATES_T0";
	} else if (entity.getData("skarlet:dyn/roller_tierOne") == 1 && entity.getData("skarlet:dyn/roller_tierTwo") < 1 && entity.isOnGround()) {
        return "ROLLER_SKATES_T1";
    } else if (entity.getData("skarlet:dyn/roller_tierTwo") == 1 && entity.getData("skarlet:dyn/roller_tierThree") < 1 && entity.isOnGround()) {
        return "ROLLER_SKATES_T2";
    } else if (entity.getData("skarlet:dyn/roller_tierThree") == 1 && entity.getData("skarlet:dyn/roller_tierFour") < 1 && entity.isOnGround()) {
        return "ROLLER_SKATES_T3";
    } else if (entity.getData("skarlet:dyn/roller_tierFour") == 1 && entity.isOnGround()) {
        return "ROLLER_SKATES_T4";
    }

    return null;
}
