var landing = implement("fiskheroes:external/superhero_landing");

function init(hero) {
    hero.setName("Allfather Kratos");
    hero.setAliases("God_of_War", "GOW", "Tattooed_Warrior", "Allfather");
    hero.setVersion("\u00A7c\u00A7lGOW \u00A7f\u00A7lSym's \u00A76\u00A7lConcept\u00A7r");
    hero.setTier(10);
    
    hero.setHelmet("Head");
    hero.setChestplate("Body");
    hero.setLeggings("Legs");
    hero.setBoots("Boots");
    
    hero.addPowers("gowhp:godofwar_allfather", "gowhp:leviathanaxe_allfather", "gowhp:bladesofchaos_allfather", "gowhp:draupnirspear_allfather", "gowhp:guardianshield_allfather", "gowhp:spartanrage_allfather", "gowhp:godofthunder_allfather", "gowhp:mjolnir_allfather", "gowhp:allfather_kratos", "gowhp:gungnir_allfather");
    hero.addAttribute("PUNCH_DAMAGE", 15.0, 0);
    hero.addAttribute("KNOCKBACK", 1.0, 0);
    hero.addAttribute("JUMP_HEIGHT", 1.5, 0);
    hero.addAttribute("SPRINT_SPEED", 1.0, 1);
    hero.addAttribute("FALL_RESISTANCE", 200.0, 0);

    hero.addKeyBindFunc("WEAPON_CYCLE", weaponCycle, "Cycle Weapons", 1);
    hero.addKeyBind("LEVIATHANAXE", "Leviathan Axe", 2);
    hero.addKeyBind("BLADESOFCHAOS", "Blades of Chaos", 2);
    hero.addKeyBind("DRAUPNIRSPEAR", "Draupnir Spear", 2);
    hero.addKeyBind("MJOLNIR", "Mjolnir", 2);
    hero.addKeyBind("GUNGNIR", "Gungnir", 2);
    hero.addKeyBind("SHIELD", "Guardian Shield", 3);
    hero.addKeyBindFunc("LEVIATHANAXE_RUNIC_CYCLE", leviathanaxerunicCycle, "Cycle Ranged/Runic Attacks", 4);
    hero.addKeyBind("LEVIATHANAXERUNICCYCLEUNAVAILABLE", "\u00A7cUnavailable", 4);
    hero.addKeyBindFunc("BLADESOFCHAOS_RUNIC_CYCLE", bladesofchaosrunicCycle, "Cycle Runic Attacks", 4);
    hero.addKeyBind("BLADESOFCHAOSRUNICCYCLEUNAVAILABLE", "\u00A7cUnavailable", 4);
    hero.addKeyBindFunc("DRAUPNIRSPEAR_RUNIC_CYCLE", draupnirspearrunicCycle, "Cycle Ranged/Runic Attacks", 4);
    hero.addKeyBind("DRAUPNIRSPEARRUNICCYCLEUNAVAILABLE", "\u00A7cUnavailable", 4);
    hero.addKeyBindFunc("MJOLNIR_RUNIC_CYCLE", mjolnirrunicCycle, "Cycle Ranged/Runic Attacks", 4);
    hero.addKeyBind("MJOLNIRRUNICCYCLEUNAVAILABLE", "\u00A7cUnavailable", 4);
    hero.addKeyBindFunc("GUNGNIR_RUNIC_CYCLE", gungnirrunicCycle, "Cycle Magical/Runic Attacks", 4);
    hero.addKeyBind("GUNGNIRRUNICCYCLEUNAVAILABLE", "\u00A7cUnavailable", 4);
    hero.addKeyBind("CHARGED_BEAM", "Throw", 5);
    hero.addKeyBind("BOULDERTHROW", "Boulder Throw", 5);
    hero.addKeyBind("LEVIATHANAXETHROWANIMATION", "Throw Leviathan Axe", 5);
    hero.addKeyBind("WRATHOFTHEFROSTANCIENT", "Wrath of the Frost Ancient", 5);
    hero.addKeyBind("BREATHOFTHAMUR", "Breath of Thamur", 5);
    hero.addKeyBind("THECYCLONEOFCHAOS", "Cyclone of Chaos", 5);
    hero.addKeyBind("VIREOFARES", "Fire of Ares", 5);
    hero.addKeyBind("WHISPEROFTHEWORLD", "Whisper of the World", 5);
    hero.addKeyBind("HEAVYARTILLERYOFTHEANCIENTS", "Artillery of the Ancients", 5);
    hero.addKeyBind("MJOLNIRTHROWANIMATION", "Throw Mjolnir", 5);
    hero.addKeyBind("THETHUNDERBLASTANIMATION", "Thunder Blast", 5);
    hero.addKeyBind("ZSLAMANIMATION", "Mjolnir Slam", 5);
    hero.addKeyBind("ZZSLAMANIMATION", "\u00A7cUnavailable", 5);
    hero.addKeyBind("THELEIPTRAANIMATION", "Leiptra", 5);
    hero.addKeyBind("THEBLASTOFFIREANIMATION", "Book of Eldr", 5);
    hero.addKeyBind("BARAANIMATION", "Glettings Bara", 5);
    hero.addKeyBind("THEGLETTINGSBARAUNAVAILABLE", "\u00A7cUnavailable", 5);
    hero.addKeyBind("SPARTANRAGE", "Spartan Rage", 4);
    hero.addKeyBind("GROUND_SMASH", "Ground Smash", 3);
    hero.addKeyBind("SPELL_MENU", "Dark Magic", 1);
    
    hero.setDefaultScale(1.1);
    hero.setModifierEnabled(isModifierEnabled);
    hero.setKeyBindEnabled(isKeyBindEnabled);
    hero.addAttributeProfile("LEVIATHANAXE", leviathanaxeProfile);
    hero.addAttributeProfile("BLADESOFCHAOS", bladesofchaosProfile);
    hero.addAttributeProfile("DRAUPNIRSPEAR", draupnirspearProfile);
    hero.addAttributeProfile("MJOLNIR", mjolnirProfile);
    hero.addAttributeProfile("GUNGNIR", gungnirProfile);
    hero.addAttributeProfile("SHIELD", shieldProfile);
    hero.addAttributeProfile("SPARTANRAGE", spartanrageProfile);
    hero.addAttributeProfile("SPARTANRAGETOGGLE", spartanragetoggleProfile);
    hero.addAttributeProfile("RUNICATTACK", runicattackProfile);
    hero.addAttributeProfile("CYCLONEOFCHAOS", cycloneofchaosProfile);
    hero.setAttributeProfile(getAttributeProfile);
    hero.setHasProperty(hasProperty);

    hero.setDamageProfile(entity => entity.getData("gowhp:dyn/leviathanaxe") ? "LEVIATHANAXE_FROST" : null);
    hero.setDamageProfile(entity => entity.getData("gowhp:dyn/bladesofchaos") ? "BLADES_FLAME" : null);
    hero.setDamageProfile(entity => entity.getData("gowhp:dyn/draupnirspear") ? "DRAUPNIRSPEAR_GALE" : null);
    hero.setDamageProfile(entity => entity.getData("gowhp:dyn/mjolnir") ? "MJOLNIR_LIGHTNING" : null);
    hero.setDamageProfile(entity => entity.getData("gowhp:dyn/gungnir") ? "GUNGNIR_BIFROST" : null);
    hero.addDamageProfile("LEVIATHANAXE_FROST", {
        "types": {
            "SHARP": 1.0,
            "LEVIATHAN_ICE": 0.6,
            "JORMUNGANDR_VENOM": 0.25
        }
    });
    hero.addDamageProfile("BLADES_FLAME", {
        "types": {
            "SHARP": 1.0,
            "CHAOS_FLAMES": 0.6,
            "PRIMORDIAL": 0.5
        },
        "properties": {
            "HEAT_TRANSFER": 40,
            "IGNITE": 2
        }
    });
    hero.addDamageProfile("DRAUPNIRSPEAR_GALE", {
        "types": {
            "SHARP": 1.0,
            "GALE": 0.6
        }
    });
    hero.addDamageProfile("MJOLNIR_LIGHTNING", {
        "types": {
            "BLUNT": 1.0,
            "LIGHTNING": 0.6,
            "ASGARD_MAGIC": 0.25
        }
    });
    hero.addDamageProfile("GUNGNIR_BIFROST", {
        "types": {
            "BLUNT": 1.0,
            "BIFROST": 0.6,
            "ENERGY": 0.25,
            "MAGIC": 0.25,
            "COSMIC": 0.1
        }
    });

    hero.addSoundEvent("MASK_OPEN", "gowhp:kratos_ragnarok_voice_lines");
    hero.addSoundEvent("MASK_CLOSE", "gowhp:kratos_ragnarok_voice_lines");
    hero.addSoundEvent("STEP", ["gowhp:kratos_walk", "gowhp:kratos_sprint"]);
    hero.addSoundEvent("PUNCH", ["gowhp:kratos_punch", "gowhp:leviathanaxe_hit", "gowhp:bladesofchaos_hit",  "gowhp:draupnirspear_hit", "gowhp:mjolnir_hit", "gowhp:spartanrage_punch"]);
    hero.addSoundEvent("JUMP", "gowhp:spartanrage_leap");
    hero.addSoundEvent("LAND", "gowhp:spartanrage_land");

    hero.setTickHandler((entity, manager) => {
        var flying = entity.getData("fiskheroes:flying");
        manager.incrementData(entity, "fiskheroes:dyn/booster_timer", 2, flying);

        var item = entity.getHeldItem();
        flying &= !entity.as("PLAYER").isUsingItem();
        manager.incrementData(entity, "fiskheroes:dyn/booster_r_timer", 2, flying && item.isEmpty() && !entity.isPunching() && entity.getData("fiskheroes:aiming_timer") == 0);
        manager.incrementData(entity, "fiskheroes:dyn/booster_l_timer", 2, flying && !item.doesNeedTwoHands());

        landing.tick(entity, manager);
    });
}

