var bubble = implement("skarredheroes:external/bubble_cycle");

function init(hero) {
    hero.setName("Gwenpool");
    hero.setVersion("item.superhero_armor.version.comics");
    hero.setAliases("getpegged");
    hero.setTier(3);
    
    hero.setHelmet("Cowl");
    hero.setChestplate("Leotard");
    hero.setBoots("Boots");
    hero.addPrimaryEquipment("fiskheroes:katana{Dual:1}", true, item => item.nbt().getBoolean("Dual"));
    hero.addPrimaryEquipment("fiskheroes:desert_eagle{Dual:1}", true, item => item.nbt().getBoolean("Dual"));
   
    hero.addPowers("fiskheroes:grenades");
    hero.addAttribute("PUNCH_DAMAGE", 4.0, 0);
    hero.addAttribute("WEAPON_DAMAGE", 2.5, 0);
    hero.addAttribute("JUMP_HEIGHT", 0.5, 0);
    hero.addAttribute("FALL_RESISTANCE", 2.0, 0);
    hero.addAttribute("SPRINT_SPEED", 0.2, 1);
	
    hero.addKeyBind("AIM", "key.aim", -1);
    hero.addKeyBind("GUN_RELOAD", "key.reload", 1);
    hero.addKeyBind("UTILITY_BELT", "key.grenades", 2);
    
    hero.setKeyBindEnabled((entity, keyBind) => keyBind != "GUN_RELOAD" || entity.getHeldItem().isGun() && !entity.getData("fiskheroes:aiming"));
    hero.setHasPermission((entity, permission) => permission == "USE_GUN");
    hero.supplyFunction("canAim", entity => entity.getHeldItem().isGun());
	
    hero.setTickHandler((entity, manager) => {
        bubble.tick(entity, manager);
    });
}

