diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index e47331ed349..0338f52b811 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -10,11 +10,12 @@ var/surplus = -1 // -1 for infinite, not used by anything atm var/obj/effect/proc_holder/spell/S = null //Since spellbooks can be used by only one person anyway we can track the actual spell var/buy_word = "Learn" + var/limit //used to prevent a spellbook_entry from being bought more than X times with one wizard spellbook /datum/spellbook_entry/proc/IsAvailible() // For config prefs / gamemode restrictions - these are round applied return 1 /datum/spellbook_entry/proc/CanBuy(mob/living/carbon/human/user,obj/item/weapon/spellbook/book) // Specific circumstances - if(book.usesThe contract has been used, you can't get your points back now!" else user << "You feed the contract back into the spellbook, refunding your points." - src.uses++ + uses++ + for(var/datum/spellbook_entry/item/contract/CT in entries) + if(!isnull(CT.limit)) + CT.limit++ qdel(O) if(istype(O, /obj/item/weapon/antag_spawner/slaughter_demon)) user << "On second thought, maybe summoning a demon is a bad idea. You refund your points." - src.uses++ + 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) @@ -545,12 +553,16 @@ E = entries[text2num(href_list["buy"])] if(E && E.CanBuy(H,src)) if(E.Buy(H,src)) + if(E.limit) + E.limit-- uses -= E.cost else if(href_list["refund"]) E = entries[text2num(href_list["refund"])] if(E && E.refundable) var/result = E.Refund(H,src) if(result > 0) + if(!isnull(E.limit)) + E.limit += result uses += result else if(href_list["page"]) tab = sanitize(href_list["page"]) diff --git a/code/modules/mob/living/simple_animal/slaughter/slaughter.dm b/code/modules/mob/living/simple_animal/slaughter/slaughter.dm index cff95221196..58fe29515b3 100644 --- a/code/modules/mob/living/simple_animal/slaughter/slaughter.dm +++ b/code/modules/mob/living/simple_animal/slaughter/slaughter.dm @@ -11,6 +11,7 @@ response_harm = "punches" icon = 'icons/mob/mob.dmi' icon_state = "daemon" + icon_living = "daemon" speed = 0 a_intent = "harm" stop_automated_movement = 1 @@ -76,7 +77,7 @@ src.phased = TRUE src.holder = holder if(src.kidnapped) - src << "You being to feast on [kidnapped]. You can not move while you are doing this." + src << "You begin to feast on [kidnapped]. You can not move while you are doing this." src.eating = TRUE playsound(get_turf(src),'sound/magic/Demon_consume.ogg', 100, 1) sleep(30)