Skip to content

Commit

Permalink
fixup schema validation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pentarctagon committed Nov 27, 2023
1 parent cea436c commit 9e3797a
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 6 deletions.
2 changes: 2 additions & 0 deletions data/schema/units/abilities.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
{SIMPLE_KEY value f_int}
{SIMPLE_KEY add f_int}
{SIMPLE_KEY sub f_int}
{SIMPLE_KEY multiply f_int}
{SIMPLE_KEY divide f_int}
{SIMPLE_KEY poison string} # TODO: Enum
[/tag]
[tag]
Expand Down
2 changes: 1 addition & 1 deletion data/test/macros/unit_setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ no#endarg

[heals]
id = {ID}
name = "test-heals_{ID}"
name = _"test-heals_{ID}"
affect_self = {SELF}
affect_allies = {ALLIES}
affect_enemies = {ENEMIES}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
[effect]
apply_to = new_ability
[abilities]
#ifndef SCHEMA_VALIDATION
{TEST_HEALS 2.8 ()}
#endif
[/abilities]
[/effect]
[/modify_unit]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
[effect]
apply_to = new_ability
[abilities]
#ifndef SCHEMA_VALIDATION
{TEST_HEALS 2.2 ()}
#endif
[/abilities]
[/effect]
[/modify_unit]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
[abilities]
[heals]
id = "test-heals"
name = "test-heals"
name = _"test-heals"
affect_self = no
affect_allies = yes
affect_enemies = no
Expand Down Expand Up @@ -72,7 +72,7 @@
variable = temp1
[/store_unit]
{ASSERT {VARIABLE_CONDITIONAL temp1.hitpoints numerical_equals "$($temp1.max_hitpoints-6)"}}
{ASSERT {VARIABLE_CONDITIONAL temp1.status.poisoned numerical_equals yes}}
{ASSERT {VARIABLE_CONDITIONAL temp1.status.poisoned boolean_equals yes}}
{SUCCEED}
[/event]
)}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
[abilities]
[heals]
id = "test-heals"
name = "test-heals"
name = _"test-heals"
affect_self = no
affect_allies = yes
affect_enemies = no
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
variable = temp1
[/store_unit]
{ASSERT {VARIABLE_CONDITIONAL temp1.hitpoints numerical_equals $temp1.max_hitpoints}}
{ASSERT {VARIABLE_CONDITIONAL temp1.status.poisoned numerical_equals no}}
{ASSERT {VARIABLE_CONDITIONAL temp1.status.poisoned boolean_equals no}}
{SUCCEED}
[/event]
)}
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
variable = temp1
[/store_unit]
{ASSERT {VARIABLE_CONDITIONAL temp1.hitpoints numerical_equals $temp1.max_hitpoints}}
{ASSERT {VARIABLE_CONDITIONAL temp1.status.poisoned numerical_equals yes}}
{ASSERT {VARIABLE_CONDITIONAL temp1.status.poisoned boolean_equals yes}}
{SUCCEED}
[/event]
)}

0 comments on commit 9e3797a

Please sign in to comment.