Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
newfrenchy83 committed Dec 22, 2024
1 parent 895bdcf commit fb138e7
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,37 @@
[/event]
) SIDE2_LEADER="Elvish Archer"}
#endif

#####
# API(s) being tested: [damage]value=
##
# Actions:
# Give the leaders a damage ability with multiply 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 both of which have 8 damage (4*1.95=7.8 rounded up to 8)
#####
{COMMON_KEEP_A_B_UNIT_TEST "damage_multiply_with_decimal" (
[event]
name = start

[modify_unit]
[filter]
[/filter]
[effect]
apply_to = attack
set_damage=4
[/effect]
[effect]
apply_to = new_ability
[abilities]
{TEST_ABILITY_NO_VALUE damage (multiply=1.95) SELF=yes}
[/abilities]
[/effect]
[/modify_unit]

{ATTACK_AND_VALIDATE 8 (DAMAGE_VALUE=) WEAPON_COUNT=2}
{SUCCEED}
[/event]
) SIDE2_LEADER="Elvish Archer"}
1 change: 1 addition & 0 deletions wml_test_schedule
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,7 @@
0 damage_multiply
0 damage_multiply_divide
0 damage_multiply_fraction
0 damage_multiply_with_decimal
0 damage_no_value
0 damage_sub
0 damage_sub_divide
Expand Down

0 comments on commit fb138e7

Please sign in to comment.