diff --git a/code/modules/mob/_modifiers/modifiers_vr.dm b/code/modules/mob/_modifiers/modifiers_vr.dm new file mode 100644 index 00000000000..a56bc5d2e0a --- /dev/null +++ b/code/modules/mob/_modifiers/modifiers_vr.dm @@ -0,0 +1,33 @@ +/datum/modifier/underwater_stealth + name = "underwater stealth" + desc = "You are currently underwater, rendering it more difficult to see you and enabling you to move quicker, thanks to your aquatic nature." + + on_created_text = "You sink under the water." + on_expired_text = "You come out from the water." + + stacks = MODIFIER_STACK_FORBID + + slowdown = -1.5 //A bit faster when actually submerged fully in water, as you're not waddling through it. + siemens_coefficient = 1.5 //You are, however, underwater. Getting shocked will hurt. + + outgoing_melee_damage_percent = 0.75 //You are swinging a sword under water...Good luck. + accuracy = -50 //You're underwater. Good luck shooting a gun. (Makes shots as if you were 3.33 tiles further.) + evasion = 30 //You're underwater and a bit harder to hit. + +/datum/modifier/underwater_stealth/on_applied() + holder.alpha = 50 + return + +/datum/modifier/underwater_stealth/on_expire() + holder.alpha = 255 + return + +/datum/modifier/underwater_stealth/tick() + if(holder.stat == DEAD) + expire(silent = TRUE) //If you're dead you float to the top. + if(istype(holder.loc, /turf/simulated/floor/water)) + var/turf/simulated/floor/water/water_floor = holder.loc + if(water_floor.depth < 1) //You're not in deep enough water anymore. + expire(silent = FALSE) + else + expire(silent = FALSE) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm b/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm index a4333760a8d..ac55ff5f461 100644 --- a/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm +++ b/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm @@ -1064,4 +1064,92 @@ C.icon_scale_y = 0.25 * C.w_class C.update_transform() //egg_contents -= src - C.contents -= src \ No newline at end of file + C.contents -= src + +/mob/living/carbon/human/proc/water_stealth() + set name = "Dive under water / Resurface" + set desc = "Dive under water, allowing for you to be stealthy and move faster." + set category = "Abilities" + + if(last_special > world.time) + return + last_special = world.time + 50 //No spamming! + + if(has_modifier_of_type(/datum/modifier/underwater_stealth)) + to_chat(src, "You resurface!") + remove_modifiers_of_type(/datum/modifier/underwater_stealth) + return + + if(!isturf(loc)) //We have no turf. + to_chat(src, "There is no water for you to dive into!") + return + + if(istype(src.loc, /turf/simulated/floor/water)) + var/turf/simulated/floor/water/water_floor = src.loc + if(water_floor.depth >= 1) //Is it deep enough? + add_modifier(/datum/modifier/underwater_stealth) //No duration. It'll remove itself when they exit the water! + to_chat(src, "You dive into the water!") + visible_message("[src] dives into the water!") + else + to_chat(src, "The water here is not deep enough to dive into!") + return + + else + to_chat(src, "There is no water for you to dive into!") + return + +/mob/living/carbon/human/proc/underwater_devour() + set name = "Devour From Water" + set desc = "Grab something in the water with you and devour them with your selected stomach." + set category = "Abilities" + + if(last_special > world.time) + return + last_special = world.time + 50 //No spamming! + + if(stat == DEAD || paralysis || weakened || stunned) + to_chat(src, "You cannot do that while in your current state.") + return + + if(!(src.vore_selected)) + to_chat(src, "No selected belly found.") + return + + + if(!has_modifier_of_type(/datum/modifier/underwater_stealth)) + to_chat(src, "You must be underwater to do this!!") + return + + var/list/targets = list() //Shameless copy and paste. If it ain't broke don't fix it! + + for(var/turf/T in range(1, src)) + if(istype(T, /turf/simulated/floor/water)) + for(var/mob/living/L in T) + if(L == src) //no eating yourself. 1984. + continue + if(L.devourable) + targets += L + + if(!(targets.len)) + to_chat(src, "No eligible targets found.") + return + + var/mob/living/target = tgui_input_list(src, "Please select a target.", "Victim", targets) + + if(!target) + return + + to_chat(target, "Something begins to circle around you in the water!") //Dun dun... + var/starting_loc = target.loc + + if(do_after(src, 50)) + if(target.loc != starting_loc) + to_chat(target, "You got away from whatever that was...") + to_chat(src, "They got away.") + return + if(target.buckled) //how are you buckled in the water?! + target.buckled.unbuckle_mob() + target.visible_message("\The [target] suddenly disappears, being dragged into the water!",\ + "You are dragged below the water and feel yourself slipping directly into \the [src]'s [vore_selected]!") + to_chat(src, "You successfully drag \the [target] into the water, slipping them into your [vore_selected].") + target.forceMove(src.vore_selected) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species/station/station_vr.dm b/code/modules/mob/living/carbon/human/species/station/station_vr.dm index fcb985c435a..4b923d35668 100644 --- a/code/modules/mob/living/carbon/human/species/station/station_vr.dm +++ b/code/modules/mob/living/carbon/human/species/station/station_vr.dm @@ -81,7 +81,7 @@ name_language = LANGUAGE_SKRELLIAN color_mult = 1 assisted_langs = list(LANGUAGE_EAL, LANGUAGE_ROOTLOCAL, LANGUAGE_ROOTGLOBAL, LANGUAGE_VOX) - inherent_verbs = list(/mob/living/carbon/human/proc/tie_hair) + inherent_verbs = list(/mob/living/carbon/human/proc/tie_hair, /mob/living/carbon/human/proc/water_stealth, /mob/living/carbon/human/proc/underwater_devour) min_age = 18 max_age = 80 @@ -105,6 +105,7 @@ appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR water_breather = TRUE + water_movement = -4 //Negates shallow. Halves deep. flesh_color = "#AFA59E" base_color = "#777777" @@ -284,13 +285,16 @@ deform = 'icons/mob/human_races/r_def_skrell_vr.dmi' color_mult = 1 min_age = 18 - inherent_verbs = list(/mob/living/carbon/human/proc/tie_hair) + inherent_verbs = list(/mob/living/carbon/human/proc/tie_hair, /mob/living/carbon/human/proc/water_stealth, /mob/living/carbon/human/proc/underwater_devour) reagent_tag = null allergens = null assisted_langs = list(LANGUAGE_EAL, LANGUAGE_ROOTLOCAL, LANGUAGE_ROOTGLOBAL, LANGUAGE_VOX) genders = list(MALE, FEMALE, PLURAL, NEUTER) wikilink="https://wiki.vore-station.net/Skrell" + water_breather = TRUE + water_movement = -4 //Negates shallow. Halves deep. + /datum/species/zaddat spawn_flags = SPECIES_CAN_JOIN min_age = 18 diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm index b2b5449bf51..32280209047 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm @@ -164,11 +164,16 @@ H.verbs |= /mob/living/carbon/human/proc/weave_item H.verbs |= /mob/living/carbon/human/proc/set_silk_color -/datum/trait/positive/water_breather - name = "Water Breather" - desc = "You can breathe under water." +/datum/trait/positive/aquatic + name = "Aquatic" + desc = "You can breathe under water and can traverse water more efficiently. Additionally, you can eat others in the water." cost = 1 - var_changes = list("water_breather" = 1) + var_changes = list("water_breather" = 1, "water_movement" = -4) //Negate shallow water. Half the speed in deep water. + +/datum/trait/positive/aquatic/apply(var/datum/species/S,var/mob/living/carbon/human/H) + ..(S,H) + H.verbs |= /mob/living/carbon/human/proc/water_stealth + H.verbs |= /mob/living/carbon/human/proc/underwater_devour /datum/trait/positive/cocoon_tf name = "Cocoon Spinner" diff --git a/code/modules/mob/living/carbon/human/species/station/xenochimera_trait_vr.dm b/code/modules/mob/living/carbon/human/species/station/xenochimera_trait_vr.dm index 152851d8c21..e91f6573ea2 100644 --- a/code/modules/mob/living/carbon/human/species/station/xenochimera_trait_vr.dm +++ b/code/modules/mob/living/carbon/human/species/station/xenochimera_trait_vr.dm @@ -53,15 +53,15 @@ category = 0 custom_only = FALSE -/datum/trait/positive/water_breather/xenochimera +/datum/trait/positive/aquatic/xenochimera sort = TRAIT_SORT_SPECIES allowed_species = list(SPECIES_XENOCHIMERA) - name = "Xenochimera: Water Breather" - desc = "You can breathe under water." + name = "Xenochimera: Aquatic" + desc = "You can breathe under water and can traverse water more efficiently. Additionally, you can eat others in the water." cost = 0 category = 0 custom_only = FALSE - + /* // Commented out in lieu of finding a better solution. /datum/trait/neutral/coldadapt/xenochimera sort = TRAIT_SORT_SPECIES diff --git a/vorestation.dme b/vorestation.dme index fb7b6979ca3..c92c8d856dc 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -2697,6 +2697,7 @@ #include "code\modules\mob\_modifiers\medical.dm" #include "code\modules\mob\_modifiers\modifiers.dm" #include "code\modules\mob\_modifiers\modifiers_misc.dm" +#include "code\modules\mob\_modifiers\modifiers_vr.dm" #include "code\modules\mob\_modifiers\traits.dm" #include "code\modules\mob\_modifiers\traits_phobias.dm" #include "code\modules\mob\_modifiers\unholy.dm"