# -*- coding: utf-8 -*-
from mob import *
from json_ import *

# F0
lost_explorer = Boss(
    mob = 'zombie',
    name = JTxt('lost_explorer', color = 'red'),
    hp = 130,
    attack_damage = 2,
    movement_speed = 0.25,
    follow_range = 26,
    right_hand = 'id:"wooden_sword",Count:1b',
    feet = 'id:"leather_boots",Count:1,tag:{display:{color:9396001}}',
    legs = 'id:"leather_leggings",Count:1,tag:{display:{color:14069588}}',
    chest = 'id:"leather_chestplate",Count:1,tag:{display:{color:14733474}}',
    head = 'id:"player_head",Count:1b,tag:{SkullOwner:{Id:[I;1000,1000,1000,1000],Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjgxZWE4NjFmMWE0OWU3ZTRlMjRhMTgyM2Y0ZGNlMjA0Yjc5ZGJjZjk3NDk1YmNlNGQ2ZmRiODQ5YzBiMzc4MyJ9fX0="}]}}}',
    custom_attack = True,
    tags = ["custom_attack","tutorial_obj"])
tutorial = [lost_explorer]


# F1
troll_leader = Boss(
    mob = 'zombie',
    name = JTxt('troll_leader', color = '#986200'),
    hp = 170,
    silent = True,
    attack_damage = 5.5,
    movement_speed = 0.22,
    follow_range = 26,
    knockback_resistance = 0.7,
    right_hand = 'id:"wooden_sword",Count:1b,tag:{Enchantments:[{id:"minecraft:knockback",lvl:3s}],CustomModelData:3402}',
    feet = 'id:"leather_boots",Count:1b,tag:{display:{color:7032885}}',
    legs = 'id:"leather_leggings",Count:1b,tag:{display:{color:7032885}}',
    chest = 'id:"leather_chestplate",Count:1,tag:{display:{color:7032885}}',
    head = 'id:"player_head",Count:1b,tag:{SkullOwner:{Id:[I;1001,1001,1001,1001],Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNmYzYmQ1MzE0MDk5YWRmMjAyYzZiYmZhZjMwMTBmZDhmMjJjY2ZmYTYwNWQ5ZGRhZjM2NTI2MjdmMDAyOTYwNSJ9fX0="}]}}}',
    death_trigger = True,
    custom_attack = True,
    custom_sound = True
    )
zeldia_king = Boss(
    mob = 'skeleton',
    name = JTxt('zeldia_king', color = 'gold'),
    hp = 160,
    attack_damage = 5.1,
    movement_speed = 0.23,
    follow_range = 26,
    right_hand = 'id:diamond_sword,Count:1b',
    left_hand = 'id:"shield",Count:1b,tag:{BlockEntityTag:{Patterns:[{Color:3,Pattern:"sc"},{Color:11,Pattern:"mc"},{Color:11,Pattern:"flo"},{Color:4,Pattern:"flo"}]}}',
    feet = 'id:"iron_boots",Count:1b',
    legs = 'id:"iron_leggings",Count:1b',
    chest ='id:"golden_chestplate",Count:1b',
    head = 'id:"player_head",Count:1b,tag:{SkullOwner:{Id:[I;1002,1002,1002,1002],Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNTNhMzI5OTk2ODMyN2YwNWQ1Y2ZlN2NjNDMxNDk2MGFjNTYzNjZlYWVhMTg4Mzc0OWNmN2E3MzI4YTE3MCJ9fX0="}]}}}',
    custom_attack = True,
    tags = ["zeldian"])
mega_slime = Slime(
    name = JTxt('mega_slime', color = '#5fe61e'),
    size = 9,
    hp = 150,
    attack_damage = 4.8,
    movement_speed = 0.23,
    follow_range = 26,
    death_trigger = True,
    Mtype = "boss",
    custom_attack = True,
    tags = ["slime"]
    )
if True:
    mega_slime.icon["item"] = "player_head"
    mega_slime.icon["nbt"] = 'SkullOwner:{Id:[I;2131429491,-546682343,-1681000759,251135175],Properties:{textures:[{Value:\\"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODk1YWVlYzZiODQyYWRhODY2OWY4NDZkNjViYzQ5NzYyNTk3ODI0YWI5NDRmMjJmNDViZjNiYmI5NDFhYmU2YyJ9fX0=\\"}]}}'
b_floor_1 = [troll_leader, zeldia_king, mega_slime]