function hasProperty(entity, property) {
    return property == "BREATHE_SPACE" || property == "MASK_TOGGLE";
}

function weaponCycle(player, manager) {
  manager.setData(player, "gowhp:dyn/weapon_cycle", player.getData("gowhp:dyn/weapon_cycle") + 1);
  if (player.getData("gowhp:dyn/weapon_cycle") > 4) {
    manager.setData(player, "gowhp:dyn/weapon_cycle", 0);
  }
  return true;
}

function leviathanaxerunicCycle(player, manager) {
  manager.setData(player, "gowhp:dyn/leviathanaxe_runic_cycle", player.getData("gowhp:dyn/leviathanaxe_runic_cycle") + 1);
  if (player.getData("gowhp:dyn/leviathanaxe_runic_cycle") > 2) {
    manager.setData(player, "gowhp:dyn/leviathanaxe_runic_cycle", 0);
  }
  return true;
}

function bladesofchaosrunicCycle(player, manager) {
  manager.setData(player, "gowhp:dyn/bladesofchaos_runic_cycle", player.getData("gowhp:dyn/bladesofchaos_runic_cycle") + 1);
  if (player.getData("gowhp:dyn/bladesofchaos_runic_cycle") > 1) {
    manager.setData(player, "gowhp:dyn/bladesofchaos_runic_cycle", 0);
  }
  return true;
}

