Skip to content

Commit

Permalink
*Last commit was not as elegant. Changed the code for siege archer AI…
Browse files Browse the repository at this point in the history
… for player's troops.
  • Loading branch information
khamukkamu committed Oct 16, 2017
1 parent 86a03bd commit b5348e2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
10 changes: 4 additions & 6 deletions ModuleSystem/module_mission_templates.py
Expand Up @@ -3274,14 +3274,13 @@
(eq, "$attacker_archer_melee",1),
],
[
(get_player_agent_no, ":player"),
(agent_get_team, ":player_team", ":player"),
(try_for_agents, ":agent_no"),
(agent_is_human, ":agent_no"),
(agent_is_alive, ":agent_no"),
(agent_get_party_id, ":agent_party", ":agent_no"),
(agent_get_team, ":agent_team", ":agent_no"),
(neq, ":agent_team", ":player_team"),
(this_or_next|eq, ":agent_team", "$attacker_team"),(this_or_next|eq, ":agent_team", "$attacker_team_2"),(eq, ":agent_team", "$attacker_team_3"),
(neq, ":agent_party", "p_main_party"),
(agent_ai_set_always_attack_in_melee, ":agent_no", 0),
(assign, "$attacker_archer_melee",0),
(try_end),
Expand All @@ -3296,14 +3295,13 @@
(eq, "$attacker_archer_melee", 0),
],
[
(get_player_agent_no, ":player"),
(agent_get_team, ":player_team", ":player"),
(try_for_agents, ":agent_no"),
(agent_is_human, ":agent_no"),
(agent_is_alive, ":agent_no"),
(agent_get_party_id, ":agent_party", ":agent_no"),
(agent_get_team, ":agent_team", ":agent_no"),
(neq, ":agent_team", ":player_team"),
(this_or_next|eq, ":agent_team", "$attacker_team"),(this_or_next|eq, ":agent_team", "$attacker_team_2"),(eq, ":agent_team", "$attacker_team_3"),
(neq, ":agent_party", "p_main_party"),
(agent_ai_set_always_attack_in_melee, ":agent_no", 1),
(try_end),
(try_begin),
Expand Down
4 changes: 2 additions & 2 deletions _wb/mission_templates.txt
Expand Up @@ -1982,8 +1982,8 @@ You_attack_the_walls_of_the_castle...
1 0 5 1 2147483678 2 144115188075856124 10 11 2133 2 1224979098644774912 144115188075856131 2133 2 1224979098644774913 11 6 3 1224979098644774914 0 3 2385 2 1224979098644774915 1224979098644774912 2105 2 1224979098644774912 2 2105 2 1224979098644774913 1 2147483678 2 1224979098644774915 13 1930 2 1224979098644774913 6 2105 2 144115188075856124 1 2133 2 144115188075856566 1 3 0
3 0 5 3 2147483678 2 144115188075856123 25 2370 1 1224979098644774912 30 2 1224979098644774912 10 42 2133 2 1224979098644774912 144115188075856130 2133 2 1224979098644774913 8 6 3 1224979098644774914 0 3 2385 2 1224979098644774915 1224979098644774912 2105 2 1224979098644774912 2 2105 2 1224979098644774913 1 2147483678 2 1224979098644774915 14 1930 2 1224979098644774913 6 2105 2 144115188075856123 1 3 0 4 0 2370 1 1224979098644774916 32 2 1224979098644774916 180 1700 1 1224979098644774917 1770 2 1224979098644774918 1224979098644774917 2147483679 2 1224979098644774918 144115188075856130 2147483679 2 1224979098644774918 144115188075856132 2147483679 2 1224979098644774918 144115188075856134 30 2 144115188075856123 7 1107 1 0 1790 3 144115188075856130 0 2 1790 3 144115188075856132 0 2 1790 3 144115188075856134 0 2 1790 3 144115188075856130 2 2 1790 3 144115188075856132 2 2 1790 3 144115188075856134 2 2 1107 1 1 30 2 144115188075856123 14 1107 1 0 1790 3 144115188075856130 9 2 1790 3 144115188075856132 9 2 1790 3 144115188075856134 9 2 1107 1 1 3 0 4 0 2147483679 2 144115188075856128 -1 31 2 144115188075856287 0 1780 2 13 39 1730 3 144115188075856128 13 1 1711 2 144115188075856128 13 1721 3 144115188075856128 100 0 3 0
2 0 0 1 32 2 144115188075856123 0 1 1 1 237
5 0 0 1 31 2 144115188075856566 1 17 1700 1 1224979098644774912 1770 2 1224979098644774913 1224979098644774912 12 1 1224979098644774914 1704 1 1224979098644774914 1702 1 1224979098644774914 1770 2 1224979098644774915 1224979098644774914 2147483679 2 1224979098644774915 1224979098644774913 1073741855 2 1224979098644774915 144115188075856131 1073741855 2 1224979098644774915 144115188075856133 31 2 1224979098644774915 144115188075856135 1737 2 1224979098644774914 0 2133 2 144115188075856566 0 3 0 4 0 31 2 144115188075855982 1 1106 1 1585267068834415260 3 0
35 0 0 1 31 2 144115188075856566 0 16 1700 1 1224979098644774912 1770 2 1224979098644774913 1224979098644774912 12 1 1224979098644774914 1704 1 1224979098644774914 1702 1 1224979098644774914 1770 2 1224979098644774915 1224979098644774914 2147483679 2 1224979098644774915 1224979098644774913 1073741855 2 1224979098644774915 144115188075856131 1073741855 2 1224979098644774915 144115188075856133 31 2 1224979098644774915 144115188075856135 1737 2 1224979098644774914 1 3 0 4 0 31 2 144115188075855982 1 1106 1 1585267068834415261 3 0
5 0 0 1 31 2 144115188075856566 1 16 12 1 1224979098644774912 1704 1 1224979098644774912 1702 1 1224979098644774912 1716 2 1224979098644774913 1224979098644774912 1770 2 1224979098644774914 1224979098644774912 1073741855 2 1224979098644774914 144115188075856131 1073741855 2 1224979098644774914 144115188075856133 31 2 1224979098644774914 144115188075856135 2147483679 2 1224979098644774913 0 1737 2 1224979098644774912 0 2133 2 144115188075856566 0 3 0 4 0 31 2 144115188075855982 1 1106 1 1585267068834415260 3 0
35 0 0 1 31 2 144115188075856566 0 15 12 1 1224979098644774912 1704 1 1224979098644774912 1702 1 1224979098644774912 1716 2 1224979098644774913 1224979098644774912 1770 2 1224979098644774914 1224979098644774912 1073741855 2 1224979098644774914 144115188075856131 1073741855 2 1224979098644774914 144115188075856133 31 2 1224979098644774914 144115188075856135 2147483679 2 1224979098644774913 0 1737 2 1224979098644774912 1 3 0 4 0 31 2 144115188075855982 1 1106 1 1585267068834415261 3 0
2 0 0 0 1 1 1 201
1 60 100000000 8 2370 1 72057594037927937 30 2 72057594037927937 10 1003 1 5 1906 1 1 1106 1 216172782113783826 2133 2 144115188075856122 1 2133 2 144115188075855968 1 1 2 319 8388608 2 1 1 277 1907 1 1
10 0 0 0 2 31 2 144115188075856122 1 1106 1 216172782113783826
Expand Down
4 changes: 2 additions & 2 deletions mission_templates.txt
Expand Up @@ -1528,8 +1528,8 @@ You_attack_the_walls_of_the_castle...
1 0 5 1 2147483678 2 144115188075856124 10 11 2133 2 1224979098644774912 144115188075856131 2133 2 1224979098644774913 11 6 3 1224979098644774914 0 3 2385 2 1224979098644774915 1224979098644774912 2105 2 1224979098644774912 2 2105 2 1224979098644774913 1 2147483678 2 1224979098644774915 13 1930 2 1224979098644774913 6 2105 2 144115188075856124 1 2133 2 144115188075856542 1 3 0
3 0 5 3 2147483678 2 144115188075856123 25 2370 1 1224979098644774912 30 2 1224979098644774912 10 42 2133 2 1224979098644774912 144115188075856130 2133 2 1224979098644774913 8 6 3 1224979098644774914 0 3 2385 2 1224979098644774915 1224979098644774912 2105 2 1224979098644774912 2 2105 2 1224979098644774913 1 2147483678 2 1224979098644774915 14 1930 2 1224979098644774913 6 2105 2 144115188075856123 1 3 0 4 0 2370 1 1224979098644774916 32 2 1224979098644774916 180 1700 1 1224979098644774917 1770 2 1224979098644774918 1224979098644774917 2147483679 2 1224979098644774918 144115188075856130 2147483679 2 1224979098644774918 144115188075856132 2147483679 2 1224979098644774918 144115188075856134 30 2 144115188075856123 7 1107 1 0 1790 3 144115188075856130 0 2 1790 3 144115188075856132 0 2 1790 3 144115188075856134 0 2 1790 3 144115188075856130 2 2 1790 3 144115188075856132 2 2 1790 3 144115188075856134 2 2 1107 1 1 30 2 144115188075856123 14 1107 1 0 1790 3 144115188075856130 10 2 1790 3 144115188075856132 10 2 1790 3 144115188075856134 10 2 1107 1 1 3 0 4 0 2147483679 2 144115188075856128 -1 31 2 144115188075856287 0 1780 2 13 39 1730 3 144115188075856128 13 1 1711 2 144115188075856128 13 1721 3 144115188075856128 100 0 3 0
2 0 0 1 32 2 144115188075856123 0 1 1 1 237
5 0 0 1 31 2 144115188075856542 1 17 1700 1 1224979098644774912 1770 2 1224979098644774913 1224979098644774912 12 1 1224979098644774914 1704 1 1224979098644774914 1702 1 1224979098644774914 1770 2 1224979098644774915 1224979098644774914 2147483679 2 1224979098644774915 1224979098644774913 1073741855 2 1224979098644774915 144115188075856131 1073741855 2 1224979098644774915 144115188075856133 31 2 1224979098644774915 144115188075856135 1737 2 1224979098644774914 0 2133 2 144115188075856542 0 3 0 4 0 31 2 144115188075855982 1 1106 1 1585267068834415228 3 0
35 0 0 1 31 2 144115188075856542 0 16 1700 1 1224979098644774912 1770 2 1224979098644774913 1224979098644774912 12 1 1224979098644774914 1704 1 1224979098644774914 1702 1 1224979098644774914 1770 2 1224979098644774915 1224979098644774914 2147483679 2 1224979098644774915 1224979098644774913 1073741855 2 1224979098644774915 144115188075856131 1073741855 2 1224979098644774915 144115188075856133 31 2 1224979098644774915 144115188075856135 1737 2 1224979098644774914 1 3 0 4 0 31 2 144115188075855982 1 1106 1 1585267068834415229 3 0
5 0 0 1 31 2 144115188075856542 1 16 12 1 1224979098644774912 1704 1 1224979098644774912 1702 1 1224979098644774912 1716 2 1224979098644774913 1224979098644774912 1770 2 1224979098644774914 1224979098644774912 1073741855 2 1224979098644774914 144115188075856131 1073741855 2 1224979098644774914 144115188075856133 31 2 1224979098644774914 144115188075856135 2147483679 2 1224979098644774913 0 1737 2 1224979098644774912 0 2133 2 144115188075856542 0 3 0 4 0 31 2 144115188075855982 1 1106 1 1585267068834415228 3 0
35 0 0 1 31 2 144115188075856542 0 15 12 1 1224979098644774912 1704 1 1224979098644774912 1702 1 1224979098644774912 1716 2 1224979098644774913 1224979098644774912 1770 2 1224979098644774914 1224979098644774912 1073741855 2 1224979098644774914 144115188075856131 1073741855 2 1224979098644774914 144115188075856133 31 2 1224979098644774914 144115188075856135 2147483679 2 1224979098644774913 0 1737 2 1224979098644774912 1 3 0 4 0 31 2 144115188075855982 1 1106 1 1585267068834415229 3 0
2 0 0 0 1 1 1 201
1 60 100000000 8 2370 1 72057594037927937 30 2 72057594037927937 10 1003 1 5 1906 1 1 1106 1 216172782113783826 2133 2 144115188075856122 1 2133 2 144115188075855968 1 1 2 319 8388608 2 1 1 277 1907 1 1
10 0 0 0 2 31 2 144115188075856122 1 1106 1 216172782113783826
Expand Down

0 comments on commit b5348e2

Please sign in to comment.