clear @s written_book[custom_data={devil_deal:tag,takebook:tag,nodupe:tag}] 1
give @s written_book[custom_data={convertbook:tag,nodupe:tag},written_book_content={pages:[[{"text":"The book is no longer usable\n\n\n\n\nHowever, you still feel power emanating from the pages","color":"gray"}]],title:"Torn Book",author:Titan,generation:3}]
advancement grant @s only survivalplus:adventure/explore/pick_ability

execute if score @s titanmenu matches 1 run scoreboard players set bookstats hardmode 1
execute if score @s titanmenu matches 2 run scoreboard players set bookstats hardmode 2
execute if score @s titanmenu matches 2 run effect give @a regeneration 3 4
execute if score @s titanmenu matches 3 run scoreboard players set bookstats hardmode 3
execute if score @s titanmenu matches 4 run scoreboard players set bookstats hardmode 4
execute if score @s titanmenu matches 5 run scoreboard players set bookstats hardmode 5
#execute if score @s titanmenu matches 6 run give @s netherite_sword[custom_data={thesword:tag,formless:tag,cursed:tag},unbreakable={show_in_tooltip:false},repair_cost=99,item_name={"text":"The Sword","italic":false},lore=[{"text":"Formless","italic":false,"color":"light_purple"},{"text":"Unknowable","italic":false,"color":"red"},{"text":"Cursed","italic":false,"color":"red"}],minecraft:tooltip_display={hidden_components:[attribute_modifiers]}]
#execute if score @s titanmenu matches 6 run tellraw @s {"text": "Return... to Guardian...","italic": true,"color": "gray"}
execute if score @s titanmenu matches 6 run scoreboard players set bookstats hardmode 6
execute if score @s titanmenu matches 7 run scoreboard players set bookstats hardmode 7
execute if score @s titanmenu matches 7 run tag @a add salvagespawner
execute if score @s titanmenu matches 8 run scoreboard players set bookstats hardmode 8
execute if score @s titanmenu matches 9 run scoreboard players set bookstats hardmode 9
execute if score @s titanmenu matches 10 run scoreboard players set bookstats hardmode 10
tellraw @a[tag=!titans_gambit] [{"selector":"@s","color":"gray","italic":true},{"text":" has selected a Titan blessing"}]
execute at @s run particle flash{color:[1,0,0,0]} ~ ~1.5 ~
execute at @s run particle firework ~ ~1.5 ~ 0 0 0 .5 50
execute at @s run playsound minecraft:item.trident.thunder player @a ~ ~1 ~ 1 .8
scoreboard players set Titan hardmode 1
scoreboard players reset @s titanmenu
tag @s remove titans_gambit
scoreboard players reset Titan illager
advancement revoke @s only survivalplus:tools/titan/titans_gambit