Merge remote-tracking branch 'origin/master' into TGUI_Updoot
This commit is contained in:
@@ -43,3 +43,17 @@
|
||||
|
||||
/obj/item/ammo_casing/magic/locker
|
||||
projectile_type = /obj/item/projectile/magic/locker
|
||||
|
||||
//Spell book ammo casing
|
||||
/obj/item/ammo_casing/magic/book
|
||||
projectile_type = /obj/item/projectile/magic/spellcard/book
|
||||
|
||||
/obj/item/ammo_casing/magic/book/spark
|
||||
projectile_type = /obj/item/projectile/magic/spellcard/book/spark
|
||||
|
||||
/obj/item/ammo_casing/magic/book/heal
|
||||
projectile_type = /obj/item/projectile/magic/spellcard/book/heal
|
||||
harmful = FALSE
|
||||
|
||||
/obj/item/ammo_casing/magic/book/shock
|
||||
projectile_type = /obj/item/projectile/magic/spellcard/book/shock
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
var/caliber
|
||||
var/multiload = 1
|
||||
var/start_empty = 0
|
||||
var/load_delay = 0 //how long do we take to load (deciseconds)
|
||||
var/list/bullet_cost
|
||||
var/list/base_cost// override this one as well if you override bullet_cost
|
||||
|
||||
@@ -76,19 +75,12 @@
|
||||
return 1
|
||||
|
||||
/obj/item/ammo_box/attackby(obj/item/A, mob/user, params, silent = FALSE, replace_spent = 0)
|
||||
if(INTERACTING_WITH(user, src) || INTERACTING_WITH(user, A))
|
||||
to_chat(user, "<span class='notice'>You're already doing that!</span>")
|
||||
return FALSE
|
||||
var/num_loaded = 0
|
||||
if(!can_load(user))
|
||||
return
|
||||
if(istype(A, /obj/item/ammo_box))
|
||||
var/obj/item/ammo_box/AM = A
|
||||
for(var/obj/item/ammo_casing/AC in AM.stored_ammo)
|
||||
if(load_delay || AM.load_delay)
|
||||
var/loadtime = max(AM.load_delay, load_delay)
|
||||
if(!do_after(user, loadtime, target = src))
|
||||
return FALSE
|
||||
var/did_load = give_round(AC, replace_spent)
|
||||
if(did_load)
|
||||
AM.stored_ammo -= AC
|
||||
|
||||
@@ -156,8 +156,6 @@
|
||||
max_ammo = 4
|
||||
var/pixeloffsetx = 4
|
||||
start_empty = TRUE
|
||||
multiload = FALSE
|
||||
load_delay = 6 //6ds
|
||||
|
||||
/obj/item/ammo_box/shotgun/update_overlays()
|
||||
. = ..()
|
||||
|
||||
@@ -53,8 +53,6 @@
|
||||
..()
|
||||
if (istype(A, /obj/item/ammo_box/magazine))
|
||||
var/obj/item/ammo_box/magazine/AM = A
|
||||
if(AM.load_delay && !do_after(user, AM.load_delay, target = src))
|
||||
return FALSE
|
||||
if (!magazine && istype(AM, mag_type))
|
||||
if(user.transferItemToLoc(AM, src))
|
||||
magazine = AM
|
||||
|
||||
@@ -51,11 +51,6 @@
|
||||
cell.use(shot.energy_cost)
|
||||
. = ..()
|
||||
|
||||
/obj/item/gun/ballistic/automatic/magrifle/emp_act(severity)
|
||||
. = ..()
|
||||
if(!(. & EMP_PROTECT_CONTENTS))
|
||||
cell.use(round(cell.charge / severity))
|
||||
|
||||
/obj/item/gun/ballistic/automatic/magrifle/get_cell()
|
||||
return cell
|
||||
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
/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
|
||||
|
||||
/obj/item/gun/magic/wand/book/zap_self(mob/living/user)
|
||||
to_chat(user, "The book has [charges] pages\s remaining.</span>")
|
||||
|
||||
/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>")
|
||||
|
||||
//////////////////////
|
||||
//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
|
||||
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"
|
||||
@@ -460,6 +460,7 @@
|
||||
return TRUE //Bullets don't drift in space
|
||||
|
||||
/obj/item/projectile/process(wait)
|
||||
set waitfor = FALSE
|
||||
if(!loc || !fired || !trajectory)
|
||||
fired = FALSE
|
||||
return PROCESS_KILL
|
||||
|
||||
@@ -4,3 +4,60 @@
|
||||
icon_state = "spellcard"
|
||||
damage_type = BURN
|
||||
damage = 2
|
||||
|
||||
/obj/item/projectile/magic/spellcard/book
|
||||
nodamage = FALSE
|
||||
name = "enchanted page"
|
||||
desc = "A piece of paper enchanted to give it extreme durability and stiffness, along with a very hot burn to anyone unfortunate enough to get hit by a charged one."
|
||||
icon_state = "spellcard"
|
||||
damage_type = BURN
|
||||
damage = 12
|
||||
flag = "magic"
|
||||
|
||||
/obj/item/projectile/magic/spellcard/book/spark
|
||||
damage = 4
|
||||
var/fire_stacks = 4
|
||||
|
||||
/obj/item/projectile/magic/spellcard/book/spark/on_hit(atom/target, blocked = FALSE)
|
||||
. = ..()
|
||||
var/mob/living/carbon/M = target
|
||||
if(ismob(target))
|
||||
if(M.anti_magic_check())
|
||||
M.visible_message("<span class='warning'>[src] vanishes on contact with [target]!</span>")
|
||||
return BULLET_ACT_BLOCK
|
||||
|
||||
if(iscarbon(target))
|
||||
M.adjust_fire_stacks(fire_stacks)
|
||||
M.IgniteMob()
|
||||
return
|
||||
else
|
||||
damage = 20 //If we are a simplemob we deal 5x damage
|
||||
|
||||
/obj/item/projectile/magic/spellcard/book/shock
|
||||
damage = 0
|
||||
stamina = 11
|
||||
stutter = 5
|
||||
jitter = 20
|
||||
knockdown = 10
|
||||
|
||||
/obj/item/projectile/magic/spellcard/book/heal
|
||||
damage = 0
|
||||
nodamage = TRUE
|
||||
|
||||
/obj/item/projectile/magic/spellcard/book/heal/on_hit(atom/target, blocked = FALSE)
|
||||
. = ..()
|
||||
var/mob/living/carbon/M = target
|
||||
if(ismob(target))
|
||||
if(M.anti_magic_check())
|
||||
M.visible_message("<span class='warning'>[src] vanishes on contact with [target]!</span>")
|
||||
return BULLET_ACT_BLOCK
|
||||
if(iscarbon(target))
|
||||
M.visible_message("<span class='warning'>[src] mends [target]!</span>")
|
||||
M.adjustBruteLoss(-5) //HEALS
|
||||
M.adjustOxyLoss(-5)
|
||||
M.adjustBruteLoss(-5)
|
||||
M.adjustFireLoss(-5)
|
||||
M.adjustToxLoss(-5, TRUE) //heals TOXINLOVERs
|
||||
M.adjustCloneLoss(-5)
|
||||
M.adjustStaminaLoss(-5)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user