Syndicate simple animals will only attempt to destroy obstacles when chasing a target. Now the away missions wont start horribly smashed up.

Committing Brotemis's away mission and related code. I think he wanted to make a few more changes, but it should be functional.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5085 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
Kortgstation@gmail.com
2012-11-16 02:32:38 +00:00
parent 5ba2a398a1
commit a814ff7be4
13 changed files with 993 additions and 10 deletions
@@ -0,0 +1,47 @@
/mob/living/simple_animal/hostile/faithless
name = "Faithless"
desc = "The Wish Granter's faith in humanity, incarnate"
icon_state = "faithless"
icon_living = "faithless"
icon_dead = "faithless_dead"
speak_chance = 0
turns_per_move = 5
response_help = "passes through the"
response_disarm = "shoves"
response_harm = "hits the"
speed = -1
stop_automated_movement_when_pulled = 0
maxHealth = 100
health = 100
harm_intent_damage = 10
melee_damage_lower = 18
melee_damage_upper = 18
attacktext = "grips"
attack_sound = 'sound/hallucinations/growl1.ogg'
min_oxy = 0
max_oxy = 0
min_tox = 0
max_tox = 0
min_co2 = 0
max_co2 = 0
min_n2 = 0
max_n2 = 0
minbodytemp = 0
/mob/living/simple_animal/hostile/faithless/Process_Spacemove(var/check_drift = 0)
return 1
/mob/living/simple_animal/hostile/faithless/FindTarget()
. = ..()
if(.)
emote("wails at [.]")
/mob/living/simple_animal/hostile/faithless/AttackingTarget()
. =..()
var/mob/living/L = .
if(istype(L))
if(prob(15))
L.Weaken(3)
L.visible_message("<span class='danger'>\the [src] knocks down \the [L]!</span>")
@@ -42,6 +42,7 @@
var/stance = SYNDICATE_STANCE_IDLE //Used to determine behavior
var/mob/living/target_mob
var/hostile = 0
/mob/living/simple_animal/syndicate/Life()
..()
@@ -53,11 +54,11 @@
new weapon2 (src.loc)
del src
return
for(dir in list(NORTH,EAST,SOUTH,WEST))
var/obj/structure/obstacle = locate(/obj/structure, get_step(src, dir))
if(istype(obstacle, /obj/structure/window) || istype(obstacle, /obj/structure/closet) || istype(obstacle, /obj/structure/table) || istype(obstacle, /obj/structure/grille))
obstacle.attack_animal(src)
if(hostile)
for(dir in list(NORTH,EAST,SOUTH,WEST))
var/obj/structure/obstacle = locate(/obj/structure, get_step(src, dir))
if(istype(obstacle, /obj/structure/window) || istype(obstacle, /obj/structure/closet) || istype(obstacle, /obj/structure/table) || istype(obstacle, /obj/structure/grille))
obstacle.attack_animal(src)
if(health < 1)
Die()
@@ -76,7 +77,7 @@
if(!stat)
switch(stance)
if(SYNDICATE_STANCE_IDLE)
hostile = 0
stop_automated_movement = 0
for(var/atom/A in view(7,src))
@@ -99,6 +100,7 @@
if(SYNDICATE_STANCE_ATTACK) //This one should only be active for one tick
stop_automated_movement = 1
hostile = 1
if(!target_mob || SA_attackable(target_mob))
stance = SYNDICATE_STANCE_IDLE
if(target_mob in view(10, src))
@@ -113,6 +115,7 @@
if(SYNDICATE_STANCE_ATTACKING)
stop_automated_movement = 1
hostile = 1
if(!target_mob || SA_attackable(target_mob))
stance = SYNDICATE_STANCE_IDLE
target_mob = null