function draupnirspearrunicCycle(player, manager) {
  manager.setData(player, "gowhp:dyn/draupnirspear_runic_cycle", player.getData("gowhp:dyn/draupnirspear_runic_cycle") + 1);
  if (player.getData("gowhp:dyn/draupnirspear_runic_cycle") > 1) {
    manager.setData(player, "gowhp:dyn/draupnirspear_runic_cycle", 0);
  }
  return true;
}

function mjolnirrunicCycle(player, manager) {
  manager.setData(player, "gowhp:dyn/mjolnir_runic_cycle", player.getData("gowhp:dyn/mjolnir_runic_cycle") + 1);
  if (player.getData("gowhp:dyn/mjolnir_runic_cycle") > 2) {
    manager.setData(player, "gowhp:dyn/mjolnir_runic_cycle", 0);
  }
  return true;
}

function gungnirrunicCycle(player, manager) {
  manager.setData(player, "gowhp:dyn/gungnir_runic_cycle", player.getData("gowhp:dyn/gungnir_runic_cycle") + 1);
  if (player.getData("gowhp:dyn/gungnir_runic_cycle") > 2) {
    manager.setData(player, "gowhp:dyn/gungnir_runic_cycle", 0);
  }
  return true;
}

function leviathanaxeProfile(profile) {
    profile.inheritDefaults();
    profile.addAttribute("PUNCH_DAMAGE", 20.0, 0);
    profile.addAttribute("SPRINT_SPEED", 0.85, 1);
    profile.addAttribute("JUMP_HEIGHT", 1.35, 0);
}

function bladesofchaosProfile(profile) {
    profile.inheritDefaults();
    profile.addAttribute("PUNCH_DAMAGE", 20.0, 0);
    profile.addAttribute("SPRINT_SPEED", 1.05, 1);
    profile.addAttribute("JUMP_HEIGHT", 1.55, 0);
}

function draupnirspearProfile(profile) {
    profile.inheritDefaults();
    profile.addAttribute("PUNCH_DAMAGE", 20.0, 0);
    profile.addAttribute("SPRINT_SPEED", 1.1, 1);
    profile.addAttribute("JUMP_HEIGHT", 1.6, 0);
}

