Files
Bubberstation/code/datums/ai/basic_mobs/basic_subtrees/express_happiness.dm
SkyratBot 630b3705b6 [MIRROR] minor raptor tweaks (#27845)
* minor raptor tweaks (#83407)

## About The Pull Request
i think i made these a bit too strong, this hopefully balances them out
a bit. they were initially accidentally given alot of armor against
ranged attacks, this is now removed. also ive reduced their base hp by a
bit. im open to other suggestions and feedback

## Why It's Good For The Game
they were stronger than i intended. this keeps their usefulness for
battling tendrils, or ore vents but also prevents using them to cheese
several megafauna

## Changelog
🆑
balance: you can now polymorph into raptors
balance: raptors overall have less health and no longer have armor
against ranged attacks
/🆑

* minor raptor tweaks

---------

Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
2024-05-25 20:59:58 +02:00

45 lines
1.4 KiB
Plaintext

#define HIGH_HAPPINESS_THRESHOLD 0.7
#define MODERATE_HAPPINESS_THRESHOLD 0.5
/datum/ai_planning_subtree/express_happiness
operational_datums = list(/datum/component/happiness)
///the key storing our happiness value
var/happiness_key = BB_BASIC_HAPPINESS
///list of emotions we relay when happy
var/static/list/happy_emotions = list(
"celebrates happily!",
"dances around in excitement!",
)
///our moderate emotions
var/static/list/moderate_emotions = list(
"looks satisfied.",
"trots around.",
)
///emotions we display when we are sad
var/static/list/depressed_emotions = list(
"looks depressed...",
"turns its back and sulks...",
"looks towards the floor in dissapointment...",
)
/datum/ai_planning_subtree/express_happiness/SelectBehaviors(datum/ai_controller/controller, seconds_per_tick)
if(!SPT_PROB(5, seconds_per_tick))
return
var/happiness_value = controller.blackboard[happiness_key]
if(isnull(happiness_value))
return
var/list/final_list
switch(happiness_value)
if(HIGH_HAPPINESS_THRESHOLD to INFINITY)
final_list = happy_emotions
if(MODERATE_HAPPINESS_THRESHOLD to HIGH_HAPPINESS_THRESHOLD)
final_list = moderate_emotions
else
final_list = depressed_emotions
if(!length(final_list))
return
controller.queue_behavior(/datum/ai_behavior/perform_emote, pick(final_list))
#undef HIGH_HAPPINESS_THRESHOLD
#undef MODERATE_HAPPINESS_THRESHOLD