# F2
frog_king = Boss(
    mob = 'zombie',
    name = JTxt('frog_king', color = '#6ab335'),
    hp = 185,
    silent = True,
    attack_damage = 5.7,
    movement_speed = 0.23,
    follow_range = 26,
    feet = 'id:"leather_boots",Count:1,tag:{display:{color:6733126}}',
    legs = 'id:"leather_leggings",Count:1,tag:{display:{color:6604602}}',
    chest = 'id:"leather_chestplate",Count:1,tag:{display:{color:6283320}}',
    head = 'id:"player_head",Count:1b,tag:{SkullOwner:{Id:[I;1100,1100,1100,1100],Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzg2ZTMzNzU1NDViNjBkOTA3NDVhM2E4NzNlNzgzZDFhNWRmMzVkMzY4Yjg1N2Q3OTAyNzQzOTkxZGJjMGY3In19fQ=="}]}}}',
    custom_attack = True,
    custom_sound = True,
    commands = ["execute as @e[tag=frog_king,tag=init,sort=nearest,limit=1] run function olink:ch1/new_link"])
spider_queen = Boss(
    mob = 'spider',
    name = JTxt('spider_queen', color = '#c8c4a9'),
    hp = 180,
    attack_damage = 5.5,
    movement_speed = 0.22,
    follow_range = 26,
    custom_attack = True)
druid = Boss(
    mob = 'zombie',
    name = JTxt('druid', color = '#03a313'),
    hp = 200,
    silent = True,
    attack_damage = 5.2,
    movement_speed = 0.24,
    follow_range = 26,
    feet = 'id:"leather_boots",Count:1,tag:{display:{color:8602398}}',
    legs = 'id:"leather_leggings",Count:1,tag:{display:{color:8602398}}',
    chest = 'id:"leather_chestplate",Count:1,tag:{display:{color:8602398}}',
    head = 'id:"slime_ball",Count:1b,tag:{CustomModelData:7018}',
    right_hand = 'id:"slime_ball",Count:1,tag:{CustomModelData:7019}',
    left_hand = 'id:"slime_ball",Count:1,tag:{CustomModelData:7020}',
    death_trigger = True,
    invisible = True,
    custom_attack = True,
    custom_sound = True,
    tags = ["st_caster"]
    )

if True:
    spider_queen.icon["item"] = "player_head"
    spider_queen.icon["nbt"] = 'SkullOwner:{Id:[I;-777092776,-202029193,-1358906669,203007870],Properties:{textures:[{Value:\\"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvY2YwNjIyYjM5OThkNDJiMzRkNWJjNzYwYmIyYzgzZmRiYzZlNjhmYWIwNWI3ZWExN2IzNTA5N2VkODExOTBkNiJ9fX0=\\"}]}}'
b_floor_2 = [frog_king, spider_queen, druid]


# F3
# drwoned_diver
# Kraken
pirate_captain = Boss(
    mob = 'skeleton',
    name = JTxt('pirate_captain', color = '#c62323'),
    hp = 220,
    attack_damage = 5.8,
    movement_speed = 0.23,
    follow_range = 26,
    left_hand = 'id:"slime_ball",Count:1,tag:{CustomModelData:7037}',
    right_hand = 'id:"slime_ball",Count:1,tag:{CustomModelData:7036}', # weapon 3104
    feet = 'id:"leather_boots",Count:1b,tag:{display:{color:10755614}}',
    legs = 'id:"leather_leggings",Count:1b,tag:{display:{color:10755614}}',
    chest = 'id:"leather_chestplate",Count:1,tag:{display:{color:10755614}}',
    head = 'id:"slime_ball",Count:1b,tag:{CustomModelData:7035}',
    custom_attack = True)
drowned_diver = Boss(
    mob = 'drowned',
    name = JTxt('drowned_diver', color = 'gold'),
    hp = 210,
    attack_damage = 6.2,
    movement_speed = 0.23,
    follow_range = 26,
    feet = 'id:"leather_boots",Count:1,tag:{display:{color:12024408}}',
    legs = 'id:"leather_leggings",Count:1,tag:{display:{color:12024408}}',
    chest = 'id:"leather_chestplate",Count:1,tag:{display:{color:12024408}}',
    head = 'id:"slime_ball",Count:1b,tag:{CustomModelData:7022}',
    left_hand = 'id:"slime_ball",Count:1,tag:{CustomModelData:7023}',
    right_hand = 'id:"slime_ball",Count:1,tag:{CustomModelData:7024}',
    custom_attack = True,
    invisible = True,
    tags = ["water_speed","water_speed_I","wm_inmune"]
    )
b_floor_3 = [pirate_captain, drowned_diver]

