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

function init(hero) {
    hero.setName("Gwenpool/Dark");
    hero.setVersion("item.superhero_armor.version.comics");
    hero.setTier(4);
    
    hero.setHelmet("Cowl");
    hero.setChestplate("Chestpiece");
    hero.setLeggings("Pants");
    hero.setBoots("Boots");
    hero.addPrimaryEquipment("fiskheroes:katana", true, item => !item.nbt().getBoolean("Dual"));
    hero.addPrimaryEquipment("fiskheroes:desert_eagle", true, item => !item.nbt().getBoolean("Dual"));
    hero.addPrimaryEquipment("fisktag:weapon{WeaponType:skarlet:cyclops_cannon}", true, item => item.nbt().getString("WeaponType") == 'skarlet:cyclops_cannon');
	
    hero.addPowers("fiskheroes:grenades");
    hero.addAttribute("PUNCH_DAMAGE", 5.0, 0);
    hero.addAttribute("WEAPON_DAMAGE", 3.5, 0);
    hero.addAttribute("JUMP_HEIGHT", 0.5, 0);
    hero.addAttribute("FALL_RESISTANCE", 3.5, 0);
    hero.addAttribute("SPRINT_SPEED", 0.175, 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.getHeldItem().nbt().getString("WeaponType") == "skarlet:cyclops_cannon") && !entity.getData("fiskheroes:aiming"));
    hero.setHasPermission((entity, permission) => permission == "USE_GUN" || permission == "USE_CYCLOPS_GUN");
    hero.supplyFunction("canAim", entity => (entity.getHeldItem().isGun() || entity.getHeldItem().nbt().getString("WeaponType") == "skarlet:cyclops_cannon"));
	
    hero.setTickHandler((entity, manager) => {
        bubble.tick(entity, manager);
    });
}

