Merge pull request #8840 from Fox-McCloud/spacevine-fix

Fixes Unkillable Spacevines
This commit is contained in:
tigercat2000
2018-04-02 21:16:29 -07:00
committed by GitHub
+8 -9
View File
@@ -319,9 +319,9 @@
/datum/spacevine_mutation/woodening/on_grow(obj/structure/spacevine/holder)
if(holder.energy)
holder.density = 1
holder.maxhealth = 100
holder.health = holder.maxhealth
holder.density = TRUE
holder.max_integrity = 100
holder.obj_integrity = holder.max_integrity
/datum/spacevine_mutation/woodening/on_hit(obj/structure/spacevine/holder, mob/living/hitter, obj/item/I, expected_damage)
if(!is_sharp(I))
@@ -408,13 +408,12 @@
desc = "An extremely expansionistic species of vine."
icon = 'icons/effects/spacevines.dmi'
icon_state = "Light1"
anchored = 1
density = 0
layer = MOB_LAYER + 0.8
anchored = TRUE
density = FALSE
layer = SPACEVINE_LAYER
mouse_opacity = 2 //Clicking anywhere on the turf is good enough
pass_flags = PASSTABLE | PASSGRILLE
var/health = 50
var/maxhealth = 50
max_integrity = 50
var/energy = 0
var/obj/structure/spacevine_controller/master = null
var/list/mutations = list()
@@ -488,7 +487,7 @@
if(S.extend) //so folded telescythes won't get damage boosts / insta-clears (they instead will instead be treated like non-scythes)
damage_dealt *= 4
for(var/obj/structure/spacevine/B in range(1,src))
if(B.health > damage_dealt) //this only is going to occur for woodening mutation vines (increased health) or if we nerf scythe damage/multiplier
if(B.obj_integrity > damage_dealt) //this only is going to occur for woodening mutation vines (increased health) or if we nerf scythe damage/multiplier
B.take_damage(damage_dealt, I.damtype, "melee", 1)
else
B.wither()