Refactors Spell and Martial Art Books to use Action Granters!
This commit is contained in:
committed by
CitadelStationBot
parent
77f40b6be9
commit
2d8b007086
@@ -16,7 +16,7 @@
|
||||
for(var/mob/living/L in targets)
|
||||
var/list/hand_items = list(L.get_active_held_item(),L.get_inactive_held_item())
|
||||
var/charged_item = null
|
||||
var/burnt_out = 0
|
||||
var/burnt_out = FALSE
|
||||
|
||||
if(L.pulling && isliving(L.pulling))
|
||||
var/mob/living/M = L.pulling
|
||||
@@ -34,26 +34,30 @@
|
||||
break
|
||||
for(var/obj/item in hand_items)
|
||||
if(istype(item, /obj/item/spellbook))
|
||||
if(istype(item, /obj/item/spellbook/oneuse))
|
||||
var/obj/item/spellbook/oneuse/I = item
|
||||
if(prob(80))
|
||||
L.visible_message("<span class='warning'>[I] catches fire!</span>")
|
||||
qdel(I)
|
||||
else
|
||||
I.used = 0
|
||||
charged_item = I
|
||||
break
|
||||
to_chat(L, "<span class='danger'>Glowing red letters appear on the front cover...</span>")
|
||||
to_chat(L, "<span class='warning'>[pick("NICE TRY BUT NO!","CLEVER BUT NOT CLEVER ENOUGH!", "SUCH FLAGRANT CHEESING IS WHY WE ACCEPTED YOUR APPLICATION!", "CUTE! VERY CUTE!", "YOU DIDN'T THINK IT'D BE THAT EASY, DID YOU?")]</span>")
|
||||
burnt_out = TRUE
|
||||
else if(istype(item, /obj/item/book/granter/spell))
|
||||
var/obj/item/book/granter/spell/I = item
|
||||
if(!I.oneuse)
|
||||
to_chat(L, "<span class='notice'>This book is infinite use and can't be recharged, yet the magic has improved the book somehow...</span>")
|
||||
burnt_out = TRUE
|
||||
I.pages_to_mastery--
|
||||
break
|
||||
if(prob(80))
|
||||
L.visible_message("<span class='warning'>[I] catches fire!</span>")
|
||||
qdel(I)
|
||||
else
|
||||
to_chat(L, "<span class='danger'>Glowing red letters appear on the front cover...</span>")
|
||||
to_chat(L, "<span class='warning'>[pick("NICE TRY BUT NO!","CLEVER BUT NOT CLEVER ENOUGH!", "SUCH FLAGRANT CHEESING IS WHY WE ACCEPTED YOUR APPLICATION!", "CUTE! VERY CUTE!", "YOU DIDN'T THINK IT'D BE THAT EASY, DID YOU?")]</span>")
|
||||
burnt_out = 1
|
||||
I.used = FALSE
|
||||
charged_item = I
|
||||
break
|
||||
else if(istype(item, /obj/item/gun/magic))
|
||||
var/obj/item/gun/magic/I = item
|
||||
if(prob(80) && !I.can_charge)
|
||||
I.max_charges--
|
||||
if(I.max_charges <= 0)
|
||||
I.max_charges = 0
|
||||
burnt_out = 1
|
||||
burnt_out = TRUE
|
||||
I.charges = I.max_charges
|
||||
if(istype(item, /obj/item/gun/magic/wand) && I.max_charges != 0)
|
||||
var/obj/item/gun/magic/W = item
|
||||
@@ -61,14 +65,14 @@
|
||||
I.recharge_newshot()
|
||||
charged_item = I
|
||||
break
|
||||
else if(istype(item, /obj/item/stock_parts/cell/))
|
||||
else if(istype(item, /obj/item/stock_parts/cell))
|
||||
var/obj/item/stock_parts/cell/C = item
|
||||
if(!C.self_recharge)
|
||||
if(prob(80))
|
||||
C.maxcharge -= 200
|
||||
if(C.maxcharge <= 1) //Div by 0 protection
|
||||
C.maxcharge = 1
|
||||
burnt_out = 1
|
||||
burnt_out = TRUE
|
||||
C.charge = C.maxcharge
|
||||
charged_item = C
|
||||
break
|
||||
@@ -82,7 +86,7 @@
|
||||
C.maxcharge -= 200
|
||||
if(C.maxcharge <= 1) //Div by 0 protection
|
||||
C.maxcharge = 1
|
||||
burnt_out = 1
|
||||
burnt_out = TRUE
|
||||
C.charge = C.maxcharge
|
||||
if(istype(C.loc, /obj/item/gun))
|
||||
var/obj/item/gun/G = C.loc
|
||||
|
||||
@@ -127,16 +127,19 @@
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/spellbook/oneuse/mimery_blockade
|
||||
/obj/item/book/granter/spell/mimery_blockade
|
||||
spell = /obj/effect/proc_holder/spell/targeted/forcewall/mime
|
||||
spellname = ""
|
||||
name = "Guide to Advanced Mimery Vol 1"
|
||||
desc = "The pages don't make any sound when turned."
|
||||
icon_state ="bookmime"
|
||||
remarks = list("...")
|
||||
|
||||
/obj/item/spellbook/oneuse/mimery_guns
|
||||
|
||||
/obj/item/book/granter/spell/mimery_guns
|
||||
spell = /obj/effect/proc_holder/spell/aimed/finger_guns
|
||||
spellname = ""
|
||||
name = "Guide to Advanced Mimery Vol 2"
|
||||
desc = "There aren't any words written..."
|
||||
icon_state ="bookmime"
|
||||
remarks = list("...")
|
||||
|
||||
@@ -47,15 +47,15 @@ GLOBAL_LIST_INIT(summoned_guns, list(
|
||||
/obj/item/gun/energy/gravity_gun))
|
||||
|
||||
GLOBAL_LIST_INIT(summoned_magic, list(
|
||||
/obj/item/spellbook/oneuse/fireball,
|
||||
/obj/item/spellbook/oneuse/smoke,
|
||||
/obj/item/spellbook/oneuse/blind,
|
||||
/obj/item/spellbook/oneuse/mindswap,
|
||||
/obj/item/spellbook/oneuse/forcewall,
|
||||
/obj/item/spellbook/oneuse/knock,
|
||||
/obj/item/spellbook/oneuse/barnyard,
|
||||
/obj/item/spellbook/oneuse/charge,
|
||||
/obj/item/spellbook/oneuse/summonitem,
|
||||
/obj/item/book/granter/spell/fireball,
|
||||
/obj/item/book/granter/spell/smoke,
|
||||
/obj/item/book/granter/spell/blind,
|
||||
/obj/item/book/granter/spell/mindswap,
|
||||
/obj/item/book/granter/spell/forcewall,
|
||||
/obj/item/book/granter/spell/knock,
|
||||
/obj/item/book/granter/spell/barnyard,
|
||||
/obj/item/book/granter/spell/charge,
|
||||
/obj/item/book/granter/spell/summonitem,
|
||||
/obj/item/gun/magic/wand,
|
||||
/obj/item/gun/magic/wand/death,
|
||||
/obj/item/gun/magic/wand/resurrection,
|
||||
|
||||
Reference in New Issue
Block a user