Removed the alertness level thing for carp/hostile mobs in general. Neat idea in theory, but in practice it just meant people could run up and beat carp to death before they'd even enter their hostile state. Bears still have it though.

Carp are slightly faster (in testing, I walked away from one as a borg, this seems a bit silly). This might not work well in practice though what with lag on a live server, so I'm guessing I might have to change this back.

Carp/syndicate also keep chasing their target as long as they're within 10 tiles, to compensate for them being slower than humans.

Removed the restriction on debraining changelings, this was a terrible "fix" to half-changelings and just lets you metagame.

Added a mineral var (metal) to floors to stop runtimes when you hit them with mining tools.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5052 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
Kortgstation@gmail.com
2012-11-13 03:22:07 +00:00
parent 1bd208da87
commit 7103cbfac0
5 changed files with 27 additions and 35 deletions
@@ -33,7 +33,7 @@
min_n2 = 0
max_n2 = 0
minbodytemp = 0
var/stance_step = 0
//SPACE BEARS! SQUEEEEEEEE~ OW! FUCK! IT BIT MY HAND OFF!!
/mob/living/simple_animal/hostile/bear/Hudson
name = "Hudson"
@@ -1,7 +1,6 @@
/mob/living/simple_animal/hostile
var/stance = HOSTILE_STANCE_IDLE //Used to determine behavior
var/stance_step = 0 //Used to delay checks depending on what stance the hostile
var/mob/living/target_mob //Once the bear enters attack stance, it will try to chase this mob. This it to prevent it changing it's mind between multiple mobs.
var/attack_same = 0
@@ -9,42 +8,36 @@
var/atom/T = null
stop_automated_movement = 0
stance_step++
if(stance_step > 5)
stance_step = 0
for(var/atom/A in ListTargets())
for(var/atom/A in ListTargets())
if(!attack_same && istype(A, src.type))
continue
if(!attack_same && istype(A, src.type))
continue
if(isliving(A))
var/mob/living/L = A
if(!L.stat)
stance = HOSTILE_STANCE_ATTACK
T = L
break
if(istype(A, /obj/mecha))
var/obj/mecha/M = A
if (M.occupant)
stance = HOSTILE_STANCE_ATTACK
T = M
break
return T
if(isliving(A))
var/mob/living/L = A
if(!L.stat)
stance = HOSTILE_STANCE_ATTACK
T = L
break
if(istype(A, /obj/mecha))
var/obj/mecha/M = A
if (M.occupant)
stance = HOSTILE_STANCE_ATTACK
T = M
break
return T
/mob/living/simple_animal/hostile/proc/MoveToTarget(var/step = 5)
stop_automated_movement = 1
if(!target_mob || SA_attackable(target_mob))
stance = HOSTILE_STANCE_IDLE
stance_step = step //Make it very alert, so it quickly attacks again if a mob returns
if(target_mob in ListTargets())
walk_to(src, target_mob, 1, 3)
walk_to(src, target_mob, 1, 2)
stance = HOSTILE_STANCE_ATTACKING
stance_step = 0
/mob/living/simple_animal/hostile/proc/AttackTarget()
stop_automated_movement = 1
stance_step++
if(!target_mob || SA_attackable(target_mob))
LoseTarget()
return
@@ -64,20 +57,18 @@
M.attack_animal(src)
return M
/mob/living/simple_animal/hostile/proc/LoseTarget(var/step = 3)
/mob/living/simple_animal/hostile/proc/LoseTarget()
stance = HOSTILE_STANCE_IDLE
stance_step = step
target_mob = null
walk(src, 0)
/mob/living/simple_animal/hostile/proc/LostTarget(var/step = 1)
/mob/living/simple_animal/hostile/proc/LostTarget()
stance = HOSTILE_STANCE_IDLE
stance_step = step
walk(src, 0)
/mob/living/simple_animal/hostile/proc/ListTargets()
return view(src, 7)
return view(src, 10)
/mob/living/simple_animal/hostile/Die()
..()
@@ -101,7 +101,7 @@
stop_automated_movement = 1
if(!target_mob || SA_attackable(target_mob))
stance = SYNDICATE_STANCE_IDLE
if(target_mob in view(7, src))
if(target_mob in view(10, src))
if(ranged)
if(get_dist(src, target_mob) <= 6)
OpenFire(target_mob)
@@ -117,7 +117,7 @@
stance = SYNDICATE_STANCE_IDLE
target_mob = null
return
if(!(target_mob in view(7, src)))
if(!(target_mob in view(10, src)))
stance = SYNDICATE_STANCE_IDLE
target_mob = null
return
@@ -187,7 +187,7 @@
/mob/living/simple_animal/syndicate/melee/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(O.force)
if(prob(80))
if(prob(65))
var/damage = O.force
if (O.damtype == HALLOSS)
damage = 0