anchor.diff:  	log_name = "BB"
   	limit = 3
   	category = "Assistance"
  +	refund_message = "On second thought, maybe summoning a demon is a bad idea.  You refund the bottle."
   
   /datum/spellbook_entry/item/hugbottle
   	name = "Bottle of Tickles"
  
positive.code: 	..()
  	Initialize()
  
  
  /obj/item/weapon/spellbook/attackby(obj/item/O, mob/user, params)
  	if(istype(O, /obj/item/weapon/antag_spawner/contract))
  		var/obj/item/weapon/antag_spawner/contract/contract = O
  		if(contract.used)
  			to_chat(user, "<span class='warning'>The contract has been used, you can't get your points back now!</span>")
  		else
  			to_chat(user, "<span class='notice'>You feed the contract back into the spellbook, refunding your points.</span>")
  			uses++
  			for(var/datum/spellbook_entry/item/contract/CT in entries)
  				if(!isnull(CT.limit))
  					CT.limit++
  			qdel(O)
  	else if(istype(O, /obj/item/weapon/antag_spawner/slaughter_demon))
  		to_chat(user, "<span class='notice'>On second thought, maybe summoning a demon is a bad idea. You refund your points.</span>")
  		uses++
  		for(var/datum/spellbook_entry/item/bloodbottle/BB in entries)
  			if(!isnull(BB.limit))
  				BB.limit++
  		qdel(O)
  
  /obj/item/weapon/spellbook/proc/GetCategoryHeader(category)
  	var/dat = ""
  
negative.code: 	log_name = "WA"
  	category = "Defensive"
  
  /datum/spellbook_entry/item/contract/TryRefund(mob/user,obj/item/summoned_item)
  	if(!..())
  		return 0
  
  	if(!istype(summoned_item,/obj/item/weapon/storage/belt/wands/full))
  		return 0
  
  	var/obj/item/weapon/storage/belt/wands/belt = summoned_item
  	var/wand_count = 0
  	for(var/obj/item/belt_item in belt)
  		if(istype(belt_item,/obj/item/weapon/gun/magic/wand))
  			wand_count++
  
  	if(wand_count < 6)
  		to_chat(user,"<span class='warning'>You cannot refund a wand belt that's missing wands!</span>")
  		return 0
  
  	return 1
  
  /datum/spellbook_entry/item/armor
  	name = "Mastercrafted Armor Set"
  	desc = "An artefact suit of armor that allows you to cast spells while providing more protection against attacks and the void of space."
  