mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-22 12:47:16 +01:00
[MIRROR] Makes absorbs escapable (and other tweaks) (#7318)
Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: CHOMPStation2 <chompsation2@gmail.com>
This commit is contained in:
co-authored by
Heroman3003
CHOMPStation2
parent
45430008b1
commit
dad9d2cbca
@@ -27,10 +27,11 @@
|
||||
var/digest_clone = 0 // Clone damage per tick in digestion mode
|
||||
var/immutable = FALSE // Prevents this belly from being deleted
|
||||
var/escapable = FALSE // Belly can be resisted out of at any time
|
||||
var/escapetime = 20 SECONDS // Deciseconds, how long to escape this belly
|
||||
var/escapetime = 10 SECONDS // Deciseconds, how long to escape this belly
|
||||
var/digestchance = 0 // % Chance of stomach beginning to digest if prey struggles
|
||||
var/absorbchance = 0 // % Chance of stomach beginning to absorb if prey struggles
|
||||
var/escapechance = 0 // % Chance of prey beginning to escape if prey struggles.
|
||||
var/escapechance_absorbed = 20 // % Chance of absorbed prey finishing an escape. Requires a successful escape roll against the above as well.
|
||||
var/escape_stun = 0 // AI controlled mobs with a number here will be weakened by the provided var when someone escapes, to prevent endless nom loops
|
||||
var/transferchance = 0 // % Chance of prey being trasnsfered, goes from 0-100%
|
||||
var/transferchance_secondary = 0 // % Chance of prey being transfered to transferchance_secondary, also goes 0-100%
|
||||
@@ -1545,7 +1546,6 @@
|
||||
|
||||
for(var/mob/M in hearers(4, owner))
|
||||
M.show_message(struggle_outer_message, 2) // hearable
|
||||
to_chat(R, struggle_user_message)
|
||||
|
||||
var/sound/struggle_snuggle
|
||||
var/sound/struggle_rustle = sound(get_sfx("rustle"))
|
||||
@@ -1645,10 +1645,10 @@
|
||||
return
|
||||
|
||||
else //Nothing interesting happened.
|
||||
to_chat(R, "<span class='warning'>You make no progress in escaping [owner]'s [lowertext(name)].</span>")
|
||||
to_chat(R, struggle_user_message)
|
||||
to_chat(owner, "<span class='warning'>Your prey appears to be unable to make any progress in escaping your [lowertext(name)].</span>")
|
||||
return
|
||||
|
||||
to_chat(R, struggle_user_message)
|
||||
|
||||
/obj/belly/proc/relay_absorbed_resist(mob/living/R)
|
||||
if (!(R in contents) || !R.absorbed)
|
||||
@@ -1679,7 +1679,6 @@
|
||||
|
||||
for(var/mob/M in hearers(4, owner))
|
||||
M.show_message(struggle_outer_message, 2) // hearable
|
||||
to_chat(R, struggle_user_message)
|
||||
|
||||
var/sound/struggle_snuggle
|
||||
var/sound/struggle_rustle = sound(get_sfx("rustle"))
|
||||
@@ -1693,6 +1692,27 @@
|
||||
else
|
||||
playsound(src, struggle_rustle, vary = 1, vol = 75, falloff = VORE_SOUND_FALLOFF, frequency = noise_freq, preference = /datum/client_preference/digestion_noises, volume_channel = VOLUME_CHANNEL_VORE) //CHOMPEdit
|
||||
|
||||
//absorb resists
|
||||
if(escapable || owner.stat) //If the stomach has escapable enabled or the owner is dead/unconscious
|
||||
if(prob(escapechance) || owner.stat) //Let's have it check to see if the prey's escape attempt starts.
|
||||
to_chat(R, "<span class='warning'>You try to force yourself out of \the [lowertext(name)].</span>")
|
||||
to_chat(owner, "<span class='warning'>Someone is attempting to free themselves from your [lowertext(name)]!</span>")
|
||||
if(do_after(R, escapetime))
|
||||
if((escapable || owner.stat) && (R.loc == src) && prob(escapechance_absorbed)) //Does the escape attempt succeed?
|
||||
release_specific_contents(R)
|
||||
to_chat(R,"<span class='warning'>You manage to free yourself from \the [lowertext(name)].</span>")
|
||||
to_chat(owner,"<span class='warning'>[R] forces themselves free of your [lowertext(name)]!</span>")
|
||||
for(var/mob/M in hearers(4, owner))
|
||||
M.show_message("<span class='warning'>[R] climbs out of [owner]'s [lowertext(name)]!</span>", 2)
|
||||
return
|
||||
else if(!(R.loc == src)) //Aren't even in the belly. Quietly fail.
|
||||
return
|
||||
else //Belly became inescapable or you failed your roll.
|
||||
to_chat(R,"<span class='warning'>Before you manage to reach freedom, you feel yourself getting dragged back into \the [lowertext(name)]!</span>")
|
||||
to_chat(owner,"<span class='notice'>The attempt to escape from your [lowertext(name)] has failed!</span>")
|
||||
return
|
||||
to_chat(R, struggle_user_message)
|
||||
|
||||
/obj/belly/proc/get_mobs_and_objs_in_belly()
|
||||
var/list/see = list()
|
||||
var/list/belly_mobs = list()
|
||||
|
||||
Reference in New Issue
Block a user