Skip to content

Commit

Permalink
*Add code to change horsearcher division to archer during siege (WB o…
Browse files Browse the repository at this point in the history
…nly)
  • Loading branch information
khamukkamu committed Oct 19, 2017
1 parent e15ba5e commit 2485b4c
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 11 deletions.
31 changes: 25 additions & 6 deletions ModuleSystem/module_mission_templates.py
Expand Up @@ -3053,6 +3053,25 @@
(finish_mission,0),
]),

## WB Only - When a horse archer spawns, we set them to Archers, instead of Cavalry.

] + (is_a_wb_mt==1 and [

(ti_on_agent_spawn, 0, 0, [],
[
(store_trigger_param_1, ":is_horse_archer_agent"),
(get_player_agent_no, ":player_agent"),
(neq, ":is_horse_archer_agent", ":player_agent"),
(agent_get_troop_id, ":troop_id", ":is_horse_archer_agent"),
(troop_is_guarantee_horse, ":troop_id"),
(troop_is_guarantee_ranged, ":troop_id"),
(agent_set_division, ":is_horse_archer_agent", grc_archers),
]),

] or []) + [

## End Horse Archer to Cavalry division

## This block starts the commands of both attackers and defenders at the beginning of battle. (trigger_initial_commands)
## Both Attackers & Defenders are asked to move towards Entry Point 41, 42, 43
## Attacker Archers are asked to HOLD at entry point 60,61,62.
Expand Down Expand Up @@ -3351,12 +3370,12 @@
(neg|agent_is_defender,":agent"), #InVain: So only attackers get redistributed. I know that this is crude :)
(agent_slot_eq,":agent",slot_agent_arena_team_set,0),
(store_random_in_range, ":team", 0,3),
(try_begin), # when gate breached assign more people to medium team (which is gate oriented)
(eq,"$gate_breached",1),
(store_random_in_range, ":x",0,2),
(eq, ":x",1),
(assign, ":team", 1),
(try_end),
#(try_begin), # when gate breached assign more people to medium team (which is gate oriented)
# (eq,"$gate_breached",1),
# (store_random_in_range, ":x",0,2),
# (eq, ":x",1),
# (assign, ":team", 1),
#(try_end),
(val_mul, ":team", 2),
(try_begin),
(neg|agent_is_defender,":agent"),
Expand Down
5 changes: 3 additions & 2 deletions _wb/mission_templates.txt
Expand Up @@ -1936,7 +1936,7 @@ You_attack_the_walls_of_the_castle...
57 151616 256 16 1 0
58 151616 256 16 1 0
59 151616 256 16 1 0
58
59
-19 0 0 0 28 4 0 2211 1 1224979098644774912 1073741855 2 1224979098644774912 325 1073741855 2 1224979098644774912 326 1073741855 2 1224979098644774912 54 1073741855 2 1224979098644774912 250 1073741855 2 1224979098644774912 161 1073741855 2 1224979098644774912 163 1073741855 2 1224979098644774912 162 1073741855 2 1224979098644774912 220 1073741855 2 1224979098644774912 221 1073741855 2 1224979098644774912 222 1073741855 2 1224979098644774912 223 1073741855 2 1224979098644774912 224 1073741855 2 1224979098644774912 157 1073741855 2 1224979098644774912 200 1073741855 2 1224979098644774912 201 1073741855 2 1224979098644774912 197 1073741855 2 1224979098644774912 198 1073741855 2 1224979098644774912 199 1073741855 2 1224979098644774912 58 1073741855 2 1224979098644774912 204 1073741855 2 1224979098644774912 74 1073741855 2 1224979098644774912 79 1073741855 2 1224979098644774912 249 31 2 1224979098644774912 55 2387 0 3 0
1 0 0 0 26 12 1 1224979098644774912 1702 1 1224979098644774912 1704 1 1224979098644774912 1714 2 1224979098644774913 1224979098644774912 4 0 30 2 1224979098644774913 0 1720 2 1224979098644774914 1224979098644774913 2121 3 1224979098644774915 100 1224979098644774914 4 0 2147483680 2 1224979098644774915 15 2108 2 1224979098644774915 2 2120 3 1224979098644774916 100 1224979098644774915 5 0 2107 2 1224979098644774915 2 2108 2 1224979098644774915 3 2121 3 1224979098644774916 115 1224979098644774915 3 0 1718 2 1224979098644774917 1224979098644774912 2170 3 1224979098644774918 24 1224979098644774917 2122 3 1224979098644774919 1224979098644774918 2 2105 2 1224979098644774919 100 2107 2 1224979098644774916 1224979098644774919 2108 2 1224979098644774916 100 1734 2 1224979098644774912 1224979098644774916 3 0 3 0
-25 0 0 0 2 2071 1 1224979098644774912 1 2 600 1224979098644774912
Expand Down Expand Up @@ -1974,6 +1974,7 @@ You_attack_the_walls_of_the_castle...
0 0 100000000 0 12 2133 2 144115188075856122 0 2133 2 144115188075856123 0 2133 2 144115188075856124 0 2133 2 144115188075856125 0 2133 2 144115188075856129 0 1 2 319 262144 2133 2 144115188075856130 0 2133 2 144115188075856131 1 2133 2 144115188075856132 2 2133 2 144115188075856133 3 2133 2 144115188075856134 4 2133 2 144115188075856135 5
-21 0 0 0 19 4 0 31 2 144115188075856122 1 1 1 277 1907 1 0 5 0 1006 0 2133 2 144115188075856121 1 2320 2 5 216172782113784348 1 3 202 10 20 2133 2 144115188075855968 -1 1906 1 -1 1 1 277 1907 1 0 5 0 1 1 138 1121 1 216172782113783952 5 0 1106 1 216172782113783956 3 0
-8 0 0 0 16 2071 1 1224979098644774912 31 2 1224979098644774912 0 2133 2 144115188075856121 0 1700 1 1224979098644774913 1770 2 1224979098644774914 1224979098644774913 4 0 2147483679 2 144115188075856131 1224979098644774914 2147483679 2 144115188075856133 1224979098644774914 2147483679 2 144115188075856135 1224979098644774914 2320 2 5 216172782113783956 5 0 2320 2 5 216172782113784348 1 3 202 5 20 3 0 1 1 277 1907 1 0
-25 0 0 0 7 2071 1 1224979098644774912 1700 1 1224979098644774913 2147483679 2 1224979098644774912 1224979098644774913 1718 2 1224979098644774914 1224979098644774912 154 1 1224979098644774914 153 1 1224979098644774914 1783 2 1224979098644774912 1
3 0 0 1 2147483678 2 144115188075856129 3 34 2105 2 144115188075856129 1 1107 1 0 2133 2 1224979098644774912 144115188075856130 2133 2 1224979098644774913 144115188075856131 2133 2 1224979098644774914 60 6 3 1224979098644774915 41 44 1780 2 10 1224979098644774915 1790 3 1224979098644774912 0 0 1790 3 1224979098644774912 0 7 1790 3 1224979098644774912 0 7 1790 3 1224979098644774912 1 11 1790 3 1224979098644774912 2 0 1790 3 1224979098644774912 2 7 1790 3 1224979098644774912 2 7 1791 3 1224979098644774912 0 10 1791 3 1224979098644774912 2 10 1791 3 1224979098644774913 9 10 1780 2 10 1224979098644774914 1790 3 1224979098644774913 1 0 1791 3 1224979098644774913 1 10 2105 2 1224979098644774912 2 2105 2 1224979098644774913 2 2105 2 1224979098644774914 1 3 0 1107 1 1 4 0 31 2 144115188075855998 63 1790 3 1224979098644774913 9 2 5 0 31 2 144115188075855998 21 1780 2 10 62 1790 3 1224979098644774913 9 0 1791 3 1224979098644774913 9 10 3 0
-25 0 0 2 1073741854 2 144115188075856124 1 30 2 144115188075856123 1 48 2071 1 1224979098644774912 2147483679 2 1224979098644774912 144115188075856128 1704 1 1224979098644774912 545 3 1224979098644774912 5 0 1770 2 1224979098644774913 1224979098644774912 1772 2 1224979098644774914 1224979098644774912 2147483679 2 1224979098644774914 1 6 3 1224979098644774915 0 3 520 3 1224979098644774916 870 1224979098644774915 31 2 1224979098644774916 -1 1107 1 0 1790 3 1224979098644774913 0 2 1790 3 1224979098644774913 2 2 1107 1 1 5 0 31 2 144115188075856287 1 2136 3 1224979098644774917 0 100 2147483680 2 1224979098644774917 75 1780 2 10 42 1730 2 1224979098644774912 10 1732 1 1224979098644774912 505 3 1224979098644774912 5 42 5 0 4 0 31 2 1224979098644774915 0 1073741855 2 1224979098644774913 0 31 2 1224979098644774913 1 1780 2 10 41 1730 2 1224979098644774912 10 1732 1 1224979098644774912 505 3 1224979098644774912 5 41 5 0 31 2 1224979098644774915 2 1073741855 2 1224979098644774913 4 31 2 1224979098644774913 5 1780 2 10 43 1730 2 1224979098644774912 10 1732 1 1224979098644774912 505 3 1224979098644774912 5 43 5 0 1073741855 2 1224979098644774913 2 31 2 1224979098644774913 3 1780 2 10 42 1730 2 1224979098644774912 10 1732 1 1224979098644774912 505 3 1224979098644774912 5 42 3 0 3 0
7 0 0 2 1073741854 2 144115188075856124 1 30 2 144115188075856123 1 16 1700 1 1224979098644774912 12 1 1224979098644774913 2147483679 2 1224979098644774913 144115188075856128 2147483679 2 1224979098644774913 1224979098644774912 1704 1 1224979098644774913 525 3 1224979098644774914 1224979098644774913 5 30 2 1224979098644774914 41 1710 2 10 1224979098644774913 1780 2 11 1224979098644774914 710 3 1224979098644774915 10 11 2147483678 2 1224979098644774915 1000 1735 1 1224979098644774913 1732 1 1224979098644774913 1807 2 1224979098644774913 1 505 3 1224979098644774913 5 3 3 0
Expand All @@ -1992,7 +1993,7 @@ You_attack_the_walls_of_the_castle...
0 0 0 0 15 4 0 73 1 22 2147483679 2 144115188075856125 1 900 1 9 3 0 4 0 31 2 144115188075856125 1 2147484551 1 9 2133 2 144115188075856125 0 1107 1 1 12 1 1224979098644774912 505 3 1224979098644774912 10 0 3 0 902 1 0 3 0
0.1 0 0 0 2 31 2 144115188075856125 1 1 1 247
-22 0 0 1 1106 1 216172782113783922 0
5 0 0 0 27 12 1 1224979098644774912 1702 1 1224979098644774912 1704 1 1224979098644774912 2147485356 1 1224979098644774912 545 3 1224979098644774912 7 0 2136 3 1224979098644774913 0 3 4 0 31 2 144115188075856287 1 2136 3 1224979098644774914 0 2 31 2 1224979098644774914 1 2133 2 1224979098644774913 1 3 0 2107 2 1224979098644774913 2 4 0 2147485356 1 1224979098644774912 2105 2 1224979098644774913 1 3 0 1771 2 1224979098644774912 1224979098644774913 505 3 1224979098644774912 7 1 1716 2 1224979098644774915 1224979098644774912 1700 1 1224979098644774916 4 0 31 2 1224979098644774915 0 1770 2 1224979098644774917 1224979098644774916 1771 2 1224979098644774912 1224979098644774917 3 0 3 0
5 0 0 0 21 12 1 1224979098644774912 1702 1 1224979098644774912 1704 1 1224979098644774912 2147485356 1 1224979098644774912 545 3 1224979098644774912 7 0 2136 3 1224979098644774913 0 3 2107 2 1224979098644774913 2 4 0 2147485356 1 1224979098644774912 2105 2 1224979098644774913 1 3 0 1771 2 1224979098644774912 1224979098644774913 505 3 1224979098644774912 7 1 1716 2 1224979098644774914 1224979098644774912 1700 1 1224979098644774915 4 0 31 2 1224979098644774914 0 1770 2 1224979098644774916 1224979098644774915 1771 2 1224979098644774912 1224979098644774916 3 0 3 0
10 0 0 2 2370 1 1224979098644774912 32 2 1224979098644774912 30 61 6 3 1224979098644774912 0 3 2147484188 3 870 1224979098644774912 -1 500 3 870 1224979098644774912 0 3 0 12 1 1224979098644774913 1702 1 1224979098644774913 1708 1 1224979098644774913 1710 2 0 1224979098644774913 6 3 1224979098644774914 41 44 2121 3 1224979098644774912 1224979098644774914 41 2147484188 3 870 1224979098644774912 -1 1780 2 10 1224979098644774914 710 3 1224979098644774915 0 10 2147483678 2 1224979098644774915 500 520 3 1224979098644774916 870 1224979098644774912 2105 2 1224979098644774916 1 500 3 870 1224979098644774912 1224979098644774916 3 0 5 0 2147485356 1 1224979098644774913 1710 2 0 1224979098644774913 6 3 1224979098644774914 41 44 2121 3 1224979098644774912 1224979098644774914 38 2147484188 3 870 1224979098644774912 -1 1780 2 10 1224979098644774914 710 3 1224979098644774915 0 10 2147483678 2 1224979098644774915 800 520 3 1224979098644774916 870 1224979098644774912 2105 2 1224979098644774916 1 500 3 870 1224979098644774912 1224979098644774916 3 0 3 0 1107 1 0 1700 1 1224979098644774917 1770 2 1224979098644774918 1224979098644774917 6 3 1224979098644774912 0 3 2147484208 3 870 1224979098644774912 2 500 3 870 1224979098644774912 -1 2122 3 1224979098644774919 1224979098644774912 2 2120 3 1224979098644774920 1224979098644774919 1 3221225503 2 1224979098644774919 1224979098644774918 2147483679 2 1224979098644774920 1224979098644774918 1790 3 1224979098644774919 0 2 1790 3 1224979098644774919 2 2 1790 3 1224979098644774920 9 2 3 0 6 3 1224979098644774921 3 6 560 3 870 1224979098644774912 3 500 3 870 1224979098644774912 -1 4 0 31 2 1224979098644774921 3 2133 2 1224979098644774920 1 5 0 31 2 1224979098644774921 4 2133 2 1224979098644774920 3 5 0 2133 2 1224979098644774920 5 3 0 1790 3 1224979098644774920 9 2 3 0 1107 1 1
20 0 0 0 32 2133 2 72057594037927936 0 2133 2 72057594037927937 0 2133 2 72057594037927938 0 2133 2 72057594037927939 0 2133 2 72057594037927940 0 2133 2 72057594037927941 0 12 1 1224979098644774912 1702 1 1224979098644774912 1704 1 1224979098644774912 1770 2 1224979098644774913 1224979098644774912 4 0 31 2 1224979098644774913 0 2105 2 72057594037927936 1 5 0 31 2 1224979098644774913 1 2105 2 72057594037927937 1 5 0 31 2 1224979098644774913 2 2105 2 72057594037927938 1 5 0 31 2 1224979098644774913 3 2105 2 72057594037927939 1 5 0 31 2 1224979098644774913 4 2105 2 72057594037927940 1 5 0 31 2 1224979098644774913 5 2105 2 72057594037927941 1 3 0 3 0 1107 1 1 1106 1 1585267068834415262

Expand Down
2 changes: 1 addition & 1 deletion _wb/variable_uses.txt
Expand Up @@ -413,7 +413,7 @@
1
11
2
9
8
14
5
5
Expand Down
2 changes: 1 addition & 1 deletion mission_templates.txt
Expand Up @@ -1538,7 +1538,7 @@ You_attack_the_walls_of_the_castle...
0 0 0 0 5 4 0 73 1 20 2147483679 2 144115188075856125 1 900 1 9 3 0
0.1 0 0 0 2 31 2 144115188075856125 1 1 1 247
-22 0 0 1 1106 1 216172782113783922 0
5 0 0 0 27 12 1 1224979098644774912 1702 1 1224979098644774912 1704 1 1224979098644774912 2147485356 1 1224979098644774912 545 3 1224979098644774912 7 0 2136 3 1224979098644774913 0 3 4 0 31 2 144115188075856287 1 2136 3 1224979098644774914 0 2 31 2 1224979098644774914 1 2133 2 1224979098644774913 1 3 0 2107 2 1224979098644774913 2 4 0 2147485356 1 1224979098644774912 2105 2 1224979098644774913 1 3 0 1771 2 1224979098644774912 1224979098644774913 505 3 1224979098644774912 7 1 1716 2 1224979098644774915 1224979098644774912 1700 1 1224979098644774916 4 0 31 2 1224979098644774915 0 1770 2 1224979098644774917 1224979098644774916 1771 2 1224979098644774912 1224979098644774917 3 0 3 0
5 0 0 0 21 12 1 1224979098644774912 1702 1 1224979098644774912 1704 1 1224979098644774912 2147485356 1 1224979098644774912 545 3 1224979098644774912 7 0 2136 3 1224979098644774913 0 3 2107 2 1224979098644774913 2 4 0 2147485356 1 1224979098644774912 2105 2 1224979098644774913 1 3 0 1771 2 1224979098644774912 1224979098644774913 505 3 1224979098644774912 7 1 1716 2 1224979098644774914 1224979098644774912 1700 1 1224979098644774915 4 0 31 2 1224979098644774914 0 1770 2 1224979098644774916 1224979098644774915 1771 2 1224979098644774912 1224979098644774916 3 0 3 0
10 0 0 2 2370 1 1224979098644774912 32 2 1224979098644774912 30 61 6 3 1224979098644774912 0 3 2147484188 3 870 1224979098644774912 -1 500 3 870 1224979098644774912 0 3 0 12 1 1224979098644774913 1702 1 1224979098644774913 1708 1 1224979098644774913 1710 2 0 1224979098644774913 6 3 1224979098644774914 41 44 2121 3 1224979098644774912 1224979098644774914 41 2147484188 3 870 1224979098644774912 -1 1780 2 10 1224979098644774914 710 3 1224979098644774915 0 10 2147483678 2 1224979098644774915 500 520 3 1224979098644774916 870 1224979098644774912 2105 2 1224979098644774916 1 500 3 870 1224979098644774912 1224979098644774916 3 0 5 0 2147485356 1 1224979098644774913 1710 2 0 1224979098644774913 6 3 1224979098644774914 41 44 2121 3 1224979098644774912 1224979098644774914 38 2147484188 3 870 1224979098644774912 -1 1780 2 10 1224979098644774914 710 3 1224979098644774915 0 10 2147483678 2 1224979098644774915 800 520 3 1224979098644774916 870 1224979098644774912 2105 2 1224979098644774916 1 500 3 870 1224979098644774912 1224979098644774916 3 0 3 0 1107 1 0 1700 1 1224979098644774917 1770 2 1224979098644774918 1224979098644774917 6 3 1224979098644774912 0 3 2147484208 3 870 1224979098644774912 2 500 3 870 1224979098644774912 -1 2122 3 1224979098644774919 1224979098644774912 2 2120 3 1224979098644774920 1224979098644774919 1 3221225503 2 1224979098644774919 1224979098644774918 2147483679 2 1224979098644774920 1224979098644774918 1790 3 1224979098644774919 0 2 1790 3 1224979098644774919 2 2 1790 3 1224979098644774920 10 2 3 0 6 3 1224979098644774921 3 6 560 3 870 1224979098644774912 3 500 3 870 1224979098644774912 -1 4 0 31 2 1224979098644774921 3 2133 2 1224979098644774920 1 5 0 31 2 1224979098644774921 4 2133 2 1224979098644774920 3 5 0 2133 2 1224979098644774920 5 3 0 1790 3 1224979098644774920 10 2 3 0 1107 1 1
20 0 0 0 32 2133 2 72057594037927936 0 2133 2 72057594037927937 0 2133 2 72057594037927938 0 2133 2 72057594037927939 0 2133 2 72057594037927940 0 2133 2 72057594037927941 0 12 1 1224979098644774912 1702 1 1224979098644774912 1704 1 1224979098644774912 1770 2 1224979098644774913 1224979098644774912 4 0 31 2 1224979098644774913 0 2105 2 72057594037927936 1 5 0 31 2 1224979098644774913 1 2105 2 72057594037927937 1 5 0 31 2 1224979098644774913 2 2105 2 72057594037927938 1 5 0 31 2 1224979098644774913 3 2105 2 72057594037927939 1 5 0 31 2 1224979098644774913 4 2105 2 72057594037927940 1 5 0 31 2 1224979098644774913 5 2105 2 72057594037927941 1 3 0 3 0 1107 1 1 1106 1 1585267068834415230

Expand Down
2 changes: 1 addition & 1 deletion variable_uses.txt
Expand Up @@ -413,7 +413,7 @@
1
11
2
9
8
14
5
5
Expand Down

0 comments on commit 2485b4c

Please sign in to comment.