mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-10 14:44:05 +01:00
There's a few things in this revision made by me, and some made by other people that
requested I commit into the SVN. Please PM the collective coders if you find any bugs in
their work.
AI:
The AI now has a verb that lets it change its appearance. It doesn't do much, but but
it's some neat aesthetics that compliment the little display panes scattered around the
station that the AI can modify. This was a combined effort between Firecage, Petethegoat,
and Superxpdude.
Miscellaneous Changes (by Petethegreat):
- Cup Ramen sprite changed to a nicer one by Cheridan
- Plasma sheet sprite changed to a thicker one by Aru
Metroids:
They work. There might be some lingering bugs I simply cannot catch by testing alone,
but they WORK. They act as an entire new player-controllable race, are found in
xeniobiology, and I refuse to say anything else on the matter that would spoil anything. If
you feel so entitled to, you can view the source code to spoil everything like a little
cheater! I haven't completed everything I would like to, and as a result Metroids are
pretty useless. They're still very fun though!
Xenobiology, as a result of Metroids, got a bit of expansion. Scientists have access
to Xenobiology now, for now. If anyone wants Xenobiology to become a standalone job or
whatever, here's the place to post feedback.
Bugfixes:
- Perriot's Throat virus no longer makes you mute, instead, does what it was intended
to HONKHONKHONKHONK!!!!
- Some bugfixes with Turrets.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1774 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -647,6 +647,18 @@ var/showadminmessages = 1
|
||||
alert("You cannot perform this action. You must be of a higher administrative rank!")
|
||||
return
|
||||
|
||||
if (href_list["makemetroid"])
|
||||
if (src.level>=3)
|
||||
var/mob/M = locate(href_list["makemetroid"])
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
usr.client.cmd_admin_metroidize(M)
|
||||
else
|
||||
alert("Wrong mob. Must be human.")
|
||||
return
|
||||
else
|
||||
alert("You cannot perform this action. You must be of a higher administrative rank!")
|
||||
return
|
||||
|
||||
if (href_list["makerobot"])
|
||||
if (src.level>=3)
|
||||
var/mob/M = locate(href_list["makerobot"])
|
||||
@@ -1518,6 +1530,7 @@ var/showadminmessages = 1
|
||||
foo += text("<A HREF='?src=\ref[src];makeai=\ref[M]'>Make AI</A> | ")
|
||||
foo += text("<A HREF='?src=\ref[src];makerobot=\ref[M]'>Make Robot</A> | ")
|
||||
foo += text("<A HREF='?src=\ref[src];makealien=\ref[M]'>Make Alien</A> | ")
|
||||
foo += text("<A HREF='?src=\ref[src];makemetroid=\ref[M]'>Make Metroid</A> | ")
|
||||
foo += text("<A HREF='?src=\ref[src];tdome1=\ref[M]'>Thunderdome 1</A> | ")
|
||||
foo += text("<A HREF='?src=\ref[src];tdome2=\ref[M]'>Thunderdome 2</A> | ")
|
||||
foo += text("<A HREF='?src=\ref[src];tdomeadmin=\ref[M]'>Thunderdome Admin</A> | ")
|
||||
|
||||
@@ -191,6 +191,21 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M:Alienize()
|
||||
else
|
||||
alert("Invalid mob")
|
||||
|
||||
/client/proc/cmd_admin_metroidize(var/mob/M in world)
|
||||
set category = "Fun"
|
||||
set name = "Make Metroid"
|
||||
|
||||
if(!ticker)
|
||||
alert("Wait until the game starts")
|
||||
return
|
||||
if(ishuman(M))
|
||||
log_admin("[key_name(src)] has metroidized [M.key].")
|
||||
spawn(10)
|
||||
M:Metroidize()
|
||||
else
|
||||
alert("Invalid mob")
|
||||
|
||||
/*
|
||||
/client/proc/cmd_admin_monkeyize(var/mob/M in world)
|
||||
set category = "Fun"
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
handle_regular_status_updates()
|
||||
|
||||
health = 150 - (oxyloss + fireloss + bruteloss)
|
||||
health = 150 - (oxyloss + fireloss + bruteloss + cloneloss)
|
||||
|
||||
if(oxyloss > 50) paralysis = max(paralysis, 3)
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
handle_regular_status_updates()
|
||||
|
||||
health = 150 - (oxyloss + fireloss + bruteloss)
|
||||
health = 150 - (oxyloss + fireloss + bruteloss + cloneloss)
|
||||
|
||||
if(oxyloss > 50) paralysis = max(paralysis, 3)
|
||||
|
||||
|
||||
@@ -71,6 +71,14 @@
|
||||
|
||||
/mob/living/carbon/alien/humanoid/bullet_act(flag, A as obj)
|
||||
var/shielded = 0
|
||||
|
||||
if(prob(50))
|
||||
for(var/mob/living/carbon/metroid/M in view(1,src))
|
||||
if(M.Victim == src)
|
||||
M.bullet_act(flag, A)
|
||||
return
|
||||
|
||||
|
||||
for(var/obj/item/device/shield/S in src)
|
||||
if (S.active)
|
||||
if (flag == "bullet")
|
||||
@@ -370,6 +378,10 @@
|
||||
. = ..()
|
||||
if ((s_active && !( s_active in contents ) ))
|
||||
s_active.close(src)
|
||||
|
||||
for(var/mob/living/carbon/metroid/M in view(1,src))
|
||||
M.UpdateFeed(src)
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/update_clothing()
|
||||
@@ -568,6 +580,34 @@
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/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)
|
||||
|
||||
bruteloss += damage
|
||||
|
||||
|
||||
updatehealth()
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/attack_hand(mob/living/carbon/human/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
|
||||
@@ -376,7 +376,7 @@
|
||||
|
||||
handle_regular_status_updates()
|
||||
|
||||
health = 100 - (oxyloss + fireloss + bruteloss)
|
||||
health = 100 - (oxyloss + fireloss + bruteloss + cloneloss)
|
||||
|
||||
if(oxyloss > 50) paralysis = max(paralysis, 3)
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
|
||||
handle_regular_status_updates()
|
||||
|
||||
health = 250 - (oxyloss + fireloss + bruteloss)
|
||||
health = 250 - (oxyloss + fireloss + bruteloss + cloneloss)
|
||||
|
||||
if(oxyloss > 50) paralysis = max(paralysis, 3)
|
||||
|
||||
|
||||
@@ -66,6 +66,14 @@
|
||||
|
||||
//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(prob(50))
|
||||
for(var/mob/living/carbon/metroid/M in view(1,src))
|
||||
if(M.Victim == src)
|
||||
M.bullet_act(flag, A)
|
||||
return
|
||||
|
||||
|
||||
if (locate(/obj/item/weapon/grab, src))
|
||||
var/mob/safe = null
|
||||
if (istype(l_hand, /obj/item/weapon/grab))
|
||||
@@ -221,6 +229,7 @@
|
||||
for(var/mob/M in range(src, 1))
|
||||
if ((M.pulling == src && M.stat == 0 && !( M.restrained() )))
|
||||
t7 = null
|
||||
|
||||
if ((t7 && (pulling && ((get_dist(src, pulling) <= 1 || pulling.loc == loc) && (client && client.moving)))))
|
||||
var/turf/T = loc
|
||||
. = ..()
|
||||
@@ -273,6 +282,10 @@
|
||||
. = ..()
|
||||
if ((s_active && !( s_active in contents ) ))
|
||||
s_active.close(src)
|
||||
|
||||
for(var/mob/living/carbon/metroid/M in view(1,src))
|
||||
M.UpdateFeed(src)
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/larva/update_clothing()
|
||||
@@ -365,6 +378,34 @@
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/alien/larva/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)
|
||||
|
||||
bruteloss += damage
|
||||
|
||||
|
||||
updatehealth()
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/larva/attack_hand(mob/living/carbon/human/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
|
||||
@@ -304,7 +304,7 @@
|
||||
|
||||
handle_regular_status_updates()
|
||||
|
||||
health = 25 - (oxyloss + fireloss + bruteloss)
|
||||
health = 25 - (oxyloss + fireloss + bruteloss + cloneloss)
|
||||
|
||||
if(oxyloss > 50) paralysis = max(paralysis, 3)
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
|
||||
handle_regular_status_updates()
|
||||
|
||||
health = 100 - (oxyloss + toxloss + fireloss + bruteloss)
|
||||
health = 100 - (oxyloss + toxloss + fireloss + bruteloss + cloneloss)
|
||||
|
||||
if(oxyloss > 25) paralysis = max(paralysis, 3)
|
||||
|
||||
|
||||
@@ -186,6 +186,14 @@
|
||||
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))
|
||||
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!
|
||||
return
|
||||
|
||||
|
||||
for(var/obj/item/device/shield/S in src)
|
||||
if (S.active)
|
||||
if (flag == "bullet")
|
||||
@@ -952,6 +960,7 @@
|
||||
if (restrained())
|
||||
pulling = null
|
||||
|
||||
|
||||
var/t7 = 1
|
||||
if (restrained())
|
||||
for(var/mob/M in range(src, 1))
|
||||
@@ -1022,6 +1031,10 @@
|
||||
. = ..()
|
||||
if ((s_active && !( s_active in contents ) ))
|
||||
s_active.close(src)
|
||||
|
||||
for(var/mob/living/carbon/metroid/M in view(1,src))
|
||||
M.UpdateFeed(src)
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/update_clothing()
|
||||
@@ -1656,6 +1669,83 @@
|
||||
O.show_message(text("\red <B>[] has tried to disarm []!</B>", M, src), 1)
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/human/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)
|
||||
|
||||
|
||||
var/dam_zone = pick("head", "chest", "l_hand", "r_hand", "l_leg", "r_leg", "groin")
|
||||
|
||||
|
||||
if (dam_zone == "chest")
|
||||
if ((((wear_suit && wear_suit.body_parts_covered & UPPER_TORSO) || (w_uniform && w_uniform.body_parts_covered & LOWER_TORSO)) && prob(10)))
|
||||
if(prob(20))
|
||||
show_message("\blue You have been protected from a hit to the chest.")
|
||||
return
|
||||
|
||||
|
||||
|
||||
if (istype(organs[text("[]", dam_zone)], /datum/organ/external))
|
||||
var/datum/organ/external/temp = organs[text("[]", dam_zone)]
|
||||
if (temp.take_damage(damage, 0))
|
||||
UpdateDamageIcon()
|
||||
else
|
||||
UpdateDamage()
|
||||
|
||||
|
||||
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 [pick("bit","slashed")] []!</B>", src), 1)
|
||||
|
||||
if (weakened < power)
|
||||
weakened = power
|
||||
if (stuttering < power)
|
||||
stuttering = power
|
||||
if (stunned < power)
|
||||
stunned = power
|
||||
|
||||
if (prob(stunprob) && M.powerlevel >= 8)
|
||||
fireloss += M.powerlevel * rand(6,10)
|
||||
|
||||
|
||||
updatehealth()
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/attack_hand(mob/living/carbon/human/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
@@ -1751,6 +1841,10 @@
|
||||
M.attack_log += text("<font color='red'>[world.time] - has punched [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("<font color='orange'>[world.time] - has been punched by [M.name] ([M.ckey])</font>")
|
||||
|
||||
M.attack_log += text("<font color='red'>[world.time] - has punched [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("<font color='orange'>[world.time] - has been punched by [M.name] ([M.ckey])</font>")
|
||||
|
||||
|
||||
if (def_zone == "head")
|
||||
if ((((head && head.body_parts_covered & HEAD) || (wear_mask && wear_mask.body_parts_covered & HEAD)) && prob(99)))
|
||||
if (prob(20))
|
||||
|
||||
@@ -13,19 +13,18 @@
|
||||
for(var/i = 0,i<imax,i++)
|
||||
message += "E"
|
||||
|
||||
for(var/datum/disease/D in viruses)
|
||||
if(istype(D, /datum/disease/pierrot_throat))
|
||||
var/list/temp_message = dd_text2list(message, " ")
|
||||
var/list/pick_list = list()
|
||||
for(var/i = 1, i <= temp_message.len, i++)
|
||||
pick_list += i
|
||||
for(var/i=1, ((i <= src.virus.stage) && (i <= temp_message.len)), i++)
|
||||
if(prob(5 * src.virus.stage))
|
||||
var/H = pick(pick_list)
|
||||
if(findtext(temp_message[H], "*") || findtext(temp_message[H], ";") || findtext(temp_message[H], ":")) continue
|
||||
temp_message[H] = "HONK"
|
||||
pick_list -= H
|
||||
message = dd_list2text(temp_message, " ")
|
||||
for(var/datum/disease/pierrot_throat/D in viruses)
|
||||
var/list/temp_message = dd_text2list(message, " ")
|
||||
var/list/pick_list = list()
|
||||
for(var/i = 1, i <= temp_message.len, i++)
|
||||
pick_list += i
|
||||
for(var/i=1, ((i <= D.stage) && (i <= temp_message.len)), i++)
|
||||
if(prob(5 * D.stage))
|
||||
var/H = pick(pick_list)
|
||||
if(findtext(temp_message[H], "*") || findtext(temp_message[H], ";") || findtext(temp_message[H], ":")) continue
|
||||
temp_message[H] = "HONK"
|
||||
pick_list -= H
|
||||
message = dd_list2text(temp_message, " ")
|
||||
|
||||
//Ninja mask obscures text and voice if set to do so.
|
||||
//Would make it more global but it's sort of ninja specific.
|
||||
@@ -87,4 +86,6 @@
|
||||
return 1
|
||||
if (istype(other, /mob/living/carbon/brain))
|
||||
return 1
|
||||
if (istype(other, /mob/living/carbon/metroid))
|
||||
return 1
|
||||
return ..()
|
||||
@@ -23,6 +23,7 @@
|
||||
if (src.blind)
|
||||
src.blind.layer = 0
|
||||
src.lying = 1
|
||||
src.icon_state = "baby metroid dead"
|
||||
|
||||
var/h = src.hand
|
||||
src.hand = 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/living/carbon/alien/larva/emote(var/act)
|
||||
/mob/living/carbon/metroid/emote(var/act)
|
||||
|
||||
|
||||
if (findtext(act, "-", 1, null))
|
||||
@@ -10,55 +10,40 @@
|
||||
var/message
|
||||
|
||||
switch(act)
|
||||
if ("burp")
|
||||
message = "<B>The [src]</B> burps."
|
||||
m_type = 2
|
||||
if("scratch")
|
||||
if (!src.restrained())
|
||||
message = "<B>The [src.name]</B> scratches."
|
||||
m_type = 1
|
||||
if("whimper")
|
||||
message = "<B>The [src.name]</B> whimpers."
|
||||
if("moan")
|
||||
message = "<B>The [src.name]</B> moans."
|
||||
m_type = 2
|
||||
// if("roar")
|
||||
// if (!muzzled)
|
||||
// message = "<B>The [src.name]</B> roars." Commenting out since larva shouldn't roar /N
|
||||
// m_type = 2
|
||||
if("gasp")
|
||||
message = "<B>The [src.name]</B> gasps."
|
||||
m_type = 2
|
||||
|
||||
if("shiver")
|
||||
message = "<B>The [src.name]</B> shivers."
|
||||
m_type = 2
|
||||
if("drool")
|
||||
message = "<B>The [src.name]</B> drools."
|
||||
m_type = 1
|
||||
if("scretch")
|
||||
message = "<B>The [src.name]</B> scretches."
|
||||
m_type = 2
|
||||
if("choke")
|
||||
message = "<B>The [src.name]</B> chokes."
|
||||
m_type = 2
|
||||
if("moan")
|
||||
message = "<B>The [src.name]</B> moans!"
|
||||
m_type = 2
|
||||
if("nod")
|
||||
message = "<B>The [src.name]</B> nods its head."
|
||||
m_type = 1
|
||||
if("sway")
|
||||
message = "<B>The [src.name]</B> sways around dizzily."
|
||||
m_type = 1
|
||||
if("sulk")
|
||||
message = "<B>The [src.name]</B> sulks down sadly."
|
||||
m_type = 1
|
||||
if("twitch")
|
||||
message = "<B>The [src.name]</B> twitches violently."
|
||||
message = "<B>The [src.name]</B> twitches."
|
||||
m_type = 1
|
||||
if("shake")
|
||||
message = "<B>The [src.name]</B> shakes its head."
|
||||
if("vibrate")
|
||||
message = "<B>The [src.name]</B> vibrates!"
|
||||
m_type = 1
|
||||
if("jump")
|
||||
message = "<B>The [src.name]</B> jumps!"
|
||||
if("light")
|
||||
message = "<B>The [src.name]</B> lights up for a bit, then stops."
|
||||
m_type = 1
|
||||
if("click")
|
||||
message = "<B>The [src.name]</B> makes a clicking noise!"
|
||||
m_type = 1
|
||||
if("chatter")
|
||||
message = "<B>The [src.name]</B> makes a noisy chattering sound!"
|
||||
m_type = 1
|
||||
if("growl")
|
||||
message = "<B>The [src.name]</B> growls!"
|
||||
m_type = 1
|
||||
if("shriek")
|
||||
message = "<B>The [src.name]</B> makes a high-pitched shriek!"
|
||||
m_type = 1
|
||||
else
|
||||
src << text("Invalid Emote: []", act)
|
||||
|
||||
@@ -7,23 +7,23 @@
|
||||
usr << text("\red [] is limp and unresponsive.", src.name)
|
||||
else
|
||||
if (src.bruteloss)
|
||||
if (src.bruteloss < 30)
|
||||
usr << text("\red [] looks slightly damaged!", src.name)
|
||||
if (src.bruteloss < 40)
|
||||
usr << text("\red [] has some punctures in its flesh!", src.name)
|
||||
else
|
||||
usr << text("\red <B>[] looks severely damaged!</B>", src.name)
|
||||
usr << text("\red <B>[] has a lot of punctures and tears in its flesh!</B>", src.name)
|
||||
|
||||
switch(powerlevel)
|
||||
|
||||
if(2 to 3)
|
||||
usr << text("[] seems to have very little electrical activity inside it.", src.name)
|
||||
usr << text("\blue [] seems to have little bit of electrical activity inside it.", src.name)
|
||||
|
||||
if(4 to 5)
|
||||
usr << text("[] seems to some electricity inside of it.", src.name)
|
||||
usr << text("\blue [] seems to some electricity inside of it.", src.name)
|
||||
|
||||
if(6 to 9)
|
||||
usr << text("[] seems to have a lot of electricity inside of it.", src.name)
|
||||
usr << text("\blue [] seems to have a lot of electricity inside of it.", src.name)
|
||||
|
||||
if(10)
|
||||
usr << text("<B>[] seems to have extreme electrical activity inside it!</B>", src.name)
|
||||
usr << text("\blue <B>[] seems to have extreme electrical activity inside it!</B>", src.name)
|
||||
|
||||
return
|
||||
@@ -1,5 +1,10 @@
|
||||
|
||||
/mob/living/carbon/metroid/proc/regular_hud_updates()
|
||||
if(client)
|
||||
for(var/hud in client.screen)
|
||||
del(hud)
|
||||
|
||||
/*
|
||||
/obj/hud/proc/metroid_hud()
|
||||
|
||||
src.adding = list( )
|
||||
@@ -47,3 +52,4 @@
|
||||
src.station_explosion.mouse_opacity = 0
|
||||
src.station_explosion.screen_loc = "1,3"
|
||||
|
||||
*/
|
||||
@@ -20,6 +20,10 @@
|
||||
//Disease Check
|
||||
handle_virus_updates()
|
||||
|
||||
|
||||
// Basically just deletes any screen objects :<
|
||||
regular_hud_updates()
|
||||
|
||||
//Handle temperature/pressure differences between body and environment
|
||||
/*
|
||||
if(environment) // More error checking -- TLE
|
||||
@@ -38,22 +42,177 @@
|
||||
|
||||
handle_nutrition()
|
||||
|
||||
if(attacked > 50) attacked = 50
|
||||
|
||||
if(attacked > 0)
|
||||
if(prob(85))
|
||||
attacked--
|
||||
|
||||
|
||||
// Grabbing
|
||||
|
||||
if(!client && !stat)
|
||||
if(!client && stat != 2)
|
||||
|
||||
// DO AI STUFF HERE
|
||||
if(prob(33) && canmove && isturf(loc))
|
||||
step(src, pick(cardinal))
|
||||
if(prob(1))
|
||||
emote(pick("scratch","jump","roll","tail"))
|
||||
|
||||
|
||||
|
||||
if(Victim) return // if it's eating someone already, continue eating!
|
||||
|
||||
|
||||
if(prob(5))
|
||||
emote(pick("click","chatter","sway","light","vibrate","chatter","shriek"))
|
||||
|
||||
if(AIproc) return
|
||||
|
||||
|
||||
var/hungry = 0 // determines if the metroid is hungry
|
||||
var/starving = 0 // determines if the metroid is starving-hungry
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
switch(nutrition)
|
||||
if(200 to 600) hungry = 1
|
||||
if(0 to 199) starving = 1
|
||||
|
||||
else
|
||||
switch(nutrition)
|
||||
if(150 to 500) hungry = 1
|
||||
if(0 to 149) starving = 1
|
||||
|
||||
|
||||
if(!Target)
|
||||
var/list/targets = list()
|
||||
|
||||
for(var/mob/living/carbon/C in view(12,src))
|
||||
if(!istype(C, /mob/living/carbon/metroid)) // does not eat his bros! BROSBROSBROSBROS
|
||||
if(C.stat != 2 && C.health > 0) // chooses only healthy targets
|
||||
var/notarget = 0
|
||||
if(!C.canmove)
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
||||
if((hungry || starving) && targets.len > 0)
|
||||
if(!istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(!starving)
|
||||
for(var/mob/living/carbon/monkey/M in targets)
|
||||
Target = M
|
||||
break
|
||||
for(var/mob/living/carbon/alien/larva/L in targets)
|
||||
Target = L
|
||||
break
|
||||
if(prob(1))
|
||||
for(var/mob/living/carbon/alien/humanoid/H in targets)
|
||||
Target = H
|
||||
break
|
||||
for(var/mob/living/carbon/human/H in targets)
|
||||
Target = H
|
||||
break
|
||||
|
||||
else
|
||||
Target = pick(targets)
|
||||
|
||||
else
|
||||
Target = pick(targets)
|
||||
|
||||
if(attacked > 0 && targets.len > 0)
|
||||
Target = targets[1] // should be the closest target
|
||||
|
||||
|
||||
|
||||
|
||||
if(!Target)
|
||||
|
||||
if(prob(33) && canmove && isturf(loc))
|
||||
step(src, pick(cardinal))
|
||||
|
||||
|
||||
else
|
||||
if(!AIproc)
|
||||
spawn() AIprocess()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/metroid
|
||||
var/AIproc = 0 // determines if the AI loop is activated
|
||||
var/Atkcool = 0 // attack cooldown
|
||||
proc
|
||||
|
||||
AIprocess() // the master AI process
|
||||
|
||||
AIproc = 1
|
||||
while(AIproc)
|
||||
if(Victim) // can't eat AND have this little process at the same time
|
||||
break
|
||||
|
||||
if(Target.health <= -70 || Target.stat == 2)
|
||||
Target = null
|
||||
AIproc = 0
|
||||
break
|
||||
|
||||
if(Target)
|
||||
for(var/mob/living/carbon/metroid/M in view(1,Target))
|
||||
if(M.Victim == Target)
|
||||
Target = null
|
||||
AIproc = 0
|
||||
break
|
||||
if(!AIproc)
|
||||
break
|
||||
|
||||
if(Target in view(1,src))
|
||||
|
||||
if(prob(80) && !Target.lying)
|
||||
|
||||
if(Target.client && Target.health >= rand(10,30))
|
||||
if(!Atkcool)
|
||||
spawn()
|
||||
Atkcool = 1
|
||||
sleep(10)
|
||||
Atkcool = 0
|
||||
|
||||
Target.attack_metroid(src)
|
||||
|
||||
|
||||
if(prob(30))
|
||||
step_to(src, Target)
|
||||
|
||||
else
|
||||
|
||||
Feedon(Target)
|
||||
|
||||
else
|
||||
Feedon(Target)
|
||||
|
||||
else
|
||||
if(Target in view(30, src))
|
||||
step_to(src, Target)
|
||||
|
||||
else
|
||||
Target = null
|
||||
AIproc = 0
|
||||
break
|
||||
|
||||
var/sleeptime = movement_delay()
|
||||
if(sleeptime <= 0) sleeptime = 1
|
||||
|
||||
sleep(sleeptime + 1) // this is about as fast as a player Metroid can go
|
||||
|
||||
AIproc = 0
|
||||
|
||||
|
||||
|
||||
|
||||
handle_environment(datum/gas_mixture/environment)
|
||||
if(!environment)
|
||||
return
|
||||
@@ -90,9 +249,9 @@
|
||||
handle_regular_status_updates()
|
||||
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
health = 300 - (oxyloss + toxloss + fireloss + bruteloss + cloneloss)
|
||||
health = 200 - (oxyloss + toxloss + fireloss + bruteloss + cloneloss)
|
||||
else
|
||||
health = 250 - (oxyloss + toxloss + fireloss + bruteloss + cloneloss)
|
||||
health = 150 - (oxyloss + toxloss + fireloss + bruteloss + cloneloss)
|
||||
|
||||
|
||||
|
||||
@@ -109,9 +268,12 @@
|
||||
|
||||
if(src.stat != 2) src.stat = 1
|
||||
|
||||
if(prob(80))
|
||||
oxyloss = max(oxyloss-5, 0)
|
||||
toxloss = max(toxloss-5, 0)
|
||||
if(prob(30))
|
||||
if(oxyloss>0) oxyloss = max(oxyloss-1, 0)
|
||||
if(toxloss>0) toxloss = max(toxloss-1, 0)
|
||||
if(fireloss>0) fireloss = max(fireloss-1,0)
|
||||
if(cloneloss>0) cloneloss = max(cloneloss-1,0)
|
||||
if(bruteloss>0) bruteloss = max(bruteloss-1,0)
|
||||
|
||||
|
||||
if (src.stat == 2)
|
||||
@@ -150,7 +312,10 @@
|
||||
|
||||
|
||||
handle_nutrition()
|
||||
if(prob(25)) nutrition--
|
||||
if(prob(30))
|
||||
if(istype(src, /mob/living/carbon/metroid/adult)) nutrition-=rand(2,6)
|
||||
else nutrition-=rand(1,4)
|
||||
|
||||
if(nutrition <= 0)
|
||||
nutrition = 0
|
||||
if(prob(75))
|
||||
@@ -159,13 +324,31 @@
|
||||
|
||||
else
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(nutrition >= 350)
|
||||
if(nutrition >= 1100)
|
||||
if(prob(40)) amount_grown++
|
||||
|
||||
else
|
||||
if(nutrition >= 250)
|
||||
if(nutrition >= 900)
|
||||
if(prob(40)) amount_grown++
|
||||
|
||||
if(amount_grown >= 10 && !Victim && !Target)
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(!client)
|
||||
var/number = pick(2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,4)
|
||||
for(var/i=1,i<=number,i++) // reproduce (has a small chance of producing 3 or 4 offspring)
|
||||
var/mob/living/carbon/metroid/M = new/mob/living/carbon/metroid(loc)
|
||||
M.nutrition = round(nutrition/number)
|
||||
step_away(M,src)
|
||||
|
||||
del(src)
|
||||
|
||||
else
|
||||
if(!client)
|
||||
var/mob/living/carbon/metroid/adult/A = new/mob/living/carbon/metroid/adult(src.loc)
|
||||
A.nutrition = nutrition
|
||||
del(src)
|
||||
|
||||
|
||||
handle_virus_updates()
|
||||
if(bodytemperature > 406)
|
||||
for(var/datum/disease/D in viruses)
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
if (bodytemperature < 283.222)
|
||||
tally += (283.222 - bodytemperature) / 10 * 1.75
|
||||
toxloss+=rand(5,20)
|
||||
|
||||
if(reagents)
|
||||
if(reagents.has_reagent("hyperzine")) // hyperzine slows Metroids down
|
||||
@@ -47,6 +48,36 @@
|
||||
if ((!( yes ) || now_pushing))
|
||||
return
|
||||
now_pushing = 1
|
||||
|
||||
if(isobj(AM))
|
||||
if(!client && powerlevel > 0)
|
||||
var/probab = 10
|
||||
switch(powerlevel)
|
||||
if(1 to 2) probab = 20
|
||||
if(3 to 4) probab = 30
|
||||
if(5 to 6) probab = 40
|
||||
if(7 to 8) probab = 60
|
||||
if(9) probab = 70
|
||||
if(10) probab = 95
|
||||
if(prob(probab))
|
||||
if(istype(AM, /obj/window) || istype(AM, /obj/grille))
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(nutrition <= 600 && !Atkcool)
|
||||
AM.attack_metroid(src)
|
||||
spawn()
|
||||
Atkcool = 1
|
||||
sleep(15)
|
||||
Atkcool = 0
|
||||
else
|
||||
if(nutrition <= 500 && !Atkcool)
|
||||
if(prob(5))
|
||||
if(prob(50))
|
||||
AM.attack_metroid(src)
|
||||
spawn()
|
||||
Atkcool = 1
|
||||
sleep(15)
|
||||
Atkcool = 0
|
||||
|
||||
if(ismob(AM))
|
||||
var/mob/tmob = AM
|
||||
|
||||
@@ -85,53 +116,59 @@
|
||||
statpanel("Status")
|
||||
if (client && client.holder)
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
stat(null, "Health: [round(health)]/300")
|
||||
stat(null, "Health: [round(health)]/200")
|
||||
else
|
||||
stat(null, "Health: [round(health)]/250")
|
||||
stat(null, "Health: [round(health)]/150")
|
||||
|
||||
|
||||
if (client.statpanel == "Status")
|
||||
if(istype(src,/mob/living/carbon/metroid/adult))
|
||||
stat(null, "Nutrition: [nutrition]/400")
|
||||
if(amount_grown == 10)
|
||||
stat(null, "Nutrition: [nutrition]/1200")
|
||||
if(amount_grown >= 10)
|
||||
stat(null, "You can reproduce!")
|
||||
else
|
||||
stat(null, "Nutrition: [nutrition]/300")
|
||||
stat(null, "Nutrition: [nutrition]/1000")
|
||||
if(amount_grown >= 10)
|
||||
stat(null, "You can evolve!")
|
||||
|
||||
stat(null,"Power Level: [powerlevel]")
|
||||
|
||||
|
||||
/mob/living/carbon/metroid/bullet_act(flag, A as obj)
|
||||
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))
|
||||
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))
|
||||
safe = G.affecting
|
||||
if (safe)
|
||||
return safe.bullet_act(flag, A)
|
||||
if(A)
|
||||
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))
|
||||
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))
|
||||
safe = G.affecting
|
||||
if (safe)
|
||||
return safe.bullet_act(flag, A)
|
||||
|
||||
switch(flag)
|
||||
if(PROJECTILE_BULLET)
|
||||
var/d = 1
|
||||
|
||||
attacked += 10
|
||||
if (stat != 2)
|
||||
bruteloss += d
|
||||
|
||||
updatehealth()
|
||||
return
|
||||
if(PROJECTILE_TASER)
|
||||
if (prob(10))
|
||||
if(stunned <= 10)
|
||||
stunned = 10
|
||||
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 (prob(25)) stunned++
|
||||
|
||||
if (stat != 2)
|
||||
bruteloss += d
|
||||
@@ -140,6 +177,7 @@
|
||||
if(PROJECTILE_PULSE)
|
||||
var/d = 100
|
||||
|
||||
attacked += 10
|
||||
if (stat != 2)
|
||||
bruteloss += d
|
||||
|
||||
@@ -322,29 +360,31 @@
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/metroid/hand_p(mob/M as mob)
|
||||
/mob/living/carbon/metroid/attack_metroid(mob/living/carbon/metroid/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if (M.a_intent == "hurt")
|
||||
if (health > 0)
|
||||
if(Victim) return // can't attack while eating!
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[M.name] has [pick("bit","slashed")] []!</B>", src), 1)
|
||||
if (health > -100)
|
||||
|
||||
var/damage = rand(1, 3)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>The [M.name] has bit []!</B>", src), 1)
|
||||
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
damage = rand(20, 60)
|
||||
else
|
||||
damage = rand(5, 45)
|
||||
var/damage = rand(1, 3)
|
||||
attacked += 5
|
||||
|
||||
bruteloss += damage
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
damage = rand(1, 6)
|
||||
else
|
||||
damage = rand(1, 3)
|
||||
|
||||
bruteloss += damage
|
||||
|
||||
|
||||
updatehealth()
|
||||
updatehealth()
|
||||
|
||||
return
|
||||
|
||||
@@ -368,6 +408,7 @@
|
||||
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
return
|
||||
if (health > 0)
|
||||
attacked += 10
|
||||
playsound(loc, 'bite.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
@@ -388,6 +429,45 @@
|
||||
|
||||
..()
|
||||
|
||||
if(Victim)
|
||||
if(Victim == M)
|
||||
if(prob(90))
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message("\red [M] attempts to wrestle \the [name] off!", 1)
|
||||
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
|
||||
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message("\red [M] manages to wrestle \the [name] off!", 1)
|
||||
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
|
||||
|
||||
Victim = null
|
||||
step_away(src,M)
|
||||
|
||||
return
|
||||
|
||||
else
|
||||
if(prob(80))
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message("\red [M] attempts to wrestle \the [name] off of [Victim]!", 1)
|
||||
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
|
||||
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message("\red [M] manages to wrestle \the [name] off of [Victim]!", 1)
|
||||
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
|
||||
|
||||
Victim = null
|
||||
step_away(src,M)
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
if(M.gloves && M.gloves.elecgen == 1)//Stungloves. Any contact will stun the alien.
|
||||
if(M.gloves.uses > 0)
|
||||
M.gloves.uses--
|
||||
@@ -420,10 +500,14 @@
|
||||
|
||||
else
|
||||
var/damage = rand(1, 9)
|
||||
|
||||
attacked += 10
|
||||
if (prob(90))
|
||||
if (M.mutations & HULK)
|
||||
damage += 5
|
||||
if(Victim) Victim = null
|
||||
spawn(0)
|
||||
|
||||
step_away(src,M,15)
|
||||
sleep(3)
|
||||
step_away(src,M,15)
|
||||
@@ -431,10 +515,7 @@
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has punched []!</B>", M, src), 1)
|
||||
if (damage > 4.9)
|
||||
for(var/mob/O in viewers(M, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has weakened []!</B>", M, src), 1, "\red You hear someone fall.", 2)
|
||||
|
||||
bruteloss += damage
|
||||
updatehealth()
|
||||
else
|
||||
@@ -462,7 +543,9 @@
|
||||
O.show_message(text("\blue [M] caresses [src] with its scythe like arm."), 1)
|
||||
|
||||
if ("hurt")
|
||||
|
||||
if ((prob(95) && health > 0))
|
||||
attacked += 10
|
||||
playsound(loc, 'slice.ogg', 25, 1, -1)
|
||||
var/damage = rand(15, 30)
|
||||
if (damage >= 25)
|
||||
@@ -502,10 +585,20 @@
|
||||
if ("disarm")
|
||||
playsound(loc, 'pierce.ogg', 25, 1, -1)
|
||||
var/damage = 5
|
||||
attacked += 10
|
||||
|
||||
if(prob(95))
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has tackled down [name]!</B>", M), 1)
|
||||
O.show_message(text("\red <B>[] has tackled [name]!</B>", M), 1)
|
||||
|
||||
if(Victim) Victim = null
|
||||
spawn(0)
|
||||
|
||||
step_away(src,M,15)
|
||||
sleep(3)
|
||||
step_away(src,M,15)
|
||||
|
||||
else
|
||||
drop_item()
|
||||
for(var/mob/O in viewers(src, null))
|
||||
|
||||
@@ -1,17 +1,26 @@
|
||||
/mob/living/carbon/metroid/verb/Feed(mob/M as mob in view(1))
|
||||
|
||||
/mob/living/carbon/metroid/verb/Feed()
|
||||
set category = "Metroid"
|
||||
set desc = "This will let you feed on any valid creature in the surrounding area. This should also be used to halt the feeding process."
|
||||
if(Victim)
|
||||
Feedstop()
|
||||
return
|
||||
|
||||
var/list/choices = list()
|
||||
for(var/mob/living/carbon/C in view(1,src))
|
||||
if(C!=src && !istype(C,/mob/living/carbon/metroid))
|
||||
choices += C
|
||||
|
||||
var/mob/living/carbon/M = input(src,"Who do you wish to feed on?") in null|choices
|
||||
if(!M) return
|
||||
|
||||
if(istype(M, /mob/living/carbon) && !istype(src, /mob/living/carbon/brain))
|
||||
if(!istype(M, /mob/living/carbon/metroid))
|
||||
if(stat != 2)
|
||||
if(health > -50)
|
||||
if(health > -70)
|
||||
|
||||
for(var/mob/living/carbon/metroid/met in view())
|
||||
if(met.Victim == M && met != src)
|
||||
src << "<i>The [M.name] is already feeding on this subject...</i>"
|
||||
src << "<i>The [met.name] is already feeding on this subject...</i>"
|
||||
return
|
||||
src << "\blue <i>I have latched onto the subject and begun feeding...</i>"
|
||||
M << "\red <b>The [src.name] has latched onto your head!</b>"
|
||||
@@ -28,54 +37,155 @@
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/metroid/proc/Feedon(var/mob/M)
|
||||
/mob/living/carbon/metroid/proc/Feedon(var/mob/living/carbon/M)
|
||||
Victim = M
|
||||
src.loc = M.loc
|
||||
canmove = 0
|
||||
var/lastnut = nutrition
|
||||
M << "\red You legs become paralyzed!"
|
||||
//if(M.client) M << "\red You legs become paralyzed!"
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
icon_state = "adult metroid eat"
|
||||
else
|
||||
icon_state = "baby metroid eat"
|
||||
|
||||
while(Victim && M.health > -50)
|
||||
M.canmove = 0
|
||||
if(prob(35) && M.client)
|
||||
while(Victim && M.health > -70)
|
||||
// M.canmove = 0
|
||||
canmove = 0
|
||||
if(prob(15) && M.client)
|
||||
M << "\red [pick("You can feel your body becoming weak!", \
|
||||
"You feel like you're about to die!", \
|
||||
"You feel every part of your body screaming in agony!", \
|
||||
"A low, rolling pain passes through your body!")]"
|
||||
"A low, rolling pain passes through your body!", \
|
||||
"Your body feels as if it's falling apart!", \
|
||||
"You feel extremely weak!", \
|
||||
"A sharp, deep pain bathes every inch of your body!")]"
|
||||
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
M.cloneloss += rand(5,10)
|
||||
if(M.health <= 0)
|
||||
M.toxloss += rand(5,10)
|
||||
else
|
||||
M.oxyloss += rand(10,20)
|
||||
Victim.cloneloss += rand(1,10)
|
||||
Victim.toxloss += rand(1,2)
|
||||
if(Victim.health <= 0)
|
||||
Victim.toxloss += rand(2,5)
|
||||
|
||||
if(toxloss > 0)
|
||||
toxloss -= 5
|
||||
|
||||
if(oxyloss > 0)
|
||||
oxyloss -= 5
|
||||
|
||||
if(bruteloss > 0)
|
||||
bruteloss -= 5
|
||||
|
||||
if(fireloss > 0)
|
||||
fireloss -= 5
|
||||
|
||||
if(cloneloss > 0)
|
||||
cloneloss -= 5
|
||||
|
||||
if(Victim)
|
||||
for(var/mob/living/carbon/metroid/Metroid in view(1,M))
|
||||
if(Metroid.Victim == M && Metroid != src)
|
||||
Metroid.Feedstop()
|
||||
|
||||
if(toxloss<0) toxloss = 0
|
||||
if(oxyloss<0) oxyloss = 0
|
||||
if(bruteloss<0) bruteloss = 0
|
||||
if(fireloss<0) fireloss = 0
|
||||
if(cloneloss<0) cloneloss = 0
|
||||
|
||||
nutrition += rand(5,20)
|
||||
if(nutrition >= lastnut + 50)
|
||||
if(nutrition >= lastnut + 100)
|
||||
if(prob(20))
|
||||
lastnut = nutrition
|
||||
powerlevel++
|
||||
if(powerlevel > 10)
|
||||
powerlevel = 10
|
||||
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(nutrition > 400)
|
||||
nutrition = 400
|
||||
if(nutrition > 1200)
|
||||
nutrition = 1200
|
||||
else
|
||||
if(nutrition > 300)
|
||||
nutrition = 300
|
||||
if(nutrition > 1000)
|
||||
nutrition = 1000
|
||||
|
||||
Victim.updatehealth()
|
||||
updatehealth()
|
||||
|
||||
sleep(rand(5,25))
|
||||
|
||||
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
icon_state = "adult metroid"
|
||||
else
|
||||
icon_state = "baby metroid"
|
||||
|
||||
Victim = null
|
||||
canmove = 1
|
||||
|
||||
if(M.health <= -50)
|
||||
if(M.health <= -70)
|
||||
M.canmove = 0
|
||||
src << "<i>This subject does not have a strong enough life energy anymore...</i>"
|
||||
if(client) src << "<i>This subject does not have a strong enough life energy anymore...</i>"
|
||||
else
|
||||
M.canmove = 1
|
||||
|
||||
src << "<i>I have stopped feeding...</i>"
|
||||
if(client) src << "<i>I have stopped feeding...</i>"
|
||||
|
||||
/mob/living/carbon/metroid/proc/Feedstop()
|
||||
if(Victim)
|
||||
Victim << "[src] has let go of your head!"
|
||||
if(Victim.client) Victim << "[src] has let go of your head!"
|
||||
Victim = null
|
||||
|
||||
/mob/living/carbon/metroid/proc/UpdateFeed(var/mob/M)
|
||||
if(Victim)
|
||||
if(Victim == M)
|
||||
loc = M.loc // simple "attach to head" effect!
|
||||
|
||||
|
||||
/mob/living/carbon/metroid/verb/Evolve()
|
||||
set category = "Metroid"
|
||||
set desc = "This will let you evolve from baby to adult metroid."
|
||||
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)
|
||||
new_metroid.mind_initialize(src)
|
||||
new_metroid.key = key
|
||||
new_metroid.nutrition = nutrition
|
||||
|
||||
new_metroid.a_intent = "hurt"
|
||||
new_metroid << "<B>You are now an adult Metroid.</B>"
|
||||
del(src)
|
||||
else
|
||||
src << "<i>I am not ready to evolve yet...</i>"
|
||||
else
|
||||
src << "<i>I have already evolved...</i>"
|
||||
|
||||
/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(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"))
|
||||
if("Yes")
|
||||
var/number = pick(2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,4)
|
||||
var/list/babies = list()
|
||||
for(var/i=1,i<=number,i++) // reproduce (has a small chance of producing 3 or 4 offspring)
|
||||
var/mob/living/carbon/metroid/M = new/mob/living/carbon/metroid(loc)
|
||||
M.nutrition = round(nutrition/number)
|
||||
step_away(M,src)
|
||||
babies += M
|
||||
|
||||
|
||||
var/mob/living/carbon/metroid/new_metroid = pick(babies)
|
||||
|
||||
new_metroid.mind_initialize(src)
|
||||
new_metroid.key = key
|
||||
|
||||
new_metroid.a_intent = "hurt"
|
||||
new_metroid << "<B>You are now a baby Metroid.</B>"
|
||||
del(src)
|
||||
else
|
||||
src << "<i>I am not ready to reproduce yet...</i>"
|
||||
else
|
||||
src << "<i>I am not old enough to reproduce yet...</i>"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -373,7 +373,7 @@
|
||||
|
||||
handle_regular_status_updates()
|
||||
|
||||
health = 100 - (oxyloss + toxloss + fireloss + bruteloss)
|
||||
health = 100 - (oxyloss + toxloss + fireloss + bruteloss + cloneloss)
|
||||
|
||||
if(oxyloss > 25) paralysis = max(paralysis, 3)
|
||||
|
||||
|
||||
@@ -108,6 +108,13 @@
|
||||
|
||||
/mob/living/carbon/monkey/bullet_act(flag)
|
||||
|
||||
if(prob(50))
|
||||
for(var/mob/living/carbon/metroid/M in view(1,src))
|
||||
if(M.Victim == src)
|
||||
M.bullet_act(flag)
|
||||
return
|
||||
|
||||
|
||||
if (flag == PROJECTILE_BULLET)
|
||||
if (stat != 2)
|
||||
take_organ_damage(60, 0)
|
||||
@@ -348,6 +355,66 @@
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/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)
|
||||
|
||||
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 [pick("bit","slashed")] []!</B>", src), 1)
|
||||
|
||||
if (weakened < power)
|
||||
weakened = power
|
||||
if (stuttering < power)
|
||||
stuttering = power
|
||||
if (stunned < power)
|
||||
stunned = power
|
||||
|
||||
if (prob(stunprob) && M.powerlevel >= 8)
|
||||
fireloss += M.powerlevel * rand(6,10)
|
||||
|
||||
|
||||
updatehealth()
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/Stat()
|
||||
..()
|
||||
statpanel("Status")
|
||||
@@ -481,6 +548,10 @@
|
||||
. = ..()
|
||||
if ((s_active && !( contents.Find(s_active) )))
|
||||
s_active.close(src)
|
||||
|
||||
for(var/mob/living/carbon/metroid/M in view(1,src))
|
||||
M.UpdateFeed(src)
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/verb/removeinternal()
|
||||
|
||||
@@ -62,6 +62,33 @@
|
||||
spawn(0)
|
||||
ainame(src)
|
||||
|
||||
/mob/living/silicon/ai/verb/pick_icon()
|
||||
set category = "AI Commands"
|
||||
set name = "Change AI Core Display"
|
||||
|
||||
//if(icon_state == initial(icon_state))
|
||||
var/icontype = input("Please, select a display!", "AI", null/*, null*/) in list("Clown", "HAL9000", "Monochrome", "Blue", "HAL9000 Mark2", "Inverted", "Firewall", "Green")
|
||||
if(icontype == "Clown")
|
||||
icon_state = "ai-clown2"
|
||||
else if(icontype == "HAL9000")
|
||||
icon_state = "ai-hal9000-2"
|
||||
else if(icontype == "Monochrome")
|
||||
icon_state = "ai-mono"
|
||||
else if(icontype == "Blue")
|
||||
icon_state = "ai"
|
||||
else if(icontype == "HAL9000 Mark2")
|
||||
icon_state = "ai-hal9000-3"
|
||||
else if(icontype == "Inverted")
|
||||
icon_state = "ai-u"
|
||||
else if(icontype == "Firewall")
|
||||
icon_state = "ai-magma"
|
||||
else//(icontype == "Green")
|
||||
icon_state = "ai-wierd"
|
||||
|
||||
//else
|
||||
//usr <<"You can only change your display once!"
|
||||
//return
|
||||
|
||||
/mob/living/silicon/ai/Stat()
|
||||
..()
|
||||
statpanel("Status")
|
||||
|
||||
@@ -249,7 +249,7 @@
|
||||
del(src)
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/proc/Metroidize()
|
||||
/mob/living/carbon/human/proc/Metroidize(adult as num, reproduce as num)
|
||||
if (monkeyizing)
|
||||
return
|
||||
for(var/obj/item/W in src)
|
||||
@@ -262,13 +262,40 @@
|
||||
for(var/t in organs)
|
||||
del(organs[t])
|
||||
|
||||
var/mob/living/carbon/metroid/new_metroid = new /mob/living/carbon/metroid (loc)
|
||||
if(reproduce)
|
||||
var/number = pick(2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,4)
|
||||
var/list/babies = list()
|
||||
for(var/i=1,i<=number,i++) // reproduce (has a small chance of producing 3 or 4 offspring)
|
||||
var/mob/living/carbon/metroid/M = new/mob/living/carbon/metroid(loc)
|
||||
M.nutrition = round(nutrition/number)
|
||||
step_away(M,src)
|
||||
babies += M
|
||||
|
||||
new_metroid.mind_initialize(src)
|
||||
new_metroid.key = key
|
||||
|
||||
new_metroid.a_intent = "hurt"
|
||||
new_metroid << "<B>You are now a Metroid.</B>"
|
||||
var/mob/living/carbon/metroid/new_metroid = pick(babies)
|
||||
|
||||
new_metroid.mind_initialize(src)
|
||||
new_metroid.key = key
|
||||
|
||||
new_metroid.a_intent = "hurt"
|
||||
new_metroid << "<B>You are now a baby Metroid.</B>"
|
||||
|
||||
if(adult)
|
||||
var/mob/living/carbon/metroid/adult/new_metroid = new /mob/living/carbon/metroid/adult (loc)
|
||||
new_metroid.mind_initialize(src)
|
||||
new_metroid.key = key
|
||||
|
||||
new_metroid.a_intent = "hurt"
|
||||
new_metroid << "<B>You are now an adult Metroid.</B>"
|
||||
|
||||
else
|
||||
var/mob/living/carbon/metroid/new_metroid = new /mob/living/carbon/metroid (loc)
|
||||
|
||||
new_metroid.mind_initialize(src)
|
||||
new_metroid.key = key
|
||||
|
||||
new_metroid.a_intent = "hurt"
|
||||
new_metroid << "<B>You are now a baby Metroid.</B>"
|
||||
spawn(0)//To prevent the proc from returning null.
|
||||
del(src)
|
||||
return
|
||||
Reference in New Issue
Block a user