Removes watcher overwatch ability (#78292)

## About The Pull Request

Removes the "overwatch" ability from Watchers, allowing them to use
their "look away" ability at any health threshold instead (but only if
it's been fighting you for at least 5 seconds or if you attack it).
Drops the cooldown on the gaze a little bit to compensate.

Also fixes some weird behaviour I noticed while testing:
- It won't cancel its own ability by trying to back away from you.
- It will look at you when it shoots you.

## Why It's Good For The Game

I was cooking too hard with this one.
- Two abilities overcomplicates what are supposed to be a pretty simple
mob you fight in packs.
- It wasn't obvious what you were actually supposed to do when
targetted.
- Doing it wrong could be very punishing in groups.
- Doing it _right_ was still kind of unexciting.

This is an ability to give to an elite, not a random trash mob.

## Changelog

🆑
balance: Watchers will no longer put you at gunpoint.
/🆑
This commit is contained in:
Jacquerel
2023-09-15 16:28:07 +02:00
committed by GitHub
parent e6c95bd890
commit e11b69f2e6
9 changed files with 15 additions and 35 deletions
+2
View File
@@ -44,6 +44,8 @@
/// Generic key for a non-specific targetted action
#define BB_TARGETTED_ACTION "BB_targetted_action"
/// Generic key for a non-specific action
#define BB_GENERIC_ACTION "BB_generic_action"
///How long have we spent with no target?
#define BB_TARGETLESS_TIME "BB_targetless_time"
-5
View File
@@ -59,11 +59,6 @@
/// We increment this counter every time we try to move while dragging an arm and if we go too long we'll give up trying to get out of line of sight and just eat the fingers
#define BB_LOBSTROSITY_FINGER_LUST "BB_lobstrosity_finger_lust"
/// Key containing overwatch ability information
#define BB_WATCHER_OVERWATCH "BB_watcher_overwatch"
/// Key containing gazae ability information
#define BB_WATCHER_GAZE "BB_watcher_gaze"
// eyeball keys
///the death glare ability
#define BB_GLARE_ABILITY "BB_glare_ability"
@@ -11,6 +11,9 @@
/datum/ai_planning_subtree/maintain_distance/SelectBehaviors(datum/ai_controller/controller, seconds_per_tick)
. = ..()
var/mob/living/living_pawn = controller.pawn
if(LAZYLEN(living_pawn.do_afters))
return
var/atom/target = controller.blackboard[target_key]
if (!isliving(target) || !can_see(controller.pawn, target, view_distance))
return // Don't run away from cucumbers, they're not snakes
@@ -4,7 +4,7 @@
*/
/datum/ai_planning_subtree/use_mob_ability
/// Blackboard key for the ability
var/ability_key
var/ability_key = BB_GENERIC_ACTION
/// Behaviour to perform using ability
var/use_ability_behaviour = /datum/ai_behavior/use_mob_ability
/// If true we terminate planning after trying to use the ability.
+1
View File
@@ -66,6 +66,7 @@
/// Actually fire the damn thing
/datum/component/ranged_attacks/proc/async_fire_ranged_attack(mob/living/basic/firer, atom/target, modifiers)
firer.face_atom(target)
if(projectile_type)
firer.fire_projectile(projectile_type, target, projectile_sound)
SEND_SIGNAL(parent, COMSIG_BASICMOB_POST_ATTACK_RANGED, target, modifiers)
@@ -1,4 +1,4 @@
/// A floating eyeball which keeps its distance and plays red light/green light with you.
/// A floating eyeball which keeps its distance and sometimes make you look away.
/mob/living/basic/mining/watcher
name = "watcher"
desc = "A levitating, monocular creature held aloft by wing-like veins. A sharp spine of crystal protrudes from its body."
@@ -59,14 +59,10 @@
)
update_appearance(UPDATE_OVERLAYS)
var/datum/action/cooldown/mob_cooldown/watcher_overwatch/overwatch = new(src)
overwatch.Grant(src)
overwatch.projectile_type = projectile_type
ai_controller.set_blackboard_key(BB_WATCHER_OVERWATCH, overwatch)
var/datum/action/cooldown/mob_cooldown/watcher_gaze/gaze = new gaze_attack(src)
gaze.Grant(src)
ai_controller.set_blackboard_key(BB_WATCHER_GAZE, gaze)
ai_controller.set_blackboard_key(BB_GENERIC_ACTION, gaze)
AddComponent(/datum/component/revenge_ability, gaze, targetting = ai_controller.blackboard[BB_TARGETTING_DATUM])
/mob/living/basic/mining/watcher/update_overlays()
. = ..()
@@ -9,38 +9,20 @@
/datum/ai_planning_subtree/target_retaliate,
/datum/ai_planning_subtree/simple_find_target,
/datum/ai_planning_subtree/use_mob_ability/gaze,
/datum/ai_planning_subtree/targeted_mob_ability/overwatch,
/datum/ai_planning_subtree/ranged_skirmish/watcher,
/datum/ai_planning_subtree/maintain_distance,
)
/datum/ai_planning_subtree/targeted_mob_ability/overwatch
ability_key = BB_WATCHER_OVERWATCH
operational_datums = list(/datum/component/ai_target_timer)
/datum/ai_planning_subtree/targeted_mob_ability/overwatch/SelectBehaviors(datum/ai_controller/controller, seconds_per_tick)
var/mob/living/living_pawn = controller.pawn
if (living_pawn.do_after_count())
return // Don't interrupt our other ability
var/atom/target = controller.blackboard[target_key]
if (QDELETED(target) || HAS_TRAIT(target, TRAIT_OVERWATCH_IMMUNE))
return // We should probably let miners move sometimes
var/time_on_target = controller.blackboard[BB_BASIC_MOB_HAS_TARGET_TIME] || 0
if (time_on_target < 5 SECONDS)
return // We need to spend some time acquiring our target first
return ..()
/datum/ai_planning_subtree/use_mob_ability/gaze
ability_key = BB_WATCHER_GAZE
finish_planning = TRUE
/datum/ai_planning_subtree/use_mob_ability/gaze/SelectBehaviors(datum/ai_controller/controller, seconds_per_tick)
var/mob/living/watcher = controller.pawn
if (watcher.health > watcher.maxHealth * 0.66) // When we're a little hurt
return
var/mob/living/target = controller.blackboard[BB_BASIC_MOB_CURRENT_TARGET]
if (!isliving(target))
return // Don't do this if there's nothing hostile around or if our target is a mech
var/time_on_target = controller.blackboard[BB_BASIC_MOB_HAS_TARGET_TIME] || 0
if (time_on_target < 5 SECONDS)
return // We need to spend some time acquiring our target first
return ..()
/datum/ai_planning_subtree/ranged_skirmish/watcher
@@ -8,7 +8,7 @@
button_icon_state = "gaze"
background_icon_state = "bg_demon"
overlay_icon_state = "bg_demon_border"
cooldown_time = 30 SECONDS
cooldown_time = 20 SECONDS
check_flags = AB_CHECK_CONSCIOUS | AB_CHECK_INCAPACITATED
click_to_activate = FALSE
shared_cooldown = NONE
@@ -1,5 +1,6 @@
/**
* Automatically shoot at a target if they do anything while this is active on them.
* Currently not given to any mob, but retained so admins can use it.
*/
/datum/action/cooldown/mob_cooldown/watcher_overwatch
name = "Overwatch"