Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extend special_id_active and special_type_active to account for abili…
…ties used as specials
- Loading branch information
1 parent
f671d2a
commit 05b2ea2
Showing
19 changed files
with
1,356 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
183 changes: 183 additions & 0 deletions
183
data/test/scenarios/swarm_disables_upgrades_with_abilities_adjacent.cfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,183 @@ | ||
# This unit test defines a WML object based implementation of the "unupgradable" ability | ||
# https://github.com/ProditorMagnus/Ageless-for-1-14/blob/52c1eaf31722bb58046a1b459d4f29daa8d88487/data/general_data/weapon_specials/unupgradable.cfg | ||
# and checks that it works. What is being tested here is that | ||
# [swarm] with swarm_attacks_max=swarm_attacks_min prevents strike changes | ||
# - through [attacks] | ||
# - through [effect] increase_attacks | ||
|
||
{GENERIC_UNIT_TEST "swarm_disables_upgrades_with_abilities_adjacent" ( | ||
#define FILTER_BOB | ||
[filter_student] | ||
[filter_weapon] | ||
type=blade | ||
[/filter_weapon] | ||
[/filter_student] | ||
[filter_opponent] | ||
race=elf | ||
[filter_weapon] | ||
special_id_active=test_cth #for testing if special_id_active work with abilities used like weapons | ||
[/filter_weapon] | ||
[/filter_opponent] | ||
affect_self=no | ||
affect_allies=yes | ||
[affect_adjacent] | ||
[/affect_adjacent] | ||
#enddef | ||
#define FILTER_ALICE | ||
[filter_student] | ||
[filter_weapon] | ||
type=blade,pierce | ||
[/filter_weapon] | ||
[/filter_student] | ||
[filter_opponent] | ||
race=orc | ||
[/filter_opponent] | ||
affect_self=no | ||
affect_allies=yes | ||
[affect_adjacent] | ||
[/affect_adjacent] | ||
#enddef | ||
[event] | ||
name=start | ||
[unit] | ||
id=alex | ||
name=_"Alex" | ||
x,y=12,4 | ||
type=Elvish Hero | ||
side=1 | ||
[/unit] | ||
[unit] | ||
id=ben | ||
name=_"Ben" | ||
x,y=14,3 | ||
type=Orcish Warrior | ||
side=2 | ||
[/unit] | ||
[modify_unit] | ||
[filter] | ||
[/filter] | ||
max_hitpoints=100 | ||
hitpoints=100 | ||
attacks_left=1 | ||
[/modify_unit] | ||
[object] | ||
silent=yes | ||
[effect] | ||
apply_to=new_ability | ||
[abilities] | ||
[swarm] | ||
swarm_attacks_max=1 | ||
swarm_attacks_min=1 | ||
{FILTER_BOB} | ||
[/swarm] | ||
[attacks] | ||
value=10 | ||
{FILTER_BOB} | ||
[/attacks] | ||
[attacks] | ||
add=13 | ||
{FILTER_BOB} | ||
[/attacks] | ||
[damage] | ||
value=1 | ||
{FILTER_BOB} | ||
[/damage] | ||
[chance_to_hit] | ||
value=100 | ||
{FILTER_BOB} | ||
[/chance_to_hit] | ||
[/abilities] | ||
[/effect] | ||
[filter] | ||
id=ben | ||
[/filter] | ||
[/object] | ||
[object] | ||
silent=yes | ||
[effect] | ||
apply_to=new_ability | ||
[abilities] | ||
[attacks] | ||
value=10 | ||
{FILTER_ALICE} | ||
[/attacks] | ||
[damage] | ||
value=1 | ||
{FILTER_ALICE} | ||
[/damage] | ||
[chance_to_hit] | ||
id=test_cth | ||
value=100 | ||
{FILTER_ALICE} | ||
[/chance_to_hit] | ||
[/abilities] | ||
[/effect] | ||
[filter] | ||
id=alex | ||
[/filter] | ||
[/object] | ||
[object] | ||
silent=yes | ||
[filter] | ||
id=bob | ||
[/filter] | ||
[effect] | ||
apply_to=attack | ||
increase_attacks=12 | ||
[/effect] | ||
[/object] | ||
|
||
[store_unit] | ||
[filter] | ||
id=alice | ||
[/filter] | ||
variable=a | ||
kill=yes | ||
[/store_unit] | ||
[store_unit] | ||
[filter] | ||
id=bob | ||
[/filter] | ||
variable=b | ||
[/store_unit] | ||
[unstore_unit] | ||
variable=a | ||
find_vacant=yes | ||
x,y=12,3 | ||
[/unstore_unit] | ||
[store_unit] | ||
[filter] | ||
id=alice | ||
[/filter] | ||
variable=a | ||
[/store_unit] | ||
|
||
[do_command] | ||
[attack] | ||
weapon=0 | ||
defender_weapon=0 | ||
[source] | ||
x,y=$a.x,$a.y | ||
[/source] | ||
[destination] | ||
x,y=$b.x,$b.y | ||
[/destination] | ||
[/attack] | ||
[/do_command] | ||
[store_unit] | ||
[filter] | ||
id=alice | ||
[/filter] | ||
variable=a | ||
[/store_unit] | ||
[store_unit] | ||
[filter] | ||
id=bob | ||
[/filter] | ||
variable=b | ||
[/store_unit] | ||
{ASSERT ({VARIABLE_CONDITIONAL a.hitpoints equals 99})} | ||
{ASSERT ({VARIABLE_CONDITIONAL b.hitpoints equals 90})} | ||
{SUCCEED} | ||
[/event] | ||
)} |
Oops, something went wrong.