-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

@@ -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()
@@ -77,14 +57,4 @@
for(var/mob/O in viewers(src, null))
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()
return

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,30 +63,9 @@
/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)
amount_grown++
//grow!! but not if metroid or dead
if(health>-100 && amount_grown < 200)
amount_grown++
if (radiation)
if (radiation > 100)

View File

@@ -15,4 +15,33 @@
src << text("\green You have stopped hiding.")
for(var/mob/O in oviewers(src, null))
if ((O.client && !( O.blinded )))
O << text("[] slowly peaks up from the ground...", src)
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