Skip to content

Commit

Permalink
*Clean up Siege Mission Template + Make Adjustments to Battle Advantage
Browse files Browse the repository at this point in the history
- Unify some Siege Triggers
- Clean up the code and ready siege ai for adjustments & testing
- Change Battle Advantage formula slightly to favour orc dominant parties
  • Loading branch information
khamukkamu committed Jul 21, 2017
1 parent c627b8a commit 7e88e27
Show file tree
Hide file tree
Showing 18 changed files with 889 additions and 701 deletions.
343 changes: 249 additions & 94 deletions ModuleSystem/module_mission_templates.py

Large diffs are not rendered by default.

47 changes: 43 additions & 4 deletions ModuleSystem/module_scripts.py
Expand Up @@ -7989,19 +7989,58 @@ def set_item_score():
(party_get_skill_level, ":enemy_party_tactics", "p_collective_enemy", skl_tactics),
(val_add, ":friend_count", 1),
(val_add, "$enemy_count1", 1),

#Kham - Orc Bonus for Battle Advantage

(call_script, "script_party_get_dominant_race", "p_collective_friends"),
(assign, ":raceFriends", reg0),
(call_script, "script_party_get_dominant_race", "p_collective_enemy"),
(assign, ":raceEnemy", reg0),

(try_begin),
(is_between, ":raceFriends", tf_orc_begin, tf_orc_end),
(assign, ":orcFriends",1),
(else_try),
(is_between, ":raceEnemy", tf_orc_begin, tf_orc_end),
(assign, ":orcEnemy",1),
(else_try),
(assign, ":orcFriends",0),
(assign, ":orcEnemy", 0),
(try_end),

(try_begin),
(ge, ":friend_count", "$enemy_count1"),
(val_mul, ":friend_count", 100),
(store_div, ":ratio", ":friend_count", "$enemy_count1"),
(store_sub, ":raw_advantage", ":ratio", 100),
(try_begin),
(eq, ":orcFriends",1),
(store_sub, ":raw_advantage", ":ratio", 60),
(else_try),
(store_sub, ":raw_advantage", ":ratio", 100),
(try_end),
(else_try),
(val_mul, "$enemy_count1", 100),
(store_div, ":ratio", "$enemy_count1", ":friend_count"),
(store_sub, ":raw_advantage", 100, ":ratio"),
(try_begin),
(eq, ":orcEnemy",1),
(store_sub, ":raw_advantage", 60, ":ratio"),
(else_try),
(store_sub, ":raw_advantage", 100, ":ratio"),
(try_end),
(try_end),
(val_mul, ":raw_advantage", 2),
(val_mul, ":player_party_tactics", 30),
(val_mul, ":enemy_party_tactics", 30),
(try_begin),
(eq, ":orcFriends",1),
(val_mul, ":player_party_tactics", 60),
(else_try),
(val_mul, ":player_party_tactics", 30),
(try_end),
(try_begin),
(eq, ":orcEnemy",1),
(val_mul, ":enemy_party_tactics", 60),
(else_try),
(val_mul, ":enemy_party_tactics", 30),
(try_end),
(val_add, ":raw_advantage", ":player_party_tactics"),
(val_sub, ":raw_advantage", ":enemy_party_tactics"),
(val_div, ":raw_advantage", 100),
Expand Down
298 changes: 149 additions & 149 deletions _wb/conversation.txt

Large diffs are not rendered by default.

150 changes: 75 additions & 75 deletions _wb/menus.txt

Large diffs are not rendered by default.