function mjolnirProfile(profile) {
    profile.inheritDefaults();
    profile.addAttribute("PUNCH_DAMAGE", 20.5, 0);
    profile.addAttribute("SPRINT_SPEED", 0.80, 1);
    profile.addAttribute("JUMP_HEIGHT", 1.3, 0);
}

function gungnirProfile(profile) {
    profile.inheritDefaults();
    profile.addAttribute("PUNCH_DAMAGE", 20.5, 0);
    profile.addAttribute("SPRINT_SPEED", 0.80, 1);
    profile.addAttribute("JUMP_HEIGHT", 1.3, 0);
}

function shieldProfile(profile) {
    profile.inheritDefaults();
    profile.addAttribute("BASE_SPEED", -0.5, 1);
    profile.addAttribute("SPRINT_SPEED", 0.25, 1);
    profile.addAttribute("JUMP_HEIGHT", -1.0, 0);
}

function spartanrageProfile(profile) {
    profile.addAttribute("PUNCH_DAMAGE", 25.0, 0);
    profile.addAttribute("KNOCKBACK", 2.5, 0);
    profile.addAttribute("JUMP_HEIGHT", 2.5, 0);
    profile.addAttribute("SPRINT_SPEED", 1.5, 1);
    profile.addAttribute("FALL_RESISTANCE", 250.0, 0);
}

function spartanragetoggleProfile(profile) {
    profile.revokeAugments();
    profile.addAttribute("BASE_SPEED", -1, 0);
    profile.addAttribute("JUMP_HEIGHT", -10, 0);
}

function runicattackProfile(profile) {
    profile.revokeAugments();
    profile.addAttribute("BASE_SPEED", -1, 0);
    profile.addAttribute("JUMP_HEIGHT", -10, 0);
}

function cycloneofchaosProfile(profile) {
    profile.revokeAugments();
    profile.addAttribute("BASE_SPEED", -0.25, 1);
    profile.addAttribute("JUMP_HEIGHT", -0.5, 0);
}

function getAttributeProfile(entity) {
    if (entity.getData("gowhp:dyn/bladesofchaos") && entity.getData("fiskheroes:beam_charging") && entity.getData("gowhp:dyn/bladesofchaos_runic_cycle") == 0) {
        return "CYCLONEOFCHAOS";
    }
    if (((entity.getData("gowhp:dyn/leviathanaxe") && !entity.getData("gowhp:dyn/leviathanaxe_runic_cycle") == 0) || entity.getData("gowhp:dyn/bladesofchaos") || entity.getData("gowhp:dyn/draupnirspear")) && entity.getData("fiskheroes:beam_charging") && (entity.getData("gowhp:dyn/leviathanaxe_runic_cycle") == 1 || entity.getData("gowhp:dyn/leviathanaxe_runic_cycle") == 2 || entity.getData("gowhp:dyn/bladesofchaos_runic_cycle") == 1 || entity.getData("gowhp:dyn/draupnirspear_runic_cycle") == 0 || entity.getData("gowhp:dyn/draupnirspear_runic_cycle") == 1)) {
        return "RUNICATTACK";
    }
    if (entity.getData("fiskheroes:shield_blocking")) {
        return "SHIELD";
    }
    if (entity.getData("gowhp:dyn/leviathanaxe")) {
        return "LEVIATHANAXE";
    }
    if (entity.getData("gowhp:dyn/bladesofchaos")) {
        return "BLADESOFCHAOS";
    }
    if (entity.getData("gowhp:dyn/draupnirspear")) {
        return "DRAUPNIRSPEAR";
    }
    if (entity.getData("gowhp:dyn/mjolnir")) {
        return "MJOLNIR";
    }
    if (entity.getData("gowhp:dyn/gungnir")) {
        return "GUNGNIR";
    }
    if (entity.getData("gowhp:dyn/spartanrage") && entity.getInterpolatedData("gowhp:dyn/spartanrage_animation_timer") < 0.5) {
        return "SPARTANRAGETOGGLE";
    }
    if (entity.getData("gowhp:dyn/spartanrage")) {
        return "SPARTANRAGE";
    }
}

