Files
CHOMPStation2/code/modules/critters/critter.dm
mport2004@gmail.com c612827472 Singularity absorption explosion range lowered and is now dependent on singularity size.
BoH is no longer an instakill on a singularity, the chance the singularity will die from bombs now 25% from 10%.
Finished removing Metabslow from the game because delaying Interface rebuilds is a bad idea.
Sadly THE SUN is gone due to lighting lag issues, the current mob max luminosity is set to 7.
Damage and stun from doors shocking people has been lowered.
process() is now an obj level proc as it was already used by several procs and they can now jump onto the ticker if needed. 


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2199 316c924e-a436-60f5-8080-3fe189b3f50e
2011-09-14 07:24:19 +00:00

122 lines
2.9 KiB
Plaintext

/obj/critter
name = "Critter"
desc = "Generic critter."
icon = 'critter.dmi'
icon_state = "basic"
layer = 5.0
density = 1
anchored = 0
var
alive = 1
health = 10
max_health = 10
list/access_list = list()//accesses go here
//AI things
task = "thinking"
//Attacks at will
aggressive = 1
//Will target an attacker
defensive = 0
//Will randomly move about
wanderer = 1
//Will open doors it bumps ignoring access
opensdoors = 0
//Internal tracking ignore
frustration = 0
max_frustration = 8
attack = 0
attacking = 0
steps = 0
last_found = null
target = null
oldtarget_name = null
target_lastloc = null
//The last guy who attacked it
attacker = null
//Will not attack this thing
friend = null
//How far to look for things dont set this overly high
seekrange = 7
//If true will attack these things
atkcarbon = 1
atksilicon = 0
atkcritter = 0
//Attacks critters of the same type
atksame = 0
atkmech = 0
//Damage multipliers
brutevuln = 1
firevuln = 1
//DR
armor = 0
//How much damage it does it melee
melee_damage_lower = 1
melee_damage_upper = 2
//Basic attack message when they move to attack and attack
angertext = "charges at"
attacktext = "attacks"
attack_sound = null // the sound it makes when it attacks!
attack_speed = 25 // delay of attack
proc
patrol_step()
seek_target()
Die()
ChaseAttack()
RunAttack()
TakeDamage(var/damage = 0)
Target_Attacker(var/target)
Harvest(var/obj/item/weapon/W, var/mob/living/user)//Controls havesting things from dead critters
AfterAttack(var/mob/living/target)
/* TODO:Go over these and see how/if to add them
proc/set_attack()
state = 1
if(path_idle.len) path_idle = new/list()
trg_idle = null
proc/set_idle()
state = 2
if (path_target.len) path_target = new/list()
target = null
frustration = 0
proc/set_null()
state = 0
if (path_target.len) path_target = new/list()
if (path_idle.len) path_idle = new/list()
target = null
trg_idle = null
frustration = 0
proc/path_idle(var/atom/trg)
path_idle = AStar(src.loc, get_turf(trg), /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 250, anicard, null)
path_idle = reverselist(path_idle)
proc/path_attack(var/atom/trg)
path_target = AStar(src.loc, trg.loc, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 250, anicard, null)
path_target = reverselist(path_target)
//Look these over
var/list/path = new/list()
var/patience = 35 //The maximum time it'll chase a target.
var/list/mob/living/carbon/flee_from = new/list()
var/list/path_target = new/list() //The path to the combat target.
var/turf/trg_idle //It's idle target, the one it's following but not attacking.
var/list/path_idle = new/list() //The path to the idle target.
*/