78 changes: 39 additions & 39 deletions _wb/mission_templates.txt

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions _wb/quick_strings.txt
@@ -1,4 +1,4 @@
1393
1390
qstr_Gate_is_breached! Gate_is_breached!
qstr_Gate_opens..._You_ha Gate_opens..._You_have_reached_the_most_sacred_place_in_Middle_Earth!
qstr_Secret_place_discove Secret_place_discovered!
Expand Down Expand Up @@ -647,9 +647,6 @@ qstr_battle_won_triggered battle_won_triggered_-_Good
qstr_battle_won_triggered_ battle_won_triggered_-_Evil
qstr_You_receive_word_tha You_receive_word_that_Beorning_villages_were_attacked._Beornings_lose_faction_strength
qstr_You_receive_word_that You_receive_word_that_the_Ring_Hunter_Leaders_were_seen_travelling_towards_Mordor,_a_chest_in_tow._Mordor_gains_faction_strength.
qstr_On_your_positions_bi On_your_positions,_bitchez!!
qstr_Defenders:_infantry_ Defenders:_infantry_CHARGE!!
qstr_Defenders:_everyone_ Defenders:_everyone_CHARGE!!
qstr_DEBUG:_Attackers_go_ DEBUG:_Attackers_go_back_to_regular_attack_mode
qstr_DEBUG:_Attackers_do_ DEBUG:_Attackers_do_not_stall_on_ladders_triggered
qstr_Attackers:_{reg1}/{r Attackers:_{reg1}/{reg3}/{reg5}_Defenders:_{reg0}/{reg2}/{reg4}
Expand Down
2 changes: 1 addition & 1 deletion _wb/scripts.txt
Expand Up @@ -275,7 +275,7 @@ party_wound_all_members_aux -1
party_wound_all_members -1
2 21 1 1224979098644774912 1 2 135 1224979098644774912
calculate_battle_advantage -1
29 1 2 109 17 2133 2 1224979098644774912 72057594037927936 1685 3 1224979098644774913 0 15 1685 3 1224979098644774914 17 15 2111 2 1224979098644774913 1224979098644774914 1 2 109 15 2133 2 144115188075856313 72057594037927936 2120 3 144115188075855980 1224979098644774912 144115188075856313 1685 3 1224979098644774915 15 15 2105 2 1224979098644774912 1 2105 2 144115188075856313 1 4 0 30 2 1224979098644774912 144115188075856313 2107 2 1224979098644774912 100 2123 3 1224979098644774916 1224979098644774912 144115188075856313 2121 3 1224979098644774917 1224979098644774916 100 5 0 2107 2 144115188075856313 100 2123 3 1224979098644774916 144115188075856313 1224979098644774912 2121 3 1224979098644774917 100 1224979098644774916 3 0 2107 2 1224979098644774917 2 2107 2 1224979098644774913 30 2107 2 1224979098644774915 30 2105 2 1224979098644774917 1224979098644774913 2106 2 1224979098644774917 1224979098644774915 2108 2 1224979098644774917 100 2133 2 72057594037927936 1224979098644774917 1106 2 1585267068834414804 4294967295
63 1 2 109 17 2133 2 1224979098644774912 72057594037927936 1685 3 1224979098644774913 0 15 1685 3 1224979098644774914 17 15 2111 2 1224979098644774913 1224979098644774914 1 2 109 15 2133 2 144115188075856313 72057594037927936 2120 3 144115188075855980 1224979098644774912 144115188075856313 1685 3 1224979098644774915 15 15 2105 2 1224979098644774912 1 2105 2 144115188075856313 1 1 2 62 17 2133 2 1224979098644774916 72057594037927936 1 2 62 15 2133 2 1224979098644774917 72057594037927936 4 0 33 3 1224979098644774916 5 8 2133 2 1224979098644774918 1 5 0 33 3 1224979098644774917 5 8 2133 2 1224979098644774919 1 5 0 2133 2 1224979098644774918 0 2133 2 1224979098644774919 0 3 0 4 0 30 2 1224979098644774912 144115188075856313 2107 2 1224979098644774912 100 2123 3 1224979098644774920 1224979098644774912 144115188075856313 4 0 31 2 1224979098644774918 1 2121 3 1224979098644774921 1224979098644774920 60 5 0 2121 3 1224979098644774921 1224979098644774920 100 3 0 5 0 2107 2 144115188075856313 100 2123 3 1224979098644774920 144115188075856313 1224979098644774912 4 0 31 2 1224979098644774919 1 2121 3 1224979098644774921 60 1224979098644774920 5 0 2121 3 1224979098644774921 100 1224979098644774920 3 0 3 0 2107 2 1224979098644774921 2 4 0 31 2 1224979098644774918 1 2107 2 1224979098644774913 60 5 0 2107 2 1224979098644774913 30 3 0 4 0 31 2 1224979098644774919 1 2107 2 1224979098644774915 60 5 0 2107 2 1224979098644774915 30 3 0 2105 2 1224979098644774921 1224979098644774913 2106 2 1224979098644774921 1224979098644774915 2108 2 1224979098644774921 100 2133 2 72057594037927936 1224979098644774921 1106 2 1585267068834414804 4294967295
cf_check_enemies_nearby -1
16 1700 1 1224979098644774912 1702 1 1224979098644774912 1710 2 1 1224979098644774912 2133 2 1224979098644774913 0 2124 1 100 12 1 1224979098644774914 2147483679 2 1224979098644774914 1224979098644774912 1702 1 1224979098644774914 1704 1 1224979098644774914 2147485354 1 1224979098644774914 1710 2 2 1224979098644774914 710 3 1224979098644774915 1 2 2147483680 2 1224979098644774915 1500 2133 2 1224979098644774913 1 3 0 31 2 1224979098644774913 0
get_heroes_attached_to_center_aux -1
Expand Down

0 comments on commit 7e88e27

Please sign in to comment.