-Added a plasma_rate and heal_rate variable for Aliens. This will make it easier to tweak balance changes.

-Made all aliens use this when determining how much to recharge/heal.
-Deleted handle_enviroments which overshadow the base alien one.
-Made maxHealth actually do something. Every alien caste had their own updatehealth which did not use maxHealth, which was very stupid.
-Fixed an issue where a player could accidentally pick a breed of alien when typing. Larva will now have to use the evolve verb in order to evolve.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4353 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
giacomand@gmail.com
2012-08-09 19:26:52 +00:00
parent 7d7fb4abaf
commit 35c0740f22
11 changed files with 57 additions and 113 deletions

View File

@@ -17,3 +17,5 @@
var/move_delay_add = 0 // movement delay to add
status_flags = CANPARALYSE
var/heal_rate = 5
var/plasma_rate = 5

View File

@@ -19,6 +19,7 @@
storedPlasma = 100
max_plasma = 150
icon_state = "alienh_s"
plasma_rate = 5
/mob/living/carbon/alien/humanoid/sentinel
name = "alien sentinel"
@@ -28,6 +29,7 @@
storedPlasma = 100
max_plasma = 250
icon_state = "aliens_s"
plasma_rate = 10
/mob/living/carbon/alien/humanoid/drone
name = "alien drone"
@@ -35,6 +37,7 @@
maxHealth = 100
health = 100
icon_state = "aliend_s"
plasma_rate = 15
/mob/living/carbon/alien/humanoid/queen
name = "alien queen"
@@ -43,6 +46,8 @@
health = 250
icon_state = "alienq_s"
nopush = 1
heal_rate = 15
plasma_rate = 20
/mob/living/carbon/alien/humanoid/rpbody
update_icon = 0

View File

@@ -240,7 +240,8 @@
//world << sound('aliens.ogg')
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
if(temp_vent.loc.z == 1 && !temp_vent.welded)
if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network)
if(temp_vent.network.normal_members.len > 50) // Stops Aliens getting stuck in small networks. See: Security, Virology
vents += temp_vent
var/list/candidates = list() //List of candidate KEYs to control the new larvae. ~Carn
@@ -252,6 +253,7 @@
if(prob(33)) spawncount++ //sometimes, have two larvae spawn instead of one
while((spawncount >= 1) && vents.len && candidates.len)
var/obj/vent = pick(vents)
var/candidate = pick(candidates)
@@ -262,7 +264,7 @@
vents -= vent
spawncount--
spawn(rand(3000, 6000)) //Delayed announcements to keep the crew on their toes.
spawn(rand(5000, 6000)) //Delayed announcements to keep the crew on their toes.
command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
world << sound('aliens.ogg')

View File

@@ -9,15 +9,6 @@
/mob/living/carbon/alien/humanoid/hunter
updatehealth()
if(nodamage)
health = 150
stat = CONSCIOUS
else
//oxyloss is only used for suicide
//toxloss isn't used for aliens, its actually used as alien powers!!
health = 150 - getOxyLoss() - getFireLoss() - getBruteLoss() - getCloneLoss()
handle_regular_hud_updates()
@@ -44,15 +35,9 @@
handle_environment()
if(m_intent == "run" || resting)
//If there are alien weeds on the ground then heal if needed or give some toxins
if(locate(/obj/effect/alien/weeds) in loc)
if(health >= 150)
adjustToxLoss(5)
..()
else
adjustBruteLoss(-5)
adjustFireLoss(-5)
else
adjustToxLoss(-5)
adjustToxLoss(-heal_rate)
//Hunter verbs

View File

@@ -10,15 +10,6 @@
/mob/living/carbon/alien/humanoid/sentinel
updatehealth()
if(nodamage)
health = 125
stat = CONSCIOUS
else
//oxyloss is only used for suicide
//toxloss isn't used for aliens, its actually used as alien powers!!
health = 125 - getOxyLoss() - getFireLoss() - getBruteLoss() - getCloneLoss()
handle_regular_hud_updates()
@@ -41,13 +32,3 @@
healths.icon_state = "health5"
else
healths.icon_state = "health6"
handle_environment()
//If there are alien weeds on the ground then heal if needed or give some toxins
if(locate(/obj/effect/alien/weeds) in loc)
if(health >= 125)
adjustToxLoss(10)
else
adjustBruteLoss(-10)
adjustFireLoss(-10)

View File

@@ -529,11 +529,11 @@ In all, this is a lot like the monkey code. /N
/mob/living/carbon/alien/humanoid/updatehealth()
if(nodamage)
health = 100
stat = 0
health = maxHealth
stat = CONSCIOUS
else
//oxyloss is only used for suicide
//toxloss isn't used for aliens, its actually used as alien powers!!
health = 100 - getOxyLoss() - getFireLoss() - getBruteLoss() - getCloneLoss()
health = maxHealth - getOxyLoss() - getFireLoss() - getBruteLoss() - getCloneLoss()

View File

@@ -261,13 +261,13 @@
//If there are alien weeds on the ground then heal if needed or give some toxins
if(locate(/obj/effect/alien/weeds) in loc)
if(health >= 100)
adjustToxLoss(15)
if(health >= maxHealth)
adjustToxLoss(plasma_rate)
else
adjustBruteLoss(-5)
adjustFireLoss(-5)
adjustOxyLoss(-5)
adjustBruteLoss(-heal_rate)
adjustFireLoss(-heal_rate)
adjustOxyLoss(-heal_rate)

