mob_damage
Tests to make sure mob damage procs are working correctly
Procs | |
apply_damage | Apply a specific amount of damage to the mob using adjustBruteLoss(), adjustToxLoss(), etc. |
---|---|
set_damage | Set a specific amount of damage for the mob using setBruteLoss(), setToxLoss(), etc. |
test_apply_damage | Test whether the adjust damage procs return the correct values and that the mob's health is the expected value afterwards. |
test_biotypes | Testing biotypes |
test_godmode | Tests damage procs with godmode on |
test_nobreath | Testing oxyloss with the TRAIT_NOBREATH |
test_ordered_healing | Testing heal_ordered_damage() |
test_sanity_complex | Sanity tests damage and healing using the more complex procs like take_overall_damage(), heal_overall_damage(), etc |
test_sanity_simple | Sanity tests damage and healing using adjustToxLoss, adjustBruteLoss, etc |
test_set_damage | Test whether the set damage procs return the correct values and that the mob's health is the expected value afterwards. |
test_toxintraits | Testing toxloss with TRAIT_TOXINLOVER and TRAIT_TOXIMMUNE |
verify_damage | Check that the mob has a specific amount of damage |
Proc Details
apply_damage
Apply a specific amount of damage to the mob using adjustBruteLoss(), adjustToxLoss(), etc.
By default this applies
- testing_mob - the mob to apply the damage to
- amount - the amount of damage to apply to the mob
- expected - what the expected return value of the damage proc is
- included_types - Bitflag of damage types to apply
- biotypes - the biotypes of damage to apply
- bodytypes - the bodytypes of damage to apply
- forced - whether or not this is forced damage
set_damage
Set a specific amount of damage for the mob using setBruteLoss(), setToxLoss(), etc.
By default this sets every type of damage to
- testing_mob - the mob to apply the damage to
- amount - the amount of damage to apply to the mob
- expected - what the expected return value of the damage proc is
- included_types - Bitflag of damage types to apply
- biotypes - the biotypes of damage to apply
- bodytypes - the bodytypes of damage to apply
- forced - whether or not this is forced damage
test_apply_damage
Test whether the adjust damage procs return the correct values and that the mob's health is the expected value afterwards.
By default this calls apply_damage(amount) followed by verify_damage(amount_after) and returns TRUE if both succeeded. amount_after defaults to the mob's current stamina loss but can be overridden as needed.
Arguments:
- testing_mob - the mob to apply the damage to
- amount - the amount of damage to apply to the mob
- expected - what the expected return value of the damage proc is
- amount_after - in case you want to specify what the damage amount on the mob should be afterwards
- included_types - Bitflag of damage types to apply
- biotypes - the biotypes of damage to apply
- bodytypes - the bodytypes of damage to apply
- forced - whether or not this is forced damage
test_biotypes
Testing biotypes
test_godmode
Tests damage procs with godmode on
test_nobreath
Testing oxyloss with the TRAIT_NOBREATH
test_ordered_healing
Testing heal_ordered_damage()
test_sanity_complex
Sanity tests damage and healing using the more complex procs like take_overall_damage(), heal_overall_damage(), etc
test_sanity_simple
Sanity tests damage and healing using adjustToxLoss, adjustBruteLoss, etc
test_set_damage
Test whether the set damage procs return the correct values and that the mob's health is the expected value afterwards.
By default this calls set_damage(amount) followed by verify_damage(amount_after) and returns TRUE if both succeeded. amount_after defaults to the mob's current stamina loss but can be overridden as needed.
Arguments:
- testing_mob - the mob to apply the damage to
- amount - the amount of damage to apply to the mob
- expected - what the expected return value of the damage proc is
- amount_after - in case you want to specify what the damage amount on the mob should be afterwards
- included_types - Bitflag of damage types to apply
- biotypes - the biotypes of damage to apply
- bodytypes - the bodytypes of damage to apply
- forced - whether or not this is forced damage
test_toxintraits
Testing toxloss with TRAIT_TOXINLOVER and TRAIT_TOXIMMUNE
verify_damage
Check that the mob has a specific amount of damage
By default this checks that the mob has
- testing_mob - the mob to check the damage of
- amount - the amount of damage to verify that the mob has
- included_types - Bitflag of damage types to check.