mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
Merge pull request #3011 from Anewbe/simple_mob
Tasers can hurt simple mobs
This commit is contained in:
@@ -92,13 +92,6 @@
|
||||
src.visible_message("\red [src] triggers their deadman's switch!")
|
||||
signaler.signal()
|
||||
|
||||
//Stun Beams
|
||||
if(P.taser_effect)
|
||||
stun_effect_act(0, P.agony, def_zone, P)
|
||||
src <<"\red You have been hit by [P]!"
|
||||
qdel(P)
|
||||
return
|
||||
|
||||
//Armor
|
||||
var/absorb = run_armor_check(def_zone, P.check_armour, P.armor_penetration)
|
||||
var/proj_sharp = is_sharp(P)
|
||||
@@ -107,6 +100,15 @@
|
||||
proj_sharp = 0
|
||||
proj_edge = 0
|
||||
|
||||
//Stun Beams
|
||||
if(P.taser_effect)
|
||||
stun_effect_act(0, P.agony, def_zone, P)
|
||||
src <<"\red You have been hit by [P]!"
|
||||
if(!P.nodamage)
|
||||
apply_damage(P.damage, P.damage_type, def_zone, absorb, 0, P, sharp=proj_sharp, edge=proj_edge)
|
||||
qdel(P)
|
||||
return
|
||||
|
||||
if(!P.nodamage)
|
||||
apply_damage(P.damage, P.damage_type, def_zone, absorb, 0, P, sharp=proj_sharp, edge=proj_edge)
|
||||
P.on_hit(src, absorb, def_zone)
|
||||
|
||||
@@ -271,7 +271,13 @@
|
||||
custom_emote(2, act_desc)
|
||||
|
||||
/mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(!Proj || Proj.nodamage)
|
||||
if(!Proj)
|
||||
return
|
||||
|
||||
if(Proj.taser_effect)
|
||||
stun_effect_act(0, Proj.agony)
|
||||
|
||||
if(Proj.nodamage)
|
||||
return
|
||||
|
||||
adjustBruteLoss(Proj.damage)
|
||||
@@ -651,4 +657,16 @@
|
||||
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, loc)
|
||||
s.start()
|
||||
s.start()
|
||||
|
||||
/mob/living/simple_animal/stun_effect_act(var/stun_amount, var/agony_amount, var/def_zone, var/used_weapon=null)
|
||||
var/stunDam = 0
|
||||
var/agonyDam = 0
|
||||
|
||||
if(stun_amount)
|
||||
stunDam += stun_amount * 0.5
|
||||
adjustFireLoss(stunDam)
|
||||
|
||||
if(agony_amount)
|
||||
agonyDam += agony_amount * 0.5
|
||||
adjustFireLoss(agonyDam)
|
||||
@@ -6,7 +6,6 @@
|
||||
check_armour = "energy"
|
||||
var/flash_strength = 10
|
||||
|
||||
|
||||
//releases a burst of light on impact or after travelling a distance
|
||||
/obj/item/projectile/energy/flash
|
||||
name = "chemical shell"
|
||||
@@ -64,10 +63,8 @@
|
||||
/obj/item/projectile/energy/electrode
|
||||
name = "electrode"
|
||||
icon_state = "spark"
|
||||
nodamage = 1
|
||||
taser_effect = 1
|
||||
agony = 40
|
||||
damage_type = HALLOSS
|
||||
light_range = 2
|
||||
light_power = 0.5
|
||||
light_color = "#FFFFFF"
|
||||
@@ -79,7 +76,6 @@
|
||||
/obj/item/projectile/energy/electrode/stunshot
|
||||
name = "stunshot"
|
||||
damage = 5
|
||||
taser_effect = 1
|
||||
agony = 80
|
||||
|
||||
/obj/item/projectile/energy/declone
|
||||
@@ -107,7 +103,6 @@
|
||||
icon_state = "cbbolt"
|
||||
damage = 10
|
||||
damage_type = TOX
|
||||
nodamage = 0
|
||||
agony = 40
|
||||
stutter = 10
|
||||
|
||||
|
||||
36
html/changelogs/Anewbe - Taser.yml
Normal file
36
html/changelogs/Anewbe - Taser.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# wip (For works in progress)
|
||||
# tweak
|
||||
# soundadd
|
||||
# sounddel
|
||||
# rscadd (general adding of nice things)
|
||||
# rscdel (general deleting of nice things)
|
||||
# imageadd
|
||||
# imagedel
|
||||
# maptweak
|
||||
# spellcheck (typo fixes)
|
||||
# experiment
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: Anewbe
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- rscadd: "Tasers can hurt simple mobs."
|
||||
Reference in New Issue
Block a user