From 7103cbfac01b8d755f6866fe1dfbe473f3c2ef70 Mon Sep 17 00:00:00 2001 From: "Kortgstation@gmail.com" Date: Tue, 13 Nov 2012 03:22:07 +0000 Subject: [PATCH] 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 --- .../objects/items/weapons/surgery_tools.dm | 4 +- code/game/turfs/simulated/floor.dm | 1 + .../mob/living/simple_animal/hostile/bear.dm | 2 +- .../living/simple_animal/hostile/hostile.dm | 49 ++++++++----------- .../mob/living/simple_animal/syndicate.dm | 6 +-- 5 files changed, 27 insertions(+), 35 deletions(-) diff --git a/code/game/objects/items/weapons/surgery_tools.dm b/code/game/objects/items/weapons/surgery_tools.dm index 0ccfacd1f78..109a7af65ed 100644 --- a/code/game/objects/items/weapons/surgery_tools.dm +++ b/code/game/objects/items/weapons/surgery_tools.dm @@ -538,9 +538,9 @@ return if(3.0) - if(M.mind && M.mind.changeling) + /*if(M.mind && M.mind.changeling) user << "\red The neural tissue regrows before your eyes as you cut it." - return + return*/ if(M != user) for(var/mob/O in (viewers(M) - user - M)) diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index 1454333c892..436417d5915 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -27,6 +27,7 @@ var/list/wood_icons = list("wood","wood-broken") var/lava = 0 var/broken = 0 var/burnt = 0 + var/mineral = "metal" var/obj/item/stack/tile/floor_tile = new/obj/item/stack/tile/plasteel diff --git a/code/modules/mob/living/simple_animal/hostile/bear.dm b/code/modules/mob/living/simple_animal/hostile/bear.dm index e3f44cdc2c2..c227133556d 100644 --- a/code/modules/mob/living/simple_animal/hostile/bear.dm +++ b/code/modules/mob/living/simple_animal/hostile/bear.dm @@ -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" diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index 011816156d5..3b24fb24bc8 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -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() ..() diff --git a/code/modules/mob/living/simple_animal/syndicate.dm b/code/modules/mob/living/simple_animal/syndicate.dm index 93dd0b462bd..19c583417e0 100644 --- a/code/modules/mob/living/simple_animal/syndicate.dm +++ b/code/modules/mob/living/simple_animal/syndicate.dm @@ -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