mk III
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
/obj/item/gun/magic/wand/book
|
||||
name = "blank spellbook"
|
||||
desc = "It's not just a book, it's a SPELL book!"
|
||||
ammo_type = /obj/item/ammo_casing/magic
|
||||
icon = 'icons/obj/library.dmi'
|
||||
icon_state = "book"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
charges = 10 //We start with max pages
|
||||
max_charges = 10
|
||||
variable_charges = FALSE
|
||||
self_attack = FALSE
|
||||
|
||||
/obj/item/gun/magic/wand/book/examine(mob/user)
|
||||
. = ..()
|
||||
. += "Has [charges] pages\s remaining."
|
||||
|
||||
/obj/item/gun/magic/wand/book/attack(atom/target, mob/living/user)
|
||||
if(target == user)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/gun/magic/wand/book/afterattack(atom/target, mob/living/user)
|
||||
if(charges == 0)
|
||||
shoot_with_empty_chamber(user)
|
||||
return
|
||||
if(target == user)
|
||||
to_chat(user, "The book has [charges] pages\s remaining.</span>")
|
||||
else
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/magic/wand/book/attackby(obj/item/S, mob/living/user, params)
|
||||
if(!istype(S, /obj/item/paper))
|
||||
return
|
||||
if(charges < max_charges)
|
||||
charges++
|
||||
recharge_newshot()
|
||||
to_chat(user, "You add a new page to [src].</span>")
|
||||
qdel(S)
|
||||
update_icon()
|
||||
process()
|
||||
else
|
||||
to_chat(user, "The [src] has no more room for pages!</span>")
|
||||
return
|
||||
|
||||
//////////////////////
|
||||
//Spell Book - SPARK//
|
||||
//////////////////////
|
||||
|
||||
/obj/item/gun/magic/wand/book/spark
|
||||
name = "Spell Book of Spark"
|
||||
desc = "A spell book that fires burn pages to set the target ablaze!"
|
||||
ammo_type = /obj/item/ammo_casing/magic/book/spark
|
||||
icon_state = "spellbook_spark"
|
||||
|
||||
//////////////////////
|
||||
//Spell Book - PAGE///
|
||||
//////////////////////
|
||||
|
||||
/obj/item/gun/magic/wand/book/page
|
||||
name = "Spell Book of Throw"
|
||||
desc = "A spell book that throws pages at its target!"
|
||||
ammo_type = /obj/item/ammo_casing/magic/book/book
|
||||
icon_state = "spellbook_page"
|
||||
|
||||
//////////////////////
|
||||
//Spell Book - SHOCK//
|
||||
//////////////////////
|
||||
|
||||
/obj/item/gun/magic/wand/book/shock
|
||||
name = "Spell Book of Shock"
|
||||
desc = "A spell book that uses its pages to capture energy in the air and send it in a bolt at its target!"
|
||||
ammo_type = /obj/item/ammo_casing/magic/book/shock
|
||||
icon_state = "spellbook_shock"
|
||||
|
||||
////////////////////////
|
||||
//Spell Book - HEALING//
|
||||
////////////////////////
|
||||
|
||||
/obj/item/gun/magic/wand/book/healing
|
||||
name = "Spell Book of Mending"
|
||||
desc = "A spell book that uses its pages to heal and repair the target! The back of the book lists what it works on, and it seems to only be of flesh and of metal beings..."
|
||||
ammo_type = /obj/item/ammo_casing/magic/book/heal
|
||||
icon_state = "spellbook_healing"
|
||||
@@ -8,6 +8,7 @@
|
||||
can_charge = 0
|
||||
max_charges = 100 //100, 50, 50, 34 (max charge distribution by 25%ths)
|
||||
var/variable_charges = 1
|
||||
var/self_attack = TRUE
|
||||
|
||||
/obj/item/gun/magic/wand/Initialize()
|
||||
if(prob(75) && variable_charges) //25% chance of listed max charges, 50% chance of 1/2 max charges, 25% chance of 1/3 max charges
|
||||
@@ -33,7 +34,7 @@
|
||||
if(!charges)
|
||||
shoot_with_empty_chamber(user)
|
||||
return
|
||||
if(target == user)
|
||||
if(target == user && self_attack == TRUE)
|
||||
if(no_den_usage)
|
||||
var/area/A = get_area(user)
|
||||
if(istype(A, /area/wizard_station))
|
||||
|
||||
Reference in New Issue
Block a user