Skip to content

Commit 0e8cd31

Browse files
BSG AOE and arc revolver chains now are impacted by lens damage (ParadiseSS13#29343)
* BSG AOE and arc revolver chains now are impacted by lens damage * eh define this too
1 parent e690c3b commit 0e8cd31

1 file changed

Lines changed: 21 additions & 8 deletions

File tree

code/modules/projectiles/projectile/energy_projectiles.dm

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,13 @@
5757
/obj/item/projectile/energy/bolt/large
5858
damage = 20
5959

60+
#define BSG_BASE_DAMAGE 90
61+
6062
/obj/item/projectile/energy/bsg
6163
name = "orb of pure bluespace energy"
6264
icon_state = "bluespace"
6365
impact_effect_type = /obj/effect/temp_visual/bsg_kaboom
64-
damage = 90
66+
damage = BSG_BASE_DAMAGE
6567
damage_type = BURN
6668
armour_penetration_flat = 50
6769
range = 9
@@ -89,6 +91,8 @@
8991
..()
9092

9193
/obj/item/projectile/energy/bsg/proc/kaboom(atom/target)
94+
// If a lens is modifying the damage of the projectile, the AOE should be impacted as well
95+
var/damage_multiplier = damage / BSG_BASE_DAMAGE
9296
playsound(src, 'sound/weapons/bsg_explode.ogg', 75, TRUE)
9397
for(var/mob/living/M in hearers(7, src)) //No stuning people with thermals through a wall.
9498
if(M == target)
@@ -102,7 +106,7 @@
102106
if(prob(min(400 / distance, 100))) //100% chance to hit with the blast up to 3 tiles, after that chance to hit is 80% at 4 tiles, 66.6% at 5, 57% at 6, and 50% at 7
103107
if(prob(min(200 / distance, 100)))//100% chance to upgraded to a stun as well at a direct hit, 100% at 1 tile, 66% at 2, 50% at 3, 40% at 4, 33% at 5, 28.5% at 6, and finaly 25% at 7. This is calculated after the first hit however.
104108
floored = TRUE
105-
M.apply_damage((rand(60, 80) * (1.1 - distance / 10)), BURN) //reduced by 10% per tile
109+
M.apply_damage((rand(60, 80) * (1.1 - distance / 10)) * damage_multiplier, BURN) //reduced by 10% per tile
106110
add_attack_logs(firer, M, "Hit heavily by [src]")
107111
if(floored)
108112
to_chat(M, "<span class='userdanger'>You see a flash of briliant blue light as [src] explodes, knocking you to the ground and burning you!</span>")
@@ -115,9 +119,11 @@
115119
else
116120
to_chat(M, "<span class='userdanger'>You feel the heat of the explosion of [src], but the blast mostly misses you.</span>")
117121
add_attack_logs(firer, M, "Hit lightly by [src]")
118-
M.apply_damage(rand(20, 25), BURN)
122+
M.apply_damage(rand(20, 25) * damage_multiplier, BURN)
119123
if(ROLE_BLOB in M.faction)
120-
M.apply_damage(rand(20, 25), BURN) //Ensures it clears all blob spores on the screen without fail.
124+
M.apply_damage(rand(20, 25) * damage_multiplier, BURN) //Ensures it clears all blob spores on the screen without fail.
125+
126+
#undef BSG_BASE_DAMAGE
121127

122128
/obj/item/projectile/energy/weak_plasma
123129
name = "plasma bolt"
@@ -151,10 +157,13 @@
151157
homing_active = TRUE
152158
..()
153159

160+
161+
#define ARC_REVOLVER_BASE_DAMAGE 10
162+
154163
/obj/item/projectile/energy/arc_revolver
155164
name = "arc emitter"
156165
icon_state = "plasma_light"
157-
damage = 10
166+
damage = ARC_REVOLVER_BASE_DAMAGE
158167
damage_type = BURN
159168
var/charge_number = null
160169

@@ -167,7 +176,7 @@
167176
A.duration += 10 SECONDS
168177
qdel(src)
169178
return
170-
new /obj/effect/abstract/arc_revolver(target, charge_number, immolate)
179+
new /obj/effect/abstract/arc_revolver(target, charge_number, immolate, damage)
171180
qdel(src)
172181

173182

@@ -180,13 +189,15 @@
180189
var/successfulshocks = 0
181190
var/wait_for_three = 0
182191
var/our_immolate = 0
192+
var/damage_multiplier = 1
183193

184-
/obj/effect/abstract/arc_revolver/Initialize(mapload, charge_number, immolate)
194+
/obj/effect/abstract/arc_revolver/Initialize(mapload, charge_number, immolate, damage)
185195
. = ..()
186196
charge_numbers += charge_number
187197
START_PROCESSING(SSfastprocess, src)
188198
GLOB.arc_emitters += src
189199
our_immolate = immolate / 5
200+
damage_multiplier = damage / ARC_REVOLVER_BASE_DAMAGE
190201
build_chains()
191202

192203
/obj/effect/abstract/arc_revolver/proc/build_chains()
@@ -255,7 +266,7 @@
255266
"<span class='userdanger'>You are shocked by the lightning chain!</span>", \
256267
"<span class='italics'>You hear a heavy electrical crack.</span>" \
257268
)
258-
var/damage = (2 - isliving(B.origin) + 2 - isliving(B.target)) //Damage is upped depending if the origin is a mob or not. Wall to wall hurts more than mob to wall, or mob to mob
269+
var/damage = (2 - isliving(B.origin) + 2 - isliving(B.target)) * damage_multiplier //Damage is upped depending if the origin is a mob or not. Wall to wall hurts more than mob to wall, or mob to mob
259270
L.adjustFireLoss(damage) //time to die
260271
if(our_immolate)
261272
L.adjust_fire_stacks(our_immolate)
@@ -274,3 +285,5 @@
274285
var/datum/cd = chain
275286
if(!chain || QDELETED(cd))
276287
chains -= chain
288+
289+
#undef ARC_REVOLVER_BASE_DAMAGE

0 commit comments

Comments
 (0)