Variable rename and operator change

Changes the variable name to avoid confusion, and changes the math to
use the *= operator.

Also does the same for the spacevines, for consistency.
This commit is contained in:
FalseIncarnate
2017-04-25 23:55:40 -04:00
parent f8b5a7025e
commit f7c76befff
2 changed files with 12 additions and 12 deletions
+8 -8
View File
@@ -485,29 +485,29 @@
if (!W || !user || !W.type)
return
user.changeNext_move(CLICK_CD_MELEE)
var/force = W.force
var/damage_to_do = W.force
if(istype(W, /obj/item/weapon/scythe))
var/obj/item/weapon/scythe/S = W
if(S.extend) //so folded telescythes won't get damage boosts / insta-clears (they instead will instead be treated like non-scythes)
force = force * 4
damage_to_do *= 4
for(var/obj/structure/spacevine/B in range(1,src))
if(B.health > force) //this only is going to occur for woodening mutation vines (increased health) or if we nerf scythe damage/multiplier
B.health -= force
if(B.health > damage_to_do) //this only is going to occur for woodening mutation vines (increased health) or if we nerf scythe damage/multiplier
B.health -= damage_to_do
else
B.wither()
return
if(is_sharp(W))
force = force * 4
damage_to_do *= 4
if(W && W.damtype == "fire")
force = force * 4
damage_to_do *= 4
for(var/datum/spacevine_mutation/SM in mutations)
force = SM.on_hit(src, user, W, force) //on_hit now takes override damage as arg and returns new value for other mutations to permutate further
damage_to_do = SM.on_hit(src, user, W, damage_to_do) //on_hit now takes override damage as arg and returns new value for other mutations to permutate further
health -= force
health -= damage_to_do
if(health < 1)
wither()