mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-29 23:16:21 +01:00
-Committed RavingManiac (Smoke Carter)'s Roros laying eggs.
http://nanotrasen.com/phpBB3/viewtopic.php?f=16&t=10501 -You can insert the Auth Disk by clicking on the nuclear bomb. -Changed how aliens are selected. It will filter the list of possible candidates by checking for players who aren't inactive for more than a minute. If no possible candidates are found, it increases the filter by another minute. It does this 5 times before giving up. -Alien embryos cannot have carriers and they are more likely to infect someone. -The time it takes before a larva bursts is increased a bit. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4897 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -329,27 +329,22 @@
|
||||
if(nutrition >= 800)
|
||||
if(prob(40)) amount_grown++
|
||||
|
||||
//lay eggs or grow
|
||||
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 * 0.9)
|
||||
M.powerlevel = round(powerlevel/number)
|
||||
M.Friends = Friends
|
||||
M.tame = tame
|
||||
M.rabid = rabid
|
||||
M.Discipline = Discipline
|
||||
if(i != 1) step_away(M,src)
|
||||
|
||||
del(src)
|
||||
if(!client && nutrition >= 1000)
|
||||
var/number = pick(1,1,1,1,1,1,2,2,2,3) //number of eggs laid
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/roro_egg/E
|
||||
for(var/i=1,i<=number,i++)
|
||||
E = new/obj/item/weapon/reagent_containers/food/snacks/roro_egg(loc)
|
||||
src.nutrition -= 200
|
||||
step_away(E,src)
|
||||
|
||||
else
|
||||
if(!client)
|
||||
var/mob/living/carbon/metroid/adult/A = new/mob/living/carbon/metroid/adult(src.loc)
|
||||
A.nutrition = nutrition
|
||||
// A.nutrition += 100
|
||||
A.nutrition += 100
|
||||
A.powerlevel = max(0, powerlevel-1)
|
||||
A.Friends = Friends
|
||||
A.tame = tame
|
||||
|
||||
@@ -770,4 +770,81 @@ mob/living/carbon/metroid/var/temperature_resistance = T0C+75
|
||||
|
||||
return 0
|
||||
|
||||
return 1
|
||||
return 1
|
||||
|
||||
|
||||
// Basically this Metroid Core catalyzes reactions that normally wouldn't happen anywhere
|
||||
/obj/item/metroid_core
|
||||
name = "roro core"
|
||||
desc = "A very slimy and tender part of a Rorobeast. Legends claim these to have \"magical powers\"."
|
||||
icon = 'icons/obj/surgery.dmi'
|
||||
icon_state = "roro core"
|
||||
flags = TABLEPASS
|
||||
force = 1.0
|
||||
w_class = 1.0
|
||||
throwforce = 1.0
|
||||
throw_speed = 3
|
||||
throw_range = 6
|
||||
origin_tech = "biotech=4"
|
||||
var/POWERFLAG = 0 // sshhhhhhh
|
||||
var/Flush = 30
|
||||
var/Uses = 5 // uses before it goes inert
|
||||
|
||||
New()
|
||||
..()
|
||||
var/datum/reagents/R = new/datum/reagents(100)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
POWERFLAG = rand(1,10)
|
||||
Uses = rand(7, 25)
|
||||
//flags |= NOREACT
|
||||
|
||||
spawn()
|
||||
Life()
|
||||
|
||||
proc/Life()
|
||||
while(src)
|
||||
sleep(25)
|
||||
Flush--
|
||||
if(Flush <= 0)
|
||||
reagents.clear_reagents()
|
||||
Flush = 30
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/roro_egg
|
||||
name = "roro egg"
|
||||
desc = "A small, gelatinous egg."
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
icon_state = "roro egg-growing"
|
||||
bitesize = 12
|
||||
origin_tech = "biotech=4"
|
||||
var/grown = 0
|
||||
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("nutriment", 5)
|
||||
spawn(rand(1200,1500))//the egg takes a while to "ripen"
|
||||
Grow()
|
||||
|
||||
proc/Grow()
|
||||
grown = 1
|
||||
icon_state = "roro egg-grown"
|
||||
processing_objects.Add(src)
|
||||
return
|
||||
|
||||
proc/Hatch()
|
||||
processing_objects.Remove(src)
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/mob/O in hearers(T))
|
||||
O.show_message("\blue The [name] pulsates and quivers!")
|
||||
spawn(rand(50,100))
|
||||
for(var/mob/O in hearers(T))
|
||||
O.show_message("\blue The [name] bursts open!")
|
||||
new/mob/living/carbon/metroid(T)
|
||||
del(src)
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/roro_egg/process()
|
||||
var/turf/location = get_turf(src)
|
||||
var/datum/gas_mixture/environment = location.return_air()
|
||||
if (environment.toxins > MOLES_PLASMA_VISIBLE)//plasma exposure causes the egg to hatch
|
||||
src.Hatch()
|
||||
@@ -187,7 +187,7 @@
|
||||
|
||||
/mob/living/carbon/metroid/verb/Reproduce()
|
||||
set category = "Roro"
|
||||
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."
|
||||
set desc = "This will make you lay an egg. NOTE: This decreases your nutrition."
|
||||
|
||||
if(stat)
|
||||
src << "<i>I must be conscious to do this...</i>"
|
||||
@@ -195,32 +195,15 @@
|
||||
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(amount_grown >= 10)
|
||||
if(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 rorobeast.") in list("Yes","No")=="Yes")
|
||||
if(stat)
|
||||
src << "<i>I must be conscious to do this...</i>"
|
||||
return
|
||||
|
||||
var/list/babies = list()
|
||||
var/number = pick(14;2,3,4)
|
||||
var/new_nutrition = round(nutrition * 0.9)
|
||||
var/new_powerlevel = round(powerlevel / number)
|
||||
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 = new_nutrition
|
||||
M.powerlevel = new_powerlevel
|
||||
if(i != 1) step_away(M,src)
|
||||
babies += M
|
||||
|
||||
var/mob/living/carbon/metroid/new_metroid = pick(babies)
|
||||
new_metroid.a_intent = "hurt"
|
||||
new_metroid.key = key
|
||||
|
||||
new_metroid << "<B>You are now a Rorobeast. Skree!</B>"
|
||||
del(src)
|
||||
if(src.nutrition >= 300)
|
||||
new/obj/item/weapon/reagent_containers/food/snacks/roro_egg(loc)
|
||||
src.nutrition -= 200
|
||||
else
|
||||
src << "<i>I have not fed enough...</i>"
|
||||
else
|
||||
src << "<i>I am not ready to reproduce yet...</i>"
|
||||
else
|
||||
src << "<i>I am not old enough to reproduce yet...</i>"
|
||||
src << "<i>I am not old enough to lay eggs yet...</i>"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ Put (mob/proc)s here that are in dire need of a code cleanup.
|
||||
v.affected_mob = src
|
||||
v.strain_data = v.strain_data.Copy()
|
||||
v.holder = src
|
||||
if(prob(5))
|
||||
if(v.can_carry && prob(5))
|
||||
v.carrier = 1
|
||||
return
|
||||
|
||||
@@ -194,7 +194,7 @@ Put (mob/proc)s here that are in dire need of a code cleanup.
|
||||
v.affected_mob = src
|
||||
v.strain_data = v.strain_data.Copy()
|
||||
v.holder = src
|
||||
if(prob(5))
|
||||
if(v.can_carry && prob(5))
|
||||
v.carrier = 1
|
||||
return
|
||||
return
|
||||
|
||||
@@ -1119,8 +1119,12 @@ datum
|
||||
..()
|
||||
return
|
||||
reaction_obj(var/obj/O, var/volume)
|
||||
if((!O) || (!volume)) return 0
|
||||
src = null
|
||||
if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/roro_egg))
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/roro_egg/egg = O
|
||||
if (egg.grown)
|
||||
egg.Hatch()
|
||||
if((!O) || (!volume)) return 0
|
||||
var/turf/the_turf = get_turf(O)
|
||||
var/datum/gas_mixture/napalm = new
|
||||
var/datum/gas/volatile_fuel/fuel = new
|
||||
|
||||
Reference in New Issue
Block a user