baton 
Vars | |
active | Whether this baton is active or not. |
---|---|
affect_bots | Can we stun bots? |
affect_cyborgs | Can we stun cyborgs? |
allows_stun_in_harm | Can we stun the target in harm intent, additionally to a normal attack? |
clumsy_knockdown_time | The length of the knockdown applied to the user on clumsy_check(). |
cooldown | Default wait time until can stun again. |
force_say_chance | Chance of causing force_say() when stunning a human mob. |
knockdown_time | The length of the knockdown applied to a struck living, non-cyborg mob. |
log_stun_attack | Whether the stun attack is logged. Only relevant for abductor batons, which have different modes. |
on_stun_sound | The path of the default sound to play when we stun something. |
on_stun_volume | The volume of the stun sound. |
skip_harm_attack | Whether to skip attack in harm mode. |
stamina_damage | How much stamina damage we deal on a successful hit against a living, non-cyborg mob. |
stun_animation | Do we animate the "hit" when stunning something? |
stun_cooldown | Cooldown timestamp |
stun_time_cyborg | If affect_cyborg is TRUE, this is how long we stun cyborgs for on a hit. |
Procs | |
additional_effects_cyborg | Contains any special effects that we apply to cyborgs we stun. Does not include flashing the cyborg's screen, hardstunning them, etc. |
additional_effects_non_cyborg | Contains any special effects that we apply to living, non-cyborg mobs we stun. Does not include applying a knockdown, dealing stamina damage, etc. |
attack | Ok, think of baton attacks like a melee attack chain: |
get_cyborg_stun_description | Default message for stunning a cyborg. |
get_stun_description | Default message for stunning a living, non-cyborg mob. |
get_unga_dunga_cyborg_stun_description | Default message for trying to stun a cyborg with a baton that can't stun cyborgs. |
get_wait_description | Description for trying to stun when still on cooldown. |
Var Details
active 
Whether this baton is active or not.
affect_bots 
Can we stun bots?
affect_cyborgs 
Can we stun cyborgs?
allows_stun_in_harm 
Can we stun the target in harm intent, additionally to a normal attack?
clumsy_knockdown_time 
The length of the knockdown applied to the user on clumsy_check().
cooldown 
Default wait time until can stun again.
force_say_chance 
Chance of causing force_say() when stunning a human mob.
knockdown_time 
The length of the knockdown applied to a struck living, non-cyborg mob.
log_stun_attack 
Whether the stun attack is logged. Only relevant for abductor batons, which have different modes.
on_stun_sound 
The path of the default sound to play when we stun something.
on_stun_volume 
The volume of the stun sound.
skip_harm_attack 
Whether to skip attack in harm mode.
stamina_damage 
How much stamina damage we deal on a successful hit against a living, non-cyborg mob.
stun_animation 
Do we animate the "hit" when stunning something?
stun_cooldown 
Cooldown timestamp
stun_time_cyborg 
If affect_cyborg is TRUE, this is how long we stun cyborgs for on a hit.
Proc Details
additional_effects_cyborg
Contains any special effects that we apply to cyborgs we stun. Does not include flashing the cyborg's screen, hardstunning them, etc.
additional_effects_non_cyborg
Contains any special effects that we apply to living, non-cyborg mobs we stun. Does not include applying a knockdown, dealing stamina damage, etc.
attack
Ok, think of baton attacks like a melee attack chain:
[/baton_attack()] comes first. It checks if the user is clumsy, human shields, martial defence and handles some messages and sounds.
- Depending on its return value, it'll either do a normal attack, continue to the next step or stop the attack.
[/finalize_baton_attack()] is then called. It handles logging stuff, sound effects and calls baton_effect().
- The proc is also called in other situations such as throw impact. Basically when baton_attack()
- checks are either redundant or unnecessary.
[/baton_effect()] is third in the line. It knockdowns targets, along other effects called in additional_effects_cyborg() and
- additional_effects_non_cyborg().
Last but not least [/set_batoned()], which gives the target the IWASBATONED trait with UNIQUE_TRAIT_SOURCE(user) as source
- and then removes it after a cooldown has passed. Basically, it stops users from cheesing the cooldowns by dual wielding batons.
TL;DR: [/baton_attack()] -> [/finalize_baton_attack()] -> [/baton_effect()] -> [/set_batoned()]
get_cyborg_stun_description
Default message for stunning a cyborg.
get_stun_description
Default message for stunning a living, non-cyborg mob.
get_unga_dunga_cyborg_stun_description
Default message for trying to stun a cyborg with a baton that can't stun cyborgs.
get_wait_description
Description for trying to stun when still on cooldown.