Merge pull request #12946 from farie82/runtime-fix-2

Fixed a few funtimes and bugs
This commit is contained in:
Fox McCloud
2020-05-01 18:39:30 -04:00
committed by GitHub
10 changed files with 39 additions and 36 deletions
+22 -20
View File
@@ -84,27 +84,29 @@
/obj/item/flash/proc/flash_carbon(var/mob/living/carbon/M, var/mob/user = null, var/power = 5, targeted = 1)
add_attack_logs(user, M, "Flashed with [src]")
if(user && targeted)
if(M.weakeyes)
M.Weaken(3) //quick weaken bypasses eye protection but has no eye flash
if(M.flash_eyes(1, 1))
M.AdjustConfused(power)
terrible_conversion_proc(M, user)
M.Stun(1)
visible_message("<span class='disarm'>[user] blinds [M] with the flash!</span>")
to_chat(user, "<span class='danger'>You blind [M] with the flash!</span>")
to_chat(M, "<span class='userdanger'>[user] blinds you with the flash!</span>")
if(user)
add_attack_logs(user, M, "Flashed with [src]")
if(targeted)
if(M.weakeyes)
M.Stun(2)
M.visible_message("<span class='disarm'>[M] gasps and shields [M.p_their()] eyes!</span>", "<span class='userdanger'>You gasp and shields your eyes!</span>")
else
visible_message("<span class='disarm'>[user] fails to blind [M] with the flash!</span>")
to_chat(user, "<span class='warning'>You fail to blind [M] with the flash!</span>")
to_chat(M, "<span class='danger'>[user] fails to blind you with the flash!</span>")
else
if(M.flash_eyes())
M.AdjustConfused(power)
M.Weaken(3) //quick weaken bypasses eye protection but has no eye flash
if(M.flash_eyes(1, 1))
M.AdjustConfused(power)
terrible_conversion_proc(M, user)
M.Stun(1)
visible_message("<span class='disarm'>[user] blinds [M] with the flash!</span>")
to_chat(user, "<span class='danger'>You blind [M] with the flash!</span>")
to_chat(M, "<span class='userdanger'>[user] blinds you with the flash!</span>")
if(M.weakeyes)
M.Stun(2)
M.visible_message("<span class='disarm'>[M] gasps and shields [M.p_their()] eyes!</span>", "<span class='userdanger'>You gasp and shields your eyes!</span>")
else
visible_message("<span class='disarm'>[user] fails to blind [M] with the flash!</span>")
to_chat(user, "<span class='warning'>You fail to blind [M] with the flash!</span>")
to_chat(M, "<span class='danger'>[user] fails to blind you with the flash!</span>")
return
if(M.flash_eyes())
M.AdjustConfused(power)
/obj/item/flash/attack(mob/living/M, mob/user)
if(!try_use_flash(user))