mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 23:27:34 +01:00
"vines", "plants" faction gives immunity to kuzdu (#18540)
* "vines", "plants" faction gives immunity to kuzdu Adding "vines" and "plants" to podpeople's factions only makes them immune to the snare of the venus human trap. Now added some checks to spacevine.dm which checks for vine immunity, and a check in mob/living.dm (apparently). Podpeople (and venus human traps) are now no longer damaged, poisoned or obstructed by space vines. Explosive vines still damage them, because there's an actual explosion. * Some grammar fixes for venus human traps * Fixes compile error * Pod people are now vine immune, completely
This commit is contained in:
@@ -109,23 +109,36 @@
|
||||
/turf/open/floor/vines/ChangeTurf(turf/open/floor/T)
|
||||
for(var/obj/effect/spacevine/SV in src)
|
||||
qdel(SV)
|
||||
..()
|
||||
. = ..()
|
||||
UpdateAffectingLights()
|
||||
|
||||
/datum/spacevine_mutation/space_covering
|
||||
var/static/list/coverable_turfs
|
||||
|
||||
/datum/spacevine_mutation/space_covering/New()
|
||||
. = ..()
|
||||
if(!coverable_turfs)
|
||||
coverable_turfs = typecacheof(list(
|
||||
/turf/open/space
|
||||
))
|
||||
coverable_turfs -= typecacheof(list(
|
||||
/turf/open/space/transit
|
||||
))
|
||||
|
||||
/datum/spacevine_mutation/space_covering/on_grow(obj/effect/spacevine/holder)
|
||||
if(istype(holder.loc, /turf/open/space))
|
||||
var/turf/open/spaceturf = holder.loc
|
||||
spaceturf.ChangeTurf(/turf/open/floor/vines)
|
||||
process_mutation(holder)
|
||||
|
||||
/datum/spacevine_mutation/space_covering/process_mutation(obj/effect/spacevine/holder)
|
||||
if(istype(holder.loc, /turf/open/space))
|
||||
var/turf/open/spaceturf = holder.loc
|
||||
spaceturf.ChangeTurf(/turf/open/floor/vines)
|
||||
var/turf/T = get_turf(holder)
|
||||
if(is_type_in_typecache(T, coverable_turfs))
|
||||
var/currtype = T.type
|
||||
T.ChangeTurf(/turf/open/floor/vines)
|
||||
T.baseturf = currtype
|
||||
|
||||
/datum/spacevine_mutation/space_covering/on_death(obj/effect/spacevine/holder)
|
||||
if(istype(holder.loc, /turf/open/floor/vines))
|
||||
var/turf/open/spaceturf = holder.loc
|
||||
spaceturf.ChangeTurf(/turf/open/space)
|
||||
var/turf/T = get_turf(holder)
|
||||
if(istype(T, /turf/open/floor/vines))
|
||||
T.ChangeTurf(T.baseturf)
|
||||
|
||||
/datum/spacevine_mutation/bluespace
|
||||
name = "bluespace"
|
||||
@@ -155,12 +168,13 @@
|
||||
/datum/spacevine_mutation/toxicity/on_cross(obj/effect/spacevine/holder, mob/living/crosser)
|
||||
if(issilicon(crosser))
|
||||
return
|
||||
if(prob(severity) && istype(crosser))
|
||||
if(prob(severity) && istype(crosser) && !isvineimmune(crosser))
|
||||
crosser << "<span class='alert'>You accidently touch the vine and feel a strange sensation.</span>"
|
||||
crosser.adjustToxLoss(5)
|
||||
|
||||
/datum/spacevine_mutation/toxicity/on_eat(obj/effect/spacevine/holder, mob/living/eater)
|
||||
eater.adjustToxLoss(5)
|
||||
if(!isvineimmune(eater))
|
||||
eater.adjustToxLoss(5)
|
||||
|
||||
/datum/spacevine_mutation/explosive //OH SHIT IT CAN CHAINREACT RUN!!!
|
||||
name = "explosive"
|
||||
@@ -173,8 +187,7 @@
|
||||
qdel(src)
|
||||
else
|
||||
. = 1
|
||||
spawn(5)
|
||||
qdel(src)
|
||||
QDEL_IN(src, 5)
|
||||
|
||||
/datum/spacevine_mutation/explosive/on_death(obj/effect/spacevine/holder, mob/hitter, obj/item/I)
|
||||
explosion(holder.loc, 0, 0, severity, 0, 0)
|
||||
@@ -210,10 +223,10 @@
|
||||
quality = NEGATIVE
|
||||
|
||||
/datum/spacevine_mutation/aggressive_spread/on_spread(obj/effect/spacevine/holder, turf/target)
|
||||
target.ex_act(severity, src)
|
||||
target.ex_act(severity, src) // vine immunity handled at /mob/ex_act
|
||||
|
||||
/datum/spacevine_mutation/aggressive_spread/on_buckle(obj/effect/spacevine/holder, mob/living/buckled)
|
||||
buckled.ex_act(severity)
|
||||
buckled.ex_act(severity, src)
|
||||
|
||||
/datum/spacevine_mutation/transparency
|
||||
name = "transparent"
|
||||
@@ -291,13 +304,13 @@
|
||||
quality = NEGATIVE
|
||||
|
||||
/datum/spacevine_mutation/thorns/on_cross(obj/effect/spacevine/holder, mob/living/crosser)
|
||||
if(prob(severity) && istype(crosser))
|
||||
if(prob(severity) && istype(crosser) && !isvineimmune(holder))
|
||||
var/mob/living/M = crosser
|
||||
M.adjustBruteLoss(5)
|
||||
M << "<span class='alert'>You cut yourself on the thorny vines.</span>"
|
||||
|
||||
/datum/spacevine_mutation/thorns/on_hit(obj/effect/spacevine/holder, mob/living/hitter, obj/item/I, expected_damage)
|
||||
if(prob(severity) && istype(hitter))
|
||||
if(prob(severity) && istype(hitter) && !isvineimmune(holder))
|
||||
var/mob/living/M = hitter
|
||||
M.adjustBruteLoss(5)
|
||||
M << "<span class='alert'>You cut yourself on the thorny vines.</span>"
|
||||
@@ -497,7 +510,7 @@
|
||||
|
||||
/obj/effect/spacevine_controller/process()
|
||||
if(!vines)
|
||||
qdel(src) //space vines exterminated. Remove the controller
|
||||
qdel(src) //space vines exterminated. Remove the controller
|
||||
return
|
||||
if(!growth_queue)
|
||||
qdel(src) //Sanity check
|
||||
@@ -509,7 +522,7 @@
|
||||
var/i = 0
|
||||
var/list/obj/effect/spacevine/queue_end = list()
|
||||
|
||||
for( var/obj/effect/spacevine/SV in growth_queue )
|
||||
for(var/obj/effect/spacevine/SV in growth_queue)
|
||||
if(qdeleted(SV))
|
||||
continue
|
||||
i++
|
||||
@@ -546,12 +559,12 @@
|
||||
if(!has_buckled_mobs() && prob(25))
|
||||
for(var/mob/living/V in src.loc)
|
||||
entangle(V)
|
||||
if(buckled_mobs.len)
|
||||
if(buckled_mobs && buckled_mobs.len)
|
||||
break //only capture one mob at a time
|
||||
|
||||
|
||||
/obj/effect/spacevine/proc/entangle(mob/living/V)
|
||||
if(!V)
|
||||
if(!V || isvineimmune(V))
|
||||
return
|
||||
for(var/datum/spacevine_mutation/SM in mutations)
|
||||
SM.on_buckle(src, V)
|
||||
@@ -585,3 +598,16 @@
|
||||
override += SM.process_temperature(src, temp, volume)
|
||||
if(!override)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/spacevine/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(isvineimmune(mover))
|
||||
. = TRUE
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/proc/isvineimmune(atom/A)
|
||||
. = FALSE
|
||||
if(isliving(A))
|
||||
var/mob/living/M = A
|
||||
if(("vines" in M.faction) || ("plants" in M.faction))
|
||||
. = TRUE
|
||||
|
||||
@@ -120,6 +120,8 @@
|
||||
var/b_loss = null
|
||||
var/f_loss = null
|
||||
var/bomb_armor = getarmor(null, "bomb")
|
||||
if(istype(ex_target, /datum/spacevine_mutation) && isvineimmune(src))
|
||||
return
|
||||
|
||||
switch (severity)
|
||||
if (1)
|
||||
|
||||
@@ -104,6 +104,15 @@
|
||||
heatmod = 1.5
|
||||
meat = /obj/item/weapon/reagent_containers/food/snacks/meat/slab/human/mutant/plant
|
||||
|
||||
/datum/species/pod/on_species_gain(mob/living/carbon/C, datum/species/old_species)
|
||||
. = ..()
|
||||
C.faction |= "plants"
|
||||
C.faction |= "vines"
|
||||
|
||||
/datum/species/pod/on_species_loss(mob/living/carbon/C)
|
||||
. = ..()
|
||||
C.faction -= "plants"
|
||||
C.faction -= "vines"
|
||||
|
||||
/datum/species/pod/spec_life(mob/living/carbon/human/H)
|
||||
if(H.stat == DEAD)
|
||||
@@ -146,8 +155,6 @@
|
||||
H.show_message("<span class='userdanger'>The radiation beam singes you!</span>")
|
||||
if(/obj/item/projectile/energy/florayield)
|
||||
H.nutrition = min(H.nutrition+30, NUTRITION_LEVEL_FULL)
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
SHADOWPEOPLE
|
||||
|
||||
@@ -225,7 +225,9 @@ Sorry Giacom. Please don't be mad :(
|
||||
/mob/living/proc/InCritical()
|
||||
return (src.health < 0 && src.health > -95 && stat == UNCONSCIOUS)
|
||||
|
||||
/mob/living/ex_act(severity, target)
|
||||
/mob/living/ex_act(severity, origin)
|
||||
if(istype(origin, /datum/spacevine_mutation) && isvineimmune(src))
|
||||
return
|
||||
..()
|
||||
flash_eyes()
|
||||
|
||||
|
||||
@@ -423,16 +423,25 @@
|
||||
|
||||
/mob/living/simple_animal/ex_act(severity, target)
|
||||
..()
|
||||
var/bomb_armor = getarmor(null, "bomb")
|
||||
switch (severity)
|
||||
if (1)
|
||||
gib()
|
||||
return
|
||||
|
||||
if(prob(bomb_armor))
|
||||
adjustBruteLoss(500)
|
||||
else
|
||||
gib()
|
||||
return
|
||||
if (2)
|
||||
adjustBruteLoss(60)
|
||||
var/bloss = 60
|
||||
if(prob(bomb_armor))
|
||||
bloss = bloss / 1.5
|
||||
adjustBruteLoss(bloss)
|
||||
|
||||
if(3)
|
||||
adjustBruteLoss(30)
|
||||
var/bloss = 30
|
||||
if(prob(bomb_armor))
|
||||
bloss = bloss / 1.5
|
||||
adjustBruteLoss(bloss)
|
||||
|
||||
/mob/living/simple_animal/proc/CanAttack(atom/the_target)
|
||||
if(see_invisible < the_target.invisibility)
|
||||
|
||||
Reference in New Issue
Block a user