Some more work/bugfixes on Metroids.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1794 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
vageyenaman@gmail.com
2011-07-07 07:56:00 +00:00
parent 9bd966bf01
commit 4ccc71f047
9 changed files with 156 additions and 21 deletions
@@ -603,6 +603,41 @@
bruteloss += damage
if(M.powerlevel > 0)
var/stunprob = 10
var/power = M.powerlevel + rand(0,3)
switch(M.powerlevel)
if(1 to 2) stunprob = 20
if(3 to 4) stunprob = 30
if(5 to 6) stunprob = 40
if(7 to 8) stunprob = 60
if(9) stunprob = 70
if(10) stunprob = 95
if(prob(stunprob))
M.powerlevel -= 3
if(M.powerlevel < 0)
M.powerlevel = 0
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] has shocked []!</B>", src), 1)
if (weakened < power)
weakened = power
if (stuttering < power)
stuttering = power
if (stunned < power)
stunned = power
var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread
s.set_up(5, 1, src)
s.start()
if (prob(stunprob) && M.powerlevel >= 8)
fireloss += M.powerlevel * rand(6,10)
updatehealth()
@@ -1733,7 +1733,7 @@
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] has [pick("bit","slashed")] []!</B>", src), 1)
O.show_message(text("\red <B>The [M.name] has shocked []!</B>", src), 1)
if (weakened < power)
weakened = power
@@ -1742,6 +1742,10 @@
if (stunned < power)
stunned = power
var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread
s.set_up(5, 1, src)
s.start()
if (prob(stunprob) && M.powerlevel >= 8)
fireloss += M.powerlevel * rand(6,10)
+29 -11
View File
@@ -95,7 +95,6 @@
for(var/mob/living/carbon/metroid/M in view(1,C))
if(M.Victim == C)
notarget = 1
break // They don't go for prey already being eaten
if(!notarget) targets += C
@@ -225,6 +224,9 @@
if(istype(loc, /turf/space))
environment_heat_capacity = loc:heat_capacity
if(environment.temperature < (T0C + 10))
fireloss += rand(10,20)
if((environment.temperature > (T0C + 50)) || (environment.temperature < (T0C + 10)))
var/transfer_coefficient
@@ -268,7 +270,7 @@
// if(src.health <= 20 && prob(1)) spawn(0) emote("gasp")
//if(!src.rejuv) src.oxyloss++
if(!src.reagents.has_reagent("inaprovaline")) src.oxyloss+=8
if(!src.reagents.has_reagent("inaprovaline")) src.oxyloss+=10
if(src.stat != 2) src.stat = 1
@@ -286,16 +288,34 @@
src.blinded = 1
src.stat = 2
if (src.stuttering) src.stuttering--
else
if (src.paralysis || src.stunned || src.weakened || changeling_fakedeath) //Stunned etc.
if (src.stunned > 0)
src.stunned = 0
src.stat = 0
if (src.weakened > 0)
src.weakened = 0
src.lying = 0
src.stat = 0
if (src.paralysis > 0)
src.paralysis = 0
src.blinded = 0
src.lying = 0
src.stat = 0
else
src.lying = 0
src.stat = 0
if (src.stuttering) src.stuttering = 0
if (src.eye_blind)
src.eye_blind--
src.eye_blind = 0
src.blinded = 1
if (src.ear_deaf > 0) src.ear_deaf--
if (src.ear_deaf > 0) src.ear_deaf = 0
if (src.ear_damage < 25)
src.ear_damage -= 0.05
src.ear_damage = max(src.ear_damage, 0)
src.ear_damage = 0
src.density = !( src.lying )
@@ -305,12 +325,10 @@
src.ear_deaf = 1
if (src.eye_blurry > 0)
src.eye_blurry--
src.eye_blurry = max(0, src.eye_blurry)
src.eye_blurry = 0
if (src.druggy > 0)
src.druggy--
src.druggy = max(0, src.druggy)
src.druggy = 0
return 1
@@ -34,6 +34,9 @@
if(reagents.has_reagent("hyperzine")) // hyperzine slows Metroids down
tally *= 2 // moves twice as slow
if(reagents.has_reagent("frostoil")) // frostoil also makes them move pretty slow
tally *= 3
if(health <= 0) // if damaged, the metroid moves twice as slow
tally *= 2
@@ -114,11 +117,10 @@
..()
statpanel("Status")
if (client && client.holder)
if(istype(src, /mob/living/carbon/metroid/adult))
stat(null, "Health: [round(health)]/200")
else
stat(null, "Health: [round(health)]/150")
if(istype(src, /mob/living/carbon/metroid/adult))
stat(null, "Health: [round((health / 200) * 100)]%")
else
stat(null, "Health: [round((health / 150) * 100)]%")
if (client.statpanel == "Status")
@@ -398,7 +398,7 @@
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] has [pick("bit","slashed")] []!</B>", src), 1)
O.show_message(text("\red <B>The [M.name] has shocked []!</B>", src), 1)
if (weakened < power)
weakened = power
@@ -407,6 +407,10 @@
if (stunned < power)
stunned = power
var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread
s.set_up(5, 1, src)
s.start()
if (prob(stunprob) && M.powerlevel >= 8)
fireloss += M.powerlevel * rand(6,10)
@@ -591,6 +591,66 @@
O.show_message(text("\red <B>[] attempted to force back []!</B>", M, src), 1)
return
/mob/living/silicon/robot/attack_metroid(mob/living/carbon/metroid/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
if(M.Victim) return // can't attack while eating!
if (health > -100)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] has [pick("bit","slashed")] []!</B>", src), 1)
var/damage = rand(1, 3)
if(istype(src, /mob/living/carbon/metroid/adult))
damage = rand(20, 40)
else
damage = rand(5, 35)
damage = round(damage / 2) // borgs recieve half damage
bruteloss += damage
if(M.powerlevel > 0)
var/stunprob = 10
switch(M.powerlevel)
if(1 to 2) stunprob = 20
if(3 to 4) stunprob = 30
if(5 to 6) stunprob = 40
if(7 to 8) stunprob = 60
if(9) stunprob = 70
if(10) stunprob = 95
if(prob(stunprob))
M.powerlevel -= 3
if(M.powerlevel < 0)
M.powerlevel = 0
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] has electrified []!</B>", src), 1)
flick("noise", flash)
var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread
s.set_up(5, 1, src)
s.start()
if (prob(stunprob) && M.powerlevel >= 8)
bruteloss += M.powerlevel * rand(6,10)
updatehealth()
return
/mob/living/silicon/robot/attack_hand(mob/user)
add_fingerprint(user)