Skip to content

Commit

Permalink
*Fix HOLD command for AI archers + Finally fix Beonring valuation of …
Browse files Browse the repository at this point in the history
…metal scraps

- Make sure that HOLD command is only for player team
- Fix bitmask that led to metal scraps not being counted in some factions.
  • Loading branch information
khamukkamu committed Apr 19, 2017
1 parent 3d0153d commit 6fe9e97
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 23 deletions.
7 changes: 4 additions & 3 deletions ModuleSystem/module_mission_templates_TLD_wb.py
Expand Up @@ -635,6 +635,9 @@
(agent_is_alive,":agent1"),
(agent_is_non_player, ":agent1"),

(agent_get_team, ":agent_team", ":agent1"),
(eq, ":agent_team", ":team"),

(agent_get_wielded_item, ":weapon", ":agent1", 0),
(ge, ":weapon", 0),
(this_or_next|item_has_property, ":weapon", itp_type_bow),
Expand All @@ -653,7 +656,6 @@
(agent_get_position, pos3, ":agent1"),
(get_distance_between_positions, ":distance", pos3, pos2),

(agent_get_team, ":agent_team", ":agent1"),

(try_begin),
(eq, "$cheat_mode",1),
Expand All @@ -668,10 +670,9 @@
(eq, ":counter", 0),
(set_show_messages, 0),
(team_give_order, ":team", grc_archers, mordr_hold_fire),
(assign, ":counter", 1),
(eq, ":agent_team", ":team"),
(set_show_messages, 1),
(display_message, "@Your high-level archers determines that the enemy is too far away. They are holding their fire to conserve arrows until ordered otherwise.", color_good_news),
(assign, ":counter", 1),
(try_end),
(try_end),
])
Expand Down
12 changes: 7 additions & 5 deletions ModuleSystem/module_scripts.py
Expand Up @@ -1941,6 +1941,7 @@ def set_item_score():

(try_begin),
(eq, ":volunteers", 0),
(party_is_active, ":town"),
(spawn_around_party, ":town", "pt_volunteers"), #Kham - use actual party template instead of 'none'
(assign, ":volunteers", reg0),
(party_attach_to_party, ":volunteers", ":town"),
Expand Down Expand Up @@ -1986,6 +1987,7 @@ def set_item_score():

(party_get_slot, ":recruit_template", ":town", slot_town_recruits_pt),
(try_begin),
(party_is_active, ":town"),
(gt, ":to_add", 0), # add volunteers!
# this is to simulate slower growth for smaller templates (e.g. rangers)
(store_div, ":reinf_rounds", ":to_add", 3), #average troops per template is 3-4; need minimum of 3 to actually reinforce
Expand Down Expand Up @@ -18286,11 +18288,11 @@ def set_item_score():

# script_set_item_faction
("set_item_faction", set_item_faction()+[
(item_set_slot, "itm_wood_club", slot_item_faction,0xFFFF), # mtarini: make a few items all factions
(item_set_slot, "itm_twohand_wood_club", slot_item_faction,0xFFFF),
(item_set_slot, "itm_metal_scraps_bad", slot_item_faction,0xFFFF), # scraps needed for selling w/o faction discount
(item_set_slot, "itm_metal_scraps_medium", slot_item_faction,0xFFFF),
(item_set_slot, "itm_metal_scraps_good", slot_item_faction,0xFFFF),
(item_set_slot, "itm_wood_club", slot_item_faction,0xFFFFFFFF), # mtarini: make a few items all factions
(item_set_slot, "itm_twohand_wood_club", slot_item_faction,0xFFFFFFFF),
(item_set_slot, "itm_metal_scraps_bad", slot_item_faction,0xFFFFFFFF), # scraps needed for selling w/o faction discount
(item_set_slot, "itm_metal_scraps_medium", slot_item_faction,0xFFFFFFFF),
(item_set_slot, "itm_metal_scraps_good", slot_item_faction,0xFFFFFFFF),

# CC: Easiest way to make this work...
(faction_get_slot, ":mordor_mask", "fac_mordor", slot_faction_mask),
Expand Down

0 comments on commit 6fe9e97

Please sign in to comment.