# F4
twisted_mechanic = Boss(
    mob = "evoker",
    name = JTxt('twisted_mechanic', color = '#cac8c8'),
    hp = 220,
    attack_damage = 6,
    movement_speed = 0.3,
    follow_range = 26,
    )
automaton = Boss(
    mob = "zombie",
    name = JTxt('automaton', color = 'gold'),
    hp = 240,
    attack_damage = 6.5,
    movement_speed = 0.25,
    follow_range = 26,
    silent = True,
    invisible = True,
    custom_sound = True,
    custom_attack = True,
    death_trigger = True,
    objmc = Objmc('7016', 0, 0),
    tags = ["electric_immunity"],
    commands = [
        "execute as @e[tag=automaton,tag=init,sort=nearest,limit=1] run function bosses:automaton/state/change/2idle",
    ]
)
mechanical_monstrosity = Boss(
    mob = "ravager",
    name = JTxt('mechanical_monstrosity', color = '#cac8c8'),
    hp = 255,
    attack_damage = 5,
    movement_speed = 0.22,
    follow_range = 26,
    custom_attack = True,
    tags = ["electric_immunity"]
)


if True:
    twisted_mechanic.icon["item"] = "slime_ball"
    twisted_mechanic.icon["nbt"] = 'CustomModelData:7027'
    automaton.icon["item"] = "slime_ball"
    automaton.icon["nbt"] = 'CustomModelData:7030'
    mechanical_monstrosity.icon["item"] = "player_head"
    mechanical_monstrosity.icon["nbt"] = 'SkullOwner:{Id:[I;520102013,1535003450,-1604796681,-835899773],Properties:{textures:[{Value:\\"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNWM3M2UxNmZhMjkyNjg5OWNmMTg0MzQzNjBlMjE0NGY4NGVmMWViOTgxZjk5NjE0ODkxMjE0OGRkODdlMGIyYSJ9fX0=\\"}]}}'

b_floor_4 = [twisted_mechanic, automaton, mechanical_monstrosity]

# Others
# Queen Bee
# Mushroom boss
pharaoh = Boss(
    mob = 'skeleton',
    name = JTxt('Pharaoh', color = 'white'),
    feet = 'id:"leather_boots",Count:1,tag:{display:{color:13223523}}',
    legs = 'id:"leather_leggings",Count:1,tag:{display:{color:6309854}}',
    chest = 'id:"leather_chestplate",Count:1,tag:{display:{color:14604909}}',
    head = 'id:"player_head",Count:1b,tag:{SkullOwner:{Id:[I;1101,1101,1101,1101],Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZWNjYjI4YzVjMDY2NGEyYjFmMmU1MzVhMzI3ZTY2NTk4ZWI3MjI1MTJhMDA0Yzc0MzMyYjY0YjYwZTFjNjg0YiJ9fX0="}]}}}',
    custom_attack = True)
zombie_cult_leader = Boss(
    mob = 'zombie',
    name = JTxt('Zombie Cult Leader', color = 'dark_purple'),
    feet = 'id:"leather_boots",Count:1,tag:{display:{color:4142914}}',
    legs = 'id:"leather_leggings",Count:1,tag:{display:{color:1906975}}',
    chest = 'id:"leather_chestplate",Count:1,tag:{display:{color:1906975}}',
    head = 'id:"player_head",Count:1b,tag:{SkullOwner:{Id:[I;1102,1102,1102,1102],Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNGMxNWE1OGRmMDJlOTg0NDJmNzk0MGRhNDhjNGUwNTU3ZTA4MzVmMWZmMjM1MGNiNDIzNzlkOWE4ZWFjMDEwYiJ9fX0="}]}}}',
    custom_attack = True)
the_lich = Boss(
    mob = 'skeleton',
    name = JTxt('The Lich', color = 'dark_purple'),
    feet = 'id:"leather_boots",Count:1,tag:{display:{color:4670007}}',
    legs = 'id:"leather_leggings",Count:1,tag:{display:{color:7696458}}',
    chest = 'id:"leather_chestplate",Count:1,tag:{display:{color:3764318}}',
    head = 'id:"player_head",Count:1b,tag:{SkullOwner:{Id:[I;1103,1103,1103,1103],Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYTE2ODAyZGQwMDkzODY5M2U0NGMyNjM2NzhmMTJhYTU5YjRkYTlkMjUxM2Q1NTZmYzkwMzkwZTA1ODg0YWI3ZSJ9fX0="}]}}}',
    custom_attack = True)

b_others = [pharaoh,  zombie_cult_leader, the_lich]


bosses:list[Boss] = tutorial + b_floor_1 + b_floor_2 + b_floor_3 + b_floor_4
