- 好友
- 0
- 在线时间
- 0 小时
- 最后登录
- 2022-5-27
平民
- UID
- 3360164
- 第纳尔
- 23
- 精华
- 0
- 互助
- 0
- 荣誉
- 0
- 贡献
- 0
- 魅力
- 0
- 注册时间
- 2022-5-18
鲜花( 0) 鸡蛋( 0)
|
楼主 |
发表于 2022-5-25 10:16:05
|
显示全部楼层
# script_calculate_player_faction_wage
# Input: arg1 = party_no
# Output: reg0 = weekly wage
("calculate_player_faction_wage",
[(assign, ":nongarrison_wages", 0),
(assign, ":garrison_wages", 0),
(try_for_parties, ":party_no"),
(assign, ":garrison_troop", 0),
(try_begin),
(this_or_next|party_slot_eq, ":party_no", slot_party_type, spt_town),
(party_slot_eq, ":party_no", slot_party_type, spt_castle),
(party_slot_eq, ":party_no", slot_town_lord, "trp_player"),
(assign, ":garrison_troop", 1),
(try_end),
(this_or_next|eq, ":party_no", "p_main_party"),
(eq, ":garrison_troop", 1),
(party_get_num_companion_stacks, ":num_stacks",":party_no"),
(try_for_range, ":i_stack", 0, ":num_stacks"),
(party_stack_get_troop_id, ":stack_troop",":party_no",":i_stack"),
(party_stack_get_size, ":stack_size",":party_no",":i_stack"),
(call_script, "script_game_get_troop_wage", ":stack_troop", ":party_no"),
(assign, ":cur_wage", reg0),
(val_mul, ":cur_wage", ":stack_size"),
(try_begin),
(eq, ":garrison_troop", 1),
(val_add, ":garrison_wages", ":cur_wage"),
(else_try),
(val_add, ":nongarrison_wages", ":cur_wage"),
(try_end),
(try_end),
(try_end),
(val_div, ":garrison_wages", 2),#Half payment for garrisons
(store_sub, ":total_payment", 14, "$g_cur_week_half_daily_wage_payments"), #between 0 and 7
(val_mul, ":nongarrison_wages", ":total_payment"),
(val_div, ":nongarrison_wages", 14),
(store_add, reg0, ":nongarrison_wages", ":garrison_wages"),
]),
这一段的 (val_div, ":garrison_wages", 2)中的2改成了1,但没用 |
|