Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(mostly)Ignorable weeds #261

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 16 additions & 13 deletions code/modules/cm_aliens/weeds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -372,26 +372,29 @@
if(QDELETED(attacking_item) || QDELETED(user) || (attacking_item.flags_item & NOBLUDGEON))
return 0

if(istype(src, /obj/effect/alien/weeds/node)) //The pain is real
to_chat(user, SPAN_WARNING("You hit \the [src] with \the [attacking_item]."))
else
to_chat(user, SPAN_WARNING("You cut \the [src] away with \the [attacking_item]."))

var/damage = (attacking_item.force * attacking_item.demolition_mod) / 3
playsound(loc, "alien_resin_break", 25)

if(iswelder(attacking_item))
var/obj/item/tool/weldingtool/WT = attacking_item
if(WT.remove_fuel(2))
damage = WEED_HEALTH_STANDARD
if(istype(src, /obj/effect/alien/weeds/node))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't need \the in any of this (ik it's not your code but still)

to_chat(user, SPAN_WARNING("You hit \the [src] with \the [attacking_item]."))
else
to_chat(user, SPAN_WARNING("You cut \the [src] away with \the [attacking_item]."))
playsound(loc, "alien_resin_break", 25)
playsound(loc, 'sound/items/Welder.ogg', 25, 1)
user.animation_attack_on(src)
take_damage(WEED_HEALTH_STANDARD)
else
if(!attacking_item.force)
to_chat(user, SPAN_WARNING("You scrape ineffectively at \the [src] with \the [attacking_item]."))
return
to_chat(user, SPAN_NOTICE("You start clearing \the [src] away with \the [attacking_item]..."))
var/duration = (20 SECONDS) * (health / attacking_item.force * attacking_item.demolition_mod) //effectively applying attack damage to weed's health spread over 20 seconds
if(!do_after(user, duration, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has the do_after wheel keep going even if the user moves, from a round i played in

return
playsound(loc, "alien_resin_break", 25)
user.animation_attack_on(src)
take_damage(health)


user.animation_attack_on(src)

take_damage(damage)
return TRUE //don't call afterattack

/obj/effect/alien/weeds/proc/take_damage(damage)
Expand Down
5 changes: 0 additions & 5 deletions code/modules/mob/living/carbon/xenomorph/XenoProcs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,6 @@
if(agility)
. += caste.agility_speed_increase

var/obj/effect/alien/weeds/W = locate(/obj/effect/alien/weeds) in loc
if (W)
if (W.linked_hive.hivenumber == hivenumber)
. *= 0.95

var/obj/effect/alien/resin/sticky/fast/FR = locate(/obj/effect/alien/resin/sticky/fast) in loc
if (FR && FR.hivenumber == hivenumber)
. *= 0.8
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/carbon/xenomorph/life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
if(regular_update && health <= 0 && (!caste || (caste.fire_immunity & FIRE_IMMUNITY_NO_IGNITE) || !on_fire)) //Sleeping Xenos are also unconscious, but all crit Xenos are under 0 HP. Go figure
var/turf/T = loc
if(istype(T))
if(!check_weeds_for_healing()) //In crit, damage is maximal if you're caught off weeds
if(!check_weeds_for_healing() || HAS_FLAG(mob_flags, AI_CONTROLLED)) //In crit, damage is maximal if you're caught off weeds or are an AI
apply_damage(2.5 - warding_aura*0.5, BRUTE) //Warding can heavily lower the impact of bleedout. Halved at 2.5 phero, stopped at 5 phero
else
apply_damage(-warding_aura, BRUTE)
Expand Down Expand Up @@ -339,7 +339,7 @@ Make sure their actual health updates immediately.*/
plasma_stored += plasma_gain * plasma_max / 100
if(recovery_aura)
plasma_stored += floor(plasma_gain * plasma_max / 100 * recovery_aura/4) //Divided by four because it gets massive fast. 1 is equivalent to weed regen! Only the strongest pheromones should bypass weeds
if(health < maxHealth && !hardcore && is_hive_living(hive) && last_hit_time + caste.heal_delay_time <= world.time)
if(health < maxHealth && !hardcore && is_hive_living(hive) && last_hit_time + caste.heal_delay_time <= world.time && !HAS_FLAG(mob_flags, AI_CONTROLLED)) //no healing for AI
if(body_position == LYING_DOWN || resting)
if(health < 0) //Unconscious
heal_wounds(caste.heal_knocked_out * regeneration_multiplier, recoveryActual) //Healing is much slower. Warding pheromones make up for the rest if you're curious
Expand Down
Loading