function isModifierEnabled(entity, modifier) {
    switch (modifier.name()) {
    case "gowhp:dyn/leviathanaxe":
        return entity.getData("gowhp:dyn/weapon_cycle") == 0 && !entity.getData("gowhp:dyn/spartanrage") && !entity.getData("gowhp:dyn/bladesofchaos") && !entity.getData("gowhp:dyn/draupnirspear") && !entity.getData("gowhp:dyn/mjolnir") && !entity.getData("gowhp:dyn/gungnir");
    case "gowhp:dyn/bladesofchaos":
        return entity.getData("gowhp:dyn/weapon_cycle") == 1 && !entity.getData("gowhp:dyn/spartanrage") && !entity.getData("gowhp:dyn/leviathanaxe") && !entity.getData("gowhp:dyn/draupnirspear") && !entity.getData("gowhp:dyn/mjolnir") && !entity.getData("gowhp:dyn/gungnir");
    case "gowhp:dyn/draupnirspear":
        return entity.getData("gowhp:dyn/weapon_cycle") == 2 && !entity.getData("gowhp:dyn/spartanrage") && !entity.getData("gowhp:dyn/leviathanaxe") && !entity.getData("gowhp:dyn/bladesofchaos") && !entity.getData("gowhp:dyn/mjolnir") && !entity.getData("gowhp:dyn/gungnir");
    case "gowhp:dyn/mjolnir":
        return entity.getData("gowhp:dyn/weapon_cycle") == 3 && !entity.getData("gowhp:dyn/spartanrage") && !entity.getData("gowhp:dyn/leviathanaxe") && !entity.getData("gowhp:dyn/bladesofchaos") && !entity.getData("gowhp:dyn/draupnirspear") && !entity.getData("gowhp:dyn/gungnir");
    case "gowhp:dyn/gungnir":
        return entity.getData("gowhp:dyn/weapon_cycle") == 4 && !entity.getData("gowhp:dyn/spartanrage") && !entity.getData("gowhp:dyn/leviathanaxe") && !entity.getData("gowhp:dyn/bladesofchaos") && !entity.getData("gowhp:dyn/draupnirspear") && !entity.getData("gowhp:dyn/mjolnir");
    case "fiskheroes:shield":
        return !entity.getData("gowhp:dyn/spartanrage") && !entity.getData("fiskheroes:beam_charging");
    case "gowhp:dyn/spartanrage":
        return !entity.getData("gowhp:dyn/leviathanaxe") && !entity.getData("gowhp:dyn/bladesofchaos") && !entity.getData("gowhp:dyn/draupnirspear") && !entity.getData("gowhp:dyn/mjolnir") && !entity.getData("gowhp:dyn/gungnir");
    case "fiskheroes:arrow_catching":
        return entity.getData("gowhp:dyn/spartanrage") && !entity.getData("gowhp:dyn/leviathanaxe") && !entity.getData("gowhp:dyn/bladesofchaos") && !entity.getData("gowhp:dyn/draupnirspear") && !entity.getData("gowhp:dyn/mjolnir") && !entity.getData("gowhp:dyn/gungnir") && !entity.getData("fiskheroes:shield");
    case "fiskheroes:fire_immunity":
        return entity.getData("gowhp:dyn/spartanrage") || entity.getData("gowhp:dyn/bladesofchaos");
    case "fiskheroes:controlled_flight":
        return (!(entity.getData("fiskheroes:beam_charging") && entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 2));
    case "fiskheroes:lightning_cast":
        return (entity.getData("gowhp:dyn/mjolnir") || entity.getData("gowhp:dyn/gungnir")) && !entity.getData("fiskheroes:beam_charging");
    case "fiskheroes:regeneration":
      switch (modifier.id()) {
        case "default":
          return !entity.getData("gowhp:dyn/spartanrage");
        case "spartanrageregen":
          return entity.getData("gowhp:dyn/spartanrage");
      };
    case "fiskheroes:leaping":
      switch (modifier.id()) {
        case "default":
          return !entity.getData("gowhp:dyn/spartanrage");
        case "spartanrageleap":
          return entity.getData("gowhp:dyn/spartanrage");
      };
    case "fiskheroes:charged_beam":
      switch (modifier.id()) {
        case "boulderthrow":
          return entity.getData("gowhp:dyn/spartanrage") && entity.isOnGround();
        case "leviathanaxethrow":
          return entity.getData("gowhp:dyn/leviathanaxe") && entity.getData("gowhp:dyn/leviathanaxe_runic_cycle") == 0;
        case "wrathofthefrostancient":
          return entity.getData("gowhp:dyn/leviathanaxe") && entity.getData("gowhp:dyn/leviathanaxe_runic_cycle") == 1;
        case "breathofthamur":
          return entity.getData("gowhp:dyn/leviathanaxe") && entity.getData("gowhp:dyn/leviathanaxe_runic_cycle") == 2;
        case "cycloneofchaos":
          return entity.getData("gowhp:dyn/bladesofchaos") && entity.getData("gowhp:dyn/bladesofchaos_runic_cycle") == 0;
        case "fireofares":
          return entity.getData("gowhp:dyn/bladesofchaos") && entity.getData("gowhp:dyn/bladesofchaos_runic_cycle") == 1;
        case "whisperoftheworld":
          return entity.getData("gowhp:dyn/draupnirspear") && entity.getData("gowhp:dyn/draupnirspear_runic_cycle") == 0;
        case "artilleryoftheancients":
          return entity.getData("gowhp:dyn/draupnirspear") && entity.getData("gowhp:dyn/draupnirspear_runic_cycle") == 1;
        case "mjolnirthrow":
          return entity.getData("gowhp:dyn/mjolnir") && entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 0;
        case "thunderblast":
          return entity.getData("gowhp:dyn/mjolnir") && entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 1;
        case "mjolnirslam":
          return entity.getData("gowhp:dyn/mjolnir") && !entity.getData("fiskheroes:flying") && entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 2;
        case "leiptra":
          return entity.getData("gowhp:dyn/gungnir") && entity.getData("gowhp:dyn/gungnir_runic_cycle") == 0;
        case "eldr":
          return entity.getData("gowhp:dyn/gungnir") && entity.getData("gowhp:dyn/gungnir_runic_cycle") == 1;
        case "glettingsbara":
          return entity.getData("gowhp:dyn/gungnir") && !entity.getData("fiskheroes:flying") && entity.getData("gowhp:dyn/gungnir_runic_cycle") == 2;
      };
    case "fiskheroes:fireball":
        return entity.getData("gowhp:dyn/bladesofchaos") && !entity.getData("fiskheroes:beam_charging");
    default:
        return true;
    }
}

