Added two new variables, "canstun" and "canweaken". They can be modified in runtime to prevent mobs from ever being weakened and stunned by tasers/batons/electrified doors.

Xenos are immune to stunning and weakening. This basically means you cannot run up to a xeno and shoot them with a taser and game over. This makes them a lot more dangerous. To compensate, I've added in a xeno-exclusive variable controlling movement delay addition. When a xeno is stunned, its movement speed goes down. The speed is recovered in the life() proc.


Modifications to critter.dmi (manhacks). Added a new lighting icon, floor lights. Possible implementation later.



git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2886 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
vageyenaman@gmail.com
2011-12-31 22:50:38 +00:00
parent 51edbc649a
commit cfba741fa2
14 changed files with 57 additions and 13 deletions
@@ -86,6 +86,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)
@@ -87,6 +87,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)
@@ -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()
@@ -406,6 +406,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)
@@ -331,6 +331,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)
+2 -1
View File
@@ -50,7 +50,8 @@
if(IRRADIATE)
radiation += min((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(EYE_BLUR)
eye_blurry = max(eye_blurry,(effect/(blocked+1)))
if(DROWSY)
+17 -6
View File
@@ -1040,27 +1040,38 @@ note dizziness decrements automatically in the mob's Life() proc.
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)
+3 -2
View File
@@ -28,8 +28,6 @@
//Vars that should only be accessed via procs ++END
// var/uses_hud = 0
var/obj/screen/flash = null
var/obj/screen/blind = null
@@ -249,3 +247,6 @@ 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