diff --git a/code/defines/mob/living/carbon/alien.dm b/code/defines/mob/living/carbon/alien.dm index 7ed371f5d9f..60b38a20c00 100644 --- a/code/defines/mob/living/carbon/alien.dm +++ b/code/defines/mob/living/carbon/alien.dm @@ -13,4 +13,9 @@ alien_talk_understand = 1 var/obj/item/weapon/card/id/wear_id = null // Fix for station bounced radios -- Skie - var/has_fine_manipulation = 0 \ No newline at end of file + var/has_fine_manipulation = 0 + + var/move_delay_add = 0 // movement delay to add + + canstun = 0 + canweaken = 0 // aliens cannot be stunned or knocked down. Massive buff! \ No newline at end of file diff --git a/code/defines/mob/living/carbon/metroid.dm b/code/defines/mob/living/carbon/metroid.dm index c60d26fc748..48fd4fea5c1 100644 --- a/code/defines/mob/living/carbon/metroid.dm +++ b/code/defines/mob/living/carbon/metroid.dm @@ -19,6 +19,11 @@ see_in_dark = 8 + // canstun and canweaken don't affect metroids because they ignore stun and weakened variables + // for the sake of cleanliness, though, here they are. + canstun = 0 + canweaken = 0 + var/amount_grown = 0// controls how long the metroid has been overfed, if 10, grows into an adult // if adult: if 10: reproduces var/powerlevel = 0 // 1-10 controls how much electricity they are generating diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm index f8aeea6b84f..0c5412385a3 100644 --- a/code/game/objects/items/weapons/swords_axes_etc.dm +++ b/code/game/objects/items/weapons/swords_axes_etc.dm @@ -161,7 +161,7 @@ STUN BATON R.cell.charge -= 20 else charges-- - if (M.stuttering < 1 && (!(M.mutations & HULK)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/) + if (M.stuttering < 1 && (!(M.mutations & HULK) && M.canstun) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/) M.stuttering = 1 M.Stun(1) M.Weaken(1) @@ -172,7 +172,7 @@ STUN BATON R.cell.charge -= 20 else charges-- - if (M.stuttering < 10 && (!(M.mutations & HULK)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/) + if (M.stuttering < 10 && (!(M.mutations & HULK) && M.canstun) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/) M.stuttering = 10 M.Stun(10) M.Weaken(10) diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm index 152e86def59..1358df19aa1 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm @@ -91,6 +91,9 @@ if(src.resting) Weaken(5) + if(move_delay_add > 0) + move_delay_add = max(0, move_delay_add - rand(1, 2)) + if(health < config.health_threshold_dead || src.brain_op_stage == 4.0) death() else if(src.health < config.health_threshold_crit) diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm index ebadc3bb720..7bd9b41b9b5 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm @@ -92,6 +92,9 @@ if(src.resting) Weaken(5) + if(move_delay_add > 0) + move_delay_add = max(0, move_delay_add - rand(1, 2)) + if(health < config.health_threshold_dead || src.brain_op_stage == 4.0) death() else if(src.health < config.health_threshold_crit) diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm index 76b19a0965c..8b261940cec 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm @@ -58,7 +58,9 @@ tally += 2 if (istype(src, /mob/living/carbon/alien/humanoid/sentinel)) tally += 1 - return tally + if (istype(src, /mob/living/carbon/alien/humanoid/hunter)) + tally = -1 // hunters go supersuperfast + return tally + move_delay_add //This needs to be fixed /mob/living/carbon/alien/humanoid/Stat() diff --git a/code/modules/mob/living/carbon/alien/humanoid/life.dm b/code/modules/mob/living/carbon/alien/humanoid/life.dm index 3a0d3b6121e..e843086d29f 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/life.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/life.dm @@ -407,6 +407,9 @@ if(src.resting) Weaken(5) + if(move_delay_add > 0) + move_delay_add = max(0, move_delay_add - rand(1, 2)) + if(health < config.health_threshold_dead || src.brain_op_stage == 4.0) death() else if(src.health < config.health_threshold_crit) diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm index 74fee11c9f1..68708360cfa 100644 --- a/code/modules/mob/living/carbon/alien/larva/life.dm +++ b/code/modules/mob/living/carbon/alien/larva/life.dm @@ -332,6 +332,9 @@ if(resting) Weaken(5) + if(move_delay_add > 0) + move_delay_add = max(0, move_delay_add - rand(1, 2)) + if(health < config.health_threshold_dead || brain_op_stage == 4.0) death() else if(health < config.health_threshold_crit) diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm index 27267bdcb53..d165af01fc0 100644 --- a/code/modules/mob/living/damage_procs.dm +++ b/code/modules/mob/living/damage_procs.dm @@ -50,7 +50,8 @@ if(IRRADIATE) radiation += max((effect - (effect*getarmor(null, "rad"))), 0)//Rads auto check armor if(STUTTER) - stuttering = max(stuttering,(effect/(blocked+1))) + if(canstun) // stun is usually associated with stutter + stuttering = max(stuttering,(effect/(blocked+1))) if(SLUR) slurring = max(slurring, (effect/(blocked+1))) if(EYE_BLUR) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 280986c3611..f2afcbcd81e 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1098,28 +1098,39 @@ note dizziness decrements automatically in the mob's Life() proc. /mob/proc/IsAdvancedToolUser()//This might need a rename but it should replace the can this mob use things check return 0 + /mob/proc/Stun(amount) - stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun + if(canstun) + stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun + else + if(istype(src, /mob/living/carbon/alien)) // add some movement delay + var/mob/living/carbon/alien/Alien = src + Alien.move_delay_add = min(Alien.move_delay_add + round(amount / 5), 10) // a maximum delay of 10 return /mob/proc/SetStunned(amount) //if you REALLY need to set stun to a set amount without the whole "can't go below current stunned" - stunned = max(amount,0) + if(canstun) + stunned = max(amount,0) return /mob/proc/AdjustStunned(amount) - stunned = max(stunned + amount,0) + if(canstun) + stunned = max(stunned + amount,0) return /mob/proc/Weaken(amount) - weakened = max(max(weakened,amount),0) + if(canweaken) + weakened = max(max(weakened,amount),0) return /mob/proc/SetWeakened(amount) - weakened = max(amount,0) + if(canweaken) + weakened = max(amount,0) return /mob/proc/AdjustWeakened(amount) - weakened = max(weakened + amount,0) + if(canweaken) + weakened = max(weakened + amount,0) return /mob/proc/Paralyse(amount) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 36729181ff1..7bff1dd16c6 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -29,6 +29,7 @@ var/maxHealth = 100 //Living //Vars that should only be accessed via procs ++END + // var/uses_hud = 0 var/obj/screen/pain = null var/obj/screen/flash = null @@ -257,15 +258,6 @@ var/halloss = 0 var/hallucination = 0 -// TG Porting Variables - var/canstun = 1 // determines if this mob can be stunned by things - var/canweaken = 1 // determines if this mob can be weakened/knocked down by things - var/nopush = 0 //Can they be shoved? - - var/area/lastarea = null - - var/digitalcamo = 0 // Can they be tracked by the AI? - /*For ninjas and others. This variable is checked when a mob moves and I guess it was supposed to allow the mob to move through dense areas, such as walls. Setting density to 0 does the same thing. The difference here is that the mob is also allowed to move without any sort of restriction. For instance, in space or out of holder objects.*/ @@ -279,6 +271,16 @@ the mob is also allowed to move without any sort of restriction. For instance, i var/UI = 'screen1_old.dmi' // For changing the UI from preferences // var/obj/effect/organstructure/organStructure = null //for dem organs + + var/canstun = 1 // determines if this mob can be stunned by things + var/canweaken = 1 // determines if this mob can be weakened/knocked down by things + var/nopush = 0 //Can they be shoved? + + var/area/lastarea = null + + var/digitalcamo = 0 // Can they be tracked by the AI? + + var/list/organs = list( ) //List of organs. //Singularity wants you! diff --git a/icons/mob/critter.dmi b/icons/mob/critter.dmi index 3ec19ac3cd2..0febb340d1b 100644 Binary files a/icons/mob/critter.dmi and b/icons/mob/critter.dmi differ diff --git a/icons/obj/lighting.dmi b/icons/obj/lighting.dmi index e65494ba7c9..c26a5ba0572 100644 Binary files a/icons/obj/lighting.dmi and b/icons/obj/lighting.dmi differ