[MIRROR] Fixes free Wizard spells (#1493)

* Merge pull request #54606 from ATH1909/dontneedlesslyyeetspellsonawhim

Fixes free Wizard spells

* Fixes free Wizard spells

Co-authored-by: 81Denton <32391752+81Denton@users.noreply.github.com>
This commit is contained in:
SkyratBot
2020-10-27 17:38:03 +00:00
committed by GitHub
co-authored by 81Denton
parent b2ece61930
commit 54101ca32b
3 changed files with 26 additions and 0 deletions
@@ -760,6 +760,18 @@
mag_type = /obj/item/ammo_box/magazine/internal/boltaction/enchanted/arcane_barrage/blood
fire_sound = 'sound/magic/wand_teleport.ogg'
/obj/item/gun/ballistic/rifle/boltaction/enchanted/arcane_barrage/blood/can_trigger_gun(mob/living/user)
. = ..()
if(!iscultist(user))
to_chat(user, "<span class='cultlarge'>\"Did you truly think that you could channel MY blood without my approval? Amusing, but futile.\"</span>")
if(iscarbon(user))
var/mob/living/carbon/C = user
if(C.active_hand_index == 1)
C.apply_damage(20, BRUTE, BODY_ZONE_L_ARM, wound_bonus = 20, sharpness = SHARP_EDGED) //oof ouch
else
C.apply_damage(20, BRUTE, BODY_ZONE_R_ARM, wound_bonus = 20, sharpness = SHARP_EDGED)
qdel(src)
return FALSE
/obj/item/ammo_box/magazine/internal/boltaction/enchanted/arcane_barrage/blood
ammo_type = /obj/item/ammo_casing/magic/arcane_barrage/blood
@@ -229,12 +229,24 @@
cost = 3
no_coexistance_typecache = /obj/effect/proc_holder/spell/targeted/infinite_guns/arcane_barrage
/datum/spellbook_entry/infinite_guns/Refund(mob/living/carbon/human/user, obj/item/spellbook/book)
for (var/obj/item/currentItem in user.get_all_gear())
if (currentItem.type == /obj/item/gun/ballistic/rifle/boltaction/enchanted)
qdel(currentItem)
return ..()
/datum/spellbook_entry/arcane_barrage
name = "Arcane Barrage"
spell_type = /obj/effect/proc_holder/spell/targeted/infinite_guns/arcane_barrage
cost = 3
no_coexistance_typecache = /obj/effect/proc_holder/spell/targeted/infinite_guns/gun
/datum/spellbook_entry/arcane_barrage/Refund(mob/living/carbon/human/user, obj/item/spellbook/book)
for (var/obj/item/currentItem in user.get_all_gear())
if (currentItem.type == /obj/item/gun/ballistic/rifle/boltaction/enchanted/arcane_barrage)
qdel(currentItem)
return ..()
/datum/spellbook_entry/barnyard
name = "Barnyard Curse"
spell_type = /obj/effect/proc_holder/spell/pointed/barnyardcurse
@@ -102,6 +102,8 @@
/obj/item/gun/ballistic/rifle/boltaction/enchanted/dropped()
. = ..()
guns_left = 0
magazine = null
chambered = null
/obj/item/gun/ballistic/rifle/boltaction/enchanted/proc/discard_gun(mob/living/user)
user.throw_item(pick(oview(7,get_turf(user))))