mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Okay, so this is a pretty big change.
Guns:
The projectile code has been mostly reworked to provide better support for effects, dynamic damage, etc. This also makes adding new projectiles easier for other coders. This is a pretty big change! If you see any bugs, get on IRC and bug me about it before the change goes live on the server!
Miscellaneous:
I fixed some bugs with Metroids hopefully. Turrets now don't identify people laying down as a threat.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1884 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -184,7 +184,7 @@
|
||||
if(!istype(T, /turf))
|
||||
return
|
||||
if (U == T)
|
||||
usr.bullet_act(PROJECTILE_DART, src, src.get_organ_target())
|
||||
usr.bullet_act(src, src.get_organ_target())
|
||||
return
|
||||
if(!istype(U, /turf))
|
||||
return
|
||||
|
||||
@@ -74,19 +74,19 @@
|
||||
if (client.statpanel == "Status")
|
||||
stat(null, "Plasma Stored: [toxloss]")
|
||||
|
||||
/mob/living/carbon/alien/humanoid/bullet_act(flag, A as obj)
|
||||
/mob/living/carbon/alien/humanoid/bullet_act(var/obj/item/projectile/Proj)
|
||||
var/shielded = 0
|
||||
|
||||
if(prob(50))
|
||||
if(prob(80))
|
||||
for(var/mob/living/carbon/metroid/M in view(1,src))
|
||||
if(M.Victim == src)
|
||||
M.bullet_act(flag, A)
|
||||
M.bullet_act(Proj)
|
||||
return
|
||||
|
||||
|
||||
for(var/obj/item/device/shield/S in src)
|
||||
if (S.active)
|
||||
if (flag == "bullet")
|
||||
if (Proj.flag == "bullet")
|
||||
return
|
||||
shielded = 1
|
||||
S.active = 0
|
||||
@@ -96,8 +96,8 @@
|
||||
shielded = 1
|
||||
S.active = 0
|
||||
S.icon_state = "shield0"
|
||||
if ((shielded && flag != "bullet"))
|
||||
if (!flag)
|
||||
if ((shielded && Proj.flag != "bullet"))
|
||||
if (Proj.flag)
|
||||
src << "\blue Your shield was disturbed by a laser!"
|
||||
if(paralysis <= 12) paralysis = 12
|
||||
updatehealth()
|
||||
@@ -105,83 +105,78 @@
|
||||
var/mob/safe = null
|
||||
if (istype(l_hand, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = l_hand
|
||||
if ((G.state == 3 && get_dir(src, A) == dir))
|
||||
if ((G.state == 3 && get_dir(src, Proj) == dir))
|
||||
safe = G.affecting
|
||||
if (istype(r_hand, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon.grab/G = r_hand
|
||||
if ((G.state == 3 && get_dir(src, A) == dir))
|
||||
if ((G.state == 3 && get_dir(src, Proj) == dir))
|
||||
safe = G.affecting
|
||||
if (safe)
|
||||
return safe.bullet_act(flag, A)
|
||||
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 (stat != 2)
|
||||
bruteloss += d
|
||||
updatehealth()
|
||||
if (prob(50)&&weakened <= 5)
|
||||
weakened = 5
|
||||
if(PROJECTILE_WEAKBULLET)
|
||||
var/d = 14
|
||||
if (stat != 2)
|
||||
bruteloss += d
|
||||
updatehealth()
|
||||
if (prob(50)&&weakened <= 2)
|
||||
weakened = 2
|
||||
if(PROJECTILE_WEAKBULLETBURST)
|
||||
var/d = 7
|
||||
if (stat != 2)
|
||||
bruteloss += d
|
||||
updatehealth()
|
||||
if (prob(50)&&weakened <= 2)
|
||||
weakened = 2
|
||||
if(PROJECTILE_BULLETBURST)
|
||||
var/d = 18
|
||||
if (stat != 2)
|
||||
bruteloss += d
|
||||
updatehealth()
|
||||
if (prob(50)&&weakened <= 2)
|
||||
weakened = 2
|
||||
if(PROJECTILE_TASER)
|
||||
if (prob(75) && stunned <= 10)
|
||||
stunned = 10
|
||||
else
|
||||
weakened = 10
|
||||
if(PROJECTILE_DART)//Nothing is supposed to happen, just making sure it's listed.
|
||||
return safe.bullet_act(Proj)
|
||||
|
||||
if(PROJECTILE_LASER)
|
||||
var/d = 20
|
||||
// if (!eye_blurry) eye_blurry = 4 //This stuff makes no sense but lasers need a buff./ It really doesn't make any sense. /N
|
||||
if (prob(25)) stunned++
|
||||
if (stat != 2)
|
||||
bruteloss += d
|
||||
updatehealth()
|
||||
if (prob(25))
|
||||
stunned = 1
|
||||
if(PROJECTILE_SHOCK)
|
||||
var/d = 20
|
||||
if (!eye_blurry) eye_blurry = 4 //This stuff makes no sense but lasers need a buff./ It really doesn't make any sense. /N
|
||||
if (prob(25)) stunned++
|
||||
if (stat != 2)
|
||||
bruteloss += d
|
||||
updatehealth()
|
||||
if (prob(25))
|
||||
stunned = 10
|
||||
else
|
||||
weakened = 10
|
||||
if(PROJECTILE_PULSE)
|
||||
var/d = 40
|
||||
for(var/i = 1, i<= Proj.mobdamage.len, i++)
|
||||
|
||||
if (stat != 2)
|
||||
bruteloss += d
|
||||
switch(i)
|
||||
if(1)
|
||||
var/d = Proj.mobdamage[BRUTE]
|
||||
if(!Proj.nodamage) bruteloss += d
|
||||
updatehealth()
|
||||
if (prob(50))
|
||||
stunned = min(stunned, 5)
|
||||
if(PROJECTILE_BOLT)
|
||||
toxloss += 3
|
||||
radiation += 100
|
||||
updatehealth()
|
||||
drowsyness += 5
|
||||
if(2)
|
||||
var/d = Proj.mobdamage[BURN]
|
||||
if(!Proj.nodamage) fireloss += d
|
||||
updatehealth()
|
||||
if(3)
|
||||
var/d = Proj.mobdamage[TOX]
|
||||
if(!Proj.nodamage) toxloss += d
|
||||
updatehealth()
|
||||
if(4)
|
||||
var/d = Proj.mobdamage[OXY]
|
||||
if(!Proj.nodamage) oxyloss += d
|
||||
updatehealth()
|
||||
if(5)
|
||||
var/d = Proj.mobdamage[CLONE]
|
||||
if(!Proj.nodamage) cloneloss += d
|
||||
updatehealth()
|
||||
|
||||
if(Proj.effects["stun"] && prob(Proj.effectprob["stun"]))
|
||||
if(Proj.effectmod["stun"] == SET)
|
||||
stunned = Proj.effects["stun"]
|
||||
else
|
||||
stunned += Proj.effects["stun"]
|
||||
|
||||
|
||||
if(Proj.effects["weak"] && prob(Proj.effectprob["weak"]))
|
||||
if(Proj.effectmod["weak"] == SET)
|
||||
weakened = Proj.effects["weak"]
|
||||
else
|
||||
weakened += Proj.effects["weak"]
|
||||
|
||||
if(Proj.effects["paralysis"] && prob(Proj.effectprob["paralysis"]))
|
||||
if(Proj.effectmod["paralysis"] == SET)
|
||||
paralysis = Proj.effects["paralysis"]
|
||||
else
|
||||
paralysis += Proj.effects["paralysis"]
|
||||
|
||||
if(Proj.effects["stutter"] && prob(Proj.effectprob["stutter"]))
|
||||
if(Proj.effectmod["stutter"] == SET)
|
||||
stuttering = Proj.effects["stutter"]
|
||||
else
|
||||
stuttering += Proj.effects["stutter"]
|
||||
|
||||
if(Proj.effects["drowsyness"] && prob(Proj.effectprob["drowsyness"]))
|
||||
if(Proj.effectmod["drowsyness"] == SET)
|
||||
drowsyness = Proj.effects["drowsyness"]
|
||||
else
|
||||
drowsyness += Proj.effects["drowsyness"]
|
||||
|
||||
// Aliums not effected by radiation damage
|
||||
|
||||
if(Proj.effects["eyeblur"] && prob(Proj.effectprob["eyeblur"]))
|
||||
if(Proj.effectmod["eyeblur"] == SET)
|
||||
eye_blurry = Proj.effects["eyeblur"]
|
||||
else
|
||||
eye_blurry += Proj.effects["eyeblur"]
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/emp_act(severity)
|
||||
|
||||
@@ -67,12 +67,12 @@
|
||||
|
||||
|
||||
//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)
|
||||
/mob/living/carbon/alien/larva/bullet_act(var/obj/item/projectile/Proj)
|
||||
|
||||
if(prob(50))
|
||||
if(prob(80))
|
||||
for(var/mob/living/carbon/metroid/M in view(1,src))
|
||||
if(M.Victim == src)
|
||||
M.bullet_act(flag, A)
|
||||
M.bullet_act(Proj)
|
||||
return
|
||||
|
||||
|
||||
@@ -80,105 +80,79 @@
|
||||
var/mob/safe = null
|
||||
if (istype(l_hand, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = l_hand
|
||||
if ((G.state == 3 && get_dir(src, A) == dir))
|
||||
if ((G.state == 3 && get_dir(src, Proj) == dir))
|
||||
safe = G.affecting
|
||||
if (istype(r_hand, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon.grab/G = r_hand
|
||||
if ((G.state == 3 && get_dir(src, A) == dir))
|
||||
if ((G.state == 3 && get_dir(src, Proj) == dir))
|
||||
safe = G.affecting
|
||||
if (safe)
|
||||
return safe.bullet_act(flag, A)
|
||||
switch(flag)
|
||||
if(PROJECTILE_BULLET)
|
||||
var/d = 51
|
||||
return safe.bullet_act(Proj)
|
||||
|
||||
if (stat != 2)
|
||||
bruteloss += d
|
||||
|
||||
for(var/i = 1, i<= Proj.mobdamage.len, i++)
|
||||
|
||||
switch(i)
|
||||
if(1)
|
||||
var/d = Proj.mobdamage[BRUTE]
|
||||
if(!Proj.nodamage) bruteloss += d
|
||||
updatehealth()
|
||||
if (prob(50))
|
||||
if(weakened <= 5) weakened = 5
|
||||
return
|
||||
if(PROJECTILE_WEAKBULLET)
|
||||
var/d = 14
|
||||
|
||||
if (stat != 2)
|
||||
bruteloss += d
|
||||
|
||||
if(2)
|
||||
var/d = Proj.mobdamage[BURN]
|
||||
if(!Proj.nodamage) fireloss += d
|
||||
updatehealth()
|
||||
if (prob(50))
|
||||
if(weakened <= 2) weakened = 2
|
||||
return
|
||||
if(PROJECTILE_WEAKBULLETBURST)
|
||||
var/d = 7
|
||||
|
||||
if (stat != 2)
|
||||
bruteloss += d
|
||||
|
||||
if(3)
|
||||
var/d = Proj.mobdamage[TOX]
|
||||
if(!Proj.nodamage) toxloss += d
|
||||
updatehealth()
|
||||
if (prob(50))
|
||||
if(weakened <= 2) weakened = 2
|
||||
return
|
||||
if(PROJECTILE_BULLETBURST)
|
||||
var/d = 18
|
||||
|
||||
if (stat != 2)
|
||||
bruteloss += d
|
||||
|
||||
if(4)
|
||||
var/d = Proj.mobdamage[OXY]
|
||||
if(!Proj.nodamage) oxyloss += d
|
||||
updatehealth()
|
||||
if (prob(50))
|
||||
if(weakened <= 2) weakened = 2
|
||||
return
|
||||
if(PROJECTILE_TASER)
|
||||
if (prob(75) && stunned <= 10)
|
||||
stunned = 10
|
||||
else
|
||||
weakened = 10
|
||||
if (stuttering < 10)
|
||||
stuttering = 10
|
||||
if(PROJECTILE_DART)
|
||||
return
|
||||
if(PROJECTILE_LASER)
|
||||
var/d = 20
|
||||
|
||||
// if (!eye_blurry) eye_blurry = 4 //This stuff makes no sense but lasers need a buff./ It really doesn't make any sense. /N
|
||||
if (prob(25)) stunned++
|
||||
|
||||
if (stat != 2)
|
||||
bruteloss += d
|
||||
|
||||
if(5)
|
||||
var/d = Proj.mobdamage[CLONE]
|
||||
if(!Proj.nodamage) cloneloss += d
|
||||
updatehealth()
|
||||
if (prob(25))
|
||||
stunned = 1
|
||||
if(PROJECTILE_SHOCK)
|
||||
var/d = 20
|
||||
|
||||
if (!eye_blurry) eye_blurry = 4 //This stuff makes no sense but lasers need a buff./ It really doesn't make any sense. /N
|
||||
if (prob(25)) stunned++
|
||||
if(Proj.effects["stun"] && prob(Proj.effectprob["stun"]))
|
||||
if(Proj.effectmod["stun"] == SET)
|
||||
stunned = Proj.effects["stun"]
|
||||
else
|
||||
stunned += Proj.effects["stun"]
|
||||
|
||||
if (stat != 2)
|
||||
bruteloss += d
|
||||
|
||||
updatehealth()
|
||||
if (prob(25))
|
||||
stunned = 1
|
||||
else
|
||||
weakened = 10
|
||||
if(PROJECTILE_PULSE)
|
||||
var/d = 40
|
||||
if(Proj.effects["weak"] && prob(Proj.effectprob["weak"]))
|
||||
if(Proj.effectmod["weak"] == SET)
|
||||
weakened = Proj.effects["weak"]
|
||||
else
|
||||
weakened += Proj.effects["weak"]
|
||||
|
||||
if (stat != 2)
|
||||
bruteloss += d
|
||||
if(Proj.effects["paralysis"] && prob(Proj.effectprob["paralysis"]))
|
||||
if(Proj.effectmod["paralysis"] == SET)
|
||||
paralysis = Proj.effects["paralysis"]
|
||||
else
|
||||
paralysis += Proj.effects["paralysis"]
|
||||
|
||||
if(Proj.effects["stutter"] && prob(Proj.effectprob["stutter"]))
|
||||
if(Proj.effectmod["stutter"] == SET)
|
||||
stuttering = Proj.effects["stutter"]
|
||||
else
|
||||
stuttering += Proj.effects["stutter"]
|
||||
|
||||
if(Proj.effects["drowsyness"] && prob(Proj.effectprob["drowsyness"]))
|
||||
if(Proj.effectmod["drowsyness"] == SET)
|
||||
drowsyness = Proj.effects["drowsyness"]
|
||||
else
|
||||
drowsyness += Proj.effects["drowsyness"]
|
||||
|
||||
// Aliums not effected by radiation damage
|
||||
|
||||
if(Proj.effects["eyeblur"] && prob(Proj.effectprob["eyeblur"]))
|
||||
if(Proj.effectmod["eyeblur"] == SET)
|
||||
eye_blurry = Proj.effects["eyeblur"]
|
||||
else
|
||||
eye_blurry += Proj.effects["eyeblur"]
|
||||
|
||||
updatehealth()
|
||||
if (prob(50))
|
||||
stunned = min(stunned, 5)
|
||||
if(PROJECTILE_BOLT)
|
||||
toxloss += 3
|
||||
radiation += 100
|
||||
updatehealth()
|
||||
stuttering += 5
|
||||
drowsyness += 5
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/larva/emp_act(severity)
|
||||
|
||||
@@ -192,21 +192,31 @@
|
||||
if (istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)&&wear_suit:s_initialized)
|
||||
stat("Energy Charge", round(wear_suit:cell:charge/100))
|
||||
|
||||
/mob/living/carbon/human/bullet_act(flag, A as obj, var/datum/organ/external/def_zone)
|
||||
/mob/living/carbon/human/bullet_act(A as obj, var/datum/organ/external/def_zone)
|
||||
var/shielded = 0
|
||||
var/list/armor
|
||||
//Preparing the var for grabbing the armor information, can't grab the values yet because we don't know what kind of bullet was used. --NEO
|
||||
|
||||
if(prob(50))
|
||||
var/obj/item/projectile/P = A
|
||||
if(prob(80))
|
||||
for(var/mob/living/carbon/metroid/M in view(1,src))
|
||||
if(M.Victim == src)
|
||||
M.bullet_act(flag, A) // the bullet hits them, not src!
|
||||
M.bullet_act(A) // the bullet hits them, not src!
|
||||
return
|
||||
|
||||
if (istype(l_hand, /obj/item/weapon/shield/riot))
|
||||
if (prob(50 + round(P.damage / 3))) // the more damage a projectile does, the more likely to block it
|
||||
show_message("\red Your shield blocks the blow!", 4)
|
||||
return
|
||||
|
||||
if (istype(r_hand, /obj/item/weapon/shield/riot))
|
||||
if (prob(50 + round(P.damage / 3)))
|
||||
show_message("\red Your shield blocks the blow!", 4)
|
||||
return
|
||||
|
||||
|
||||
for(var/obj/item/device/shield/S in src)
|
||||
if (S.active)
|
||||
if (flag == "bullet")
|
||||
if (P.flag == "bullet")
|
||||
return
|
||||
shielded = 1
|
||||
S.active = 0
|
||||
@@ -216,8 +226,8 @@
|
||||
shielded = 1
|
||||
S.active = 0
|
||||
S.icon_state = "shield0"
|
||||
if ((shielded && flag != "bullet"))
|
||||
if (!flag)
|
||||
if ((shielded && P.flag != "bullet"))
|
||||
if (P.flag)
|
||||
src << "\blue Your shield was disturbed by a laser!"
|
||||
if(paralysis <= 120) paralysis = 120
|
||||
updatehealth()
|
||||
@@ -243,398 +253,216 @@
|
||||
if ((G.state == 3 && get_dir(src, A) == dir))
|
||||
safe = G.affecting
|
||||
if (safe)
|
||||
return safe.bullet_act(flag, A)
|
||||
return safe.bullet_act(A)
|
||||
|
||||
var/absorb
|
||||
var/soften
|
||||
|
||||
switch(flag)
|
||||
if(PROJECTILE_BULLET)
|
||||
armor = getarmor(affecting, "bullet")
|
||||
var/d = 51
|
||||
if (prob(armor["armor"]))
|
||||
show_message("\red Your [armor["clothes"]] absorbs the hit!", 4)
|
||||
return
|
||||
else
|
||||
if (prob(armor["armor"]/2))
|
||||
show_message("\red Your [armor["clothes"]] only softens the hit!", 4)
|
||||
if (prob(20))
|
||||
d = d / 2
|
||||
d = d / 4
|
||||
/*
|
||||
else
|
||||
if (istype(wear_suit, /obj/item/clothing/suit/swat_suit))
|
||||
if (prob(90))
|
||||
show_message("\red Your armor absorbs the blow!", 4)
|
||||
return
|
||||
for(var/i = 1, i<= P.mobdamage.len, i++)
|
||||
|
||||
switch(i)
|
||||
if(1)
|
||||
var/d = P.mobdamage[BRUTE]
|
||||
if(d)
|
||||
var/list/armor = getarmor(affecting, P.flag)
|
||||
if (prob(armor["armor"]))
|
||||
absorb = 1
|
||||
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(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))
|
||||
if (prob(armor["armor"])/2)
|
||||
soften = 1
|
||||
d = d / 2
|
||||
d = d / 5
|
||||
else
|
||||
if (istype(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 (stat != 2)
|
||||
affecting.take_damage(d, 0)
|
||||
UpdateDamageIcon()
|
||||
updatehealth()
|
||||
if (prob(50))
|
||||
if(weakened <= 5) weakened = 5
|
||||
return
|
||||
if(PROJECTILE_BULLETBURST)
|
||||
armor = getarmor(affecting, "bullet")
|
||||
var/d = 18
|
||||
if (prob(armor["armor"]))
|
||||
show_message("\red Your [armor["clothes"]] absorbs the hit!", 4)
|
||||
return
|
||||
else
|
||||
if (prob(armor["armor"]/2))
|
||||
show_message("\red Your [armor["clothes"]] only softens the hit!", 4)
|
||||
if (prob(20))
|
||||
d = d / 2
|
||||
d = d / 4
|
||||
/*
|
||||
else
|
||||
if (istype(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(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(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 (stat != 2)
|
||||
affecting.take_damage(d, 0)
|
||||
UpdateDamageIcon()
|
||||
updatehealth()
|
||||
if (prob(50))
|
||||
if(weakened <= 2) weakened = 2
|
||||
return
|
||||
if(PROJECTILE_TASER)
|
||||
armor = getarmor(affecting, "taser")
|
||||
if (prob(armor["armor"]))
|
||||
show_message("\red Your [armor["clothes"]] absorbs the hit!", 4)
|
||||
return
|
||||
/*else
|
||||
if (istype(wear_suit, /obj/item/clothing/suit/swat_suit))
|
||||
if (prob(70))
|
||||
show_message("\red Your armor absorbs the hit!", 4)
|
||||
return*/
|
||||
if (prob(75) && stunned <= 10)
|
||||
stunned = 10
|
||||
else
|
||||
weakened = 10
|
||||
if (stuttering < 10)
|
||||
stuttering = 10
|
||||
if(PROJECTILE_DART)
|
||||
armor = getarmor(affecting, "bio")
|
||||
if (prob(armor["armor"]))
|
||||
show_message("\red Your [armor["clothes"]] absorbs the hit!", 4)
|
||||
return
|
||||
if (istype(l_hand, /obj/item/weapon/shield/riot)||istype(r_hand, /obj/item/weapon/shield/riot))
|
||||
if (prob(50))
|
||||
show_message("\red Your shield absorbs the hit!", 4)
|
||||
else
|
||||
weakened += 5
|
||||
toxloss += 10
|
||||
if(PROJECTILE_LASER)
|
||||
armor = getarmor(affecting, "laser")
|
||||
var/d = 20
|
||||
if (prob(armor["armor"]))
|
||||
show_message("\red Your [armor["clothes"]] absorbs the hit!", 4)
|
||||
return
|
||||
else
|
||||
if (prob(armor["armor"])/2)
|
||||
show_message("\red Your [armor["clothes"]] only softens the hit!", 4)
|
||||
if (prob(20))
|
||||
d = d / 2
|
||||
d = d / 2
|
||||
/*else
|
||||
if (istype(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 (!eye_blurry) eye_blurry = 4 //This stuff makes no sense but lasers need a buff.
|
||||
if (prob(25)) stunned++
|
||||
|
||||
if (stat != 2)
|
||||
affecting.take_damage(0, d)
|
||||
UpdateDamageIcon()
|
||||
updatehealth()
|
||||
if (prob(25))
|
||||
stunned = 1
|
||||
if(PROJECTILE_SHOCK)
|
||||
armor = getarmor(affecting, "laser")
|
||||
var/d = 20
|
||||
if (prob(armor["armor"]))
|
||||
show_message("\red Your [armor["clothes"]] absorbs the hit!", 4)
|
||||
return
|
||||
else
|
||||
if (prob(armor["armor"])/2)
|
||||
show_message("\red Your [armor["clothes"]] only softens the hit!", 4)
|
||||
if (prob(20))
|
||||
d = d / 2
|
||||
d = d / 2
|
||||
/*else
|
||||
if (istype(wear_suit, /obj/item/clothing/suit/swat_suit))
|
||||
if (prob(70))
|
||||
show_message("\red Your armor absorbs the blow!", 4)
|
||||
return
|
||||
if(!P.nodamage) affecting.take_damage(d, 0)
|
||||
UpdateDamageIcon()
|
||||
updatehealth()
|
||||
if(2)
|
||||
var/d = P.mobdamage[BURN]
|
||||
if(d)
|
||||
var/list/armor = getarmor(affecting, P.flag)
|
||||
if (prob(armor["armor"]))
|
||||
absorb = 1
|
||||
else
|
||||
if (prob(90))
|
||||
show_message("\red Your armor only softens the blow!", 4)
|
||||
if (prob(60))
|
||||
d = d / 2
|
||||
d = d / 2*/
|
||||
if (prob(armor["armor"])/2)
|
||||
soften = 1
|
||||
d = d / 2
|
||||
|
||||
if (!eye_blurry) eye_blurry = 4 //This stuff makes no sense but lasers need a buff.
|
||||
if (prob(25)) stunned++
|
||||
|
||||
if (stat != 2)
|
||||
affecting.take_damage(0, d)
|
||||
UpdateDamageIcon()
|
||||
updatehealth()
|
||||
if (prob(25))
|
||||
stunned = 10
|
||||
else
|
||||
weakened = 10
|
||||
if(PROJECTILE_PULSE)
|
||||
armor = getarmor(affecting, "laser")
|
||||
var/d = 40
|
||||
if (prob(armor["armor"]/2))
|
||||
show_message("\red Your [armor["clothes"]] absorbs the hit!", 4)
|
||||
return
|
||||
else
|
||||
if (prob(armor["armor"])/2)
|
||||
show_message("\red Your [armor["clothes"]] only softens the hit!", 4)
|
||||
if (prob(20))
|
||||
d = d / 2
|
||||
d = d / 2
|
||||
/*else
|
||||
if (istype(wear_suit, /obj/item/clothing/suit/swat_suit))
|
||||
if (prob(50))
|
||||
show_message("\red Your armor absorbs the blow!", 4)
|
||||
return
|
||||
if(!P.nodamage) affecting.take_damage(0, d)
|
||||
UpdateDamageIcon()
|
||||
updatehealth()
|
||||
if(3)
|
||||
var/d = P.mobdamage[TOX]
|
||||
if(d)
|
||||
var/list/armor = getarmor(affecting, P.flag)
|
||||
if (prob(armor["armor"]))
|
||||
absorb = 1
|
||||
else
|
||||
if (prob(50))
|
||||
show_message("\red Your armor only softens the blow!", 4)
|
||||
if (prob(50))
|
||||
d = d / 2
|
||||
d = d / 2*/
|
||||
if (stat != 2)
|
||||
affecting.take_damage(0, d)
|
||||
UpdateDamageIcon()
|
||||
updatehealth()
|
||||
if (prob(50))
|
||||
stunned = min(stunned, 5)
|
||||
if(PROJECTILE_BOLT)
|
||||
armor = getarmor(affecting, "rad")
|
||||
if (prob(getarmor(affecting, "bio")))
|
||||
show_message("\red Your [armor["clothes"]] absorbs the hit!", 4)
|
||||
return
|
||||
toxloss += 3
|
||||
radiation += 100
|
||||
updatehealth()
|
||||
stuttering += 5
|
||||
drowsyness += 5
|
||||
if(PROJECTILE_WEAKBULLET)
|
||||
armor = getarmor(affecting, "bullet")
|
||||
var/d = 14
|
||||
if (prob(armor["armor"]))
|
||||
show_message("\red Your [armor["clothes"]] absorbs the hit!", 4)
|
||||
return
|
||||
else
|
||||
if (prob(armor["armor"]/2))
|
||||
show_message("\red Your [armor["clothes"]] only softens the hit!", 4)
|
||||
if (prob(20))
|
||||
d = d / 2
|
||||
d = d / 4
|
||||
/*else
|
||||
if (istype(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(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))
|
||||
if (prob(armor["armor"])/2)
|
||||
soften = 1
|
||||
d = d / 2
|
||||
d = d / 5
|
||||
else
|
||||
if (istype(l_hand, /obj/item/weapon/shield/riot))
|
||||
if (prob(90))
|
||||
show_message("\red Your shield absorbs the blow!", 4)
|
||||
return
|
||||
|
||||
|
||||
if(!P.nodamage) toxloss += d
|
||||
UpdateDamageIcon()
|
||||
updatehealth()
|
||||
if(4)
|
||||
var/d = P.mobdamage[OXY]
|
||||
if(d)
|
||||
var/list/armor = getarmor(affecting, P.flag)
|
||||
if (prob(armor["armor"]))
|
||||
absorb = 1
|
||||
else
|
||||
if (prob(40))
|
||||
show_message("\red Your shield only softens the blow!", 4)
|
||||
if (prob(60))
|
||||
d = d / 2
|
||||
d = d / 5
|
||||
if (stat != 2)
|
||||
affecting.take_damage(d, 0)
|
||||
UpdateDamageIcon()
|
||||
updatehealth()
|
||||
if(weakened <= 5) weakened = 5
|
||||
return
|
||||
if(PROJECTILE_WEAKBULLETBURST)
|
||||
armor = getarmor(affecting, "bullet")
|
||||
var/d = 7
|
||||
if (prob(armor["armor"]))
|
||||
show_message("\red Your [armor["clothes"]] absorbs the hit!", 4)
|
||||
return
|
||||
else
|
||||
if (prob(armor["armor"]/2))
|
||||
show_message("\red Your [armor["clothes"]] only softens the hit!", 4)
|
||||
if (prob(20))
|
||||
d = d / 2
|
||||
d = d / 4
|
||||
/*else
|
||||
if (istype(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(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))
|
||||
if (prob(armor["armor"])/2)
|
||||
soften = 1
|
||||
d = d / 2
|
||||
d = d / 5
|
||||
else
|
||||
if (istype(l_hand, /obj/item/weapon/shield/riot))
|
||||
if (prob(90))
|
||||
show_message("\red Your shield absorbs the blow!", 4)
|
||||
return
|
||||
|
||||
|
||||
if(!P.nodamage) oxyloss += d
|
||||
UpdateDamageIcon()
|
||||
updatehealth()
|
||||
if(5)
|
||||
var/d = P.mobdamage[CLONE]
|
||||
if(d)
|
||||
var/list/armor = getarmor(affecting, P.flag)
|
||||
if (prob(armor["armor"]))
|
||||
absorb = 1
|
||||
else
|
||||
if (prob(40))
|
||||
show_message("\red Your shield only softens the blow!", 4)
|
||||
if (prob(60))
|
||||
d = d / 2
|
||||
d = d / 5
|
||||
if (stat != 2)
|
||||
affecting.take_damage(d, 0)
|
||||
UpdateDamageIcon()
|
||||
updatehealth()
|
||||
if(weakened <= 2) weakened = 2
|
||||
return
|
||||
if(PROJECTILE_WEAKERBULLETBURST)
|
||||
armor = getarmor(affecting, "bullet")
|
||||
var/d = 4
|
||||
if (prob(armor["armor"]))
|
||||
show_message("\red Your [armor["clothes"]] absorbs the hit!", 4)
|
||||
return
|
||||
else
|
||||
if (prob(armor["armor"]/2))
|
||||
show_message("\red Your [armor["clothes"]] only softens the hit!", 4)
|
||||
if (prob(20))
|
||||
d = d / 2
|
||||
d = d / 4
|
||||
/*else
|
||||
if (istype(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(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))
|
||||
if (prob(armor["armor"])/2)
|
||||
soften = 1
|
||||
d = d / 2
|
||||
d = d / 5
|
||||
|
||||
|
||||
if(!nodamage) cloneloss += d
|
||||
UpdateDamageIcon()
|
||||
updatehealth()
|
||||
|
||||
|
||||
|
||||
|
||||
/////////////////// All the unique projectile stuff goes here ///////////////////
|
||||
|
||||
if(absorb)
|
||||
show_message("\red Your armor absorbs the blow!", 4)
|
||||
return // a projectile can be deflected/absorbed given the right amount of protection
|
||||
if(soften)
|
||||
show_message("\red Your armor only softens the blow!", 4)
|
||||
if(prob(15)) return
|
||||
|
||||
var/nostutter = 0
|
||||
|
||||
if(P.effects["stun"] && prob(P.effectprob["stun"]))
|
||||
var/list/armor = getarmor(affecting, "taser")
|
||||
if (!prob(armor["armor"]))
|
||||
if(P.effectmod["stun"] == SET)
|
||||
stunned = P.effects["stun"]
|
||||
else
|
||||
if (istype(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 (stat != 2)
|
||||
affecting.take_damage(d, 0)
|
||||
UpdateDamageIcon()
|
||||
updatehealth()
|
||||
if(weakened <= 2) weakened = 2
|
||||
stunned += P.effects["stun"]
|
||||
else
|
||||
nostutter = 1
|
||||
|
||||
|
||||
if(P.effects["weak"] && prob(P.effectprob["weak"]))
|
||||
if(P.effectmod["weak"] == SET)
|
||||
weakened = P.effects["weak"]
|
||||
else
|
||||
weakened += P.effects["weak"]
|
||||
|
||||
if(P.effects["paralysis"] && prob(P.effectprob["paralysis"]))
|
||||
if(P.effectmod["paralysis"] == SET)
|
||||
paralysis = P.effects["paralysis"]
|
||||
else
|
||||
paralysis += P.effects["paralysis"]
|
||||
|
||||
if(P.effects["stutter"] && prob(P.effectprob["stutter"]) && !nostutter)
|
||||
if(P.effectmod["stutter"] == SET)
|
||||
stuttering = P.effects["stutter"]
|
||||
else
|
||||
stuttering += P.effects["stutter"]
|
||||
|
||||
if(P.effects["drowsyness"] && prob(P.effectprob["drowsyness"]))
|
||||
if(P.effectmod["drowsyness"] == SET)
|
||||
drowsyness = P.effects["drowsyness"]
|
||||
else
|
||||
drowsyness += P.effects["drowsyness"]
|
||||
|
||||
if(P.effects["radiation"] && prob(P.effectprob["radiation"]))
|
||||
var/list/armor = getarmor(affecting, "rad")
|
||||
if (!prob(armor["armor"]))
|
||||
if(P.effectmod["radiation"] == SET)
|
||||
radiation = P.effects["radiation"]
|
||||
else
|
||||
radiation += P.effects["radiation"]
|
||||
|
||||
if(P.effects["eyeblur"] && prob(P.effectprob["eyeblur"]))
|
||||
if(P.effectmod["eyeblur"] == SET)
|
||||
eye_blurry = P.effects["eyeblur"]
|
||||
else
|
||||
eye_blurry += P.effects["eyeblur"]
|
||||
|
||||
|
||||
|
||||
/*
|
||||
// Bullet shots
|
||||
if(P.flag == "bullet")
|
||||
if (prob(50) && stat != 2)
|
||||
if(weakened <= 5) weakened = 5
|
||||
|
||||
// Taser shots
|
||||
if(P.flag == "taser" && d == P.damage)
|
||||
armor = getarmor(affecting, "taser")
|
||||
if (prob(armor["armor"]))
|
||||
show_message("\red Your [armor["clothes"]] absorbs the hit!", 4)
|
||||
return
|
||||
|
||||
if (prob(75) && stunned <= 10)
|
||||
stunned = 10
|
||||
else
|
||||
weakened = 10
|
||||
if (stuttering < 10)
|
||||
stuttering = 10
|
||||
|
||||
// Laser shots
|
||||
if(P.flag == "laser")
|
||||
if (!eye_blurry && prob(50)) eye_blurry = 4
|
||||
if (prob(25)) stunned++
|
||||
|
||||
// Shock shots
|
||||
if(istype(P, /obj/item/projectile/fireball))
|
||||
if (!eye_blurry && prob(50)) eye_blurry = 4
|
||||
if (prob(25))
|
||||
stunned = 10
|
||||
else
|
||||
weakened = 10
|
||||
|
||||
// Dart shots
|
||||
if(istype(P, /obj/item/projectile/dart) && d == P.damage)
|
||||
armor = getarmor(affecting, "bio")
|
||||
if (prob(armor["armor"]))
|
||||
show_message("\red Your [armor["clothes"]] absorbs the hit!", 4)
|
||||
return
|
||||
if (istype(l_hand, /obj/item/weapon/shield/riot)||istype(r_hand, /obj/item/weapon/shield/riot))
|
||||
if (prob(50))
|
||||
show_message("\red Your shield absorbs the hit!", 4)
|
||||
else
|
||||
weakened += 5
|
||||
toxloss += 10
|
||||
|
||||
// Pulse shots
|
||||
if(istype(P, /obj/item/projectile/beam/pulse))
|
||||
if (prob(50))
|
||||
stunned = min(stunned, 5)
|
||||
|
||||
// Bolt shots
|
||||
if(istype(P, /obj/item/projectile/bolt) && d == P.damage)
|
||||
toxloss += 3
|
||||
radiation += 100
|
||||
updatehealth()
|
||||
stuttering += 5
|
||||
drowsyness += 5
|
||||
|
||||
*/
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/emp_act(severity)
|
||||
@@ -1075,7 +903,7 @@
|
||||
if (emptyHand)
|
||||
l_store.DblClick()
|
||||
return
|
||||
if ((!( istype(W, /obj/item) ) || W.w_class > 2 || !( w_uniform )))
|
||||
if ((!( istype(W, /obj/item) ) || W.w_class >= 2 || !( w_uniform )))
|
||||
return
|
||||
u_equip(W)
|
||||
l_store = W
|
||||
@@ -1084,7 +912,7 @@
|
||||
if (emptyHand)
|
||||
r_store.DblClick()
|
||||
return
|
||||
if ((!( istype(W, /obj/item) ) || W.w_class > 2 || !( w_uniform )))
|
||||
if ((!( istype(W, /obj/item) ) || W.w_class >= 2 || !( w_uniform )))
|
||||
return
|
||||
u_equip(W)
|
||||
r_store = W
|
||||
|
||||
@@ -74,6 +74,9 @@
|
||||
if(attacked <= 0)
|
||||
Target = null
|
||||
|
||||
if(Victim && !Target)
|
||||
Victim = null
|
||||
|
||||
if(Victim) return // if it's eating someone already, continue eating!
|
||||
|
||||
|
||||
@@ -171,8 +174,13 @@
|
||||
|
||||
if(!Target)
|
||||
|
||||
if(prob(33) && canmove && isturf(loc))
|
||||
step(src, pick(cardinal))
|
||||
if(hungry || starving)
|
||||
if(prob(50) && canmove && isturf(loc))
|
||||
step(src, pick(cardinal))
|
||||
|
||||
else
|
||||
if(prob(33) && canmove && isturf(loc))
|
||||
step(src, pick(cardinal))
|
||||
|
||||
|
||||
else
|
||||
@@ -200,10 +208,11 @@
|
||||
if(Victim) // can't eat AND have this little process at the same time
|
||||
break
|
||||
|
||||
if(attacked <= 0)
|
||||
if(attacked <= 0 || !Target)
|
||||
break
|
||||
|
||||
|
||||
|
||||
if(Target.health <= -70 || Target.stat == 2)
|
||||
Target = null
|
||||
AIproc = 0
|
||||
|
||||
@@ -137,97 +137,56 @@
|
||||
stat(null,"Power Level: [powerlevel]")
|
||||
|
||||
|
||||
/mob/living/carbon/metroid/bullet_act(flag, A as obj)
|
||||
if(A)
|
||||
/mob/living/carbon/metroid/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(Proj)
|
||||
if (locate(/obj/item/weapon/grab, src))
|
||||
var/mob/safe = null
|
||||
if (istype(l_hand, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = l_hand
|
||||
if ((G.state == 3 && get_dir(src, A) == dir))
|
||||
if ((G.state == 3 && get_dir(src, Proj) == dir))
|
||||
safe = G.affecting
|
||||
if (istype(r_hand, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon.grab/G = r_hand
|
||||
if ((G.state == 3 && get_dir(src, A) == dir))
|
||||
if ((G.state == 3 && get_dir(src, Proj) == dir))
|
||||
safe = G.affecting
|
||||
if (safe)
|
||||
return safe.bullet_act(flag, A)
|
||||
return safe.bullet_act(Proj)
|
||||
|
||||
switch(flag)
|
||||
if(PROJECTILE_BULLET)
|
||||
var/d = 1
|
||||
|
||||
attacked += 10
|
||||
if (stat != 2)
|
||||
bruteloss += d
|
||||
attacked += 10
|
||||
for(var/i = 1, i<= Proj.mobdamage.len, i++)
|
||||
|
||||
switch(i)
|
||||
if(1)
|
||||
var/d = Proj.mobdamage[BRUTE]
|
||||
if(!Proj.nodamage) bruteloss += d
|
||||
updatehealth()
|
||||
return
|
||||
if(PROJECTILE_BULLETBURST)
|
||||
var/d = 1
|
||||
|
||||
attacked += 10
|
||||
if (stat != 2)
|
||||
bruteloss += d
|
||||
|
||||
if(2)
|
||||
var/d = Proj.mobdamage[BURN]
|
||||
if(!Proj.nodamage) fireloss += d
|
||||
updatehealth()
|
||||
return
|
||||
if(PROJECTILE_WEAKBULLETBURST)
|
||||
var/d = 1
|
||||
|
||||
attacked += 10
|
||||
if (stat != 2)
|
||||
bruteloss += d
|
||||
|
||||
if(3)
|
||||
var/d = Proj.mobdamage[TOX]
|
||||
if(!Proj.nodamage) toxloss += d
|
||||
updatehealth()
|
||||
return
|
||||
if(PROJECTILE_WEAKERBULLETBURST)
|
||||
var/d = 0.5
|
||||
|
||||
attacked += 10
|
||||
if (stat != 2)
|
||||
bruteloss += d
|
||||
|
||||
if(4)
|
||||
var/d = Proj.mobdamage[OXY]
|
||||
if(!Proj.nodamage) oxyloss += d
|
||||
updatehealth()
|
||||
return
|
||||
if(PROJECTILE_TASER)
|
||||
if (prob(70))
|
||||
powerlevel++
|
||||
if(powerlevel > 10) powerlevel = 10
|
||||
|
||||
if(PROJECTILE_LASER)
|
||||
var/d = 30
|
||||
|
||||
attacked += 10
|
||||
// if (!eye_blurry) eye_blurry = 4 //This stuff makes no sense but lasers need a buff./ It really doesn't make any sense. /N
|
||||
|
||||
if (stat != 2)
|
||||
bruteloss += d
|
||||
|
||||
updatehealth()
|
||||
if(PROJECTILE_SHOCK)
|
||||
var/d = 30
|
||||
|
||||
attacked += 10
|
||||
if (!eye_blurry) eye_blurry = 4 //This stuff makes no sense but lasers need a buff./ It really doesn't make any sense. /N
|
||||
|
||||
if (stat != 2)
|
||||
bruteloss += d
|
||||
|
||||
if(5)
|
||||
var/d = Proj.mobdamage[CLONE]
|
||||
if(!Proj.nodamage) cloneloss += d
|
||||
updatehealth()
|
||||
|
||||
if (prob(70))
|
||||
powerlevel++
|
||||
if(powerlevel > 10) powerlevel = 10
|
||||
if(PROJECTILE_PULSE)
|
||||
var/d = 100
|
||||
|
||||
attacked += 10
|
||||
if (stat != 2)
|
||||
bruteloss += d
|
||||
|
||||
updatehealth()
|
||||
return
|
||||
if(Proj.flag == "taser" && prob(35))
|
||||
// Metroids have a small chance of "absorbing" taser shots. Deal /w it
|
||||
powerlevel++
|
||||
src << "<i>I have absorbed the electrode projectile...</i>"
|
||||
|
||||
// K
|
||||
// ~~~~ N
|
||||
// Metroids aren't effected by extra status effects. DO NOT NERF THIS PLZ THNX - LOVE, DOOHL 3===========D ~~~~ HONK
|
||||
// ~~~~ H
|
||||
|
||||
/mob/living/carbon/metroid/emp_act(severity)
|
||||
powerlevel = 0 // oh no, the power!
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
Feedstop()
|
||||
return
|
||||
|
||||
if(stat)
|
||||
src << "<i>I must be conscious to do this...</i>"
|
||||
return
|
||||
|
||||
var/list/choices = list()
|
||||
for(var/mob/living/carbon/C in view(1,src))
|
||||
if(C!=src && !istype(C,/mob/living/carbon/metroid))
|
||||
@@ -67,19 +71,19 @@
|
||||
Victim.toxloss += rand(2,4)
|
||||
|
||||
if(toxloss > 0)
|
||||
toxloss -= 5
|
||||
toxloss = max(0, toxloss-10)
|
||||
|
||||
if(oxyloss > 0)
|
||||
oxyloss -= 5
|
||||
oxyloss = max(0, oxyloss-10)
|
||||
|
||||
if(bruteloss > 0)
|
||||
bruteloss -= 5
|
||||
bruteloss = max(0, bruteloss-10)
|
||||
|
||||
if(fireloss > 0)
|
||||
fireloss -= 5
|
||||
fireloss = max(0, fireloss-10)
|
||||
|
||||
if(cloneloss > 0)
|
||||
cloneloss -= 5
|
||||
cloneloss = max(0, cloneloss-10)
|
||||
|
||||
if(Victim)
|
||||
for(var/mob/living/carbon/metroid/Metroid in view(1,M))
|
||||
@@ -160,6 +164,10 @@
|
||||
/mob/living/carbon/metroid/verb/Evolve()
|
||||
set category = "Metroid"
|
||||
set desc = "This will let you evolve from baby to adult metroid."
|
||||
|
||||
if(stat)
|
||||
src << "<i>I must be conscious to do this...</i>"
|
||||
return
|
||||
if(!istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(amount_grown >= 10)
|
||||
var/mob/living/carbon/metroid/adult/new_metroid = new /mob/living/carbon/metroid/adult (loc)
|
||||
@@ -179,6 +187,11 @@
|
||||
/mob/living/carbon/metroid/verb/Reproduce()
|
||||
set category = "Metroid"
|
||||
set desc = "This will make you split into a random number of Metroids (usually 2). NOTE: this will KILL you, but you will be transferred into one of the babies."
|
||||
|
||||
if(stat)
|
||||
src << "<i>I must be conscious to do this...</i>"
|
||||
return
|
||||
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(amount_grown >= 10)
|
||||
switch(input("Are you absolutely sure you want to reproduce? Your current body will cease to be, but your consciousness will be transferred into a produced metroid.") in list("Yes","No"))
|
||||
|
||||
@@ -110,82 +110,80 @@
|
||||
health = 100 - oxyloss - toxloss - fireloss - bruteloss
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/bullet_act(flag)
|
||||
/mob/living/carbon/monkey/bullet_act(var/obj/item/projectile/Proj)
|
||||
|
||||
if(prob(50))
|
||||
if(prob(80))
|
||||
for(var/mob/living/carbon/metroid/M in view(1,src))
|
||||
if(M.Victim == src)
|
||||
M.bullet_act(flag)
|
||||
M.bullet_act(Proj)
|
||||
return
|
||||
|
||||
for(var/i = 1, i<= Proj.mobdamage.len, i++)
|
||||
|
||||
if (flag == PROJECTILE_BULLET)
|
||||
if (stat != 2)
|
||||
take_organ_damage(60, 0)
|
||||
updatehealth()
|
||||
if (prob(50))
|
||||
if(weakened <= 5) weakened = 5
|
||||
else if (flag == PROJECTILE_BULLETBURST)
|
||||
if (stat != 2)
|
||||
take_organ_damage(21, 0)
|
||||
updatehealth()
|
||||
if (prob(50))
|
||||
if(weakened <= 2) weakened = 2
|
||||
else if (flag == PROJECTILE_TASER)
|
||||
if (prob(75) && stunned <= 10)
|
||||
stunned = 10
|
||||
switch(i)
|
||||
if(1)
|
||||
var/d = Proj.mobdamage[BRUTE]
|
||||
if(!Proj.nodamage) src.take_organ_damage(d)
|
||||
updatehealth()
|
||||
if(2)
|
||||
var/d = Proj.mobdamage[BURN]
|
||||
if(!Proj.nodamage) src.take_organ_damage(0, d)
|
||||
updatehealth()
|
||||
if(3)
|
||||
var/d = Proj.mobdamage[TOX]
|
||||
if(!Proj.nodamage) toxloss += d
|
||||
updatehealth()
|
||||
if(4)
|
||||
var/d = Proj.mobdamage[OXY]
|
||||
if(!Proj.nodamage) oxyloss += d
|
||||
updatehealth()
|
||||
if(5)
|
||||
var/d = Proj.mobdamage[CLONE]
|
||||
if(!Proj.nodamage) cloneloss += d
|
||||
updatehealth()
|
||||
|
||||
if(Proj.effects["stun"] && prob(Proj.effectprob["stun"]))
|
||||
if(Proj.effectmod["stun"] == SET)
|
||||
stunned = Proj.effects["stun"]
|
||||
else
|
||||
weakened = 10
|
||||
if (stuttering < 10)
|
||||
stuttering = 10
|
||||
else if (flag == PROJECTILE_DART)
|
||||
weakened += 5
|
||||
toxloss += 10
|
||||
else if(flag == PROJECTILE_LASER)
|
||||
if (!eye_blurry) eye_blurry = 4 //This stuff makes no sense but lasers need a buff.
|
||||
if (prob(25)) stunned++
|
||||
if (stat != 2)
|
||||
take_organ_damage(0, 20)
|
||||
updatehealth()
|
||||
if (prob(25))
|
||||
stunned = 1
|
||||
else if(flag == PROJECTILE_SHOCK)
|
||||
if (!eye_blurry) eye_blurry = 4 //This stuff makes no sense but lasers need a buff.
|
||||
if (prob(25)) stunned++
|
||||
if (stat != 2)
|
||||
take_organ_damage(0, 20)
|
||||
updatehealth()
|
||||
if (prob(25))
|
||||
stunned = 10
|
||||
else
|
||||
weakened = 10
|
||||
else if(flag == PROJECTILE_PULSE)
|
||||
if (stat != 2)
|
||||
take_organ_damage(0, 40)
|
||||
updatehealth()
|
||||
if (prob(50))
|
||||
stunned = min(stunned, 5)
|
||||
else if(flag == PROJECTILE_BOLT)
|
||||
toxloss += 3
|
||||
radiation += 100
|
||||
updatehealth()
|
||||
stuttering += 5
|
||||
drowsyness += 5
|
||||
else if (flag == PROJECTILE_WEAKBULLET)
|
||||
if (stat != 2)
|
||||
take_organ_damage(10, 0)
|
||||
updatehealth()
|
||||
if(weakened <= 5) weakened = 5
|
||||
else if (flag == PROJECTILE_WEAKBULLETBURST)
|
||||
if (stat != 2)
|
||||
take_organ_damage(5, 0)
|
||||
updatehealth()
|
||||
if(weakened <= 2) weakened = 2
|
||||
else if (flag == PROJECTILE_WEAKERBULLETBURST)
|
||||
if (stat != 2)
|
||||
take_organ_damage(3, 0)
|
||||
updatehealth()
|
||||
if(weakened <= 2) weakened = 2
|
||||
stunned += Proj.effects["stun"]
|
||||
|
||||
|
||||
if(Proj.effects["weak"] && prob(Proj.effectprob["weak"]))
|
||||
if(Proj.effectmod["weak"] == SET)
|
||||
weakened = Proj.effects["weak"]
|
||||
else
|
||||
weakened += Proj.effects["weak"]
|
||||
|
||||
if(Proj.effects["paralysis"] && prob(Proj.effectprob["paralysis"]))
|
||||
if(Proj.effectmod["paralysis"] == SET)
|
||||
paralysis = Proj.effects["paralysis"]
|
||||
else
|
||||
paralysis += Proj.effects["paralysis"]
|
||||
|
||||
if(Proj.effects["stutter"] && prob(Proj.effectprob["stutter"]))
|
||||
if(Proj.effectmod["stutter"] == SET)
|
||||
stuttering = Proj.effects["stutter"]
|
||||
else
|
||||
stuttering += Proj.effects["stutter"]
|
||||
|
||||
if(Proj.effects["drowsyness"] && prob(Proj.effectprob["drowsyness"]))
|
||||
if(Proj.effectmod["drowsyness"] == SET)
|
||||
drowsyness = Proj.effects["drowsyness"]
|
||||
else
|
||||
drowsyness += Proj.effects["drowsyness"]
|
||||
|
||||
if(Proj.effects["radiation"] && prob(Proj.effectprob["radiation"]))
|
||||
if(Proj.effectmod["radiation"] == SET)
|
||||
radiation = Proj.effects["radiation"]
|
||||
else
|
||||
radiation += Proj.effects["radiation"]
|
||||
|
||||
if(Proj.effects["eyeblur"] && prob(Proj.effectprob["eyeblur"]))
|
||||
if(Proj.effectmod["eyeblur"] == SET)
|
||||
eye_blurry = Proj.effects["eyeblur"]
|
||||
else
|
||||
eye_blurry += Proj.effects["eyeblur"]
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/hand_p(mob/M as mob)
|
||||
|
||||
@@ -7,107 +7,85 @@
|
||||
src << "\blue You have given up life and succumbed to death."
|
||||
|
||||
|
||||
/mob/living/bullet_act(flag)
|
||||
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_BULLETBURST)
|
||||
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(18, 0))
|
||||
H.UpdateDamageIcon()
|
||||
else
|
||||
H.UpdateDamage()
|
||||
else
|
||||
src.take_organ_damage(18)
|
||||
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()
|
||||
/mob/living/bullet_act(var/obj/item/projectile/Proj)
|
||||
|
||||
for(var/i = 1, i<= Proj.mobdamage.len, i++)
|
||||
|
||||
switch(i)
|
||||
if(1)
|
||||
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(Proj.mobdamage[BRUTE], 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_SHOCK)
|
||||
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 = 10
|
||||
else
|
||||
src.weakened = 10
|
||||
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
|
||||
|
||||
else
|
||||
if(!nodamage) src.take_organ_damage(Proj.mobdamage[BRUTE])
|
||||
|
||||
if(2)
|
||||
var/d = Proj.mobdamage[BURN]
|
||||
if(!Proj.nodamage) fireloss += d
|
||||
updatehealth()
|
||||
if(3)
|
||||
var/d = Proj.mobdamage[TOX]
|
||||
if(!Proj.nodamage) toxloss += d
|
||||
updatehealth()
|
||||
if(4)
|
||||
var/d = Proj.mobdamage[OXY]
|
||||
if(!Proj.nodamage) oxyloss += d
|
||||
updatehealth()
|
||||
if(5)
|
||||
var/d = Proj.mobdamage[CLONE]
|
||||
if(!Proj.nodamage) cloneloss += d
|
||||
updatehealth()
|
||||
|
||||
if(Proj.effects["stun"] && prob(Proj.effectprob["stun"]))
|
||||
if(Proj.effectmod["stun"] == SET)
|
||||
stunned = Proj.effects["stun"]
|
||||
else
|
||||
stunned += Proj.effects["stun"]
|
||||
|
||||
|
||||
if(Proj.effects["weak"] && prob(Proj.effectprob["weak"]))
|
||||
if(Proj.effectmod["weak"] == SET)
|
||||
weakened = Proj.effects["weak"]
|
||||
else
|
||||
weakened += Proj.effects["weak"]
|
||||
|
||||
if(Proj.effects["paralysis"] && prob(Proj.effectprob["paralysis"]))
|
||||
if(Proj.effectmod["paralysis"] == SET)
|
||||
paralysis = Proj.effects["paralysis"]
|
||||
else
|
||||
paralysis += Proj.effects["paralysis"]
|
||||
|
||||
if(Proj.effects["stutter"] && prob(Proj.effectprob["stutter"]))
|
||||
if(Proj.effectmod["stutter"] == SET)
|
||||
stuttering = Proj.effects["stutter"]
|
||||
else
|
||||
stuttering += Proj.effects["stutter"]
|
||||
|
||||
if(Proj.effects["drowsyness"] && prob(Proj.effectprob["drowsyness"]))
|
||||
if(Proj.effectmod["drowsyness"] == SET)
|
||||
drowsyness = Proj.effects["drowsyness"]
|
||||
else
|
||||
drowsyness += Proj.effects["drowsyness"]
|
||||
|
||||
if(Proj.effects["radiation"] && prob(Proj.effectprob["radiation"]))
|
||||
if(Proj.effectmod["radiation"] == SET)
|
||||
radiation = Proj.effects["radiation"]
|
||||
else
|
||||
radiation += Proj.effects["radiation"]
|
||||
|
||||
if(Proj.effects["eyeblur"] && prob(Proj.effectprob["eyeblur"]))
|
||||
if(Proj.effectmod["eyeblur"] == SET)
|
||||
eye_blurry = Proj.effects["eyeblur"]
|
||||
else
|
||||
eye_blurry += Proj.effects["eyeblur"]
|
||||
|
||||
|
||||
/mob/living/proc/updatehealth()
|
||||
|
||||
@@ -265,45 +265,12 @@
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/silicon/ai/bullet_act(flag)
|
||||
if (flag == PROJECTILE_BULLET)
|
||||
if (stat != 2)
|
||||
bruteloss += 60
|
||||
updatehealth()
|
||||
weakened = 10
|
||||
else if (flag == PROJECTILE_BULLETBURST)
|
||||
if (stat != 2)
|
||||
bruteloss += 21
|
||||
updatehealth()
|
||||
weakened = 4
|
||||
else if (flag == PROJECTILE_TASER)
|
||||
if (prob(75))
|
||||
stunned = 15
|
||||
else
|
||||
weakened = 15
|
||||
else if (flag == PROJECTILE_DART)
|
||||
return
|
||||
else if(flag == PROJECTILE_LASER)
|
||||
if (stat != 2)
|
||||
bruteloss += 20
|
||||
updatehealth()
|
||||
if (prob(25))
|
||||
stunned = 1
|
||||
else if(flag == PROJECTILE_SHOCK)
|
||||
if (stat != 2)
|
||||
bruteloss += 20
|
||||
updatehealth()
|
||||
if (prob(25))
|
||||
stunned = 10
|
||||
else
|
||||
weakened = 10
|
||||
else if(flag == PROJECTILE_PULSE)
|
||||
if (stat != 2)
|
||||
bruteloss += 40
|
||||
updatehealth()
|
||||
if (prob(50))
|
||||
stunned = min(5, stunned)
|
||||
return
|
||||
/mob/living/silicon/ai/bullet_act(var/obj/item/projectile/Proj)
|
||||
|
||||
// AI bullet code is pretty simple. No other effects really need to be added.
|
||||
if(!Proj.nodamage) bruteloss += Proj.damage
|
||||
updatehealth()
|
||||
|
||||
|
||||
/mob/living/silicon/ai/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
|
||||
if (!ticker)
|
||||
|
||||
@@ -114,44 +114,11 @@
|
||||
src.updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/silicon/pai/bullet_act(flag)
|
||||
if (flag == PROJECTILE_BULLET)
|
||||
if (src.stat != 2)
|
||||
src.bruteloss += 60
|
||||
src.updatehealth()
|
||||
src.weakened = 10
|
||||
else if (flag == PROJECTILE_BULLETBURST)
|
||||
if (src.stat != 2)
|
||||
src.bruteloss += 21
|
||||
src.updatehealth()
|
||||
src.weakened = 4
|
||||
else if (flag == PROJECTILE_TASER)
|
||||
if (prob(75))
|
||||
src.stunned = 15
|
||||
else
|
||||
src.weakened = 15
|
||||
else if (flag == PROJECTILE_DART)
|
||||
return
|
||||
else if(flag == PROJECTILE_LASER)
|
||||
if (src.stat != 2)
|
||||
src.bruteloss += 20
|
||||
src.updatehealth()
|
||||
if (prob(25))
|
||||
src.stunned = 1
|
||||
else if(flag == PROJECTILE_SHOCK)
|
||||
if (src.stat != 2)
|
||||
src.bruteloss += 20
|
||||
src.updatehealth()
|
||||
if (prob(25))
|
||||
src.stunned = 10
|
||||
else
|
||||
src.weakened = 15
|
||||
else if(flag == PROJECTILE_PULSE)
|
||||
if (src.stat != 2)
|
||||
src.bruteloss += 40
|
||||
src.updatehealth()
|
||||
if (prob(50))
|
||||
src.stunned = min(5, src.stunned)
|
||||
/mob/living/silicon/pai/bullet_act(var/obj/item/projectile/Proj)
|
||||
|
||||
bruteloss += Proj.damage
|
||||
updatehealth()
|
||||
|
||||
return
|
||||
|
||||
/mob/living/silicon/pai/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
|
||||
|
||||
@@ -271,89 +271,10 @@
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/bullet_act(flag)
|
||||
switch(flag)
|
||||
if(PROJECTILE_BULLET)
|
||||
if (stat != 2)
|
||||
bruteloss += 60
|
||||
updatehealth()
|
||||
return
|
||||
if(PROJECTILE_BULLETBURST)
|
||||
if (stat != 2)
|
||||
bruteloss += 21
|
||||
updatehealth()
|
||||
return
|
||||
/*
|
||||
if(PROJECTILE_MEDBULLET)
|
||||
if (stat != 2)
|
||||
bruteloss += 30
|
||||
updatehealth()
|
||||
*/
|
||||
if(PROJECTILE_WEAKBULLET)
|
||||
if (stat != 2)
|
||||
bruteloss += 15
|
||||
updatehealth()
|
||||
return
|
||||
if(PROJECTILE_WEAKBULLETBURST)
|
||||
if (stat != 2)
|
||||
bruteloss += 7
|
||||
updatehealth()
|
||||
return
|
||||
if(PROJECTILE_WEAKERBULLETBURST)
|
||||
if (stat != 2)
|
||||
bruteloss += 5
|
||||
updatehealth()
|
||||
return
|
||||
/*
|
||||
if(PROJECTILE_MPBULLET)
|
||||
if (stat != 2)
|
||||
bruteloss += 20
|
||||
updatehealth()
|
||||
|
||||
if(PROJECTILE_SLUG)
|
||||
if (stat != 2)
|
||||
bruteloss += 40
|
||||
updatehealth()
|
||||
|
||||
if(PROJECTILE_BAG)
|
||||
if (stat != 2)
|
||||
bruteloss += 2
|
||||
updatehealth()
|
||||
*/
|
||||
|
||||
if(PROJECTILE_TASER)
|
||||
if (stat != 2)
|
||||
fireloss += rand(0,10)
|
||||
stunned += rand(0,3)
|
||||
return
|
||||
if(PROJECTILE_DART)
|
||||
if (stat != 2)
|
||||
stunned += 5
|
||||
fireloss += 10
|
||||
updatehealth()
|
||||
return
|
||||
/*
|
||||
if(PROJECTILE_WAVE)
|
||||
if (stat != 2)
|
||||
bruteloss += 25
|
||||
updatehealth()
|
||||
return
|
||||
*/
|
||||
if(PROJECTILE_LASER)
|
||||
if (stat != 2)
|
||||
bruteloss += 20
|
||||
updatehealth()
|
||||
if(PROJECTILE_SHOCK)
|
||||
if (stat != 2)
|
||||
bruteloss += 20
|
||||
updatehealth()
|
||||
fireloss += rand(0,10)
|
||||
stunned += rand(0,3)
|
||||
if(PROJECTILE_PULSE)
|
||||
if (stat != 2)
|
||||
bruteloss += 40
|
||||
updatehealth()
|
||||
spark_system.start()
|
||||
/mob/living/silicon/robot/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(!Proj.nodamage) bruteloss += Proj.damage
|
||||
updatehealth()
|
||||
if(prob(75) && Proj.damage > 0) spark_system.start()
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -171,25 +171,8 @@ field_generator power level display
|
||||
..()
|
||||
|
||||
|
||||
bullet_act(flag)
|
||||
if (flag == PROJECTILE_BULLET)
|
||||
src.power -= 50
|
||||
else if (flag == PROJECTILE_BULLETBURST)
|
||||
src.power -= 20
|
||||
else if (flag == PROJECTILE_WEAKBULLET)
|
||||
src.power -= 25
|
||||
else if (flag == PROJECTILE_WEAKBULLETBURST)
|
||||
src.power -= 13
|
||||
else if (flag == PROJECTILE_WEAKERBULLETBURST)
|
||||
src.power -= 7
|
||||
else if (flag == PROJECTILE_LASER)
|
||||
src.power += 20
|
||||
else if (flag == PROJECTILE_SHOCK)
|
||||
src.power += 25
|
||||
else if (flag == PROJECTILE_TASER)
|
||||
src.power += 5
|
||||
else
|
||||
src.power -= 10
|
||||
bullet_act(var/obj/item/projectile/Proj)
|
||||
power -= Proj.damage
|
||||
update_icon()
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user