martial_art
Vars | |
allow_temp_override | If TRUE, this martial art can be overridden and stored (via base) by other martial arts if deemed "temporary" via teach(). |
---|---|
base | Used for temporary martial arts. This is a reference to the last martial art that was replaced by this one. |
combo_timer | The length of time until streaks are auto-reset. |
current_target | Weakref to the last mob we attacked, for determining when to reset streaks |
display_combos | If TRUE, a combo meter will be displayed on the HUD for the current streak |
help_verb | Path to verb to display help text for this martial art. |
holder | The current mob associated with this martial art datum. Do not set directly. |
id | ID of the martial art |
max_streak_length | The maximum length of streaks allowed |
name | Player readable name of the martial art |
pacifist_style | If TRUE, this style allows you to punch people despite being a pacifist (IE: Boxing, which does no damage) |
smashes_tables | If TRUE, this martial art smashes tables when performing table slams and head smashes |
streak | The streak of attacks the user has performed |
timerid | Timer ID for the combo reset timer. |
Procs | |
add_to_streak | Adds the passed element to the current streak, resetting it if the target is not the same as the last target. |
attempt_grab | Signal proc for COMSIG_LIVING_GRAB to hook into the grab |
can_use | Checks if the passed mob can use this martial art. |
disarm_act | Called when disarm-intenting on someone |
fully_remove | A helper proc to remove the martial art from the passed mob fully, e ven if stored in another martial art's base. |
grab_act | Called when grabbing someone |
harm_act | Called when harm-intenting on someone |
help_act | Called when help-intenting on someone |
on_remove | Called when this martial art is removed from a mob. |
on_teach | Called when this martial art is added to a mob. |
remove | Removes this martial art from the passed mob AND their mind. |
reset_streak | Resets the current streak. |
store_martial_art | Stores the passed martial art in the base var. |
teach | Teaches the passed mob this martial art. |
transfer_martial_arts | Signal proc for COMSIG_MOB_MIND_TRANSFERRED_OUT_OF to pass martial arts between bodies on mind transfer By this point the martial art's holder is the old body, but the mind that owns it is in the new body |
unarmed_strike | Signal proc for COMSIG_LIVING_UNARMED_ATTACK to hook into the appropriate proc |
unstore_martial_art | Unstores the base var. |
Var Details
allow_temp_override
If TRUE, this martial art can be overridden and stored (via base) by other martial arts if deemed "temporary" via teach().
base
Used for temporary martial arts. This is a reference to the last martial art that was replaced by this one.
combo_timer
The length of time until streaks are auto-reset.
current_target
Weakref to the last mob we attacked, for determining when to reset streaks
display_combos
If TRUE, a combo meter will be displayed on the HUD for the current streak
help_verb
Path to verb to display help text for this martial art.
holder
The current mob associated with this martial art datum. Do not set directly.
id
ID of the martial art
max_streak_length
The maximum length of streaks allowed
name
Player readable name of the martial art
pacifist_style
If TRUE, this style allows you to punch people despite being a pacifist (IE: Boxing, which does no damage)
smashes_tables
If TRUE, this martial art smashes tables when performing table slams and head smashes
streak
The streak of attacks the user has performed
timerid
Timer ID for the combo reset timer.
Proc Details
add_to_streak
Adds the passed element to the current streak, resetting it if the target is not the same as the last target.
Arguments
- element - The element to add to the streak. This is some one letter string.
- mob/living/defender - The mob being attacked
attempt_grab
Signal proc for COMSIG_LIVING_GRAB to hook into the grab
can_use
Checks if the passed mob can use this martial art.
Arguments
- mob/living/martial_artist - The mob to check
Returns
- TRUE - The mob can use this martial art
- FALSE - The mob cannot use this martial art
disarm_act
Called when disarm-intenting on someone
What is checked going into this: Adjacency, TRAIT_MARTIAL_ARTS_IMMUNE, attacker incapacitated, can_unarmed_attack, can_use
What is NOT: check_block
Arguments
- mob/living/attacker - The mob attacking
- mob/living/defender - The mob being attacked
Returns
- MARTIAL_ATTACK_INVALID - The attack is not valid, do normal unarmed attack
- MARTIAL_ATTACK_FAIL - The attack is valid, but failed. No followup attack is made.
- MARTIAL_ATTACK_SUCCESS - The attack is valid, and succeeded. No followup attack is made.
fully_remove
A helper proc to remove the martial art from the passed mob fully, e ven if stored in another martial art's base.
Arguments
- mob/living/maybe_holder - The mob to check.
Returns
- TRUE - If the martial art was removed in some way
- FALSE - If nothing happened
grab_act
Called when grabbing someone
What is checked going into this: Adjacency, TRAIT_MARTIAL_ARTS_IMMUNE, attacker incapacitated, can_unarmed_attack, can_use
What is NOT: check_block
Arguments
- mob/living/attacker - The mob attacking
- mob/living/defender - The mob being attacked
Returns
- MARTIAL_ATTACK_INVALID - The attack is not valid, do normal unarmed attack
- MARTIAL_ATTACK_FAIL - The attack is valid, but failed. No followup attack is made.
- MARTIAL_ATTACK_SUCCESS - The attack is valid, and succeeded. No followup attack is made.
harm_act
Called when harm-intenting on someone
What is checked going into this: Adjacency, TRAIT_MARTIAL_ARTS_IMMUNE, attacker incapacitated, can_unarmed_attack, can_use
What is NOT: check_block
Arguments
- mob/living/attacker - The mob attacking
- mob/living/defender - The mob being attacked
Returns
- MARTIAL_ATTACK_INVALID - The attack is not valid, do normal unarmed attack
- MARTIAL_ATTACK_FAIL - The attack is valid, but failed. No followup attack is made.
- MARTIAL_ATTACK_SUCCESS - The attack is valid, and succeeded. No followup attack is made.
help_act
Called when help-intenting on someone
What is checked going into this: Adjacency, TRAIT_MARTIAL_ARTS_IMMUNE, attacker incapacitated, can_unarmed_attack, can_use
What is NOT: check_block
Arguments
- mob/living/attacker - The mob attacking
- mob/living/defender - The mob being attacked
Returns
- MARTIAL_ATTACK_INVALID - The attack is not valid, do normal unarmed attack
- MARTIAL_ATTACK_FAIL - The attack is valid, but failed. No followup attack is made.
- MARTIAL_ATTACK_SUCCESS - The attack is valid, and succeeded. No followup attack is made.
on_remove
Called when this martial art is removed from a mob.
on_teach
Called when this martial art is added to a mob.
remove
Removes this martial art from the passed mob AND their mind.
Arguments
- mob/living/old_holder - The mob to remove this martial art from.
reset_streak
Resets the current streak.
Arguments
- mob/living/new_target - (Optional) The mob being attacked while the reset is occurring.
- update_icon - If TRUE, the combo display will be updated.
store_martial_art
Stores the passed martial art in the base var.
teach
Teaches the passed mob this martial art.
Arguments
- mob/living/new_holder - The mob to teach this martial art to.
- make_temporary - If FALSE, this martial art will completely replace any existing martial arts. If TRUE, any existing martial art will be stored in the base variable, and will be restored when this martial art is removed. This can only occur if allow_temp_override is TRUE.
Returns
- TRUE - The martial art was successfully taught.
- FALSE - The mob failed to learn the martial art, for whatever reason.
transfer_martial_arts
Signal proc for COMSIG_MOB_MIND_TRANSFERRED_OUT_OF to pass martial arts between bodies on mind transfer By this point the martial art's holder is the old body, but the mind that owns it is in the new body
unarmed_strike
Signal proc for COMSIG_LIVING_UNARMED_ATTACK to hook into the appropriate proc
unstore_martial_art
Unstores the base var.