chance_to_hit tests (#9093)
This commit is contained in:
parent
f1a236ae24
commit
124cf1ccf0
33 changed files with 1130 additions and 4 deletions
|
@ -80,6 +80,7 @@
|
|||
{test/scenarios/wml_tests/UnitsWML/AbilitiesWML}
|
||||
{test/scenarios/wml_tests/UnitsWML/AbilitiesWML/attacks}
|
||||
{test/scenarios/wml_tests/UnitsWML/AbilitiesWML/berserk}
|
||||
{test/scenarios/wml_tests/UnitsWML/AbilitiesWML/chance_to_hit}
|
||||
{test/scenarios/wml_tests/UnitsWML/AbilitiesWML/heals}
|
||||
{test/scenarios/wml_tests/UnitsWML/AbilitiesWML/hides}
|
||||
{test/scenarios/wml_tests/UnitsWML/AbilitiesWML/illuminates}
|
||||
|
|
|
@ -161,6 +161,7 @@ bob#endarg
|
|||
# checks the number of strikes of all weapons a unit has
|
||||
# STRIKES is a comma-delimited list containing the number of strikes each weapon the unit has is expected to have
|
||||
# The implementation currently only supports one CHECK_STRIKES per unique ID1 per unit test
|
||||
# By default, both units chance to hit will be set to 100%. This can be overridden with the optional CHANCE_TO_HIT argument
|
||||
#define CHECK_STRIKES STRIKES RESULT
|
||||
|
||||
#arg ID1
|
||||
|
@ -172,6 +173,12 @@ bob#endarg
|
|||
#arg COMPARE
|
||||
numerical_equals#endarg
|
||||
|
||||
#arg CHANCE_TO_HIT
|
||||
[chance_to_hit]
|
||||
value=100
|
||||
[/chance_to_hit]
|
||||
#endarg
|
||||
|
||||
[event]
|
||||
name = start
|
||||
|
||||
|
@ -207,9 +214,7 @@ numerical_equals#endarg
|
|||
[damage]
|
||||
value=1
|
||||
[/damage]
|
||||
[chance_to_hit]
|
||||
value=100
|
||||
[/chance_to_hit]
|
||||
{CHANCE_TO_HIT}
|
||||
[/set_specials]
|
||||
[/effect]
|
||||
[/modify_unit]
|
||||
|
@ -244,7 +249,7 @@ numerical_equals#endarg
|
|||
[/event]
|
||||
|
||||
[event]
|
||||
name=attacker hits, attacker misses
|
||||
name=attacker hits
|
||||
first_time_only=no
|
||||
|
||||
[filter]
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
# wmllint: no translatables
|
||||
|
||||
#####
|
||||
# API(s) being tested: [chance_to_hit]value=
|
||||
##
|
||||
# Actions:
|
||||
# Give the leaders a chance_to_hit ability with both the value and add attributes, adding up to 100
|
||||
# Give each unit 1000 hp and 100 strikes
|
||||
# Have the side 1 leader attack the side 2 leader with both its weapons
|
||||
##
|
||||
# Expected end state:
|
||||
# The side 1 leader's first weapon strikes 100 times
|
||||
# The side 1 leader's second weapon strikes 100 times
|
||||
#####
|
||||
{COMMON_KEEP_A_B_UNIT_TEST "chance_to_hit_add" (
|
||||
[event]
|
||||
name = start
|
||||
|
||||
{SET_HP VALUE=1000}
|
||||
|
||||
[modify_unit]
|
||||
[filter]
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to = new_ability
|
||||
[abilities]
|
||||
{TEST_ABILITY attacks 100 () SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 90 (add=10) SELF=yes}
|
||||
[/abilities]
|
||||
[/effect]
|
||||
[/modify_unit]
|
||||
[/event]
|
||||
|
||||
{CHECK_STRIKES "100,100" ({SUCCEED}) (CHANCE_TO_HIT=)}
|
||||
)}
|
|
@ -0,0 +1,36 @@
|
|||
# wmllint: no translatables
|
||||
|
||||
#####
|
||||
# API(s) being tested: [chance_to_hit]value=
|
||||
##
|
||||
# Actions:
|
||||
# Give the leaders a chance_to_hit ability with both the value, add, and divide attributes, adding up to 100
|
||||
# Give each unit 1000 hp and 100 strikes
|
||||
# Have the side 1 leader attack the side 2 leader with both its weapons
|
||||
##
|
||||
# Expected end state:
|
||||
# The side 1 leader's first weapon strikes 100 times
|
||||
# The side 1 leader's second weapon strikes 100 times
|
||||
#####
|
||||
{COMMON_KEEP_A_B_UNIT_TEST "chance_to_hit_add_divide" (
|
||||
[event]
|
||||
name = start
|
||||
|
||||
{SET_HP VALUE=1000}
|
||||
|
||||
[modify_unit]
|
||||
[filter]
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to = new_ability
|
||||
[abilities]
|
||||
{TEST_ABILITY attacks 100 () SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 50 (add=150
|
||||
divide=2) SELF=yes}
|
||||
[/abilities]
|
||||
[/effect]
|
||||
[/modify_unit]
|
||||
[/event]
|
||||
|
||||
{CHECK_STRIKES "100,100" ({SUCCEED}) (CHANCE_TO_HIT=)}
|
||||
)}
|
|
@ -0,0 +1,38 @@
|
|||
# wmllint: no translatables
|
||||
|
||||
#####
|
||||
# API(s) being tested: [chance_to_hit]value=
|
||||
##
|
||||
# Actions:
|
||||
# Give the leaders a chance_to_hit ability with both the value, add, and multiply attributes, adding up to 100
|
||||
# Give each unit 1000 hp and 100 strikes
|
||||
# Have the side 1 leader attack the side 2 leader with both its weapons
|
||||
##
|
||||
# Expected end state:
|
||||
# The side 1 leader's first weapon strikes 100 times
|
||||
# The side 1 leader's second weapon strikes 100 times
|
||||
#####
|
||||
#ifndef SCHEMA_VALIDATION
|
||||
{COMMON_KEEP_A_B_UNIT_TEST "chance_to_hit_add_multiply" (
|
||||
[event]
|
||||
name = start
|
||||
|
||||
{SET_HP VALUE=1000}
|
||||
|
||||
[modify_unit]
|
||||
[filter]
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to = new_ability
|
||||
[abilities]
|
||||
{TEST_ABILITY attacks 100 () SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 45 (add=5
|
||||
multiply=2) SELF=yes}
|
||||
[/abilities]
|
||||
[/effect]
|
||||
[/modify_unit]
|
||||
[/event]
|
||||
|
||||
{CHECK_STRIKES "100,100" ({SUCCEED}) (CHANCE_TO_HIT=)}
|
||||
)}
|
||||
#endif
|
|
@ -0,0 +1,37 @@
|
|||
# wmllint: no translatables
|
||||
|
||||
#####
|
||||
# API(s) being tested: [chance_to_hit]value=
|
||||
##
|
||||
# Actions:
|
||||
# Give the leaders a chance_to_hit ability with both the value, add, and sub attributes, adding up to 10 but effectively zero because sub completely overrides the add attribute.
|
||||
# Give each unit 1000 hp and 100 strikes
|
||||
# Have the side 1 leader attack the side 2 leader with both its weapons
|
||||
##
|
||||
# Expected end state:
|
||||
# the add attributes is ignored
|
||||
# The side 1 leader's first weapon strikes 0 times
|
||||
# The side 1 leader's second weapon strikes 0 times
|
||||
#####
|
||||
{COMMON_KEEP_A_B_UNIT_TEST "chance_to_hit_add_sub" (
|
||||
[event]
|
||||
name = start
|
||||
|
||||
{SET_HP VALUE=1000}
|
||||
|
||||
[modify_unit]
|
||||
[filter]
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to = new_ability
|
||||
[abilities]
|
||||
{TEST_ABILITY attacks 100 () SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 20 (add=10
|
||||
sub=20) SELF=yes}
|
||||
[/abilities]
|
||||
[/effect]
|
||||
[/modify_unit]
|
||||
[/event]
|
||||
|
||||
{CHECK_STRIKES "0,0" ({SUCCEED}) (CHANCE_TO_HIT=)}
|
||||
)}
|
|
@ -0,0 +1,41 @@
|
|||
# wmllint: no translatables
|
||||
|
||||
#####
|
||||
# API(s) being tested: [chance_to_hit]affect_allies=
|
||||
##
|
||||
# Actions:
|
||||
# Give the side 1 leader a chance_to_hit ability that only affects adjacent allies set to 100
|
||||
# Give each unit 1000 hp and 100 strikes
|
||||
# Have the side 2 leader attack the side 3 leader with both its weapons
|
||||
##
|
||||
# Expected end state:
|
||||
# The side 2 leader's first weapon strikes 100 times
|
||||
# The side 2 leader's second weapon strikes 100 times
|
||||
#####
|
||||
{COMMON_KEEP_A_B_C_D_UNIT_TEST "chance_to_hit_affect_allies" (
|
||||
[event]
|
||||
name = start
|
||||
|
||||
[modify_side]
|
||||
side=1,2
|
||||
team_name=allies
|
||||
[/modify_side]
|
||||
|
||||
{SET_HP VALUE=1000}
|
||||
|
||||
[modify_unit]
|
||||
[filter]
|
||||
side=1
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to = new_ability
|
||||
[abilities]
|
||||
{TEST_ABILITY attacks 100 ([affect_adjacent][/affect_adjacent]) ALLIES=yes}
|
||||
{TEST_ABILITY chance_to_hit 100 ([affect_adjacent][/affect_adjacent]) ALLIES=yes}
|
||||
[/abilities]
|
||||
[/effect]
|
||||
[/modify_unit]
|
||||
[/event]
|
||||
|
||||
{CHECK_STRIKES "100,100" ({SUCCEED}) ID1=bob ID2=charlie (CHANCE_TO_HIT=)}
|
||||
) SIDE_LEADER="Elvish Archer"}
|
|
@ -0,0 +1,36 @@
|
|||
# wmllint: no translatables
|
||||
|
||||
#####
|
||||
# API(s) being tested: [chance_to_hit]affect_enemies=
|
||||
##
|
||||
# Actions:
|
||||
# Give the side 1 leader a chance_to_hit ability that only affects adjacent enemies set to 100
|
||||
# Give each unit 1000 hp and 100 strikes
|
||||
# Have the side 2 leader attack the side 1 leader with both its weapons
|
||||
##
|
||||
# Expected end state:
|
||||
# The side 2 leader's first weapon strikes 100 times
|
||||
# The side 2 leader's second weapon strikes 100 times
|
||||
#####
|
||||
{COMMON_KEEP_A_B_UNIT_TEST "chance_to_hit_affect_enemies" (
|
||||
[event]
|
||||
name = start
|
||||
|
||||
{SET_HP VALUE=1000}
|
||||
|
||||
[modify_unit]
|
||||
[filter]
|
||||
side=1
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to = new_ability
|
||||
[abilities]
|
||||
{TEST_ABILITY attacks 100 ([affect_adjacent][/affect_adjacent]) ENEMIES=yes}
|
||||
{TEST_ABILITY chance_to_hit 100 ([affect_adjacent][/affect_adjacent]) ENEMIES=yes}
|
||||
[/abilities]
|
||||
[/effect]
|
||||
[/modify_unit]
|
||||
[/event]
|
||||
|
||||
{CHECK_STRIKES "100,100" ({SUCCEED}) ID1=bob ID2=alice (CHANCE_TO_HIT=)}
|
||||
) SIDE2_LEADER="Elvish Archer"}
|
|
@ -0,0 +1,50 @@
|
|||
# wmllint: no translatables
|
||||
|
||||
#####
|
||||
# API(s) being tested: [chance_to_hit]affect_allies=
|
||||
##
|
||||
# Actions:
|
||||
# Give the side 1 leader a chance_to_hit ability with affect_allies, affect_enemies, and affect_self set to 100
|
||||
# Give each unit 1000 hp and 100 strikes
|
||||
# Make side 1 and side 2 allies
|
||||
# Have the side 1 leader attack the side 3 leader with both its weapons
|
||||
# Have the side 2 leader attack the side 4 leader with both its weapons
|
||||
# Have the side 4 leader attack the side 1 leader with both its weapons
|
||||
##
|
||||
# Expected end state:
|
||||
# The side 1 leader's first weapon strikes 100 times
|
||||
# The side 1 leader's second weapon strikes 100 times
|
||||
# The side 2 leader's first weapon strikes 100 times
|
||||
# The side 2 leader's second weapon strikes 100 times
|
||||
# The side 4 leader's first weapon strikes 100 times
|
||||
# The side 4 leader's second weapon strikes 100 times
|
||||
#####
|
||||
{COMMON_KEEP_A_B_C_D_UNIT_TEST "chance_to_hit_affect_everybody" (
|
||||
[event]
|
||||
name = start
|
||||
|
||||
[modify_side]
|
||||
side=1,2
|
||||
team_name=allies
|
||||
[/modify_side]
|
||||
|
||||
{SET_HP VALUE=1000}
|
||||
|
||||
[modify_unit]
|
||||
[filter]
|
||||
side = 1
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to = new_ability
|
||||
[abilities]
|
||||
{TEST_ABILITY attacks 100 ([affect_adjacent][/affect_adjacent]) ENEMIES=yes SELF=yes ALLIES=yes}
|
||||
{TEST_ABILITY chance_to_hit 100 ([affect_adjacent][/affect_adjacent]) ENEMIES=yes SELF=yes ALLIES=yes}
|
||||
[/abilities]
|
||||
[/effect]
|
||||
[/modify_unit]
|
||||
[/event]
|
||||
|
||||
{CHECK_STRIKES "100,100" () ID1=alice ID2=charlie (CHANCE_TO_HIT=)}
|
||||
{CHECK_STRIKES "100,100" () ID1=bob ID2=dave (CHANCE_TO_HIT=)}
|
||||
{CHECK_STRIKES "100,100" ({SUCCEED}) ID1=dave ID2=alice (CHANCE_TO_HIT=)}
|
||||
) SIDE_LEADER="Elvish Archer"}
|
|
@ -0,0 +1,33 @@
|
|||
# wmllint: no translatables
|
||||
|
||||
#####
|
||||
# API(s) being tested: [chance_to_hit]affect_self=
|
||||
##
|
||||
# Actions:
|
||||
# Give the leaders a chance_to_hit ability that doesn't affect themselves.
|
||||
# Have the side 1 leader attack the side 2 leader with both its weapons
|
||||
##
|
||||
# Expected end state:
|
||||
# The side 1 leader has 2 weapons and is able to strike the side 2 leader
|
||||
#####
|
||||
{COMMON_KEEP_A_B_UNIT_TEST "chance_to_hit_affect_self_no" (
|
||||
[event]
|
||||
name = start
|
||||
|
||||
{SET_HP VALUE=1000}
|
||||
|
||||
[modify_unit]
|
||||
[filter]
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to = new_ability
|
||||
[abilities]
|
||||
{TEST_ABILITY attacks 100 () SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 0 ()}
|
||||
[/abilities]
|
||||
[/effect]
|
||||
[/modify_unit]
|
||||
[/event]
|
||||
|
||||
{CHECK_STRIKES "0,0" ({SUCCEED}) COMPARE=numerical_not_equals (CHANCE_TO_HIT=)}
|
||||
)}
|
|
@ -0,0 +1,34 @@
|
|||
# wmllint: no translatables
|
||||
|
||||
#####
|
||||
# API(s) being tested: [chance_to_hit]value=
|
||||
##
|
||||
# Actions:
|
||||
# Give the leaders a chance_to_hit ability with both the value and divide attributes
|
||||
# Have the side 1 leader attack the side 2 leader with both its weapons
|
||||
##
|
||||
# Expected end state:
|
||||
# The side 1 leader's first weapon strikes 100 times
|
||||
# The side 1 leader's second weapon strikes 100 times
|
||||
#####
|
||||
{COMMON_KEEP_A_B_UNIT_TEST "chance_to_hit_divide" (
|
||||
[event]
|
||||
name = start
|
||||
|
||||
{SET_HP VALUE=1000}
|
||||
|
||||
[modify_unit]
|
||||
[filter]
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to = new_ability
|
||||
[abilities]
|
||||
{TEST_ABILITY attacks 100 () SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 200 (divide=2) SELF=yes}
|
||||
[/abilities]
|
||||
[/effect]
|
||||
[/modify_unit]
|
||||
[/event]
|
||||
|
||||
{CHECK_STRIKES "100,100" ({SUCCEED}) (CHANCE_TO_HIT=)}
|
||||
)}
|
|
@ -0,0 +1,34 @@
|
|||
# wmllint: no translatables
|
||||
|
||||
#####
|
||||
# API(s) being tested: [chance_to_hit]value=
|
||||
##
|
||||
# Actions:
|
||||
# Give the leaders a chance_to_hit ability with both the value and max_value attributes
|
||||
# Have the side 1 leader attack the side 2 leader with both its weapons
|
||||
##
|
||||
# Expected end state:
|
||||
# The side 1 leader's first weapon doesn't strike 100 times
|
||||
# The side 1 leader's second weapon doesn't strike 100 times
|
||||
#####
|
||||
{COMMON_KEEP_A_B_UNIT_TEST "chance_to_hit_max_value" (
|
||||
[event]
|
||||
name = start
|
||||
|
||||
{SET_HP VALUE=1000}
|
||||
|
||||
[modify_unit]
|
||||
[filter]
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to = new_ability
|
||||
[abilities]
|
||||
{TEST_ABILITY attacks 100 () SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 100 (max_value=10) SELF=yes}
|
||||
[/abilities]
|
||||
[/effect]
|
||||
[/modify_unit]
|
||||
[/event]
|
||||
|
||||
{CHECK_STRIKES "100,100" ({SUCCEED}) COMPARE=numerical_not_equals (CHANCE_TO_HIT=)}
|
||||
)}
|
|
@ -0,0 +1,34 @@
|
|||
# wmllint: no translatables
|
||||
|
||||
#####
|
||||
# API(s) being tested: [chance_to_hit]value=
|
||||
##
|
||||
# Actions:
|
||||
# Give the leaders a chance_to_hit ability with both the value and multiply attributes
|
||||
# Have the side 1 leader attack the side 2 leader with both its weapons
|
||||
##
|
||||
# Expected end state:
|
||||
# The side 1 leader's first weapon strikes 100 times
|
||||
# The side 1 leader's second weapon strikes 100 times
|
||||
#####
|
||||
{COMMON_KEEP_A_B_UNIT_TEST "chance_to_hit_multiply" (
|
||||
[event]
|
||||
name = start
|
||||
|
||||
{SET_HP VALUE=1000}
|
||||
|
||||
[modify_unit]
|
||||
[filter]
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to = new_ability
|
||||
[abilities]
|
||||
{TEST_ABILITY attacks 100 () SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 50 (multiply=2) SELF=yes}
|
||||
[/abilities]
|
||||
[/effect]
|
||||
[/modify_unit]
|
||||
[/event]
|
||||
|
||||
{CHECK_STRIKES "100,100" ({SUCCEED}) (CHANCE_TO_HIT=)}
|
||||
)}
|
|
@ -0,0 +1,35 @@
|
|||
# wmllint: no translatables
|
||||
|
||||
#####
|
||||
# API(s) being tested: [chance_to_hit]value=
|
||||
##
|
||||
# Actions:
|
||||
# Give the leaders a chance_to_hit ability with both the value, multiply, and divide attributes
|
||||
# Have the side 1 leader attack the side 2 leader with both its weapons
|
||||
##
|
||||
# Expected end state:
|
||||
# The side 1 leader's first weapon strikes 100 times
|
||||
# The side 1 leader's second weapon strikes 100 times
|
||||
#####
|
||||
{COMMON_KEEP_A_B_UNIT_TEST "chance_to_hit_multiply_divide" (
|
||||
[event]
|
||||
name = start
|
||||
|
||||
{SET_HP VALUE=1000}
|
||||
|
||||
[modify_unit]
|
||||
[filter]
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to = new_ability
|
||||
[abilities]
|
||||
{TEST_ABILITY attacks 100 () SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 50 (multiply=4
|
||||
divide=2) SELF=yes}
|
||||
[/abilities]
|
||||
[/effect]
|
||||
[/modify_unit]
|
||||
[/event]
|
||||
|
||||
{CHECK_STRIKES "100,100" ({SUCCEED}) (CHANCE_TO_HIT=)}
|
||||
)}
|
|
@ -0,0 +1,34 @@
|
|||
# wmllint: no translatables
|
||||
|
||||
#####
|
||||
# API(s) being tested: [chance_to_hit]value=
|
||||
##
|
||||
# Actions:
|
||||
# Give the leaders a chance_to_hit ability with a value of -10.
|
||||
# Have the side 1 leader attack the side 2 leader with both its weapons
|
||||
##
|
||||
# Expected end state:
|
||||
# The side 1 leader's first weapon strikes 0 times
|
||||
# The side 1 leader's second weapon strikes 0 times
|
||||
#####
|
||||
{COMMON_KEEP_A_B_UNIT_TEST "chance_to_hit_negative_value" (
|
||||
[event]
|
||||
name = start
|
||||
|
||||
{SET_HP VALUE=1000}
|
||||
|
||||
[modify_unit]
|
||||
[filter]
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to = new_ability
|
||||
[abilities]
|
||||
{TEST_ABILITY attacks 100 () SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit -10 () SELF=yes}
|
||||
[/abilities]
|
||||
[/effect]
|
||||
[/modify_unit]
|
||||
[/event]
|
||||
|
||||
{CHECK_STRIKES "0,0" ({SUCCEED}) (CHANCE_TO_HIT=)}
|
||||
)}
|
|
@ -0,0 +1,42 @@
|
|||
#textdomain wesnoth-test
|
||||
|
||||
#####
|
||||
# API(s) being tested: [chance_to_hit]value=
|
||||
##
|
||||
# Actions:
|
||||
# Give the leaders a chance_to_hit ability missing the value attribute.
|
||||
# Have the side 1 leader attack the side 2 leader with both its weapons
|
||||
##
|
||||
# Expected end state:
|
||||
# The chance to hit is not changed.
|
||||
# No errors are logged.
|
||||
#####
|
||||
{COMMON_KEEP_A_B_UNIT_TEST "chance_to_hit_no_value" (
|
||||
[event]
|
||||
name = start
|
||||
|
||||
{SET_HP VALUE=1000}
|
||||
|
||||
[modify_unit]
|
||||
[filter]
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to = new_ability
|
||||
[abilities]
|
||||
{TEST_ABILITY attacks 100 () SELF=yes}
|
||||
[chance_to_hit]
|
||||
id = "test-chance_to_hit"
|
||||
name = _"test-chance_to_hit"
|
||||
affect_self = yes
|
||||
affect_allies = no
|
||||
affect_enemies = no
|
||||
cumulative = no
|
||||
[/chance_to_hit]
|
||||
[/abilities]
|
||||
[/effect]
|
||||
[/modify_unit]
|
||||
[/event]
|
||||
|
||||
{CHECK_STRIKES "0,0" () COMPARE=numerical_not_equals (CHANCE_TO_HIT=)}
|
||||
{CHECK_STRIKES "100,100" ({SUCCEED}) COMPARE=numerical_not_equals (CHANCE_TO_HIT=)}
|
||||
)}
|
|
@ -0,0 +1,36 @@
|
|||
# wmllint: no translatables
|
||||
|
||||
#####
|
||||
# API(s) being tested: [chance_to_hit]overwrite_specials=
|
||||
##
|
||||
# Actions:
|
||||
# Give the side 1 leader a chance_to_hit ability with the overwrite_specials=both_sides attribute
|
||||
# Give the side 1 leader a chance_to_hit ability without the overwrite_specials attribute
|
||||
# Have the side 1 leader attack the side 2 leader with both its weapons
|
||||
##
|
||||
# Expected end state:
|
||||
# The side 1 leader has 2 weapons which strike 100 times, since the 100 value ability takes priority due to overwrite_specials
|
||||
#####
|
||||
{COMMON_KEEP_A_B_UNIT_TEST "chance_to_hit_overwrite_specials_both_sides" (
|
||||
[event]
|
||||
name = start
|
||||
|
||||
{SET_HP VALUE=1000}
|
||||
|
||||
[modify_unit]
|
||||
[filter]
|
||||
side=1
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to = new_ability
|
||||
[abilities]
|
||||
{TEST_ABILITY attacks 100 () SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 100 (overwrite_specials=both_sides) SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 0 () SELF=yes}
|
||||
[/abilities]
|
||||
[/effect]
|
||||
[/modify_unit]
|
||||
[/event]
|
||||
|
||||
{CHECK_STRIKES "100,100" ({SUCCEED}) (CHANCE_TO_HIT=)}
|
||||
)}
|
|
@ -0,0 +1,36 @@
|
|||
# wmllint: no translatables
|
||||
|
||||
#####
|
||||
# API(s) being tested: [chance_to_hit]overwrite_specials=
|
||||
##
|
||||
# Actions:
|
||||
# Give the side 1 leader a chance_to_hit ability with the overwrite_specials=one_side attribute
|
||||
# Give the side 1 leader another chance_to_hit ability with the overwrite_specials=both_sides attribute
|
||||
# Have the side 1 leader attack the side 2 leader with both its weapons
|
||||
##
|
||||
# Expected end state:
|
||||
# The side 1 leader has 2 weapons which strike 100 times, since the the higher value ability is used
|
||||
#####
|
||||
{COMMON_KEEP_A_B_UNIT_TEST "chance_to_hit_overwrite_specials_mixed" (
|
||||
[event]
|
||||
name = start
|
||||
|
||||
{SET_HP VALUE=1000}
|
||||
|
||||
[modify_unit]
|
||||
[filter]
|
||||
side=1
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to = new_ability
|
||||
[abilities]
|
||||
{TEST_ABILITY attacks 100 () SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 0 (overwrite_specials=one_side) SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 100 (overwrite_specials=both_sides) SELF=yes}
|
||||
[/abilities]
|
||||
[/effect]
|
||||
[/modify_unit]
|
||||
[/event]
|
||||
|
||||
{CHECK_STRIKES "100,100" ({SUCCEED}) (CHANCE_TO_HIT=)}
|
||||
)}
|
|
@ -0,0 +1,36 @@
|
|||
# wmllint: no translatables
|
||||
|
||||
#####
|
||||
# API(s) being tested: [chance_to_hit]overwrite_specials=
|
||||
##
|
||||
# Actions:
|
||||
# Give the side 1 leader a chance_to_hit ability with the overwrite_specials=one_side attribute
|
||||
# Give the side 1 leader a chance_to_hit ability without the overwrite_specials attribute
|
||||
# Have the side 1 leader attack the side 2 leader with both its weapons
|
||||
##
|
||||
# Expected end state:
|
||||
# The side 1 leader has 2 weapons which strike 0 times, since the 0 value ability takes priority due to overwrite_specials
|
||||
#####
|
||||
{COMMON_KEEP_A_B_UNIT_TEST "chance_to_hit_overwrite_specials_one_side" (
|
||||
[event]
|
||||
name = start
|
||||
|
||||
{SET_HP VALUE=1000}
|
||||
|
||||
[modify_unit]
|
||||
[filter]
|
||||
side=1
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to = new_ability
|
||||
[abilities]
|
||||
{TEST_ABILITY attacks 100 () SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 0 (overwrite_specials=one_side) SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 100 () SELF=yes}
|
||||
[/abilities]
|
||||
[/effect]
|
||||
[/modify_unit]
|
||||
[/event]
|
||||
|
||||
{CHECK_STRIKES "0,0" ({SUCCEED}) (CHANCE_TO_HIT=)}
|
||||
)}
|
|
@ -0,0 +1,36 @@
|
|||
# wmllint: no translatables
|
||||
|
||||
#####
|
||||
# API(s) being tested: [chance_to_hit]overwrite_specials=
|
||||
##
|
||||
# Actions:
|
||||
# Give the side 1 leader a chance_to_hit ability with the overwrite_specials=both_sides attribute
|
||||
# Give the side 1 leader another chance_to_hit ability with the overwrite_specials=both_sides attribute
|
||||
# Have the side 1 leader attack the side 2 leader with both its weapons
|
||||
##
|
||||
# Expected end state:
|
||||
# The side 1 leader has 2 weapons which strike 100 times, since the the higher value ability is used
|
||||
#####
|
||||
{COMMON_KEEP_A_B_UNIT_TEST "chance_to_hit_overwrite_specials_two_both_sides" (
|
||||
[event]
|
||||
name = start
|
||||
|
||||
{SET_HP VALUE=1000}
|
||||
|
||||
[modify_unit]
|
||||
[filter]
|
||||
side=1
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to = new_ability
|
||||
[abilities]
|
||||
{TEST_ABILITY attacks 100 () SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 100 (overwrite_specials=both_sides) SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 0 (overwrite_specials=both_sides) SELF=yes}
|
||||
[/abilities]
|
||||
[/effect]
|
||||
[/modify_unit]
|
||||
[/event]
|
||||
|
||||
{CHECK_STRIKES "100,100" ({SUCCEED}) (CHANCE_TO_HIT=)}
|
||||
)}
|
|
@ -0,0 +1,36 @@
|
|||
# wmllint: no translatables
|
||||
|
||||
#####
|
||||
# API(s) being tested: [chance_to_hit]overwrite_specials=
|
||||
##
|
||||
# Actions:
|
||||
# Give the side 1 leader a chance_to_hit ability with the overwrite_specials=one_side attribute
|
||||
# Give the side 1 leader another chance_to_hit ability with the overwrite_specials=one_side attribute
|
||||
# Have the side 1 leader attack the side 2 leader with both its weapons
|
||||
##
|
||||
# Expected end state:
|
||||
# The side 1 leader has 2 weapons which strike 100 times, since the the higher value ability is used
|
||||
#####
|
||||
{COMMON_KEEP_A_B_UNIT_TEST "chance_to_hit_overwrite_specials_two_one_side" (
|
||||
[event]
|
||||
name = start
|
||||
|
||||
{SET_HP VALUE=1000}
|
||||
|
||||
[modify_unit]
|
||||
[filter]
|
||||
side=1
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to = new_ability
|
||||
[abilities]
|
||||
{TEST_ABILITY attacks 100 () SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 0 (overwrite_specials=one_side) SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 100 (overwrite_specials=one_side) SELF=yes}
|
||||
[/abilities]
|
||||
[/effect]
|
||||
[/modify_unit]
|
||||
[/event]
|
||||
|
||||
{CHECK_STRIKES "100,100" ({SUCCEED}) (CHANCE_TO_HIT=)}
|
||||
)}
|
|
@ -0,0 +1,34 @@
|
|||
# wmllint: no translatables
|
||||
|
||||
#####
|
||||
# API(s) being tested: [chance_to_hit]value=
|
||||
##
|
||||
# Actions:
|
||||
# Give the leaders a chance_to_hit ability with both the value and sub attributes
|
||||
# Have the side 1 leader attack the side 2 leader with both its weapons
|
||||
##
|
||||
# Expected end state:
|
||||
# The side 1 leader's first weapon strikes 0 times
|
||||
# The side 1 leader's second weapon strikes 0 times
|
||||
#####
|
||||
{COMMON_KEEP_A_B_UNIT_TEST "chance_to_hit_sub" (
|
||||
[event]
|
||||
name = start
|
||||
|
||||
{SET_HP VALUE=1000}
|
||||
|
||||
[modify_unit]
|
||||
[filter]
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to = new_ability
|
||||
[abilities]
|
||||
{TEST_ABILITY attacks 100 () SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 50 (sub=50) SELF=yes}
|
||||
[/abilities]
|
||||
[/effect]
|
||||
[/modify_unit]
|
||||
[/event]
|
||||
|
||||
{CHECK_STRIKES "0,0" ({SUCCEED}) (CHANCE_TO_HIT=)}
|
||||
)}
|
|
@ -0,0 +1,35 @@
|
|||
# wmllint: no translatables
|
||||
|
||||
#####
|
||||
# API(s) being tested: [chance_to_hit]value=
|
||||
##
|
||||
# Actions:
|
||||
# Give the leaders a chance_to_hit ability with both the value, sub, and divide attributes
|
||||
# Have the side 1 leader attack the side 2 leader with both its weapons
|
||||
##
|
||||
# Expected end state:
|
||||
# The side 1 leader's first weapon strikes 100 times
|
||||
# The side 1 leader's second weapon strikes 100 times
|
||||
#####
|
||||
{COMMON_KEEP_A_B_UNIT_TEST "chance_to_hit_sub_divide" (
|
||||
[event]
|
||||
name = start
|
||||
|
||||
{SET_HP VALUE=1000}
|
||||
|
||||
[modify_unit]
|
||||
[filter]
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to = new_ability
|
||||
[abilities]
|
||||
{TEST_ABILITY attacks 100 () SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 250 (sub=50
|
||||
divide=2) SELF=yes}
|
||||
[/abilities]
|
||||
[/effect]
|
||||
[/modify_unit]
|
||||
[/event]
|
||||
|
||||
{CHECK_STRIKES "100,100" ({SUCCEED}) (CHANCE_TO_HIT=)}
|
||||
)}
|
|
@ -0,0 +1,35 @@
|
|||
# wmllint: no translatables
|
||||
|
||||
#####
|
||||
# API(s) being tested: [chance_to_hit]value=
|
||||
##
|
||||
# Actions:
|
||||
# Give the leaders a chance_to_hit ability with both the value, sub, and multiply attributes
|
||||
# Have the side 1 leader attack the side 2 leader with both its weapons
|
||||
##
|
||||
# Expected end state:
|
||||
# The side 1 leader's first weapon strikes 100 times
|
||||
# The side 1 leader's second weapon strikes 100 times
|
||||
#####
|
||||
{COMMON_KEEP_A_B_UNIT_TEST "chance_to_hit_sub_multiply" (
|
||||
[event]
|
||||
name = start
|
||||
|
||||
{SET_HP VALUE=1000}
|
||||
|
||||
[modify_unit]
|
||||
[filter]
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to = new_ability
|
||||
[abilities]
|
||||
{TEST_ABILITY attacks 100 () SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 75 (sub=25
|
||||
multiply=2) SELF=yes}
|
||||
[/abilities]
|
||||
[/effect]
|
||||
[/modify_unit]
|
||||
[/event]
|
||||
|
||||
{CHECK_STRIKES "100,100" ({SUCCEED}) (CHANCE_TO_HIT=)}
|
||||
)}
|
|
@ -0,0 +1,36 @@
|
|||
# wmllint: no translatables
|
||||
|
||||
#####
|
||||
# API(s) being tested: [chance_to_hit]cumulative=
|
||||
##
|
||||
# Actions:
|
||||
# Give the leaders a chance_to_hit ability with non-unique IDs, one with cumulative=yes, and one with cumulative=no
|
||||
# Have the side 1 leader attack the side 2 leader with both its weapons
|
||||
##
|
||||
# Expected end state:
|
||||
# The side 1 leader's first weapon doesn't strike 100 times
|
||||
# The side 1 leader's second weapon doesn't strike 100 times
|
||||
#####
|
||||
{COMMON_KEEP_A_B_UNIT_TEST "chance_to_hit_two_cumulative_mixed_same_id" (
|
||||
[event]
|
||||
name = start
|
||||
|
||||
{SET_HP VALUE=1000}
|
||||
|
||||
[modify_unit]
|
||||
[filter]
|
||||
side=1
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to = new_ability
|
||||
[abilities]
|
||||
{TEST_ABILITY attacks 100 () SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 75 () ID=1 CUMULATIVE=yes SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 25 () ID=1 CUMULATIVE=no SELF=yes}
|
||||
[/abilities]
|
||||
[/effect]
|
||||
[/modify_unit]
|
||||
[/event]
|
||||
|
||||
{CHECK_STRIKES "100,100" ({SUCCEED}) COMPARE=numerical_not_equals (CHANCE_TO_HIT=)}
|
||||
)}
|
|
@ -0,0 +1,35 @@
|
|||
# wmllint: no translatables
|
||||
|
||||
#####
|
||||
# API(s) being tested: [chance_to_hit]cumulative=
|
||||
##
|
||||
# Actions:
|
||||
# Give the leaders a chance_to_hit ability with unique IDs, one with cumulative=yes, and one with cumulative=no
|
||||
# Have the side 1 leader attack the side 2 leader with both its weapons
|
||||
##
|
||||
# Expected end state:
|
||||
# The side 1 leader's first weapon doesn't strike 100 times
|
||||
# The side 1 leader's second weapon doesn't strike 100 times
|
||||
#####
|
||||
{COMMON_KEEP_A_B_UNIT_TEST "chance_to_hit_two_cumulative_mixed_unique_id" (
|
||||
[event]
|
||||
name = start
|
||||
|
||||
{SET_HP VALUE=1000}
|
||||
|
||||
[modify_unit]
|
||||
[filter]
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to = new_ability
|
||||
[abilities]
|
||||
{TEST_ABILITY attacks 100 () SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 75 () ID=1 CUMULATIVE=yes SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 25 () ID=2 CUMULATIVE=no SELF=yes}
|
||||
[/abilities]
|
||||
[/effect]
|
||||
[/modify_unit]
|
||||
[/event]
|
||||
|
||||
{CHECK_STRIKES "100,100" ({SUCCEED}) COMPARE=numerical_not_equals (CHANCE_TO_HIT=)}
|
||||
)}
|
|
@ -0,0 +1,35 @@
|
|||
# wmllint: no translatables
|
||||
|
||||
#####
|
||||
# API(s) being tested: [chance_to_hit]cumulative=
|
||||
##
|
||||
# Actions:
|
||||
# Give the leaders a chance_to_hit ability with non-unique IDs and cumulative=no
|
||||
# Have the side 1 leader attack the side 2 leader with both its weapons
|
||||
##
|
||||
# Expected end state:
|
||||
# The side 1 leader's first weapon doesn't strike 100 times
|
||||
# The side 1 leader's second weapon doesn't strike 100 times
|
||||
#####
|
||||
{COMMON_KEEP_A_B_UNIT_TEST "chance_to_hit_two_cumulative_no_same_id" (
|
||||
[event]
|
||||
name = start
|
||||
|
||||
{SET_HP VALUE=1000}
|
||||
|
||||
[modify_unit]
|
||||
[filter]
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to = new_ability
|
||||
[abilities]
|
||||
{TEST_ABILITY attacks 100 () SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 75 () ID=1 CUMULATIVE=no SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 25 () ID=1 CUMULATIVE=no SELF=yes}
|
||||
[/abilities]
|
||||
[/effect]
|
||||
[/modify_unit]
|
||||
[/event]
|
||||
|
||||
{CHECK_STRIKES "100,100" ({SUCCEED}) COMPARE=numerical_not_equals (CHANCE_TO_HIT=)}
|
||||
)}
|
|
@ -0,0 +1,35 @@
|
|||
# wmllint: no translatables
|
||||
|
||||
#####
|
||||
# API(s) being tested: [chance_to_hit]cumulative=
|
||||
##
|
||||
# Actions:
|
||||
# Give the leaders a chance_to_hit ability with unique IDs and cumulative=no
|
||||
# Have the side 1 leader attack the side 2 leader with both its weapons
|
||||
##
|
||||
# Expected end state:
|
||||
# The side 1 leader's first weapon doesn't strike 100 times
|
||||
# The side 1 leader's second weapon doesn't strike 100 times
|
||||
#####
|
||||
{COMMON_KEEP_A_B_UNIT_TEST "chance_to_hit_two_cumulative_no_unique_id" (
|
||||
[event]
|
||||
name = start
|
||||
|
||||
{SET_HP VALUE=1000}
|
||||
|
||||
[modify_unit]
|
||||
[filter]
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to = new_ability
|
||||
[abilities]
|
||||
{TEST_ABILITY attacks 100 () SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 75 () ID=1 CUMULATIVE=no SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 25 () ID=2 CUMULATIVE=no SELF=yes}
|
||||
[/abilities]
|
||||
[/effect]
|
||||
[/modify_unit]
|
||||
[/event]
|
||||
|
||||
{CHECK_STRIKES "100,100" ({SUCCEED}) COMPARE=numerical_not_equals (CHANCE_TO_HIT=)}
|
||||
)}
|
|
@ -0,0 +1,35 @@
|
|||
# wmllint: no translatables
|
||||
|
||||
#####
|
||||
# API(s) being tested: [chance_to_hit]cumulative=
|
||||
##
|
||||
# Actions:
|
||||
# Give the leaders a chance_to_hit ability with non-unique IDs and cumulative=yes
|
||||
# Have the side 1 leader attack the side 2 leader with both its weapons
|
||||
##
|
||||
# Expected end state:
|
||||
# The side 1 leader's first weapon doesn't strike 100 times
|
||||
# The side 1 leader's second weapon doesn't strike 100 times
|
||||
#####
|
||||
{COMMON_KEEP_A_B_UNIT_TEST "chance_to_hit_two_cumulative_yes_same_id" (
|
||||
[event]
|
||||
name = start
|
||||
|
||||
{SET_HP VALUE=1000}
|
||||
|
||||
[modify_unit]
|
||||
[filter]
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to = new_ability
|
||||
[abilities]
|
||||
{TEST_ABILITY attacks 100 () SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 75 () ID=1 CUMULATIVE=yes SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 25 () ID=1 CUMULATIVE=yes SELF=yes}
|
||||
[/abilities]
|
||||
[/effect]
|
||||
[/modify_unit]
|
||||
[/event]
|
||||
|
||||
{CHECK_STRIKES "100,100" ({SUCCEED}) COMPARE=numerical_not_equals (CHANCE_TO_HIT=)}
|
||||
)}
|
|
@ -0,0 +1,35 @@
|
|||
# wmllint: no translatables
|
||||
|
||||
#####
|
||||
# API(s) being tested: [chance_to_hit]cumulative=
|
||||
##
|
||||
# Actions:
|
||||
# Give the leaders a chance_to_hit ability with unique IDs and cumulative=yes
|
||||
# Have the side 1 leader attack the side 2 leader with both its weapons
|
||||
##
|
||||
# Expected end state:
|
||||
# The side 1 leader's first weapon doesn't strike 100 times
|
||||
# The side 1 leader's second weapon doesn't strike 100 times
|
||||
#####
|
||||
{COMMON_KEEP_A_B_UNIT_TEST "chance_to_hit_two_cumulative_yes_unique_id" (
|
||||
[event]
|
||||
name = start
|
||||
|
||||
{SET_HP VALUE=1000}
|
||||
|
||||
[modify_unit]
|
||||
[filter]
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to = new_ability
|
||||
[abilities]
|
||||
{TEST_ABILITY attacks 100 () SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 75 () ID=1 CUMULATIVE=yes SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit 25 () ID=2 CUMULATIVE=yes SELF=yes}
|
||||
[/abilities]
|
||||
[/effect]
|
||||
[/modify_unit]
|
||||
[/event]
|
||||
|
||||
{CHECK_STRIKES "100,100" ({SUCCEED}) COMPARE=numerical_not_equals (CHANCE_TO_HIT=)}
|
||||
)}
|
|
@ -0,0 +1,38 @@
|
|||
# wmllint: no translatables
|
||||
|
||||
#####
|
||||
# API(s) being tested: [chance_to_hit]value=
|
||||
##
|
||||
# Actions:
|
||||
# Give the leaders a chance_to_hit ability uses the other unit's max hp and a constant value to add up to 100.
|
||||
# Have the side 1 leader attack the side 2 leader with both its weapons
|
||||
##
|
||||
# Expected end state:
|
||||
# chance_to_hit has a value of 100 (29+71)
|
||||
# The side 1 leader's first weapon strikes 100 times
|
||||
# The side 1 leader's second weapon strikes 100 times
|
||||
#####
|
||||
{COMMON_KEEP_A_B_UNIT_TEST "chance_to_hit_wfl_other" (
|
||||
[event]
|
||||
name = start
|
||||
|
||||
{ASSERT_UNIT_HP_XP "alice" 29 0}
|
||||
|
||||
{SET_HP VALUE=1000}
|
||||
|
||||
[modify_unit]
|
||||
[filter]
|
||||
side=1
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to = new_ability
|
||||
[abilities]
|
||||
{TEST_ABILITY attacks 100 () SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit "(other.max_hitpoints+71)" () SELF=yes}
|
||||
[/abilities]
|
||||
[/effect]
|
||||
[/modify_unit]
|
||||
[/event]
|
||||
|
||||
{CHECK_STRIKES "100,100" ({SUCCEED}) (CHANCE_TO_HIT=)}
|
||||
)}
|
|
@ -0,0 +1,38 @@
|
|||
# wmllint: no translatables
|
||||
|
||||
#####
|
||||
# API(s) being tested: [chance_to_hit]value=
|
||||
##
|
||||
# Actions:
|
||||
# Give the leaders a chance_to_hit ability that uses its max hp and a constant value to add up to 100.
|
||||
# Have the side 1 leader attack the side 2 leader with both its weapons
|
||||
##
|
||||
# Expected end state:
|
||||
# chance_to_hit has a value of 100 (29+71)
|
||||
# The side 1 leader's first weapon strikes 100 times
|
||||
# The side 1 leader's second weapon strikes 100 times
|
||||
#####
|
||||
{COMMON_KEEP_A_B_UNIT_TEST "chance_to_hit_wfl_self" (
|
||||
[event]
|
||||
name = start
|
||||
|
||||
{ASSERT_UNIT_HP_XP "alice" 29 0}
|
||||
|
||||
{SET_HP VALUE=1000}
|
||||
|
||||
[modify_unit]
|
||||
[filter]
|
||||
side=1
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to = new_ability
|
||||
[abilities]
|
||||
{TEST_ABILITY attacks 100 () SELF=yes}
|
||||
{TEST_ABILITY chance_to_hit "(max_hitpoints+71)" () SELF=yes}
|
||||
[/abilities]
|
||||
[/effect]
|
||||
[/modify_unit]
|
||||
[/event]
|
||||
|
||||
{CHECK_STRIKES "100,100" ({SUCCEED}) (CHANCE_TO_HIT=)}
|
||||
)}
|
|
@ -783,6 +783,36 @@
|
|||
0 berserk_overwrite_specials_two_one_side
|
||||
0 berserk_overwrite_specials_mixed
|
||||
0 berserk_different_values
|
||||
# chance_to_hit ability tests
|
||||
0 chance_to_hit_negative_value
|
||||
0 chance_to_hit_add
|
||||
0 chance_to_hit_add_divide
|
||||
0 chance_to_hit_add_multiply
|
||||
0 chance_to_hit_add_sub
|
||||
0 chance_to_hit_affect_self_no
|
||||
0 chance_to_hit_affect_enemies
|
||||
0 chance_to_hit_affect_everybody
|
||||
0 chance_to_hit_divide
|
||||
0 chance_to_hit_multiply
|
||||
0 chance_to_hit_multiply_divide
|
||||
0 chance_to_hit_no_value
|
||||
0 chance_to_hit_sub
|
||||
0 chance_to_hit_sub_divide
|
||||
0 chance_to_hit_sub_multiply
|
||||
0 chance_to_hit_wfl_other
|
||||
0 chance_to_hit_wfl_self
|
||||
0 chance_to_hit_two_cumulative_yes_same_id
|
||||
0 chance_to_hit_two_cumulative_yes_unique_id
|
||||
0 chance_to_hit_two_cumulative_no_same_id
|
||||
0 chance_to_hit_two_cumulative_no_unique_id
|
||||
0 chance_to_hit_two_cumulative_mixed_same_id
|
||||
0 chance_to_hit_two_cumulative_mixed_unique_id
|
||||
0 chance_to_hit_max_value
|
||||
0 chance_to_hit_overwrite_specials_one_side
|
||||
0 chance_to_hit_overwrite_specials_both_sides
|
||||
0 chance_to_hit_overwrite_specials_two_both_sides
|
||||
0 chance_to_hit_overwrite_specials_two_one_side
|
||||
0 chance_to_hit_overwrite_specials_mixed
|
||||
# Warnings about WML
|
||||
0 unknown_scenario_false_positives
|
||||
0 unknown_scenario_interpolated
|
||||
|
|
Loading…
Add table
Reference in a new issue