mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
[MIRROR] Vore preference helpers (#11893)
Co-authored-by: Guti <32563288+TheCaramelion@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
dcd92a466f
commit
179d800bc7
@@ -156,7 +156,7 @@
|
||||
/obj/effect/abstract/dark_maw/proc/do_trigger(var/mob/living/L)
|
||||
var/will_vore = 1
|
||||
|
||||
if(!owner || !(target in owner) || !L.devourable || !L.can_be_drop_prey || !owner.can_be_drop_pred || !L.phase_vore)
|
||||
if(!(target in owner) || CanPhaseVore(owner, L))
|
||||
will_vore = 0
|
||||
|
||||
if(!src || src.gc_destroyed)
|
||||
|
||||
@@ -169,12 +169,12 @@
|
||||
var/mob/living/our_prey
|
||||
if(potentials.len)
|
||||
var/mob/living/target = pick(potentials)
|
||||
if(can_be_drop_pred && istype(target) && target.devourable && target.can_be_drop_prey && target.phase_vore && vore_selected && phase_vore)
|
||||
if(CanPhaseVore(src, target))
|
||||
target.forceMove(vore_selected)
|
||||
to_chat(target, span_vwarning("\The [src] phases in around you, [vore_selected.vore_verb]ing you into their [vore_selected.get_belly_name()]!"))
|
||||
to_chat(src, span_vwarning("You phase around [target], [vore_selected.vore_verb]ing them into your [vore_selected.get_belly_name()]!"))
|
||||
our_prey = target
|
||||
else if(can_be_drop_prey && istype(target) && devourable && target.can_be_drop_pred && target.phase_vore && target.vore_selected && phase_vore)
|
||||
else if(CanPhaseVore(target, src))
|
||||
our_prey = src
|
||||
forceMove(target.vore_selected)
|
||||
to_chat(target, span_vwarning("\The [src] phases into you, [target.vore_selected.vore_verb]ing them into your [target.vore_selected.get_belly_name()]!"))
|
||||
|
||||
@@ -108,7 +108,7 @@ Bonus
|
||||
var/place
|
||||
|
||||
for(var/mob/living/carbon/human/B in range(A.stage, mob))
|
||||
if(B.can_be_drop_pred && mob.can_be_drop_prey && mob.devourable)
|
||||
if(CanSpontaneousVore(B, mob))
|
||||
destination += B.vore_selected
|
||||
|
||||
for(var/turf/T in range(A.stage, mob))
|
||||
@@ -124,10 +124,10 @@ Bonus
|
||||
|
||||
var/mob/living/unlucky = locate() in place
|
||||
|
||||
if(unlucky && !unlucky.is_incorporeal())
|
||||
if(unlucky.can_be_drop_pred && mob.can_be_drop_prey && mob.devourable)
|
||||
if(unlucky)
|
||||
if(CanSpontaneousVore(unlucky, mob))
|
||||
place = unlucky.vore_selected
|
||||
else if(unlucky.devourable && unlucky.can_be_drop_prey && mob.can_be_drop_pred)
|
||||
else if(CanSpontaneousVore(mob, unlucky))
|
||||
unlucky.forceMove(mob.vore_selected)
|
||||
|
||||
mob.emote("sneeze")
|
||||
|
||||
@@ -125,64 +125,11 @@
|
||||
return
|
||||
|
||||
//Person being slipped into eats the person slipping
|
||||
if(can_slip_vore(pred = source, prey = crossed)) //If we can vore them go for it
|
||||
if(CanSlipVore(pred = source, prey = crossed)) //If we can vore them go for it
|
||||
source.begin_instant_nom(source, prey = crossed, pred = source, belly = source.vore_selected)
|
||||
return COMPONENT_BLOCK_CROSS
|
||||
|
||||
//The person slipping eats the person being slipped into
|
||||
else if(can_slip_vore(pred = crossed, prey = source))
|
||||
else if(CanSlipVore(pred = crossed, prey = source))
|
||||
source.begin_instant_nom(crossed, prey = source, pred = crossed, belly = crossed.vore_selected) //Must be
|
||||
return //We DON'T block it here. Pred can slip onto the prey's tile, no problem.
|
||||
|
||||
|
||||
///Helper Procs
|
||||
/proc/CanStumbleVore(mob/living/prey, mob/living/pred)
|
||||
if(!can_spontaneous_vore(pred, prey))
|
||||
return FALSE
|
||||
if(!prey.stumble_vore || !pred.stumble_vore)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/proc/CanDropVore(mob/living/prey, mob/living/pred)
|
||||
if(!can_spontaneous_vore(pred, prey))
|
||||
return FALSE
|
||||
if(!pred.drop_vore || !prey.drop_vore)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/proc/CanThrowVore(mob/living/prey, mob/living/pred)
|
||||
if(!can_spontaneous_vore(pred, prey))
|
||||
return FALSE
|
||||
if(!pred.throw_vore || !prey.throw_vore)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/proc/can_slip_vore(mob/living/pred, mob/living/prey)
|
||||
if(!can_spontaneous_vore(pred, prey))
|
||||
return FALSE
|
||||
if(!prey.is_slipping && !pred.is_slipping) //Obviously they have to be slipping to get slip vored
|
||||
return FALSE
|
||||
if(world.time <= prey.slip_protect)
|
||||
return FALSE
|
||||
if(!pred.slip_vore || !prey.slip_vore)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
///This is a general 'do we have the mechanical ability to do any type of spontaneous vore' without specialties.
|
||||
/proc/can_spontaneous_vore(mob/living/pred, mob/living/prey)
|
||||
if(!istype(pred) || !istype(prey))
|
||||
return FALSE
|
||||
//Unfortunately, can_be_drop_prey is 'spontanous prey' var and can_be_drop_pred is 'spontaneous pred' var...horribly named imo.
|
||||
if(!prey.can_be_drop_prey || !pred.can_be_drop_pred)
|
||||
return FALSE
|
||||
if(prey.is_incorporeal() || pred.is_incorporeal())
|
||||
return FALSE
|
||||
if(!prey.devourable)
|
||||
return FALSE
|
||||
if(!is_vore_predator(pred)) //Check their bellies and stuff
|
||||
return FALSE
|
||||
if(!pred.vore_selected) //Gotta have one selected as well.
|
||||
return FALSE
|
||||
if(!prey.allowmobvore && isanimal(pred) && !pred.ckey || (!pred.allowmobvore && isanimal(prey) && !prey.ckey))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user