mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-06-05 05:23:29 +01:00
203105788c
* fixes * fuck my stupid chungus life * Minion limit, heal fix, dead sac fix * cooldown, no sacrificing star gazer or ascended alive heretics * blade debuff * oopsy * Update tgui.bundle.js * map diff bot what ya doing * fuck that chat spam * lets heretic armour hold a haunted longsword * why not it makes sense * do_after * god I hate this bullshit * other lewc stuff * push * heretic id card fix * she tg on my ui till I css * yes * spent * fix / ipc buff (real)™️ * moderate again * revert * no reserve * bringing up to master * update map files to master * didnt replace centcomm * beginning some rebalancing * aggressive spread tweaks * lots of tweaks and fixes * trying to un-key the maps * maybe this time * this time???? * oops * sql fix * basicmob conversion * paintings! and a critical influence fix * rust + tweaks * monster tweak * small change * removing this * more tweaks. no more dusting * added some examine_more * flower seeds * various tweaks. more to come * no more conduit spacing * fixed some dumb stuff * silly stuff * its always prettier * bugfixes and linters * linters, wow * oops * bah * linter * fuck you * temp check * hidden influence drain * influence visible message * tweak fix * void cloak bugfix * small fixes * fixes * do_after_once broken * fixes and tweaks * heretic blade potential fix + sacrifice changes * batch of fixes * tiny tweak * rebuilt TGUI * no greentext + rerolls * logging + bugfix * unused var * small fix * various fixes * comment * projectile change * tgui rebuild * tgui bundle redo * rune issue solved * influence visible now * fix ui reloading * new moon ascension + fixes + icons * tweaks, species sprites * tgui rebuild * small tweak + linter * harvester icon tweak * spans * fixes and tweaks * caretaker nerf + tweaks * potential fix for knowledge * roller fix * mad mask * Update tgui.bundle.js * void phase tweak * Update tgui.bundle.js * misc tweaks * fix heretic not retargeting correctly with cryo * simplify logic * this is better * lots of fixes and tweaks * Update tgui.bundle.js * linter * linter * fireshark and greyscale insanity * fish * Update tgui.bundle.js * linter * linter * tgui * no window shopping * fish fix * tgui rebundle * moon smile runtime fix * various fixes * sacrifice fixes * insanity is easier now, madness mask changes. * bugfixing + teleport change * linters + tweaks * Update code/modules/antagonists/heretic/status_effects/mark_effects.dm Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * Update code/modules/antagonists/heretic/status_effects/mark_effects.dm Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> --------- Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> Co-authored-by: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Co-authored-by: warriorstar-orion <orion@snowfrost.garden> Co-authored-by: Paul <pmerkamp@gmail.com> Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
49 lines
2.1 KiB
Plaintext
49 lines
2.1 KiB
Plaintext
/// Shapeshift when we have no target, until someone has been nearby for long enough
|
|
/datum/ai_planning_subtree/shapechange_ambush
|
|
operational_datums = list(/datum/component/ai_target_timer)
|
|
/// Key where we keep our ability
|
|
var/ability_key = BB_SHAPESHIFT_ACTION
|
|
/// Key where we keep our target
|
|
var/target_key = BB_BASIC_MOB_CURRENT_TARGET
|
|
/// How long to lull our target into a false sense of security
|
|
var/minimum_target_time = 8 SECONDS
|
|
|
|
/datum/ai_planning_subtree/shapechange_ambush/select_behaviors(datum/ai_controller/controller, seconds_per_tick)
|
|
var/mob/living/living_pawn = controller.pawn
|
|
var/is_shifted = ismob(living_pawn.loc)
|
|
var/has_target = controller.blackboard_key_exists(target_key)
|
|
var/datum/action/cooldown/using_action = controller.blackboard[ability_key]
|
|
|
|
if(!is_shifted)
|
|
if(has_target)
|
|
return // We're busy
|
|
|
|
if(using_action?.IsAvailable())
|
|
controller.queue_behavior(/datum/ai_behavior/use_mob_ability/shapeshift, BB_SHAPESHIFT_ACTION) // Shift
|
|
return SUBTREE_RETURN_FINISH_PLANNING
|
|
|
|
if(!has_target || !using_action?.IsAvailable())
|
|
return SUBTREE_RETURN_FINISH_PLANNING // Lie in wait
|
|
var/time_on_target = controller.blackboard[BB_BASIC_MOB_HAS_TARGET_TIME] || 0
|
|
if(time_on_target < minimum_target_time)
|
|
return // Wait a bit longer
|
|
controller.queue_behavior(/datum/ai_behavior/use_mob_ability/shapeshift, BB_SHAPESHIFT_ACTION) // Surprise!
|
|
|
|
/// Selects a random shapeshift ability before shifting
|
|
/datum/ai_behavior/use_mob_ability/shapeshift
|
|
|
|
/datum/ai_behavior/use_mob_ability/shapeshift/setup(datum/ai_controller/controller, ability_key)
|
|
var/datum/spell/mimic/using_action = controller.blackboard[ability_key]
|
|
if(using_action?.cooldown_handler.is_on_cooldown())
|
|
return FALSE
|
|
if(isnull(using_action.selected_form)) // If we don't have a shape then pick one, AI can't use context wheels
|
|
var/list/things = list()
|
|
for(var/atom/movable/A in oview(src))
|
|
if(using_action.valid_target(A, src))
|
|
things += A
|
|
if(!length(things))
|
|
return
|
|
var/atom/movable/T = pick(things)
|
|
using_action.take_form(new /datum/mimic_form(T, src), src)
|
|
return ..()
|