View File

@@ -18,16 +18,6 @@
/mob/living/carbon/alien/humanoid/queen
updatehealth()
if (src.nodamage)
src.health = 250
src.stat = 0
else
//oxyloss is only used for suicide
//toxloss isn't used for aliens, its actually used as alien powers!!
src.health = 250 - src.getOxyLoss() - src.getFireLoss() - src.getBruteLoss()
handle_regular_hud_updates()
..() //-Yvarov
@@ -50,16 +40,6 @@
else
src.healths.icon_state = "health6"
handle_environment()
//If there are alien weeds on the ground then heal if needed or give some toxins
if(locate(/obj/effect/alien/weeds) in loc)
if(health >= 250)
adjustToxLoss(20)
else
adjustBruteLoss(-5)
adjustFireLoss(-5)
//Queen verbs
/mob/living/carbon/alien/humanoid/queen/verb/lay_egg()
@@ -78,13 +58,3 @@
O.show_message(text("\green <B>[src] has laid an egg!</B>"), 1)
new /obj/effect/alien/egg(loc)
return
/mob/living/carbon/alien/humanoid/queen/updatehealth()
if(nodamage)
health = 250
stat = CONSCIOUS
else
//oxyloss is only used for suicide
//toxloss isn't used for aliens, its actually used as alien powers!!
health = 250 - getOxyLoss() - getFireLoss() - getBruteLoss() - getCloneLoss()

View File

@@ -458,15 +458,6 @@
onclose(user, "mob[name]")
return
/mob/living/carbon/alien/larva/updatehealth()
if(nodamage)
health = 25
stat = 0
else
//oxyloss is only used for suicide
//toxloss isn't used for aliens, its actually used as alien powers!!
health = 25 - getOxyLoss() - getFireLoss() - getBruteLoss() - getCloneLoss()
/* Commented out because it's duplicated in life.dm
/mob/living/carbon/alien/larva/proc/grow() // Larvae can grow into full fledged Xenos if they survive long enough -- TLE
if(icon_state == "larva_l" && !canmove) // This is a shit death check. It is made of shit and death. Fix later.

View File

@@ -63,29 +63,8 @@
/mob/living/carbon/alien/larva
proc/handle_mutations_and_radiation()
if(amount_grown == 200) //TODO ~Carn
src << "\green You are growing into a beautiful alien! It is time to choose a caste."
src << "\green There are three to choose from:"
src << "\green <B>Hunters</B> are strong and agile, able to hunt away from the hive and rapidly move through ventilation shafts. Hunters generate plasma slowly and have low reserves."
src << "\green <B>Sentinels</B> are tasked with protecting the hive and are deadly up close and at a range. They are not as physically imposing nor fast as the hunters."
src << "\green <B>Drones</B> are the working class, offering the largest plasma storage and generation. They are the only caste which may evolve again, turning into the dreaded alien queen."
var/alien_caste = alert(src, "Please choose which alien caste you shall belong to.",,"Hunter","Sentinel","Drone")
var/mob/living/carbon/alien/humanoid/new_xeno
switch(alien_caste)
if("Hunter")
new_xeno = new /mob/living/carbon/alien/humanoid/hunter(loc)
if("Sentinel")
new_xeno = new /mob/living/carbon/alien/humanoid/sentinel(loc)
if("Drone")
new_xeno = new /mob/living/carbon/alien/humanoid/drone(loc)
new_xeno.UI = UI
if(mind) mind.transfer_to(new_xeno)
del(src)
return
else
//grow!! but not if metroid or dead
if(health>-100)
if(health>-100 && amount_grown < 200)
amount_grown++
if (radiation)

View File

@@ -16,3 +16,32 @@
for(var/mob/O in oviewers(src, null))
if ((O.client && !( O.blinded )))
O << text("[] slowly peaks up from the ground...", src)
/mob/living/carbon/alien/larva/verb/evolve()
set name = "Evolve"
set desc = "Evolve into a fully grown Alien."
set category = "Alien"
if(amount_grown >= 200) //TODO ~Carn
src << "\green You are growing into a beautiful alien! It is time to choose a caste."
src << "\green There are three to choose from:"
src << "\green <B>Hunters</B> are strong and agile, able to hunt away from the hive and rapidly move through ventilation shafts. Hunters generate plasma slowly and have low reserves."
src << "\green <B>Sentinels</B> are tasked with protecting the hive and are deadly up close and at a range. They are not as physically imposing nor fast as the hunters."
src << "\green <B>Drones</B> are the working class, offering the largest plasma storage and generation. They are the only caste which may evolve again, turning into the dreaded alien queen."
var/alien_caste = alert(src, "Please choose which alien caste you shall belong to.",,"Hunter","Sentinel","Drone")
var/mob/living/carbon/alien/humanoid/new_xeno
switch(alien_caste)
if("Hunter")
new_xeno = new /mob/living/carbon/alien/humanoid/hunter(loc)
if("Sentinel")
new_xeno = new /mob/living/carbon/alien/humanoid/sentinel(loc)
if("Drone")
new_xeno = new /mob/living/carbon/alien/humanoid/drone(loc)
new_xeno.UI = UI
if(mind) mind.transfer_to(new_xeno)
del(src)
return
else
src << "\red You are not fully grown."
return