local player = spell.owner


local helpMessage = [[ 
Game difficulty lets you choose how many hearts you want to play with.
  normal    - Standard minecraft amount of hearts
  easy      - Double the normal amount
  nidxtreme - Half the normal amount
]]

local newHearts = nil

if args.difficulty == "normal" then
	newHearts = 20
elseif args.difficulty == "easy" then
	newHearts = 40
elseif args.difficulty == "nidxtreme" then
	newHearts = 10
	spell:executeSilent("/tellraw " .. player.name .. " {text:\"You are bold to think yourself comparable to the Great Nid\", color:'red'}")
else
	spell:executeSilent("/tellraw " .. player.name .. " {text:\"" .. helpMessage .. "\"}")
	return
end

player:putExtra({ armadillopit = { hearts = newHearts } })
spell:executeSilent("/attribute " .. player.name .. " minecraft:max_health base set " .. str(newHearts))
spell:executeSilent("/tellraw " .. player.name .. " {text:\"Max health set to " .. str(newHearts/2) .. " hearts\"}")
