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

Movielike Crit #335

Merged
merged 15 commits into from
Aug 28, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
if(isfacehugger(checked_xeno))
return FALSE

var/mob/parent_mob = parent
var/mob/living/parent_mob = parent

var/captee_stat = parent_mob.stat
var/mob/pulledby = parent_mob.pulledby
Expand All @@ -45,7 +45,7 @@
if(distance > 10)
return FALSE

if(captee_stat == CONSCIOUS)
if(captee_stat == CONSCIOUS && !(locate(/datum/effects/crit) in parent_mob.effects_list))
return FALSE

if(isxeno(pulledby) && pulledby != checked_xeno)
Expand Down
3 changes: 2 additions & 1 deletion code/datums/effects/mob_crit/human_crit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
qdel(src)
return FALSE

affected_mob.apply_effect(3, PARALYZE)
affected_mob.KnockDown(3)
affected_mob.Stun(3)
if(!affected_mob.reagents || !affected_mob.reagents.has_reagent("inaprovaline"))
affected_mob.apply_damage(1, OXY)

Expand Down
6 changes: 4 additions & 2 deletions code/datums/effects/pain/human_pain.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@

var/mob/living/carbon/affected_mob = affected_atom
if(do_once)
affected_mob.apply_effect(3, PARALYZE)
affected_mob.KnockDown(3)
affected_mob.Stun(3)
do_once = FALSE

affected_mob.EyeBlur(2)
Expand All @@ -83,7 +84,8 @@
affected_mob.EyeBlur(2)
if(affected_mob.pain && affected_mob.pain.feels_pain)
affected_mob.TalkStutter(2)
affected_mob.apply_effect(2, PARALYZE)
affected_mob.KnockDown(2)
affected_mob.Stun(2)
if(!affected_mob.reagents || !affected_mob.reagents.has_reagent("inaprovaline"))
affected_mob.apply_damage(0.5, OXY)

Expand Down
3 changes: 3 additions & 0 deletions code/modules/cm_marines/overwatch.dm
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@
if(DEAD)
mob_state = "Dead"

if(mob_state == "Conscious" && (locate(/datum/effects/crit) in marine_human.effects_list))
mob_state = "Incapacitated"

if(!istype(marine_human.head, /obj/item/clothing/head/helmet/marine))
has_helmet = FALSE

Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/human_attackhand.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
return 1

// If unconcious with oxygen damage, do CPR. If dead, we do CPR
if(!(stat == UNCONSCIOUS && getOxyLoss() > 0) && !(stat == DEAD))
if(!((stat == UNCONSCIOUS || (locate(/datum/effects/crit) in effects_list)) && getOxyLoss() > 0) && !(stat == DEAD))
help_shake_act(attacking_mob)
return 1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

if(stat != DEAD) //the dead get zero fullscreens

if(stat == UNCONSCIOUS)
if(stat == UNCONSCIOUS || (locate(/datum/effects/crit) in effects_list))
var/severity = 0
switch(health)
if(-20 to -10) severity = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@

//UNCONSCIOUS. NO-ONE IS HOME
if(regular_update && ((getOxyLoss() > 50)))
apply_effect(3, PARALYZE)
KnockDown(3)
Stun(3)

if((src.species.flags & HAS_HARDCRIT) && HEALTH_THRESHOLD_CRIT > health)
var/already_in_crit = FALSE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ At bare minimum, make sure the relevant checks from parent types gets copied in
// MOBS //
/////////////////////////////
/mob/living/ai_check_stat(mob/living/carbon/xenomorph/X)
return stat == CONSCIOUS
return stat == CONSCIOUS && !(locate(/datum/effects/crit) in effects_list)


/////////////////////////////
Expand Down
3 changes: 2 additions & 1 deletion tgui/packages/tgui/interfaces/OverwatchConsole.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -370,12 +370,13 @@ const SquadMonitor = (props) => {

let determine_status_color = (status) => {
let conscious = status.includes('Conscious');
let incapacitated = status.includes('Incapacitated');
let unconscious = status.includes('Unconscious');

let state_color = 'red';
if (conscious) {
state_color = 'green';
} else if (unconscious) {
} else if (incapacitated || unconscious) {
state_color = 'yellow';
}
return state_color;
Expand Down
Loading