Merge pull request #2397 from Yoshax/flashrounds

Projectile flash rounds will now do the same as a flash when hitting a target
This commit is contained in:
Neerti
2016-09-02 20:01:36 -04:00
committed by GitHub
2 changed files with 48 additions and 0 deletions

View File

@@ -4,6 +4,7 @@
damage = 0 damage = 0
damage_type = BURN damage_type = BURN
check_armour = "energy" check_armour = "energy"
var/flash_strength = 10
//releases a burst of light on impact or after travelling a distance //releases a burst of light on impact or after travelling a distance
@@ -24,6 +25,15 @@
for (var/mob/living/carbon/M in viewers(T, flash_range)) for (var/mob/living/carbon/M in viewers(T, flash_range))
if(M.eyecheck() < 1) if(M.eyecheck() < 1)
M.flash_eyes() M.flash_eyes()
if(ishuman(M))
var/mob/living/carbon/human/H = M
flash_strength *= H.species.flash_mod
if(flash_strength > 0)
H.confused = max(H.confused, flash_strength + 5)
H.eye_blind = max(H.eye_blind, flash_strength)
H.eye_blurry = max(H.eye_blurry, flash_strength + 5)
//snap pop //snap pop
playsound(src, 'sound/effects/snap.ogg', 50, 1) playsound(src, 'sound/effects/snap.ogg', 50, 1)
@@ -35,11 +45,13 @@
new /obj/effect/decal/cleanable/ash(src.loc) //always use src.loc so that ash doesn't end up inside windows new /obj/effect/decal/cleanable/ash(src.loc) //always use src.loc so that ash doesn't end up inside windows
new /obj/effect/effect/smoke/illumination(T, 5, brightness, brightness, light_colour) new /obj/effect/effect/smoke/illumination(T, 5, brightness, brightness, light_colour)
//blinds people like the flash round, but can also be used for temporary illumination //blinds people like the flash round, but can also be used for temporary illumination
/obj/item/projectile/energy/flash/flare /obj/item/projectile/energy/flash/flare
damage = 10 damage = 10
flash_range = 1 flash_range = 1
brightness = 15 brightness = 15
flash_strength = 20
/obj/item/projectile/energy/flash/flare/on_impact(var/atom/A) /obj/item/projectile/energy/flash/flare/on_impact(var/atom/A)
light_colour = pick("#e58775", "#ffffff", "#90ff90", "#a09030") light_colour = pick("#e58775", "#ffffff", "#90ff90", "#a09030")

View 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: Yosh
# 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:
- tweak: "Projectile flash rounds will now do the same as a flash when it hits the target. As such, it will blind, confuse and blur the eyes of thw target. Pistol and machine gun rounds last the same length as a flash, shotgun rounds last longer."