#setblock ~ ~ ~ nether_wart_block
setblock ~ ~ ~ respawn_anchor[charges=1]
#particle block{block_state:{Name:nether_wart_block}} ~ ~ ~ .2 .2 .2 0 50
particle block{block_state:{Name:glowstone}} ~ ~ ~ .2 .2 .2 0 25

playsound minecraft:block.beacon.power_select hostile @a ~ ~ ~ 2 0
playsound minecraft:block.beacon.deactivate hostile @a ~ ~ ~ 2 .5
playsound minecraft:entity.wither.death hostile @a ~ ~ ~ 1 0

tellraw @p {"text": "Choose...","italic": true,"color": "gray"}
tag @p add titans_gambit
advancement grant @p[tag=titans_gambit] only survivalplus:adventure/explore/fuel_titan
tag @p add chosetitan
execute as @a[tag=!titans_gambit] at @s run playsound minecraft:block.end_portal.spawn master @s ~ ~ ~ .2 .5
tellraw @a[tag=!titans_gambit] [{"selector":"@s","color":"gray","italic":true},{"text":" has fueled the titan's heart"}]
execute at @e[tag=giantRhand] unless score Titan hardmode matches 1 run summon item ~ ~ ~ {Glowing:1b,Tags:[deal1,devil_deal,itemguard,special],CustomName:{"text":"Choose from a list of strong abilites","color": "yellow"},CustomNameVisible:1b,NoGravity:1b,Item:{id:"minecraft:written_book",components:{"minecraft:custom_data":{devil_deal:tag,takebook:tag,nodupe:tag},"minecraft:written_book_content":{pages:[[["",{"text":"Stats Up","color":"blue","click_event":{"action":"run_command","command":"/trigger titanmenu set 1"},"hover_event":{"action":"show_text","value":"Click to select"}},{"text":"\n+10% Speed\n+20% Damage\n+30% Mining Speed\n\nApplies to all players"}]],[["",{"text":"Max HP Up","color":"blue","click_event":{"action":"run_command","command":"/trigger titanmenu set 2"},"hover_event":{"action":"show_text","value":"Click to select"}},{"text":"\n+20 Max HP\nA second health bar\n\nApplies to all players"}]],[["",{"text":"Acrobatics","color":"blue","click_event":{"action":"run_command","command":"/trigger titanmenu set 3"},"hover_event":{"action":"show_text","value":"Click to select"}},{"text":"\n+0.1 Sneaking Speed\n+0.14 Jump Strength\n+3 Safe Fall Distance\n-10% Fall Damage\n\nApplies to all players"}]],[["",{"text":"Debuff Imbued","color":"blue","click_event":{"action":"run_command","command":"/trigger titanmenu set 4"},"hover_event":{"action":"show_text","value":"Click to select"}},{"text":"\nImbue attacks with a random debuff for 5 seconds\n\nApplies to all players"}]],[["",{"text":"Crits","color":"blue","click_event":{"action":"run_command","command":"/trigger titanmenu set 5"},"hover_event":{"action":"show_text","value":"Click to select"}},{"text":"\nGain a 10% chance to deal +100% damage on hit\n\nApplies to all players"}]],[["",{"text":"Item Guard","color":"blue","click_event":{"action":"run_command","command":"/trigger titanmenu set 6"},"hover_event":{"action":"show_text","value":"Click to select"}},{"text":"\nUpon dying, your items will become invulnerable and prevented from despawning\n\nApplies to all players"}]],[["",{"text":"Salvage Spawners","color":"blue","click_event":{"action":"run_command","command":"/trigger titanmenu set 7"},"hover_event":{"action":"show_text","value":"Click to select"}},{"text":"\nSpawners have a 33.3% chance to not be destroyed when broken\n\nApplies to all players"}]],[["",{"text":"Lucky Drops","color":"blue","click_event":{"action":"run_command","command":"/trigger titanmenu set 8"},"hover_event":{"action":"show_text","value":"Click to select"}},{"text":"\nSpecial drops do not require the Rabbit's foot trinket\n\nApplies to all players"}]],[["",{"text":"More Experience","color":"blue","click_event":{"action":"run_command","command":"/trigger titanmenu set 9"},"hover_event":{"action":"show_text","value":"Click to select"}},{"text":"\nXp orbs have a higher minimum amount of experience they can grant\n\nApplies to all players"}]],[["",{"text":"Corpse Run","color":"blue","click_event":{"action":"run_command","command":"/trigger titanmenu set 10"},"hover_event":{"action":"show_text","value":"Click to select"}},{"text":"\nUpon respawning, gain speed, resistance and strength for 5 minutes and regeneration for 2 minutes\n\nApplies to all players"}]]],title:"Powers Book",author:Titan,generation:3}}}}
#execute at @e[tag=deal1] run summon text_display ~ ~1.8 ~ {text:"One of the following:",Tags:[facetext,special,devil_deal]}
#execute at @e[tag=deal1] run summon text_display ~ ~1.4 ~ {text:"Give a powerful ability to all players",Tags:[facetext,special,devil_deal]}
#execute at @e[tag=deal1] run summon text_display ~ ~1 ~ {text:"Obtain a special tool",Tags:[facetext,special,devil_deal]}

