diff --git a/code/datums/status_effects/debuffs/fire_stacks.dm b/code/datums/status_effects/debuffs/fire_stacks.dm index cb6fe43bb73..af4f2805a36 100644 --- a/code/datums/status_effects/debuffs/fire_stacks.dm +++ b/code/datums/status_effects/debuffs/fire_stacks.dm @@ -26,10 +26,16 @@ /datum/status_effect/fire_handler/on_creation(mob/living/new_owner, new_stacks, forced = FALSE) . = ..() - if(isanimal(owner)) + if(isbasicmob(owner)) qdel(src) return + if(isanimal(owner)) + var/mob/living/simple_animal/animal_owner = owner + if(!animal_owner.flammable) + qdel(src) + return + owner = new_owner set_stacks(new_stacks) @@ -138,10 +144,13 @@ qdel(src) return TRUE - if(!on_fire || isanimal(owner)) + if(!on_fire) return TRUE - if(iscyborg(owner)) + if(isanimal(owner)) + var/mob/living/simple_animal/animal_owner = owner + adjust_stacks(animal_owner.fire_stack_removal_speed * delta_time) + else if(iscyborg(owner)) adjust_stacks(-0.55 * delta_time) else adjust_stacks(-0.05 * delta_time) diff --git a/code/game/objects/effects/spiderwebs.dm b/code/game/objects/effects/spiderwebs.dm index a99fe21fde7..fb6cee00f94 100644 --- a/code/game/objects/effects/spiderwebs.dm +++ b/code/game/objects/effects/spiderwebs.dm @@ -25,7 +25,7 @@ . = ..() /obj/structure/spider/should_atmos_process(datum/gas_mixture/air, exposed_temperature) - return exposed_temperature > 300 + return exposed_temperature > 350 /obj/structure/spider/atmos_expose(datum/gas_mixture/air, exposed_temperature) take_damage(5, BURN, 0, 0) diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index ebf5275e164..76da75f42f0 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -834,12 +834,16 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 attack_verb_simple = list("swat", "smack") hitsound = 'sound/effects/snap.ogg' w_class = WEIGHT_CLASS_SMALL - //Things in this list will be instantly splatted. Flyman weakness is handled in the flyman species weakness proc. + /// Things in this list will be instantly splatted. Flyman weakness is handled in the flyman species weakness proc. + var/list/splattable + /// Things in this list which take a lot more damage from the fly swatter, but not be necessarily killed by it. var/list/strong_against + /// How much extra damage the fly swatter does against mobs it is strong against + var/extra_strength_damage = 24 /obj/item/melee/flyswatter/Initialize(mapload) . = ..() - strong_against = typecacheof(list( + splattable = typecacheof(list( /mob/living/simple_animal/hostile/bee, /mob/living/simple_animal/butterfly, /mob/living/basic/cockroach, @@ -848,24 +852,28 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 /mob/living/simple_animal/hostile/ant, /obj/effect/decal/cleanable/ants, )) + strong_against = typecacheof(list( + /mob/living/simple_animal/hostile/giant_spider, + )) /obj/item/melee/flyswatter/afterattack(atom/target, mob/user, proximity_flag) . = ..() - if(!proximity_flag) - return - if(!is_type_in_typecache(target, strong_against)) - return - if (HAS_TRAIT(user, TRAIT_PACIFISM)) + if(!proximity_flag || HAS_TRAIT(user, TRAIT_PACIFISM)) return - new /obj/effect/decal/cleanable/insectguts(target.drop_location()) - to_chat(user, span_warning("You easily splat [target].")) - if(isliving(target)) - var/mob/living/bug = target - bug.gib() - else - qdel(target) + if(is_type_in_typecache(target, splattable)) + new /obj/effect/decal/cleanable/insectguts(target.drop_location()) + to_chat(user, span_warning("You easily splat [target].")) + if(isliving(target)) + var/mob/living/bug = target + bug.gib() + else + qdel(target) + return + if(is_type_in_typecache(target, strong_against) && isliving(target)) + var/mob/living/living_target = target + living_target.adjustBruteLoss(extra_strength_damage) /obj/item/proc/can_trigger_gun(mob/living/user) if(!user.can_use_guns(src)) diff --git a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm index c7be5fcaf23..8d27edf144a 100644 --- a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm +++ b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm @@ -29,8 +29,10 @@ maxHealth = 80 health = 80 damage_coeff = list(BRUTE = 1, BURN = 1.25, TOX = 1, CLONE = 1, STAMINA = 1, OXY = 1) - unsuitable_cold_damage = 8 - unsuitable_heat_damage = 8 + flammable = TRUE + status_flags = NONE + unsuitable_cold_damage = 4 + unsuitable_heat_damage = 4 obj_damage = 30 melee_damage_lower = 20 melee_damage_upper = 25 @@ -50,7 +52,7 @@ ///How much of a reagent the mob injects on attack var/poison_per_bite = 0 ///What reagent the mob injects targets with - var/poison_type = /datum/reagent/toxin + var/poison_type = /datum/reagent/toxin/hunterspider ///How quickly the spider can place down webbing. One is base speed, larger numbers are slower. var/web_speed = 1 ///Whether or not the spider can create sealed webs. @@ -88,6 +90,11 @@ return TRUE return ..() +/mob/living/simple_animal/hostile/giant_spider/expose_reagents(list/reagents, datum/reagents/source, methods=TOUCH, volume_modifier=1, show_message=TRUE) + . = ..() + for(var/datum/reagent/toxin/pestkiller/current_reagent in reagents) + apply_damage(50 * volume_modifier, STAMINA, BODY_ZONE_CHEST) + /** * # Spider Hunter * @@ -130,7 +137,6 @@ health = 40 melee_damage_lower = 5 melee_damage_upper = 10 - poison_per_bite = 3 web_speed = 0.25 web_sealer = TRUE menu_description = "Support spider variant specializing in healing their brethren and placing webbings very swiftly, but has very low amount of health and deals low damage." @@ -192,10 +198,8 @@ melee_damage_upper = 40 obj_damage = 100 damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 1, CLONE = 1, STAMINA = 0, OXY = 1) - poison_per_bite = 0 move_to_delay = 8 speed = 1 - status_flags = NONE mob_size = MOB_SIZE_LARGE gold_core_spawnable = NO_SPAWN menu_description = "Tank spider variant with an enormous amount of health and damage, but is very slow when not on webbing. It also has a charge ability to close distance with a target after a small windup." @@ -248,7 +252,7 @@ melee_damage_upper = 5 poison_per_bite = 5 move_to_delay = 4 - poison_type = /datum/reagent/toxin/venom + poison_type = /datum/reagent/toxin/viperspider speed = -0.5 gold_core_spawnable = NO_SPAWN menu_description = "Assassin spider variant with an unmatched speed and very deadly poison, but has very low amount of health and damage." @@ -270,12 +274,12 @@ icon_state = "midwife" icon_living = "midwife" icon_dead = "midwife_dead" - maxHealth = 40 - health = 40 - melee_damage_lower = 5 - melee_damage_upper = 10 - poison_per_bite = 3 + maxHealth = 60 + health = 60 + melee_damage_lower = 10 + melee_damage_upper = 15 gold_core_spawnable = NO_SPAWN + web_speed = 0.5 web_sealer = TRUE menu_description = "Royal spider variant specializing in reproduction and leadership, but has very low amount of health and deals low damage." @@ -462,7 +466,7 @@ check_flags = AB_CHECK_CONSCIOUS button_icon_state = "lay_eggs" ///How long it takes for a broodmother to lay eggs. - var/egg_lay_time = 15 SECONDS + var/egg_lay_time = 12 SECONDS ///The type of egg we create var/egg_type = /obj/effect/mob_spawn/ghost_role/spider @@ -523,7 +527,7 @@ return ..() && isspider(owner) /datum/action/innate/spider/set_directive/Activate() - var/mob/living/simple_animal/hostile/giant_spider/midwife/spider = owner + var/mob/living/simple_animal/hostile/giant_spider/spider = owner spider.directive = tgui_input_text(spider, "Enter the new directive", "Create directive", "[spider.directive]") if(isnull(spider.directive) || QDELETED(src) || QDELETED(owner) || !IsAvailable()) @@ -696,12 +700,15 @@ if(DOING_INTERACTION(src, INTERACTION_SPIDER_KEY)) return if(src == target) + if(on_fire) + to_chat(src, span_warning("Your self regeneration won't work when you're on fire!")) + return if(health >= maxHealth) to_chat(src, span_warning("You're not injured, there's no reason to heal.")) return visible_message(span_notice("[src] begins mending themselves..."),span_notice("You begin mending your wounds...")) if(do_after(src, 2 SECONDS, target = src, interaction_key = INTERACTION_SPIDER_KEY)) - heal_overall_damage(50, 50) + heal_overall_damage(maxHealth * 0.5, maxHealth * 0.5) new /obj/effect/temp_visual/heal(get_turf(src), "#80F5FF") visible_message(span_notice("[src]'s wounds mend together."),span_notice("You mend your wounds together.")) return diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index fd01a80fe0e..a5c339b7aab 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -79,6 +79,13 @@ ///This damage is taken when atmos doesn't fit all the requirements above. var/unsuitable_atmos_damage = 1 + ///Whether or not this mob is flammable + var/flammable = FALSE + ///How quickly should fire stacks on this mob diminish? + var/fire_stack_removal_speed = -5 + ///How fast the mob's temperature normalizes. The greater the value, the slower their temperature normalizes. Should always be greater than 0. + var/temperature_normalization_speed = 5 + //Defaults to zero so Ian can still be cuddly. Moved up the tree to living! This allows us to bypass some hardcoded stuff. melee_damage_lower = 0 melee_damage_upper = 0 @@ -366,9 +373,9 @@ if(abs(temp_delta) > 5) if(temp_delta < 0) if(!on_fire) - adjust_bodytemperature(clamp(temp_delta * delta_time / 10, temp_delta, 0)) + adjust_bodytemperature(clamp(temp_delta * delta_time / temperature_normalization_speed, temp_delta, 0)) else - adjust_bodytemperature(clamp(temp_delta * delta_time / 10, 0, temp_delta)) + adjust_bodytemperature(clamp(temp_delta * delta_time / temperature_normalization_speed, 0, temp_delta)) if(!environment_air_is_safe() && unsuitable_atmos_damage) adjustHealth(unsuitable_atmos_damage * delta_time) @@ -487,10 +494,29 @@ return TRUE /mob/living/simple_animal/ignite_mob() - return FALSE + if(!flammable) + return FALSE + return ..() + +/mob/living/simple_animal/on_fire_stack(delta_time, times_fired, datum/status_effect/fire_handler/fire_stacks/fire_handler) + adjust_bodytemperature((maxbodytemp + (fire_handler.stacks * 12)) * 0.5 * delta_time) + +/mob/living/simple_animal/update_fire_overlay(stacks, on_fire, last_icon_state, suffix = "") + var/mutable_appearance/fire_overlay = mutable_appearance('icons/mob/onfire.dmi', "generic_fire") + if(on_fire && isnull(last_icon_state)) + add_overlay(fire_overlay) + return fire_overlay + else if(!on_fire && !isnull(last_icon_state)) + cut_overlay(fire_overlay) + return null + else if(on_fire && !isnull(last_icon_state)) + return last_icon_state + return null /mob/living/simple_animal/extinguish_mob() - return + if(!flammable) + return + return ..() /mob/living/simple_animal/revive(full_heal = FALSE, admin_revive = FALSE) . = ..() diff --git a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm index e45aebfb36a..160a98680c5 100644 --- a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm @@ -8,9 +8,13 @@ taste_description = "bitterness" taste_mult = 1.2 harmful = TRUE - var/toxpwr = 1.5 chemical_flags = REAGENT_CAN_BE_SYNTHESIZED - var/silent_toxin = FALSE //won't produce a pain message when processed by liver/life() if there isn't another non-silent toxin present. + ///How much damage this toxin does + var/toxpwr = 1.5 + ///won't produce a pain message when processed by liver/life() if there isn't another non-silent toxin present if true + var/silent_toxin = FALSE + ///The afflicted must be above this health value in order for the toxin to deal damage + var/health_required = -100 // Are you a bad enough dude to poison your own plants? /datum/reagent/toxin/on_hydroponics_apply(obj/item/seeds/myseed, datum/reagents/chems, obj/machinery/hydroponics/mytray, mob/user) @@ -19,7 +23,7 @@ mytray.adjust_toxic(round(chems.get_reagent_amount(type) * 2)) /datum/reagent/toxin/on_mob_life(mob/living/carbon/M, delta_time, times_fired) - if(toxpwr) + if(toxpwr && M.health > health_required) M.adjustToxLoss(toxpwr * REM * normalise_creation_purity() * delta_time, 0) . = TRUE ..() @@ -1207,3 +1211,18 @@ to_chat(M, span_notice("Ah, what was that? You thought you heard something...")) M.adjust_timed_status_effect(5 SECONDS, /datum/status_effect/confusion) return ..() + +/datum/reagent/toxin/hunterspider + name = "Spider Toxin" + description = "A toxic chemical produced by spiders to weaken prey." + health_required = 40 + +/datum/reagent/toxin/viperspider + name = "Viper Spider Toxin" + toxpwr = 5 + description = "An extremely toxic chemical produced by the rare viper spider. Brings their prey to the brink of death and causes hallucinations." + health_required = 10 + +/datum/reagent/toxin/viperspider/on_mob_life(mob/living/carbon/M, delta_time, times_fired) + M.hallucination += 5 * REM * delta_time + return ..()