mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +01:00
Metroid-be-gone
This commit is contained in:
+27
-27
@@ -1,28 +1,28 @@
|
||||
/mob/living/carbon/slime/death(gibbed)
|
||||
if(!gibbed)
|
||||
if(is_adult)
|
||||
var/mob/living/carbon/slime/M = new /mob/living/carbon/slime(loc)
|
||||
M.colour = colour
|
||||
M.rabid = 1
|
||||
is_adult = 0
|
||||
maxHealth = 150
|
||||
revive()
|
||||
regenerate_icons()
|
||||
number = rand(1, 1000)
|
||||
name = "[colour] [is_adult ? "adult" : "baby"] slime ([number])"
|
||||
return
|
||||
|
||||
if(stat == DEAD) return
|
||||
stat = DEAD
|
||||
icon_state = "[colour] baby slime dead"
|
||||
overlays.len = 0
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("<b>The [name]</b> seizes up and falls limp...", 1) //ded -- Urist
|
||||
|
||||
update_canmove()
|
||||
if(blind) blind.layer = 0
|
||||
|
||||
if(ticker && ticker.mode)
|
||||
ticker.mode.check_win()
|
||||
|
||||
/mob/living/carbon/slime/death(gibbed)
|
||||
if(!gibbed)
|
||||
if(is_adult)
|
||||
var/mob/living/carbon/slime/M = new /mob/living/carbon/slime(loc)
|
||||
M.colour = colour
|
||||
M.rabid = 1
|
||||
is_adult = 0
|
||||
maxHealth = 150
|
||||
revive()
|
||||
regenerate_icons()
|
||||
number = rand(1, 1000)
|
||||
name = "[colour] [is_adult ? "adult" : "baby"] slime ([number])"
|
||||
return
|
||||
|
||||
if(stat == DEAD) return
|
||||
stat = DEAD
|
||||
icon_state = "[colour] baby slime dead"
|
||||
overlays.len = 0
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("<b>The [name]</b> seizes up and falls limp...", 1) //ded -- Urist
|
||||
|
||||
update_canmove()
|
||||
if(blind) blind.layer = 0
|
||||
|
||||
if(ticker && ticker.mode)
|
||||
ticker.mode.check_win()
|
||||
|
||||
return ..(gibbed)
|
||||
+61
-61
@@ -1,62 +1,62 @@
|
||||
/mob/living/carbon/slime/emote(var/act)
|
||||
|
||||
|
||||
if (findtext(act, "-", 1, null))
|
||||
var/t1 = findtext(act, "-", 1, null)
|
||||
//param = copytext(act, t1 + 1, length(act) + 1)
|
||||
act = copytext(act, 1, t1)
|
||||
|
||||
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
|
||||
act = copytext(act,1,length(act))
|
||||
|
||||
var/m_type = 1
|
||||
var/message
|
||||
|
||||
switch(act) //Alphabetical please
|
||||
if("bounce")
|
||||
message = "<B>The [src.name]</B> bounces in place."
|
||||
m_type = 1
|
||||
|
||||
if("jiggle")
|
||||
message = "<B>The [src.name]</B> jiggles!"
|
||||
m_type = 1
|
||||
|
||||
if("light")
|
||||
message = "<B>The [src.name]</B> lights up for a bit, then stops."
|
||||
m_type = 1
|
||||
|
||||
if("moan")
|
||||
message = "<B>The [src.name]</B> moans."
|
||||
m_type = 2
|
||||
|
||||
if("shiver")
|
||||
message = "<B>The [src.name]</B> shivers."
|
||||
m_type = 2
|
||||
|
||||
if("sway")
|
||||
message = "<B>The [src.name]</B> sways around dizzily."
|
||||
m_type = 1
|
||||
|
||||
if("twitch")
|
||||
message = "<B>The [src.name]</B> twitches."
|
||||
m_type = 1
|
||||
|
||||
if("vibrate")
|
||||
message = "<B>The [src.name]</B> vibrates!"
|
||||
m_type = 1
|
||||
|
||||
if ("help") //This is an exception
|
||||
src << "Help for slime emotes. You can use these emotes with say \"*emote\":\n\nbounce, jiggle, light, moan, shiver, sway, twitch, vibrate"
|
||||
|
||||
else
|
||||
src << "\blue Unusable emote '[act]'. Say *help for a list."
|
||||
if ((message && src.stat == 0))
|
||||
if (m_type & 1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(message, m_type)
|
||||
//Foreach goto(703)
|
||||
else
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message(message, m_type)
|
||||
//Foreach goto(746)
|
||||
/mob/living/carbon/slime/emote(var/act)
|
||||
|
||||
|
||||
if (findtext(act, "-", 1, null))
|
||||
var/t1 = findtext(act, "-", 1, null)
|
||||
//param = copytext(act, t1 + 1, length(act) + 1)
|
||||
act = copytext(act, 1, t1)
|
||||
|
||||
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
|
||||
act = copytext(act,1,length(act))
|
||||
|
||||
var/m_type = 1
|
||||
var/message
|
||||
|
||||
switch(act) //Alphabetical please
|
||||
if("bounce")
|
||||
message = "<B>The [src.name]</B> bounces in place."
|
||||
m_type = 1
|
||||
|
||||
if("jiggle")
|
||||
message = "<B>The [src.name]</B> jiggles!"
|
||||
m_type = 1
|
||||
|
||||
if("light")
|
||||
message = "<B>The [src.name]</B> lights up for a bit, then stops."
|
||||
m_type = 1
|
||||
|
||||
if("moan")
|
||||
message = "<B>The [src.name]</B> moans."
|
||||
m_type = 2
|
||||
|
||||
if("shiver")
|
||||
message = "<B>The [src.name]</B> shivers."
|
||||
m_type = 2
|
||||
|
||||
if("sway")
|
||||
message = "<B>The [src.name]</B> sways around dizzily."
|
||||
m_type = 1
|
||||
|
||||
if("twitch")
|
||||
message = "<B>The [src.name]</B> twitches."
|
||||
m_type = 1
|
||||
|
||||
if("vibrate")
|
||||
message = "<B>The [src.name]</B> vibrates!"
|
||||
m_type = 1
|
||||
|
||||
if ("help") //This is an exception
|
||||
src << "Help for slime emotes. You can use these emotes with say \"*emote\":\n\nbounce, jiggle, light, moan, shiver, sway, twitch, vibrate"
|
||||
|
||||
else
|
||||
src << "\blue Unusable emote '[act]'. Say *help for a list."
|
||||
if ((message && src.stat == 0))
|
||||
if (m_type & 1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(message, m_type)
|
||||
//Foreach goto(703)
|
||||
else
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message(message, m_type)
|
||||
//Foreach goto(746)
|
||||
return
|
||||
+36
-36
@@ -1,37 +1,37 @@
|
||||
/mob/living/carbon/slime/examine()
|
||||
set src in oview()
|
||||
|
||||
if(!usr || !src) return
|
||||
if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) )
|
||||
usr << "<span class='notice'>Something is there but you can't see it.</span>"
|
||||
return
|
||||
|
||||
var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n"
|
||||
if (src.stat == DEAD)
|
||||
msg += "<span class='deadsay'>It is limp and unresponsive.</span>\n"
|
||||
else
|
||||
if (src.getBruteLoss())
|
||||
msg += "<span class='warning'>"
|
||||
if (src.getBruteLoss() < 40)
|
||||
msg += "It has some punctures in its flesh!"
|
||||
else
|
||||
msg += "<B>It has severe punctures and tears in its flesh!</B>"
|
||||
msg += "</span>\n"
|
||||
|
||||
switch(powerlevel)
|
||||
|
||||
if(2 to 3)
|
||||
msg += "It is flickering gently with a little electrical activity.\n"
|
||||
|
||||
if(4 to 5)
|
||||
msg += "It is glowing gently with moderate levels of electrical activity.\n"
|
||||
|
||||
if(6 to 9)
|
||||
msg += "<span class='warning'>It is glowing brightly with high levels of electrical activity.</span>\n"
|
||||
|
||||
if(10)
|
||||
msg += "<span class='warning'><B>It is radiating with massive levels of electrical activity!</B></span>\n"
|
||||
|
||||
msg += "*---------*</span>"
|
||||
usr << msg
|
||||
/mob/living/carbon/slime/examine()
|
||||
set src in oview()
|
||||
|
||||
if(!usr || !src) return
|
||||
if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) )
|
||||
usr << "<span class='notice'>Something is there but you can't see it.</span>"
|
||||
return
|
||||
|
||||
var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n"
|
||||
if (src.stat == DEAD)
|
||||
msg += "<span class='deadsay'>It is limp and unresponsive.</span>\n"
|
||||
else
|
||||
if (src.getBruteLoss())
|
||||
msg += "<span class='warning'>"
|
||||
if (src.getBruteLoss() < 40)
|
||||
msg += "It has some punctures in its flesh!"
|
||||
else
|
||||
msg += "<B>It has severe punctures and tears in its flesh!</B>"
|
||||
msg += "</span>\n"
|
||||
|
||||
switch(powerlevel)
|
||||
|
||||
if(2 to 3)
|
||||
msg += "It is flickering gently with a little electrical activity.\n"
|
||||
|
||||
if(4 to 5)
|
||||
msg += "It is glowing gently with moderate levels of electrical activity.\n"
|
||||
|
||||
if(6 to 9)
|
||||
msg += "<span class='warning'>It is glowing brightly with high levels of electrical activity.</span>\n"
|
||||
|
||||
if(10)
|
||||
msg += "<span class='warning'><B>It is radiating with massive levels of electrical activity!</B></span>\n"
|
||||
|
||||
msg += "*---------*</span>"
|
||||
usr << msg
|
||||
return
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
/mob/living/carbon/slime/proc/regular_hud_updates()
|
||||
/mob/living/carbon/slime/proc/regular_hud_updates()
|
||||
return
|
||||
+568
-568
File diff suppressed because it is too large
Load Diff
+4
-4
@@ -1,4 +1,4 @@
|
||||
/mob/living/carbon/slime/Login()
|
||||
..()
|
||||
update_hud()
|
||||
return
|
||||
/mob/living/carbon/slime/Login()
|
||||
..()
|
||||
update_hud()
|
||||
return
|
||||
+1030
-1030
File diff suppressed because it is too large
Load Diff
+228
-228
@@ -1,229 +1,229 @@
|
||||
/mob/living/carbon/slime/verb/Feed()
|
||||
set category = "Slime"
|
||||
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
|
||||
|
||||
if(stat)
|
||||
src << "<i>I must be conscious to do this...</i>"
|
||||
return
|
||||
|
||||
var/list/choices = list()
|
||||
for(var/mob/living/C in view(1,src))
|
||||
if(C!=src && !istype(C,/mob/living/carbon/slime) && Adjacent(C))
|
||||
choices += C
|
||||
|
||||
var/mob/living/M = input(src,"Who do you wish to feed on?") in null|choices
|
||||
if(!M) return
|
||||
if(Adjacent(M))
|
||||
|
||||
if(!istype(src, /mob/living/carbon/brain))
|
||||
if(!istype(M, /mob/living/carbon/slime))
|
||||
if(stat != 2)
|
||||
if(health > -70)
|
||||
|
||||
for(var/mob/living/carbon/slime/met in view())
|
||||
if(met.Victim == M && met != src)
|
||||
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>"
|
||||
Feedon(M)
|
||||
|
||||
else
|
||||
src << "<i>This subject does not have a strong enough life energy...</i>"
|
||||
else
|
||||
src << "<i>This subject does not have an edible life energy...</i>"
|
||||
else
|
||||
src << "<i>I must not feed on my brothers...</i>"
|
||||
else
|
||||
src << "<i>This subject does not have an edible life energy...</i>"
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/slime/proc/Feedon(var/mob/living/M)
|
||||
Victim = M
|
||||
src.loc = M.loc
|
||||
canmove = 0
|
||||
anchored = 1
|
||||
var/lastnut = nutrition
|
||||
var/fed_succesfully = 0
|
||||
if(is_adult)
|
||||
icon_state = "[colour] adult slime eat"
|
||||
else
|
||||
icon_state = "[colour] baby slime eat"
|
||||
|
||||
while(Victim && M.health > -70 && stat != 2)
|
||||
canmove = 0
|
||||
|
||||
if(Adjacent(M))
|
||||
loc = M.loc
|
||||
|
||||
if(prob(15) && M.client && istype(M, /mob/living/carbon))
|
||||
M << "<span class='danger'>[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!", \
|
||||
"Your body feels as if it's falling apart!", \
|
||||
"You feel extremely weak!", \
|
||||
"A sharp, deep pain bathes every inch of your body!")]</span>"
|
||||
|
||||
if(istype(M, /mob/living/carbon))
|
||||
Victim.adjustCloneLoss(rand(5,6))
|
||||
Victim.adjustToxLoss(rand(1,2))
|
||||
if(Victim.health <= 0)
|
||||
Victim.adjustToxLoss(rand(2,4))
|
||||
|
||||
fed_succesfully = 1
|
||||
|
||||
else if(istype(M, /mob/living/simple_animal))
|
||||
Victim.adjustBruteLoss(is_adult ? rand(7, 15) : rand(4, 12))
|
||||
fed_succesfully = 1
|
||||
|
||||
else
|
||||
if(prob(25))
|
||||
src << "<span class='warning'>[pick("This subject is incompatable", \
|
||||
"This subject does not have a life energy", "This subject is empty", \
|
||||
"I am not satisified", "I can not feed from this subject", \
|
||||
"I do not feel nourished", "This subject is not food")]...</span>"
|
||||
|
||||
if(fed_succesfully)
|
||||
//I have no idea why this is not in handle_nutrition()
|
||||
nutrition += rand(15,30)
|
||||
if(nutrition >= lastnut + 50)
|
||||
if(prob(80))
|
||||
lastnut = nutrition
|
||||
powerlevel++
|
||||
if(powerlevel > 10)
|
||||
powerlevel = 10
|
||||
adjustToxLoss(-10)
|
||||
|
||||
//Heal yourself.
|
||||
adjustOxyLoss(-10)
|
||||
adjustBruteLoss(-10)
|
||||
adjustFireLoss(-10)
|
||||
adjustCloneLoss(-10)
|
||||
|
||||
updatehealth()
|
||||
if(Victim)
|
||||
Victim.updatehealth()
|
||||
|
||||
sleep(rand(15,45))
|
||||
|
||||
else
|
||||
break
|
||||
|
||||
if(stat == 2)
|
||||
if(!is_adult)
|
||||
icon_state = "[colour] baby slime dead"
|
||||
|
||||
else
|
||||
if(is_adult)
|
||||
icon_state = "[colour] adult slime"
|
||||
else
|
||||
icon_state = "[colour] baby slime"
|
||||
|
||||
canmove = 1
|
||||
anchored = 0
|
||||
|
||||
if(M)
|
||||
if(M.health <= -70)
|
||||
M.canmove = 0
|
||||
if(!client)
|
||||
if(Victim && !rabid && !attacked)
|
||||
if(Victim.LAssailant && Victim.LAssailant != Victim)
|
||||
if(prob(50))
|
||||
if(!(Victim.LAssailant in Friends))
|
||||
Friends[Victim.LAssailant] = 1
|
||||
//Friends.Add(Victim.LAssailant) // no idea why i was using the |= operator
|
||||
else
|
||||
++Friends[Victim.LAssailant]
|
||||
|
||||
|
||||
if(M.client && istype(src, /mob/living/carbon/human))
|
||||
if(prob(85))
|
||||
rabid = 1 // UUUNNBGHHHH GONNA EAT JUUUUUU
|
||||
|
||||
if(client) src << "<i>This subject does not have a strong enough life energy anymore...</i>"
|
||||
else
|
||||
M.canmove = 1
|
||||
|
||||
if(client) src << "<i>I have stopped feeding...</i>"
|
||||
else
|
||||
if(client) src << "<i>I have stopped feeding...</i>"
|
||||
|
||||
Victim = null
|
||||
|
||||
/mob/living/carbon/slime/proc/Feedstop()
|
||||
if(Victim)
|
||||
if(Victim.client) Victim << "[src] has let go of your head!"
|
||||
Victim = null
|
||||
|
||||
/mob/living/carbon/slime/proc/UpdateFeed(var/mob/M)
|
||||
if(Victim)
|
||||
if(Victim == M)
|
||||
loc = M.loc // simple "attach to head" effect!
|
||||
|
||||
|
||||
/mob/living/carbon/slime/verb/Evolve()
|
||||
set category = "Slime"
|
||||
set desc = "This will let you evolve from baby to adult slime."
|
||||
|
||||
if(stat)
|
||||
src << "<i>I must be conscious to do this...</i>"
|
||||
return
|
||||
if(!is_adult)
|
||||
if(amount_grown >= 10)
|
||||
is_adult = 1
|
||||
maxHealth = 200
|
||||
amount_grown = 0
|
||||
regenerate_icons()
|
||||
name = text("[colour] [is_adult ? "adult" : "baby"] slime ([number])")
|
||||
else
|
||||
src << "<i>I am not ready to evolve yet...</i>"
|
||||
else
|
||||
src << "<i>I have already evolved...</i>"
|
||||
|
||||
/mob/living/carbon/slime/verb/Reproduce()
|
||||
set category = "Slime"
|
||||
set desc = "This will make you split into four Slimes."
|
||||
|
||||
if(stat)
|
||||
src << "<i>I must be conscious to do this...</i>"
|
||||
return
|
||||
|
||||
if(is_adult)
|
||||
if(amount_grown >= 10)
|
||||
if(stat)
|
||||
src << "<i>I must be conscious to do this...</i>"
|
||||
return
|
||||
|
||||
var/list/babies = list()
|
||||
var/new_nutrition = round(nutrition * 0.9)
|
||||
var/new_powerlevel = round(powerlevel / 4)
|
||||
for(var/i=1,i<=4,i++)
|
||||
var/mob/living/carbon/slime/M = new /mob/living/carbon/slime/(loc)
|
||||
if(prob(mutation_chance))
|
||||
M.colour = slime_mutation[rand(1,4)]
|
||||
else
|
||||
M.colour = colour
|
||||
if(ckey) M.nutrition = new_nutrition //Player slimes are more robust at spliting. Once an oversight of poor copypasta, now a feature!
|
||||
M.powerlevel = new_powerlevel
|
||||
if(i != 1) step_away(M,src)
|
||||
M.Friends = Friends.Copy()
|
||||
babies += M
|
||||
feedback_add_details("slime_babies_born","slimebirth_[replacetext(M.colour," ","_")]")
|
||||
|
||||
var/mob/living/carbon/slime/new_slime = pick(babies)
|
||||
new_slime.a_intent = "harm"
|
||||
new_slime.universal_speak = universal_speak
|
||||
if(src.mind)
|
||||
src.mind.transfer_to(new_slime)
|
||||
else
|
||||
new_slime.key = src.key
|
||||
qdel(src)
|
||||
else
|
||||
src << "<i>I am not ready to reproduce yet...</i>"
|
||||
else
|
||||
/mob/living/carbon/slime/verb/Feed()
|
||||
set category = "Slime"
|
||||
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
|
||||
|
||||
if(stat)
|
||||
src << "<i>I must be conscious to do this...</i>"
|
||||
return
|
||||
|
||||
var/list/choices = list()
|
||||
for(var/mob/living/C in view(1,src))
|
||||
if(C!=src && !istype(C,/mob/living/carbon/slime) && Adjacent(C))
|
||||
choices += C
|
||||
|
||||
var/mob/living/M = input(src,"Who do you wish to feed on?") in null|choices
|
||||
if(!M) return
|
||||
if(Adjacent(M))
|
||||
|
||||
if(!istype(src, /mob/living/carbon/brain))
|
||||
if(!istype(M, /mob/living/carbon/slime))
|
||||
if(stat != 2)
|
||||
if(health > -70)
|
||||
|
||||
for(var/mob/living/carbon/slime/met in view())
|
||||
if(met.Victim == M && met != src)
|
||||
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>"
|
||||
Feedon(M)
|
||||
|
||||
else
|
||||
src << "<i>This subject does not have a strong enough life energy...</i>"
|
||||
else
|
||||
src << "<i>This subject does not have an edible life energy...</i>"
|
||||
else
|
||||
src << "<i>I must not feed on my brothers...</i>"
|
||||
else
|
||||
src << "<i>This subject does not have an edible life energy...</i>"
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/slime/proc/Feedon(var/mob/living/M)
|
||||
Victim = M
|
||||
src.loc = M.loc
|
||||
canmove = 0
|
||||
anchored = 1
|
||||
var/lastnut = nutrition
|
||||
var/fed_succesfully = 0
|
||||
if(is_adult)
|
||||
icon_state = "[colour] adult slime eat"
|
||||
else
|
||||
icon_state = "[colour] baby slime eat"
|
||||
|
||||
while(Victim && M.health > -70 && stat != 2)
|
||||
canmove = 0
|
||||
|
||||
if(Adjacent(M))
|
||||
loc = M.loc
|
||||
|
||||
if(prob(15) && M.client && istype(M, /mob/living/carbon))
|
||||
M << "<span class='danger'>[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!", \
|
||||
"Your body feels as if it's falling apart!", \
|
||||
"You feel extremely weak!", \
|
||||
"A sharp, deep pain bathes every inch of your body!")]</span>"
|
||||
|
||||
if(istype(M, /mob/living/carbon))
|
||||
Victim.adjustCloneLoss(rand(5,6))
|
||||
Victim.adjustToxLoss(rand(1,2))
|
||||
if(Victim.health <= 0)
|
||||
Victim.adjustToxLoss(rand(2,4))
|
||||
|
||||
fed_succesfully = 1
|
||||
|
||||
else if(istype(M, /mob/living/simple_animal))
|
||||
Victim.adjustBruteLoss(is_adult ? rand(7, 15) : rand(4, 12))
|
||||
fed_succesfully = 1
|
||||
|
||||
else
|
||||
if(prob(25))
|
||||
src << "<span class='warning'>[pick("This subject is incompatable", \
|
||||
"This subject does not have a life energy", "This subject is empty", \
|
||||
"I am not satisified", "I can not feed from this subject", \
|
||||
"I do not feel nourished", "This subject is not food")]...</span>"
|
||||
|
||||
if(fed_succesfully)
|
||||
//I have no idea why this is not in handle_nutrition()
|
||||
nutrition += rand(15,30)
|
||||
if(nutrition >= lastnut + 50)
|
||||
if(prob(80))
|
||||
lastnut = nutrition
|
||||
powerlevel++
|
||||
if(powerlevel > 10)
|
||||
powerlevel = 10
|
||||
adjustToxLoss(-10)
|
||||
|
||||
//Heal yourself.
|
||||
adjustOxyLoss(-10)
|
||||
adjustBruteLoss(-10)
|
||||
adjustFireLoss(-10)
|
||||
adjustCloneLoss(-10)
|
||||
|
||||
updatehealth()
|
||||
if(Victim)
|
||||
Victim.updatehealth()
|
||||
|
||||
sleep(rand(15,45))
|
||||
|
||||
else
|
||||
break
|
||||
|
||||
if(stat == 2)
|
||||
if(!is_adult)
|
||||
icon_state = "[colour] baby slime dead"
|
||||
|
||||
else
|
||||
if(is_adult)
|
||||
icon_state = "[colour] adult slime"
|
||||
else
|
||||
icon_state = "[colour] baby slime"
|
||||
|
||||
canmove = 1
|
||||
anchored = 0
|
||||
|
||||
if(M)
|
||||
if(M.health <= -70)
|
||||
M.canmove = 0
|
||||
if(!client)
|
||||
if(Victim && !rabid && !attacked)
|
||||
if(Victim.LAssailant && Victim.LAssailant != Victim)
|
||||
if(prob(50))
|
||||
if(!(Victim.LAssailant in Friends))
|
||||
Friends[Victim.LAssailant] = 1
|
||||
//Friends.Add(Victim.LAssailant) // no idea why i was using the |= operator
|
||||
else
|
||||
++Friends[Victim.LAssailant]
|
||||
|
||||
|
||||
if(M.client && istype(src, /mob/living/carbon/human))
|
||||
if(prob(85))
|
||||
rabid = 1 // UUUNNBGHHHH GONNA EAT JUUUUUU
|
||||
|
||||
if(client) src << "<i>This subject does not have a strong enough life energy anymore...</i>"
|
||||
else
|
||||
M.canmove = 1
|
||||
|
||||
if(client) src << "<i>I have stopped feeding...</i>"
|
||||
else
|
||||
if(client) src << "<i>I have stopped feeding...</i>"
|
||||
|
||||
Victim = null
|
||||
|
||||
/mob/living/carbon/slime/proc/Feedstop()
|
||||
if(Victim)
|
||||
if(Victim.client) Victim << "[src] has let go of your head!"
|
||||
Victim = null
|
||||
|
||||
/mob/living/carbon/slime/proc/UpdateFeed(var/mob/M)
|
||||
if(Victim)
|
||||
if(Victim == M)
|
||||
loc = M.loc // simple "attach to head" effect!
|
||||
|
||||
|
||||
/mob/living/carbon/slime/verb/Evolve()
|
||||
set category = "Slime"
|
||||
set desc = "This will let you evolve from baby to adult slime."
|
||||
|
||||
if(stat)
|
||||
src << "<i>I must be conscious to do this...</i>"
|
||||
return
|
||||
if(!is_adult)
|
||||
if(amount_grown >= 10)
|
||||
is_adult = 1
|
||||
maxHealth = 200
|
||||
amount_grown = 0
|
||||
regenerate_icons()
|
||||
name = text("[colour] [is_adult ? "adult" : "baby"] slime ([number])")
|
||||
else
|
||||
src << "<i>I am not ready to evolve yet...</i>"
|
||||
else
|
||||
src << "<i>I have already evolved...</i>"
|
||||
|
||||
/mob/living/carbon/slime/verb/Reproduce()
|
||||
set category = "Slime"
|
||||
set desc = "This will make you split into four Slimes."
|
||||
|
||||
if(stat)
|
||||
src << "<i>I must be conscious to do this...</i>"
|
||||
return
|
||||
|
||||
if(is_adult)
|
||||
if(amount_grown >= 10)
|
||||
if(stat)
|
||||
src << "<i>I must be conscious to do this...</i>"
|
||||
return
|
||||
|
||||
var/list/babies = list()
|
||||
var/new_nutrition = round(nutrition * 0.9)
|
||||
var/new_powerlevel = round(powerlevel / 4)
|
||||
for(var/i=1,i<=4,i++)
|
||||
var/mob/living/carbon/slime/M = new /mob/living/carbon/slime/(loc)
|
||||
if(prob(mutation_chance))
|
||||
M.colour = slime_mutation[rand(1,4)]
|
||||
else
|
||||
M.colour = colour
|
||||
if(ckey) M.nutrition = new_nutrition //Player slimes are more robust at spliting. Once an oversight of poor copypasta, now a feature!
|
||||
M.powerlevel = new_powerlevel
|
||||
if(i != 1) step_away(M,src)
|
||||
M.Friends = Friends.Copy()
|
||||
babies += M
|
||||
feedback_add_details("slime_babies_born","slimebirth_[replacetext(M.colour," ","_")]")
|
||||
|
||||
var/mob/living/carbon/slime/new_slime = pick(babies)
|
||||
new_slime.a_intent = "harm"
|
||||
new_slime.universal_speak = universal_speak
|
||||
if(src.mind)
|
||||
src.mind.transfer_to(new_slime)
|
||||
else
|
||||
new_slime.key = src.key
|
||||
qdel(src)
|
||||
else
|
||||
src << "<i>I am not ready to reproduce yet...</i>"
|
||||
else
|
||||
src << "<i>I am not old enough to reproduce yet...</i>"
|
||||
+21
-21
@@ -1,21 +1,21 @@
|
||||
/mob/living/carbon/slime/say(var/message)
|
||||
if (silent)
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/slime/say_quote(var/text)
|
||||
var/ending = copytext(text, length(text))
|
||||
|
||||
if (ending == "?")
|
||||
return "telepathically asks, \"[text]\"";
|
||||
else if (ending == "!")
|
||||
return "telepathically cries, \"[text]\"";
|
||||
|
||||
return "telepathically chirps, \"[text]\"";
|
||||
|
||||
/mob/living/carbon/slime/say_understands(var/other)
|
||||
if (istype(other, /mob/living/carbon/slime))
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/slime/say(var/message)
|
||||
if (silent)
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/slime/say_quote(var/text)
|
||||
var/ending = copytext(text, length(text))
|
||||
|
||||
if (ending == "?")
|
||||
return "telepathically asks, \"[text]\"";
|
||||
else if (ending == "!")
|
||||
return "telepathically cries, \"[text]\"";
|
||||
|
||||
return "telepathically chirps, \"[text]\"";
|
||||
|
||||
/mob/living/carbon/slime/say_understands(var/other)
|
||||
if (istype(other, /mob/living/carbon/slime))
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
+78
-78
@@ -1,79 +1,79 @@
|
||||
proc/mutation_table(var/colour)
|
||||
var/list/slime_mutation[4]
|
||||
switch(colour)
|
||||
//Tier 1
|
||||
if("grey")
|
||||
slime_mutation[1] = "orange"
|
||||
slime_mutation[2] = "metal"
|
||||
slime_mutation[3] = "blue"
|
||||
slime_mutation[4] = "purple"
|
||||
//Tier 2
|
||||
if("purple")
|
||||
slime_mutation[1] = "dark purple"
|
||||
slime_mutation[2] = "dark blue"
|
||||
slime_mutation[3] = "green"
|
||||
slime_mutation[4] = "green"
|
||||
if("metal")
|
||||
slime_mutation[1] = "silver"
|
||||
slime_mutation[2] = "yellow"
|
||||
slime_mutation[3] = "gold"
|
||||
slime_mutation[4] = "gold"
|
||||
if("orange")
|
||||
slime_mutation[1] = "dark purple"
|
||||
slime_mutation[2] = "yellow"
|
||||
slime_mutation[3] = "red"
|
||||
slime_mutation[4] = "red"
|
||||
if("blue")
|
||||
slime_mutation[1] = "dark blue"
|
||||
slime_mutation[2] = "silver"
|
||||
slime_mutation[3] = "pink"
|
||||
slime_mutation[4] = "pink"
|
||||
//Tier 3
|
||||
if("dark blue")
|
||||
slime_mutation[1] = "purple"
|
||||
slime_mutation[2] = "blue"
|
||||
slime_mutation[3] = "cerulean"
|
||||
slime_mutation[4] = "cerulean"
|
||||
if("dark purple")
|
||||
slime_mutation[1] = "purple"
|
||||
slime_mutation[2] = "orange"
|
||||
slime_mutation[3] = "sepia"
|
||||
slime_mutation[4] = "sepia"
|
||||
if("yellow")
|
||||
slime_mutation[1] = "metal"
|
||||
slime_mutation[2] = "orange"
|
||||
slime_mutation[3] = "bluespace"
|
||||
slime_mutation[4] = "bluespace"
|
||||
if("silver")
|
||||
slime_mutation[1] = "metal"
|
||||
slime_mutation[2] = "blue"
|
||||
slime_mutation[3] = "pyrite"
|
||||
slime_mutation[4] = "pyrite"
|
||||
//Tier 4
|
||||
if("pink")
|
||||
slime_mutation[1] = "pink"
|
||||
slime_mutation[2] = "pink"
|
||||
slime_mutation[3] = "light pink"
|
||||
slime_mutation[4] = "light pink"
|
||||
if("red")
|
||||
slime_mutation[1] = "red"
|
||||
slime_mutation[2] = "red"
|
||||
slime_mutation[3] = "oil"
|
||||
slime_mutation[4] = "oil"
|
||||
if("gold")
|
||||
slime_mutation[1] = "gold"
|
||||
slime_mutation[2] = "gold"
|
||||
slime_mutation[3] = "adamantine"
|
||||
slime_mutation[4] = "adamantine"
|
||||
if("green")
|
||||
slime_mutation[1] = "green"
|
||||
slime_mutation[2] = "green"
|
||||
slime_mutation[3] = "black"
|
||||
slime_mutation[4] = "black"
|
||||
// Tier 5
|
||||
else
|
||||
slime_mutation[1] = colour
|
||||
slime_mutation[2] = colour
|
||||
slime_mutation[3] = colour
|
||||
slime_mutation[4] = colour
|
||||
proc/mutation_table(var/colour)
|
||||
var/list/slime_mutation[4]
|
||||
switch(colour)
|
||||
//Tier 1
|
||||
if("grey")
|
||||
slime_mutation[1] = "orange"
|
||||
slime_mutation[2] = "metal"
|
||||
slime_mutation[3] = "blue"
|
||||
slime_mutation[4] = "purple"
|
||||
//Tier 2
|
||||
if("purple")
|
||||
slime_mutation[1] = "dark purple"
|
||||
slime_mutation[2] = "dark blue"
|
||||
slime_mutation[3] = "green"
|
||||
slime_mutation[4] = "green"
|
||||
if("metal")
|
||||
slime_mutation[1] = "silver"
|
||||
slime_mutation[2] = "yellow"
|
||||
slime_mutation[3] = "gold"
|
||||
slime_mutation[4] = "gold"
|
||||
if("orange")
|
||||
slime_mutation[1] = "dark purple"
|
||||
slime_mutation[2] = "yellow"
|
||||
slime_mutation[3] = "red"
|
||||
slime_mutation[4] = "red"
|
||||
if("blue")
|
||||
slime_mutation[1] = "dark blue"
|
||||
slime_mutation[2] = "silver"
|
||||
slime_mutation[3] = "pink"
|
||||
slime_mutation[4] = "pink"
|
||||
//Tier 3
|
||||
if("dark blue")
|
||||
slime_mutation[1] = "purple"
|
||||
slime_mutation[2] = "blue"
|
||||
slime_mutation[3] = "cerulean"
|
||||
slime_mutation[4] = "cerulean"
|
||||
if("dark purple")
|
||||
slime_mutation[1] = "purple"
|
||||
slime_mutation[2] = "orange"
|
||||
slime_mutation[3] = "sepia"
|
||||
slime_mutation[4] = "sepia"
|
||||
if("yellow")
|
||||
slime_mutation[1] = "metal"
|
||||
slime_mutation[2] = "orange"
|
||||
slime_mutation[3] = "bluespace"
|
||||
slime_mutation[4] = "bluespace"
|
||||
if("silver")
|
||||
slime_mutation[1] = "metal"
|
||||
slime_mutation[2] = "blue"
|
||||
slime_mutation[3] = "pyrite"
|
||||
slime_mutation[4] = "pyrite"
|
||||
//Tier 4
|
||||
if("pink")
|
||||
slime_mutation[1] = "pink"
|
||||
slime_mutation[2] = "pink"
|
||||
slime_mutation[3] = "light pink"
|
||||
slime_mutation[4] = "light pink"
|
||||
if("red")
|
||||
slime_mutation[1] = "red"
|
||||
slime_mutation[2] = "red"
|
||||
slime_mutation[3] = "oil"
|
||||
slime_mutation[4] = "oil"
|
||||
if("gold")
|
||||
slime_mutation[1] = "gold"
|
||||
slime_mutation[2] = "gold"
|
||||
slime_mutation[3] = "adamantine"
|
||||
slime_mutation[4] = "adamantine"
|
||||
if("green")
|
||||
slime_mutation[1] = "green"
|
||||
slime_mutation[2] = "green"
|
||||
slime_mutation[3] = "black"
|
||||
slime_mutation[4] = "black"
|
||||
// Tier 5
|
||||
else
|
||||
slime_mutation[1] = colour
|
||||
slime_mutation[2] = colour
|
||||
slime_mutation[3] = colour
|
||||
slime_mutation[4] = colour
|
||||
return(slime_mutation)
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
//no special icon processing
|
||||
|
||||
/mob/living/carbon/slime/update_transform() //They're slimes, they don't lie down.
|
||||
//no special icon processing
|
||||
|
||||
/mob/living/carbon/slime/update_transform() //They're slimes, they don't lie down.
|
||||
return
|
||||
Reference in New Issue
Block a user