diff --git a/code/game/objects/alien/defines.dm b/code/game/objects/alien/defines.dm
index 41e8834de5..deb3aa0058 100644
--- a/code/game/objects/alien/defines.dm
+++ b/code/game/objects/alien/defines.dm
@@ -38,8 +38,8 @@
density = 1
opacity = 1
anchored = 1
-//Alien can now normally destroy resin walls so they are no longer targetable with acid.
var/health = 50
+ var/affecting = null
/obj/alien/weeds
name = "weeds"
diff --git a/code/game/objects/alien/egg.dm b/code/game/objects/alien/egg.dm
index 6184e6d345..bc55d9d481 100644
--- a/code/game/objects/alien/egg.dm
+++ b/code/game/objects/alien/egg.dm
@@ -12,7 +12,16 @@
src.icon_state = "egg_hatched"
new /obj/alien/facehugger(src.loc)
-
+/obj/alien/egg/bullet_act(flag)
+ switch(flag)
+ if (PROJECTILE_BULLET)
+ health -= 35
+ if (PROJECTILE_PULSE)
+ health -= 50
+ if (PROJECTILE_LASER)
+ health -= 10
+ healthcheck()
+ return
/obj/alien/egg/attackby(var/obj/item/weapon/W, var/mob/user)
if(health <= 0)
diff --git a/code/game/objects/alien/facehugger.dm b/code/game/objects/alien/facehugger.dm
index f6f4a4fd5c..9777dde88b 100644
--- a/code/game/objects/alien/facehugger.dm
+++ b/code/game/objects/alien/facehugger.dm
@@ -86,12 +86,15 @@
..()
bullet_act(flag, A as obj)
- if (flag == PROJECTILE_BULLET)
- src.health -= 20
- else if (flag == PROJECTILE_WEAKBULLET)
- src.health -= 4
- else if (flag == PROJECTILE_LASER)
- src.health -= 10
+ switch(flag)
+ if (PROJECTILE_BULLET)
+ src.health -= 20
+ if (PROJECTILE_WEAKBULLET)
+ src.health -= 4
+ if (PROJECTILE_LASER)
+ src.health -= 10
+ if (PROJECTILE_PULSE)
+ src.health -= 35
healthcheck()
ex_act(severity)
diff --git a/code/game/objects/alien/resin.dm b/code/game/objects/alien/resin.dm
index 3de3778c5f..46db6cbd9e 100644
--- a/code/game/objects/alien/resin.dm
+++ b/code/game/objects/alien/resin.dm
@@ -21,26 +21,49 @@
del(src)
*/
+/obj/alien/resin/proc/healthcheck()
+ if(health <=0)
+ src.density = 0
+ if(affecting)
+ var/mob/living/carbon/M = affecting
+ contents.Remove(affecting)
+ if(ishuman(M))
+ M.verbs += /mob/living/carbon/human/verb/suicide
+ else
+ M.verbs += /mob/living/carbon/monkey/verb/suicide
+ M.loc = src.loc
+ M.paralysis += 10
+ for(var/mob/O in viewers(src, 3))
+ O.show_message(text("A body appeared from the dead resin!"), 1, text("You hear faint moaning somewhere about you."), 2)
+ del(src)
+ return
+
/obj/alien/resin/bullet_act(flag)
- if (flag == PROJECTILE_BULLET)
- health -= 35
- if(health <=0)
- src.density = 0
- del(src)
+ switch(flag)
+ if (PROJECTILE_BULLET)
+ health -= 35
+ if (PROJECTILE_PULSE)
+ health -= 50
+ if (PROJECTILE_LASER)
+ health -= 10
+ healthcheck()
return
/obj/alien/resin/ex_act(severity)
switch(severity)
if(1.0)
- del(src)
- return
+ health-=50
+ healthcheck()
if(2.0)
- del(src)
- return
+ health-=50
+ healthcheck()
if(3.0)
if (prob(50))
- del(src)
- return
+ health-=50
+ healthcheck()
+ else
+ health-=25
+ healthcheck()
return
/obj/alien/resin/blob_act()
@@ -50,9 +73,8 @@
/obj/alien/resin/meteorhit()
//*****RM
//world << "glass at [x],[y],[z] Mhit"
- src.health = 0
- src.density = 0
- del(src)
+ health-=50
+ healthcheck()
return
/obj/alien/resin/hitby(AM as mob|obj)
@@ -65,11 +87,8 @@
else
tforce = AM:throwforce
playsound(src.loc, 'attackblob.ogg', 100, 1)
- src.health = max(0, src.health - tforce)
- if (src.health <= 0)
- src.density = 0
- del(src)
- return
+ src.health = max(0, health - tforce)
+ healthcheck()
..()
return
@@ -79,9 +98,8 @@
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << text("\red [] destroys the resin wall!", usr)
- src.health = 0
- src.density = 0
- del(src)
+ health-=50
+ healthcheck()
return
/obj/alien/resin/attack_paw()
@@ -90,9 +108,8 @@
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << text("\red [] destroys the resin wall!", usr)
- src.health = 0
- src.density = 0
- del(src)
+ health-=50
+ healthcheck()
return
/obj/alien/resin/attack_alien()
@@ -109,13 +126,31 @@
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << text("\red [] slices the resin wall apart!", usr)
- src.health = 0
- src.density = 0
- del(src)
- return
+ healthcheck()
return
/obj/alien/resin/attackby(obj/item/weapon/W as obj, mob/user as mob)
+ if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
+ var/obj/item/weapon/grab/G = W
+ if(isalien(user)&&(ishuman(G.affecting)||ismonkey(G.affecting)))
+ //Only aliens can stick humans and monkeys into resin walls. Also, the wall must not have a person inside already.
+ if(!affecting)
+ if(G.state<2)
+ user << "\red You need a better grip to do that!"
+ return
+ G.affecting.loc = src.loc
+ G.affecting.paralysis = 10
+ for(var/mob/O in viewers(world.view, src))
+ if (O.client)
+ O << text("\green [] places [] in the resin wall!", G.assailant, G.affecting)
+ affecting=G.affecting
+ del(W)
+ spawn(0)
+ process()
+ else
+ user << "\red This wall is already occupied."
+ return
+
var/aforce = W.force
src.health = max(0, src.health - aforce)
playsound(src.loc, 'attackblob.ogg', 100, 1)
@@ -124,4 +159,42 @@
del(src)
return
..()
- return
\ No newline at end of file
+ return
+
+/obj/alien/resin/proc/process()
+ if(affecting)
+ var/mob/living/carbon/M = affecting
+ var/check = 0
+ if(ishuman(affecting))//So they do not suicide and kill the babby.
+ M.verbs -= /mob/living/carbon/human/verb/suicide
+ else
+ check = 1
+ M.verbs -= /mob/living/carbon/monkey/verb/suicide
+
+ contents.Add(affecting)
+
+ while(!isnull(M)&&!isnull(src))//While M and wall exist
+ if(prob(30))//Let's people know that someone is trapped in the resin wall.
+ M << "\green You feel a strange sense of calm as a flesh-like substance seems to completely envelop you."
+ for(var/mob/O in viewers(src, 3))
+ O.show_message(text("There appears to be a person stuck inside a resin wall nearby."), 1, text("You hear faint moaning somewhere about you."), 2)
+ if(prob(5))//MAYBE they are able to crawl out on their own. Not likely...
+ M << "You are able to crawl your way through the sticky mass, and out to freedom. But for how long?"
+ break
+ M.paralysis = 10//Set theis paralysis to 10 so they cannot act.
+ sleep(50)//To cut down on processing time
+
+ if(!isnull(src))
+ affecting = null
+
+ if(!isnull(M))//As long as they still exist.
+ if(!check)//And now they can suicide again, even if they are already dead in case they get revived.
+ M.verbs += /mob/living/carbon/human/verb/suicide
+ else
+ M.verbs += /mob/living/carbon/monkey/verb/suicide
+ for(var/mob/O in viewers(src, 3))
+ O.show_message(text("A body appeared from the dead resin!"), 1, text("You hear faint moaning somewhere about you."), 2)
+ else
+ for(var/mob/O in viewers(src, 3))
+ O.show_message(text("\red An alien larva bursts from the resin wall!"), 1, text("\red You hear a high, alien screech nearby!"), 2)
+ return
diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
index 1823eeaf4a..e7ea3c7b09 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
@@ -22,16 +22,6 @@
spawn( 0 )
if ((!( yes ) || src.now_pushing))
return
- src.now_pushing = 1
- if(ismob(AM))
- var/mob/tmob = AM
- if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & 32)
- if(prob(20))
- for(var/mob/M in viewers(src, null))
- if(M.client)
- M << M << "\red [src] fails to push [tmob]'s fat ass out of the way."
- src.now_pushing = 0
- return
src.now_pushing = 0
..()
if (!istype(AM, /atom/movable))
@@ -50,8 +40,6 @@
return
return
-//This is fine, maybe refine it a bit so they're faster than humans
-
/mob/living/carbon/alien/humanoid/movement_delay()
var/tally = 0
if (istype(src, /mob/living/carbon/alien/humanoid/queen))
@@ -74,18 +62,8 @@
stat(null, "Move Mode: [src.m_intent]")
if (src.client.statpanel == "Status")
- if (src.internal)
- if (!src.internal.air_contents)
- del(src.internal)
- else
- stat("Internal Atmosphere Info", src.internal.name)
- stat("Tank Pressure", src.internal.air_contents.return_pressure())
- stat("Distribution Pressure", src.internal.distribute_pressure)
-
stat(null, "Plasma Stored: [src.toxloss]")
-
-//This is okay I guess unless we add alien shields or something. Should be cleaned up a bit.
/mob/living/carbon/alien/humanoid/bullet_act(flag, A as obj)
var/shielded = 0
for(var/obj/item/device/shield/S in src)
@@ -117,46 +95,43 @@
safe = G.affecting
if (safe)
return safe.bullet_act(flag, A)
- if (flag == PROJECTILE_BULLET)
- var/d = 51
- if (src.stat != 2)
- src.bruteloss += d
- src.updatehealth()
- if (prob(50))
- if(src.weakened <= 5) src.weakened = 5
- return
- else if (flag == PROJECTILE_TASER)
- if (prob(75) && src.stunned <= 10)
- src.stunned = 10
- else
- src.weakened = 10
- if (src.stuttering < 10)
- src.stuttering = 10
- else if (flag == PROJECTILE_DART)
- return
- else if(flag == PROJECTILE_LASER)
- var/d = 20
-// if (!src.eye_blurry) src.eye_blurry = 4 //This stuff makes no sense but lasers need a buff./ It really doesn't make any sense. /N
- if (prob(25)) src.stunned++
- if (src.stat != 2)
- src.bruteloss += d
- src.updatehealth()
- if (prob(25))
- src.stunned = 1
- else if(flag == PROJECTILE_PULSE)
- var/d = 40
+ switch(flag)//Did these people not know that switch is a function that exists? I swear, half of the code ignores switch completely.
+ if(PROJECTILE_BULLET)
+ var/d = 51
+ if (src.stat != 2)
+ src.bruteloss += d
+ src.updatehealth()
+ if (prob(50)&&weakened <= 5)
+ src.weakened = 5
+ if(PROJECTILE_TASER)
+ if (prob(75) && src.stunned <= 10)
+ src.stunned = 10
+ else
+ src.weakened = 10
+ if(PROJECTILE_DART)//Nothing is supposed to happen, just making sure it's listed.
- if (src.stat != 2)
- src.bruteloss += d
+ if(PROJECTILE_LASER)
+ var/d = 20
+ // if (!src.eye_blurry) src.eye_blurry = 4 //This stuff makes no sense but lasers need a buff./ It really doesn't make any sense. /N
+ if (prob(25)) src.stunned++
+ if (src.stat != 2)
+ src.bruteloss += d
+ src.updatehealth()
+ if (prob(25))
+ src.stunned = 1
+ if(PROJECTILE_PULSE)
+ var/d = 40
+
+ if (src.stat != 2)
+ src.bruteloss += d
+ src.updatehealth()
+ if (prob(50))
+ src.stunned = min(src.stunned, 5)
+ if(PROJECTILE_BOLT)
+ src.toxloss += 3
+ src.radiation += 100
src.updatehealth()
- if (prob(50))
- src.stunned = min(src.stunned, 5)
- else if(flag == PROJECTILE_BOLT)
- src.toxloss += 3
- src.radiation += 100
- src.updatehealth()
- src.stuttering += 5
- src.drowsyness += 5
+ src.drowsyness += 5
return
/mob/living/carbon/alien/humanoid/emp_act(severity)
@@ -237,18 +212,18 @@
//unequip
/mob/living/carbon/alien/humanoid/u_equip(obj/item/W as obj)
- if (W == src.wear_suit)
- src.wear_suit = null
- else if (W == src.head)
- src.head = null
- else if (W == src.r_store)
- src.r_store = null
- else if (W == src.l_store)
- src.l_store = null
- else if (W == src.r_hand)
- src.r_hand = null
- else if (W == src.l_hand)
- src.l_hand = null
+ if (W == wear_suit)
+ wear_suit = null
+ else if (W == head)
+ head = null
+ else if (W == r_store)
+ r_store = null
+ else if (W == l_store)
+ l_store = null
+ else if (W == r_hand)
+ r_hand = null
+ else if (W == l_hand)
+ l_hand = null
/mob/living/carbon/alien/humanoid/db_click(text, t1)
var/obj/item/W = src.equipped()
@@ -567,7 +542,7 @@
return
/mob/living/carbon/alien/humanoid/attack_paw(mob/living/carbon/monkey/M as mob)
- if(!(istype(M, /mob/living/carbon/monkey))) return//Fix for aliens receiving double messages when attacking other aliens.
+ if(!ismonkey(M)) return//Fix for aliens receiving double messages when attacking other aliens.
if (!ticker)
M << "You cannot attack people before the game has started."
@@ -660,10 +635,10 @@
if ("hurt")
var/damage = rand(1, 9)
if (prob(90))
- if (M.mutations & 8)
- damage += 5
+ if (M.mutations & 8)//HULK SMASH
+ damage += 14
spawn(0)
- src.paralysis += 1
+ src.paralysis += 5
step_away(src,M,15)
sleep(3)
step_away(src,M,15)
@@ -671,9 +646,9 @@
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has punched []!", M, src), 1)
- if (damage > 4.9)
+ if (damage > 8)//Regular humans have a very small chance of weakening an alien.
if (src.weakened < 10)
- src.weakened = rand(10, 15)
+ src.weakened = rand(1,5)
for(var/mob/O in viewers(M, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has weakened []!", M, src), 1, "\red You hear someone fall.", 2)
@@ -688,14 +663,14 @@
if ("disarm")
if (!src.lying)
var/randn = rand(1, 100)
- if (randn <= 25)
+ if (randn <= 5)//Very small chance to push an alien down.
src.weakened = 2
playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has pushed down []!", M, src), 1)
else
- if (randn <= 60)
+ if (randn <= 50)
src.drop_item()
playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm
index f0fe72d447..4bbcb04e19 100644
--- a/code/modules/mob/living/carbon/alien/larva/larva.dm
+++ b/code/modules/mob/living/carbon/alien/larva/larva.dm
@@ -60,7 +60,6 @@
//This is okay I guess unless we add alien shields or something. Should be cleaned up a bit.
/mob/living/carbon/alien/larva/bullet_act(flag, A as obj)
-
if (locate(/obj/item/weapon/grab, src))
var/mob/safe = null
if (istype(src.l_hand, /obj/item/weapon/grab))
@@ -73,52 +72,53 @@
safe = G.affecting
if (safe)
return safe.bullet_act(flag, A)
- if (flag == PROJECTILE_BULLET)
- var/d = 51
+ switch(flag)
+ if(PROJECTILE_BULLET)
+ var/d = 51
- if (src.stat != 2)
- src.bruteloss += d
+ if (src.stat != 2)
+ src.bruteloss += d
+ src.updatehealth()
+ if (prob(50))
+ if(src.weakened <= 5) src.weakened = 5
+ return
+ if(PROJECTILE_TASER)
+ if (prob(75) && src.stunned <= 10)
+ src.stunned = 10
+ else
+ src.weakened = 10
+ if (src.stuttering < 10)
+ src.stuttering = 10
+ if(PROJECTILE_DART)
+ return
+ if(PROJECTILE_LASER)
+ var/d = 20
+
+ // if (!src.eye_blurry) src.eye_blurry = 4 //This stuff makes no sense but lasers need a buff./ It really doesn't make any sense. /N
+ if (prob(25)) src.stunned++
+
+ if (src.stat != 2)
+ src.bruteloss += d
+
+ src.updatehealth()
+ if (prob(25))
+ src.stunned = 1
+ if(PROJECTILE_PULSE)
+ var/d = 40
+
+ if (src.stat != 2)
+ src.bruteloss += d
+
+ src.updatehealth()
+ if (prob(50))
+ src.stunned = min(src.stunned, 5)
+ if(PROJECTILE_BOLT)
+ src.toxloss += 3
+ src.radiation += 100
src.updatehealth()
- if (prob(50))
- if(src.weakened <= 5) src.weakened = 5
- return
- else if (flag == PROJECTILE_TASER)
- if (prob(75) && src.stunned <= 10)
- src.stunned = 10
- else
- src.weakened = 10
- if (src.stuttering < 10)
- src.stuttering = 10
- else if (flag == PROJECTILE_DART)
- return
- else if(flag == PROJECTILE_LASER)
- var/d = 20
-
-// if (!src.eye_blurry) src.eye_blurry = 4 //This stuff makes no sense but lasers need a buff./ It really doesn't make any sense. /N
- if (prob(25)) src.stunned++
-
- if (src.stat != 2)
- src.bruteloss += d
-
- src.updatehealth()
- if (prob(25))
- src.stunned = 1
- else if(flag == PROJECTILE_PULSE)
- var/d = 40
-
- if (src.stat != 2)
- src.bruteloss += d
-
- src.updatehealth()
- if (prob(50))
- src.stunned = min(src.stunned, 5)
- else if(flag == PROJECTILE_BOLT)
- src.toxloss += 3
- src.radiation += 100
- src.updatehealth()
- src.stuttering += 5
- src.drowsyness += 5
+ src.stuttering += 5
+ src.drowsyness += 5
return
/mob/living/carbon/alien/larva/emp_act(severity)
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 406938a992..5f47da1a9e 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -218,184 +218,32 @@
var/armored = src.isarmored(affecting)
- if (flag == PROJECTILE_BULLET)
- var/d = 51
- if (armored)
- if (prob(70))
- show_message("\red Your armor absorbs the hit!", 4)
- return
- else
- if (prob(40))
- show_message("\red Your armor only softens the hit!", 4)
- if (prob(20))
- d = d / 2
- d = d / 4
- /*
- else
- if (istype(src.wear_suit, /obj/item/clothing/suit/swat_suit))
- if (prob(90))
- show_message("\red Your armor absorbs the blow!", 4)
- return
- else
- if (prob(90))
- show_message("\red Your armor only softens the blow!", 4)
- if (prob(60))
- d = d / 2
- d = d / 5*/
- if (istype(src.r_hand, /obj/item/weapon/shield/riot))
- if (prob(90))
- show_message("\red Your shield absorbs the blow!", 4)
- return
- else
- if (prob(40))
- show_message("\red Your shield only softens the blow!", 4)
- if (prob(60))
- d = d / 2
- d = d / 5
- else
- if (istype(src.l_hand, /obj/item/weapon/shield/riot))
- if (prob(90))
- show_message("\red Your shield absorbs the blow!", 4)
- return
- else
- if (prob(40))
- show_message("\red Your shield only softens the blow!", 4)
- if (prob(60))
- d = d / 2
- d = d / 5
- if (src.stat != 2)
- affecting.take_damage(d, 0)
- src.UpdateDamageIcon()
- src.updatehealth()
- if (prob(50))
- if(src.weakened <= 5) src.weakened = 5
- return
- else if (flag == PROJECTILE_TASER)
- if (armored)
- if (prob(5))
- show_message("\red Your armor absorbs the hit!", 4)
- return
- /*else
- if (istype(src.wear_suit, /obj/item/clothing/suit/swat_suit))
+ switch(flag)
+ if(PROJECTILE_BULLET)
+ var/d = 51
+ if (armored)
if (prob(70))
show_message("\red Your armor absorbs the hit!", 4)
- return*/
- if (prob(75) && src.stunned <= 10)
- src.stunned = 10
- else
- src.weakened = 10
- if (src.stuttering < 10)
- src.stuttering = 10
- else if (flag == PROJECTILE_DART)
- if (istype(src.l_hand, /obj/item/weapon/shield/riot)||istype(src.r_hand, /obj/item/weapon/shield/riot))
- if (prob(50))
- show_message("\red Your shield absorbs the hit!", 4)
- else
- src.weakened += 5
- src.toxloss += 10
- else if(flag == PROJECTILE_LASER)
- var/d = 20
- if (armored)
- if (prob(40))
- show_message("\red Your armor absorbs the hit!", 4)
- return
- else
- if (prob(40))
- show_message("\red Your armor only softens the hit!", 4)
- if (prob(20))
- d = d / 2
- d = d / 2
- /*else
- if (istype(src.wear_suit, /obj/item/clothing/suit/swat_suit))
- if (prob(70))
- show_message("\red Your armor absorbs the blow!", 4)
return
else
+ if (prob(40))
+ show_message("\red Your armor only softens the hit!", 4)
+ if (prob(20))
+ d = d / 2
+ d = d / 4
+ /*
+ else
+ if (istype(src.wear_suit, /obj/item/clothing/suit/swat_suit))
if (prob(90))
- show_message("\red Your armor only softens the blow!", 4)
- if (prob(60))
- d = d / 2
- d = d / 2*/
-
- if (!src.eye_blurry) src.eye_blurry = 4 //This stuff makes no sense but lasers need a buff.
- if (prob(25)) src.stunned++
-
- if (src.stat != 2)
- affecting.take_damage(0, d)
- src.UpdateDamageIcon()
- src.updatehealth()
- if (prob(25))
- src.stunned = 1
- else if(flag == PROJECTILE_PULSE)
- var/d = 40
- if (istype(src.wear_suit, /obj/item/clothing/suit/armor))
- if (prob(20))
- show_message("\red Your armor absorbs the hit!", 4)
- return
- else
- if (prob(20))
- show_message("\red Your armor only softens the hit!", 4)
- if (prob(20))
- d = d / 2
- d = d / 2
- /*else
- if (istype(src.wear_suit, /obj/item/clothing/suit/swat_suit))
- if (prob(50))
- show_message("\red Your armor absorbs the blow!", 4)
- return
- else
- if (prob(50))
- show_message("\red Your armor only softens the blow!", 4)
- if (prob(50))
- d = d / 2
- d = d / 2*/
- if (src.stat != 2)
- affecting.take_damage(0, d)
- src.UpdateDamageIcon()
- src.updatehealth()
- if (prob(50))
- src.stunned = min(src.stunned, 5)
- else if(flag == PROJECTILE_BOLT)
- src.toxloss += 3
- src.radiation += 100
- src.updatehealth()
- src.stuttering += 5
- src.drowsyness += 5
- else if(flag == PROJECTILE_WEAKBULLET)
- var/d = 14
- if (armored)
- if (prob(70))
- show_message("\red Your armor absorbs the hit!", 4)
- return
- else
- if (prob(40))
- show_message("\red Your armor only softens the hit!", 4)
- if (prob(20))
- d = d / 2
- d = d / 4
- /*else
- if (istype(src.wear_suit, /obj/item/clothing/suit/swat_suit))
- if (prob(90))
- show_message("\red Your armor absorbs the blow!", 4)
- return
- else
- if (prob(90))
- show_message("\red Your armor only softens the blow!", 4)
- if (prob(60))
- d = d / 2
- d = d / 5*/
- if (istype(src.r_hand, /obj/item/weapon/shield/riot))
- if (prob(90))
- show_message("\red Your shield absorbs the blow!", 4)
- return
- else
- if (prob(40))
- show_message("\red Your shield only softens the blow!", 4)
- if (prob(60))
- d = d / 2
- d = d / 5
- else
- if (istype(src.l_hand, /obj/item/weapon/shield/riot))
+ show_message("\red Your armor absorbs the blow!", 4)
+ return
+ else
+ if (prob(90))
+ show_message("\red Your armor only softens the blow!", 4)
+ if (prob(60))
+ d = d / 2
+ d = d / 5*/
+ if (istype(src.r_hand, /obj/item/weapon/shield/riot))
if (prob(90))
show_message("\red Your shield absorbs the blow!", 4)
return
@@ -405,12 +253,165 @@
if (prob(60))
d = d / 2
d = d / 5
- if (src.stat != 2)
- affecting.take_damage(d, 0)
- src.UpdateDamageIcon()
+ else
+ if (istype(src.l_hand, /obj/item/weapon/shield/riot))
+ if (prob(90))
+ show_message("\red Your shield absorbs the blow!", 4)
+ return
+ else
+ if (prob(40))
+ show_message("\red Your shield only softens the blow!", 4)
+ if (prob(60))
+ d = d / 2
+ d = d / 5
+ if (src.stat != 2)
+ affecting.take_damage(d, 0)
+ src.UpdateDamageIcon()
+ src.updatehealth()
+ if (prob(50))
+ if(src.weakened <= 5) src.weakened = 5
+ return
+ if(PROJECTILE_TASER)
+ if (armored)
+ if (prob(5))
+ show_message("\red Your armor absorbs the hit!", 4)
+ return
+ /*else
+ if (istype(src.wear_suit, /obj/item/clothing/suit/swat_suit))
+ if (prob(70))
+ show_message("\red Your armor absorbs the hit!", 4)
+ return*/
+ if (prob(75) && src.stunned <= 10)
+ src.stunned = 10
+ else
+ src.weakened = 10
+ if (src.stuttering < 10)
+ src.stuttering = 10
+ if(PROJECTILE_DART)
+ if (istype(src.l_hand, /obj/item/weapon/shield/riot)||istype(src.r_hand, /obj/item/weapon/shield/riot))
+ if (prob(50))
+ show_message("\red Your shield absorbs the hit!", 4)
+ else
+ src.weakened += 5
+ src.toxloss += 10
+ if(PROJECTILE_LASER)
+ var/d = 20
+ if (armored)
+ if (prob(40))
+ show_message("\red Your armor absorbs the hit!", 4)
+ return
+ else
+ if (prob(40))
+ show_message("\red Your armor only softens the hit!", 4)
+ if (prob(20))
+ d = d / 2
+ d = d / 2
+ /*else
+ if (istype(src.wear_suit, /obj/item/clothing/suit/swat_suit))
+ if (prob(70))
+ show_message("\red Your armor absorbs the blow!", 4)
+ return
+ else
+ if (prob(90))
+ show_message("\red Your armor only softens the blow!", 4)
+ if (prob(60))
+ d = d / 2
+ d = d / 2*/
+
+ if (!src.eye_blurry) src.eye_blurry = 4 //This stuff makes no sense but lasers need a buff.
+ if (prob(25)) src.stunned++
+
+ if (src.stat != 2)
+ affecting.take_damage(0, d)
+ src.UpdateDamageIcon()
+ src.updatehealth()
+ if (prob(25))
+ src.stunned = 1
+ if(PROJECTILE_PULSE)
+ var/d = 40
+ if (istype(src.wear_suit, /obj/item/clothing/suit/armor))
+ if (prob(20))
+ show_message("\red Your armor absorbs the hit!", 4)
+ return
+ else
+ if (prob(20))
+ show_message("\red Your armor only softens the hit!", 4)
+ if (prob(20))
+ d = d / 2
+ d = d / 2
+ /*else
+ if (istype(src.wear_suit, /obj/item/clothing/suit/swat_suit))
+ if (prob(50))
+ show_message("\red Your armor absorbs the blow!", 4)
+ return
+ else
+ if (prob(50))
+ show_message("\red Your armor only softens the blow!", 4)
+ if (prob(50))
+ d = d / 2
+ d = d / 2*/
+ if (src.stat != 2)
+ affecting.take_damage(0, d)
+ src.UpdateDamageIcon()
+ src.updatehealth()
+ if (prob(50))
+ src.stunned = min(src.stunned, 5)
+ if(PROJECTILE_BOLT)
+ src.toxloss += 3
+ src.radiation += 100
src.updatehealth()
- if(src.weakened <= 5) src.weakened = 5
- return
+ src.stuttering += 5
+ src.drowsyness += 5
+ if(PROJECTILE_WEAKBULLET)
+ var/d = 14
+ if (armored)
+ if (prob(70))
+ show_message("\red Your armor absorbs the hit!", 4)
+ return
+ else
+ if (prob(40))
+ show_message("\red Your armor only softens the hit!", 4)
+ if (prob(20))
+ d = d / 2
+ d = d / 4
+ /*else
+ if (istype(src.wear_suit, /obj/item/clothing/suit/swat_suit))
+ if (prob(90))
+ show_message("\red Your armor absorbs the blow!", 4)
+ return
+ else
+ if (prob(90))
+ show_message("\red Your armor only softens the blow!", 4)
+ if (prob(60))
+ d = d / 2
+ d = d / 5*/
+ if (istype(src.r_hand, /obj/item/weapon/shield/riot))
+ if (prob(90))
+ show_message("\red Your shield absorbs the blow!", 4)
+ return
+ else
+ if (prob(40))
+ show_message("\red Your shield only softens the blow!", 4)
+ if (prob(60))
+ d = d / 2
+ d = d / 5
+ else
+ if (istype(src.l_hand, /obj/item/weapon/shield/riot))
+ if (prob(90))
+ show_message("\red Your shield absorbs the blow!", 4)
+ return
+ else
+ if (prob(40))
+ show_message("\red Your shield only softens the blow!", 4)
+ if (prob(60))
+ d = d / 2
+ d = d / 5
+ if (src.stat != 2)
+ affecting.take_damage(d, 0)
+ src.UpdateDamageIcon()
+ src.updatehealth()
+ if(src.weakened <= 5) src.weakened = 5
+ return
return
/mob/living/carbon/human/emp_act(severity)
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index edd4120ceb..13a2045c72 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -8,67 +8,68 @@
/mob/living/bullet_act(flag)
- if (flag == PROJECTILE_BULLET)
- if (istype(src, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = src
- var/dam_zone = pick("chest", "chest", "chest", "groin", "head")
- if (H.organs[text("[]", dam_zone)])
- var/datum/organ/external/affecting = H.organs[text("[]", dam_zone)]
- if (affecting.take_damage(51, 0))
- H.UpdateDamageIcon()
- else
- H.UpdateDamage()
- else
- src.take_organ_damage(51)
- src.updatehealth()
- if (prob(80) && src.weakened <= 2)
- src.weakened = 2
- else if (flag == PROJECTILE_TASER)
- if (prob(75) && src.stunned <= 10)
- src.stunned = 10
- else
- src.weakened = 10
- else if (flag == PROJECTILE_DART)
- src.weakened += 5
- src.toxloss += 10
- else if(flag == PROJECTILE_LASER)
- if (istype(src, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = src
- var/dam_zone = pick("chest", "chest", "chest", "groin", "head")
- if (H.organs[text("[]", dam_zone)])
- var/datum/organ/external/affecting = H.organs[text("[]", dam_zone)]
- if (affecting.take_damage(20, 0))
- H.UpdateDamageIcon()
- else
- H.UpdateDamage()
- src.updatehealth()
- else
- src.take_organ_damage(20)
- if (prob(25) && src.stunned <= 2)
- src.stunned = 2
- else if(flag == PROJECTILE_PULSE)
- if (istype(src, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = src
- var/dam_zone = pick("chest", "chest", "chest", "groin", "head")
- if (H.organs[text("[]", dam_zone)])
- var/datum/organ/external/affecting = H.organs[text("[]", dam_zone)]
- if (affecting.take_damage(40, 0))
- H.UpdateDamageIcon()
- else
- H.UpdateDamage()
- src.updatehealth()
- else
- src.take_organ_damage(40)
- if (prob(50))
- src.stunned = min(src.stunned, 5)
- else if(flag == PROJECTILE_BOLT)
- src.toxloss += 3
- src.radiation += 100
- src.updatehealth()
- src.stuttering += 5
- src.drowsyness += 5
- if (prob(10))
- src.weakened = min(src.weakened, 2)
+ switch(flag)
+ if(PROJECTILE_BULLET)
+ if (istype(src, /mob/living/carbon/human))
+ var/mob/living/carbon/human/H = src
+ var/dam_zone = pick("chest", "chest", "chest", "groin", "head")
+ if (H.organs[text("[]", dam_zone)])
+ var/datum/organ/external/affecting = H.organs[text("[]", dam_zone)]
+ if (affecting.take_damage(51, 0))
+ H.UpdateDamageIcon()
+ else
+ H.UpdateDamage()
+ else
+ src.take_organ_damage(51)
+ src.updatehealth()
+ if (prob(80) && src.weakened <= 2)
+ src.weakened = 2
+ if(PROJECTILE_TASER)
+ if (prob(75) && src.stunned <= 10)
+ src.stunned = 10
+ else
+ src.weakened = 10
+ if(PROJECTILE_DART)
+ src.weakened += 5
+ src.toxloss += 10
+ if(PROJECTILE_LASER)
+ if (istype(src, /mob/living/carbon/human))
+ var/mob/living/carbon/human/H = src
+ var/dam_zone = pick("chest", "chest", "chest", "groin", "head")
+ if (H.organs[text("[]", dam_zone)])
+ var/datum/organ/external/affecting = H.organs[text("[]", dam_zone)]
+ if (affecting.take_damage(20, 0))
+ H.UpdateDamageIcon()
+ else
+ H.UpdateDamage()
+ src.updatehealth()
+ else
+ src.take_organ_damage(20)
+ if (prob(25) && src.stunned <= 2)
+ src.stunned = 2
+ if(PROJECTILE_PULSE)
+ if (istype(src, /mob/living/carbon/human))
+ var/mob/living/carbon/human/H = src
+ var/dam_zone = pick("chest", "chest", "chest", "groin", "head")
+ if (H.organs[text("[]", dam_zone)])
+ var/datum/organ/external/affecting = H.organs[text("[]", dam_zone)]
+ if (affecting.take_damage(40, 0))
+ H.UpdateDamageIcon()
+ else
+ H.UpdateDamage()
+ src.updatehealth()
+ else
+ src.take_organ_damage(40)
+ if (prob(50))
+ src.stunned = min(src.stunned, 5)
+ if(PROJECTILE_BOLT)
+ src.toxloss += 3
+ src.radiation += 100
+ src.updatehealth()
+ src.stuttering += 5
+ src.drowsyness += 5
+ if (prob(10))
+ src.weakened = min(src.weakened, 2)
return
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index 10283bbce2..e5dc566773 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -236,65 +236,67 @@
return
/mob/living/silicon/robot/bullet_act(flag)
- if (flag == PROJECTILE_BULLET)
- if (src.stat != 2)
- src.bruteloss += 60
- src.updatehealth()
- return
-/*
- else if (flag == PROJECTILE_MEDBULLET)
- if (src.stat != 2)
- src.bruteloss += 30
- src.updatehealth()
-*/
- else if (flag == PROJECTILE_WEAKBULLET)
- if (src.stat != 2)
- src.bruteloss += 15
- src.updatehealth()
- return
-/*
- else if (flag == PROJECTILE_MPBULLET)
- if (src.stat != 2)
- src.bruteloss += 20
- src.updatehealth()
+ switch(flag)
+ if(PROJECTILE_BULLET)
+ if (src.stat != 2)
+ src.bruteloss += 60
+ src.updatehealth()
+ return
+ /*
+ if(PROJECTILE_MEDBULLET)
+ if (src.stat != 2)
+ src.bruteloss += 30
+ src.updatehealth()
+ */
+ if(PROJECTILE_WEAKBULLET)
+ if (src.stat != 2)
+ src.bruteloss += 15
+ src.updatehealth()
+ return
+ /*
+ if(PROJECTILE_MPBULLET)
+ if (src.stat != 2)
+ src.bruteloss += 20
+ src.updatehealth()
- else if (flag == PROJECTILE_SLUG)
- if (src.stat != 2)
- src.bruteloss += 40
- src.updatehealth()
+ if(PROJECTILE_SLUG)
+ if (src.stat != 2)
+ src.bruteloss += 40
+ src.updatehealth()
- else if (flag == PROJECTILE_BAG)
- if (src.stat != 2)
- src.bruteloss += 2
- src.updatehealth()
-*/
+ if(PROJECTILE_BAG)
+ if (src.stat != 2)
+ src.bruteloss += 2
+ src.updatehealth()
+ */
- else if (flag == PROJECTILE_TASER)
- if (src.stat != 2)
- src.fireloss += rand(0,10)
- src.stunned += rand(0,3)
- return
- else if (flag == PROJECTILE_DART)
- if (src.stat != 2)
- src.stunned += 5
- src.fireloss += 10
- src.updatehealth()
- return
-/*
- else if (flag == PROJECTILE_WAVE)
- if (src.stat != 2)
- src.bruteloss += 25
- src.updatehealth()
- return
-*/
- else if(flag == PROJECTILE_LASER)
- if (src.stat != 2)
- src.bruteloss += 20
- src.updatehealth()
- else if(flag == PROJECTILE_PULSE)
- if (src.stat != 2)
- src.bruteloss += 40
- src.updatehealth()
+ if(PROJECTILE_TASER)
+ if (src.stat != 2)
+ src.fireloss += rand(0,10)
+ src.stunned += rand(0,3)
+ return
+ if(PROJECTILE_DART)
+ if (src.stat != 2)
+ src.stunned += 5
+ src.fireloss += 10
+ src.updatehealth()
+ return
+ /*
+ if(PROJECTILE_WAVE)
+ if (src.stat != 2)
+ src.bruteloss += 25
+ src.updatehealth()
+ return
+ */
+ if(PROJECTILE_LASER)
+ if (src.stat != 2)
+ src.bruteloss += 20
+ src.updatehealth()
+ if(PROJECTILE_PULSE)
+ if (src.stat != 2)
+ src.bruteloss += 40
+ src.updatehealth()
+ spark_system.start()
return
@@ -495,6 +497,7 @@
else
user << "You fail to [ locked ? "unlock" : "lock"] [src]'s interface."
else
+ spark_system.start()
return ..()
/mob/living/silicon/robot/attack_alien(mob/living/carbon/alien/humanoid/M as mob)