execute at @e[tag=giantLhand] unless score @p[tag=titans_gambit] newgame matches 1.. run summon item ~ ~ ~ {Glowing:1b,Tags:[deal2,devil_deal,itemguard,special],CustomName:{"text":"🔒Locked🔒","color": "red"},CustomNameVisible:1b,NoGravity:1b,Item:{id:trial_key,components:{custom_data:{nodupe:"tag"}}}}
execute at @e[tag=giantLhand] if score @p[tag=titans_gambit] newgame matches 1.. run summon item ~ ~ ~ {Glowing:1b,Tags:[deal2,devil_deal,itemguard,special],CustomName:{"text":"Choose from a list of special items","color": "yellow"},CustomNameVisible:1b,NoGravity:1b,Item:{id:written_book,components:{"minecraft:custom_data":{devil_deal:tag,taketool:tag,nodupe:tag},"minecraft:written_book_content":{pages:[[["",{"text":"Unbreakable Modifier","color":"blue","click_event":{"action":"run_command","command":"/trigger titanmenu2 set 1"},"hover_event":{"action":"show_text","value":"Click to select"}},{"text":"\nObtain 3 equipment modifiers that make an item unbreakable"}]],[["",{"text":"Salvage Spawners","color":"blue","click_event":{"action":"run_command","command":"/trigger titanmenu2 set 2"},"hover_event":{"action":"show_text","value":"Click to select"}},{"text":"\nObtain a special tool that has a 33.3% chance to not destroy a spawner when broken\n\nChances stack with the Titan ability if someone else chose that"}]],[["",{"text":"Dual Spawners","color":"blue","click_event":{"action":"run_command","command":"/trigger titanmenu2 set 3"},"hover_event":{"action":"show_text","value":"Click to select"}},{"text":"\nObtain 2 spawners to be placed manually\n\nCycles between 2 mobs\n\nUsing a spawn egg replaces the mob currently cycling in the spawner"}]],[["",{"text":"Capture Bag","color":"blue","click_event":{"action":"run_command","command":"/trigger titanmenu2 set 4"},"hover_event":{"action":"show_text","value":"Click to select"}},{"text":"\nObtain an item that can capture almost any mob and store it into an item for later use"}]],[["",{"text":"Totem Per Life","color":"blue","click_event":{"action":"run_command","command":"/trigger titanmenu2 set 5"},"hover_event":{"action":"show_text","value":"Click to select"}},{"text":"\nObtain a Totem of Undying that can be respawned with after use"}]],[["",{"text":"Dimensional Shulker","color":"blue","click_event":{"action":"run_command","command":"/trigger titanmenu2 set 6"},"hover_event":{"action":"show_text","value":"Click to select"}},{"text":"\nObtain a shulker that bypasses the NG+ portal shulker restriction"}]]],title:"Tools Book",author:Titan,generation:3}}}}
#,[["",{"text":"Solo Item Guard","color":"blue","click_event":{"action":"run_command","command":"/trigger titanmenu2 set 4"},"hover_event":{"action":"show_text","value":"Click to select"}},{"text":"\nObtain 2 equipment modifiers that prevents that item from depspawning or being destroyed when you drop it upon dying"}]]
#execute at @e[tag=deal2] run summon text_display ~ ~2.2 ~ {text:"Player stats will be reduced",Tags:[facetext,special,devil_deal]}
#execute at @e[tag=deal2] run summon text_display ~ ~1.8 ~ {text:"Enemy stats will be increased",Tags:[facetext,special,devil_deal]}
#execute at @e[tag=deal2] run summon text_display ~ ~1.4 ~ {text:"More Blood Moons",Tags:[facetext,special,devil_deal]}
#execute at @e[tag=deal2] run summon text_display ~ ~1 ~ {text:"You will be hunted randomly",Tags:[facetext,special,devil_deal]}
scoreboard players set Titan illager 1

#kill @e[tag=giantskel]