ai_swap_combat_mode ![code/datums/elements/ai_swap_combat_mode.dm 4](git.png)
Attached to a mob with an AI controller, updates combat mode when the affected mob acquires or loses targets
Vars | |
battle_end_barks | A one liner said when we exit combat mode |
---|---|
battle_start_barks | The message we yell when we enter combat mode |
speech_chance | The chance to yell the above lines |
target_key | Target key |
Procs | |
on_target_cleared | When the mob loses its target, and it was not already out of combat mode, exit it |
on_target_gained | When the mob gains a target, and it was not already in combat mode, enter it |
speak_bark | Says a quip, if the RNG allows it |
swap_mode | If the combat mode would be changed into a different state, updates it and returns TRUE, otherwise returns FALSE |
Var Details
battle_end_barks ![code/datums/elements/ai_swap_combat_mode.dm 10](git.png)
A one liner said when we exit combat mode
battle_start_barks ![code/datums/elements/ai_swap_combat_mode.dm 8](git.png)
The message we yell when we enter combat mode
speech_chance ![code/datums/elements/ai_swap_combat_mode.dm 12](git.png)
The chance to yell the above lines
target_key ![code/datums/elements/ai_swap_combat_mode.dm 16](git.png)
Target key
Proc Details
on_target_cleared
When the mob loses its target, and it was not already out of combat mode, exit it
on_target_gained
When the mob gains a target, and it was not already in combat mode, enter it
speak_bark
Says a quip, if the RNG allows it
swap_mode
If the combat mode would be changed into a different state, updates it and returns TRUE, otherwise returns FALSE