function isKeyBindEnabled(entity, keyBind) {
    switch (keyBind) {
        case "WEAPON_CYCLE":
            return !entity.getData("gowhp:dyn/spartanrage") && !entity.getData("fiskheroes:shield_blocking") && !(entity.getData("gowhp:dyn/leviathanaxe") || entity.getData("gowhp:dyn/bladesofchaos") || entity.getData("gowhp:dyn/draupnirspear") || entity.getData("gowhp:dyn/mjolnir") || entity.getData("gowhp:dyn/gungnir"));
        case "LEVIATHANAXE":
            return entity.getHeldItem().isEmpty() && entity.getData("gowhp:dyn/weapon_cycle") == 0 && !entity.getData("gowhp:dyn/spartanrage") && !entity.getData("gowhp:dyn/bladesofchaos") && !entity.getData("gowhp:dyn/draupnirspear") && !entity.getData("gowhp:dyn/mjolnir") && !entity.getData("gowhp:dyn/gungnir") && !entity.getData("fiskheroes:shield_blocking");
        case "BLADESOFCHAOS":
            return entity.getHeldItem().isEmpty() && entity.getData("gowhp:dyn/weapon_cycle") == 1 && !entity.getData("gowhp:dyn/spartanrage") && !entity.getData("gowhp:dyn/leviathanaxe") && !entity.getData("gowhp:dyn/draupnirspear") && !entity.getData("gowhp:dyn/mjolnir") && !entity.getData("gowhp:dyn/gungnir") && !entity.getData("fiskheroes:shield_blocking");
        case "DRAUPNIRSPEAR":
            return entity.getHeldItem().isEmpty() && entity.getData("gowhp:dyn/weapon_cycle") == 2 && !entity.getData("gowhp:dyn/spartanrage") && !entity.getData("gowhp:dyn/leviathanaxe") && !entity.getData("gowhp:dyn/bladesofchaos") && !entity.getData("gowhp:dyn/mjolnir") && !entity.getData("gowhp:dyn/gungnir") && !entity.getData("fiskheroes:shield_blocking");
        case "MJOLNIR":
            return entity.getHeldItem().isEmpty() && entity.getData("gowhp:dyn/weapon_cycle") == 3 && !entity.getData("gowhp:dyn/spartanrage") && !entity.getData("gowhp:dyn/leviathanaxe") && !entity.getData("gowhp:dyn/bladesofchaos") && !entity.getData("gowhp:dyn/draupnirspear") && !entity.getData("gowhp:dyn/gungnir") && !entity.getData("fiskheroes:shield_blocking");
        case "GUNGNIR":
            return entity.getHeldItem().isEmpty() && entity.getData("gowhp:dyn/weapon_cycle") == 4 && !entity.getData("gowhp:dyn/spartanrage") && !entity.getData("gowhp:dyn/leviathanaxe") && !entity.getData("gowhp:dyn/bladesofchaos") && !entity.getData("gowhp:dyn/draupnirspear") && !entity.getData("gowhp:dyn/mjolnir") && !entity.getData("fiskheroes:shield_blocking");
        case "SHIELD":
            return !entity.getData("gowhp:dyn/spartanrage") && !entity.getData("fiskheroes:beam_charging");
        case "SPARTANRAGE":
            return !entity.getData("gowhp:dyn/leviathanaxe") && !entity.getData("gowhp:dyn/bladesofchaos") && !entity.getData("gowhp:dyn/draupnirspear") && !entity.getData("gowhp:dyn/mjolnir") && !entity.getData("gowhp:dyn/gungnir");
        case "BOULDERTHROW":
            return entity.getData("gowhp:dyn/spartanrage") && entity.isOnGround();
        case "LEVIATHANAXE_RUNIC_CYCLE":
            return entity.getData("gowhp:dyn/leviathanaxe") && !entity.getData("fiskheroes:shield") && !((entity.getData("gowhp:dyn/leviathanaxe_runic_cycle") == 0 || entity.getData("gowhp:dyn/leviathanaxe_runic_cycle") == 1 || entity.getData("gowhp:dyn/leviathanaxe_runic_cycle") == 2) && entity.getData("fiskheroes:beam_charging"));
        case "LEVIATHANAXERUNICCYCLEUNAVAILABLE":
            return ((entity.getData("gowhp:dyn/leviathanaxe_runic_cycle") == 0 || entity.getData("gowhp:dyn/leviathanaxe_runic_cycle") == 1 || entity.getData("gowhp:dyn/leviathanaxe_runic_cycle") == 2) && entity.getData("fiskheroes:beam_charging"));
        case "BLADESOFCHAOS_RUNIC_CYCLE":
            return entity.getData("gowhp:dyn/bladesofchaos") && !entity.getData("fiskheroes:shield") && !((entity.getData("gowhp:dyn/bladesofchaos_runic_cycle") == 0 || entity.getData("gowhp:dyn/bladesofchaos_runic_cycle") == 1) && entity.getData("fiskheroes:beam_charging"));
        case "BLADESOFCHAOSRUNICCYCLEUNAVAILABLE":
            return ((entity.getData("gowhp:dyn/bladesofchaos_runic_cycle") == 0 || entity.getData("gowhp:dyn/bladesofchaos_runic_cycle") == 1) && entity.getData("fiskheroes:beam_charging"));
        case "DRAUPNIRSPEAR_RUNIC_CYCLE":
            return entity.getData("gowhp:dyn/draupnirspear") && !entity.getData("fiskheroes:shield") && !((entity.getData("gowhp:dyn/draupnirspear_runic_cycle") == 0 || entity.getData("gowhp:dyn/draupnirspear_runic_cycle") == 1) && entity.getData("fiskheroes:beam_charging"));
        case "DRAUPNIRSPEARRUNICCYCLEUNAVAILABLE":
            return ((entity.getData("gowhp:dyn/draupnirspear_runic_cycle") == 0 || entity.getData("gowhp:dyn/draupnirspear_runic_cycle") == 1) && entity.getData("fiskheroes:beam_charging"));
        case "MJOLNIR_RUNIC_CYCLE":
            return entity.getData("gowhp:dyn/mjolnir") && !entity.getData("fiskheroes:shield") && !((entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 0 || entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 1 || entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 2) && entity.getData("fiskheroes:beam_charging"));
        case "MJOLNIRRUNICCYCLEUNAVAILABLE":
            return ((entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 0 || entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 1 || entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 2) && entity.getData("fiskheroes:beam_charging"));
        case "GUNGNIR_RUNIC_CYCLE":
            return entity.getData("gowhp:dyn/gungnir") && !entity.getData("fiskheroes:shield") && !((entity.getData("gowhp:dyn/gungnir_runic_cycle") == 0 || entity.getData("gowhp:dyn/gungnir_runic_cycle") == 1 || entity.getData("gowhp:dyn/gungnir_runic_cycle") == 2) && entity.getData("fiskheroes:beam_charging"));
        case "GUNGNIRRUNICCYCLEUNAVAILABLE":
            return ((entity.getData("gowhp:dyn/gungnir_runic_cycle") == 0 || entity.getData("gowhp:dyn/gungnir_runic_cycle") == 1 || entity.getData("gowhp:dyn/gungnir_runic_cycle") == 2) && entity.getData("fiskheroes:beam_charging"));
        case "LEVIATHANAXETHROWANIMATION":
            return entity.getData("gowhp:dyn/leviathanaxe") && !entity.getData("fiskheroes:shield") && entity.getData("gowhp:dyn/leviathanaxe_runic_cycle") == 0 && entity.getData("fiskheroes:beam_charging");
        case "WRATHOFTHEFROSTANCIENT":
            return entity.getData("gowhp:dyn/leviathanaxe") && !entity.getData("fiskheroes:shield") && entity.getData("gowhp:dyn/leviathanaxe_runic_cycle") == 1;
        case "BREATHOFTHAMUR":
            return entity.getData("gowhp:dyn/leviathanaxe") && !entity.getData("fiskheroes:shield") && entity.getData("gowhp:dyn/leviathanaxe_runic_cycle") == 2;
        case "THECYCLONEOFCHAOS":
            return entity.getData("gowhp:dyn/bladesofchaos") && !entity.getData("fiskheroes:shield") && entity.getData("gowhp:dyn/bladesofchaos_runic_cycle") == 0;
        case "VIREOFARES":
            return entity.getData("gowhp:dyn/bladesofchaos") && !entity.getData("fiskheroes:shield") && entity.getData("gowhp:dyn/bladesofchaos_runic_cycle") == 1;
        case "WHISPEROFTHEWORLD":
            return entity.getData("gowhp:dyn/draupnirspear") && !entity.getData("fiskheroes:shield") && entity.getData("gowhp:dyn/draupnirspear_runic_cycle") == 0;
        case "HEAVYARTILLERYOFTHEANCIENTS":
            return entity.getData("gowhp:dyn/draupnirspear") && !entity.getData("fiskheroes:shield") && entity.getData("gowhp:dyn/draupnirspear_runic_cycle") == 1;
        case "MJOLNIRTHROWANIMATION":
            return entity.getData("gowhp:dyn/mjolnir") && !entity.getData("fiskheroes:shield") && entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 0 && entity.getData("fiskheroes:beam_charging");
        case "THETHUNDERBLASTANIMATION":
            return entity.getData("gowhp:dyn/mjolnir") && !entity.getData("fiskheroes:shield") && entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 1;
        case "ZSLAMANIMATION":
            return entity.getData("gowhp:dyn/mjolnir") && !entity.getData("fiskheroes:shield") && !entity.getData("fiskheroes:flying") && entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 2;
        case "ZZSLAMANIMATION":
            return entity.getData("gowhp:dyn/mjolnir") && !entity.getData("fiskheroes:shield") && entity.getData("fiskheroes:flying") && entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 2;
        case "THELEIPTRAANIMATION":
            return entity.getData("gowhp:dyn/gungnir") && !entity.getData("fiskheroes:shield") && entity.getData("gowhp:dyn/gungnir_runic_cycle") == 0;
        case "THEBLASTOFFIREANIMATION":
            return entity.getData("gowhp:dyn/gungnir") && !entity.getData("fiskheroes:shield") && entity.getData("gowhp:dyn/gungnir_runic_cycle") == 1;
        case "BARAANIMATION":
            return entity.getData("gowhp:dyn/gungnir") && !entity.getData("fiskheroes:shield") && !entity.getData("fiskheroes:flying") && entity.getData("gowhp:dyn/gungnir_runic_cycle") == 2;
        case "THEGLETTINGSBARAUNAVAILABLE":
            return entity.getData("gowhp:dyn/gungnir") && !entity.getData("fiskheroes:shield") && entity.getData("fiskheroes:flying") && entity.getData("gowhp:dyn/gungnir_runic_cycle") == 2;
        case "CHARGED_BEAM":
            return ((entity.getData("gowhp:dyn/spartanrage") && entity.isOnGround()) || entity.getData("gowhp:dyn/leviathanaxe") || entity.getData("gowhp:dyn/bladesofchaos") || entity.getData("gowhp:dyn/draupnirspear") || entity.getData("gowhp:dyn/mjolnir") || entity.getData("gowhp:dyn/gungnir")) && !entity.getData("fiskheroes:shield");
        case "GROUND_SMASH":
            return entity.getHeldItem().isEmpty() && !entity.getData("fiskheroes:shield") && entity.getData("gowhp:dyn/spartanrage");
        case "SPELL_MENU":
            return entity.getData("gowhp:dyn/gungnir") && !entity.getData("fiskheroes:shield") && !entity.getData("gowhp:dyn/spartanrage");
        default:
            return true;
    }
}