code/modules/mob/living/basic/space_fauna/carp/carp_ai_actions.dm
/datum/ai_planning_subtree/basic_melee_attack_subtree/magicarp | As basic attack tree but interrupt if your health gets low or if your spell is off cooldown |
---|---|
/datum/ai_behavior/basic_melee_attack/magicarp | Interrupt your attack chain if: you have a spell, it's not on cooldown, and it has a target |
/datum/ai_planning_subtree/find_nearest_magicarp_spell_target | Find a target for the magicarp's spell This gets weird because different spells want different targeting but I didn't want a new ai controller for every different spell |
/datum/ai_behavior/find_potential_targets/nearest/magicarp | This subtype only exists because if you queue multiple of the same action with different arguments it deletes their stored arguments |
/datum/ai_planning_subtree/targeted_mob_ability/magicarp | Then use it on that target |