- # script_get_item_modifier_effects moto chief
- # Input: itp_*, imod_*
- # Output: reg0 damage effect
- # reg1 speed effect
- # reg2 armor effect
- # reg3 hit points effect
- # reg4 difficulty effect
- # reg5 price factor
- # s0 descriptor string
- ("get_item_modifier_effects", [(store_script_param, ":type", 1),
- (store_script_param, ":imod", 2),
-
- (assign, ":damage", 0),
- (assign, ":speed", 0),
- (assign, ":armor", 0),
- (assign, ":hit_points", 0),
- (assign, ":difficulty", 0),
- (assign, ":price_factor", 100),
-
- (try_begin),
- (eq, ":type", itp_type_horse),
- (try_begin),
- (eq, ":imod", imod_lame),
- (assign, ":speed", -10),
- (assign, ":price_factor", 40),
- (str_store_string, s0, "@Lame"),
- (else_try),
- (eq, ":imod", imod_swaybacked),
- (assign, ":speed", -4),
- (assign, ":price_factor", 60),
- (str_store_string, s0, "@Swaybacked"),
- (else_try),
- (eq, ":imod", imod_timid),
- (assign, ":speed", 2),
- (assign, ":price_factor", 120),
- (str_store_string, s0, "@Timid"),
- (else_try),
- (eq, ":imod", imod_meek),
- (assign, ":speed", 2),
- (assign, ":price_factor", 120),
- (str_store_string, s0, "@Meek"),
- (else_try),
- (eq, ":imod", imod_stubborn),
- (assign, ":hit_points", 5),
- (assign, ":difficulty", 1),
- (assign, ":price_factor", 90),
- (str_store_string, s0, "@Stubborn"),
- (else_try),
- (eq, ":imod", imod_heavy),
- (assign, ":damage", 4),
- (assign, ":armor", 3),
- (assign, ":hit_points", 10),
- (assign, ":price_factor", 150),
- (str_store_string, s0, "@Heavy"),
- (else_try),
- (eq, ":imod", imod_spirited),
- (assign, ":damage", 1),
- (assign, ":speed", 2),
- (assign, ":price_factor", 160),
- (str_store_string, s0, "@Spirited"),
- (else_try),
- (eq, ":imod", imod_champion),
- (assign, ":damage", 2),
- (assign, ":speed", 4),
- (assign, ":difficulty", 2),
- (assign, ":price_factor", 170),
- (str_store_string, s0, "@Champion"),
- (try_end),
-
- (else_try),
- (eq, ":type", itp_type_shield),
- (try_begin),
- (eq, ":imod", imod_cracked),
- (assign, ":armor", -4),
- (assign, ":hit_points", -56),
- (assign, ":price_factor", 50),
- (str_store_string, s0, "@Cracked"),
- (else_try),
- (eq, ":imod", imod_battered),
- (assign, ":armor", -2),
- (assign, ":hit_points", -26),
- (assign, ":price_factor", 75),
- (str_store_string, s0, "@Battered"),
- (else_try),
- (eq, ":imod", imod_thick),
- (assign, ":armor", 2),
- (assign, ":hit_points", 47),
- (assign, ":price_factor", 120),
- (str_store_string, s0, "@Thick"),
- (else_try),
- (eq, ":imod", imod_reinforced),
- (assign, ":armor", 4),
- (assign, ":hit_points", 63),
- (assign, ":price_factor", 150),
- (str_store_string, s0, "@Reinforced"),
- (try_end),
-
- (else_try),
- (ge, ":type", itp_type_head_armor),
- (le, ":type", itp_type_hand_armor),
- (try_begin),
- (eq, ":imod", imod_cracked),
- (assign, ":armor", -4),
- (assign, ":price_factor", 50),
- (str_store_string, s0, "@Cracked"),
- (else_try),
- (eq, ":imod", imod_rusty),
- (assign, ":armor", -3),
- (assign, ":price_factor", 55),
- (str_store_string, s0, "@Rusty"),
- (else_try),
- (eq, ":imod", imod_tattered),
- (assign, ":armor", -3),
- (assign, ":price_factor", 40),
- (str_store_string, s0, "@Tattered"),
- (else_try),
- (eq, ":imod", imod_ragged),
- (assign, ":armor", -2),
- (assign, ":price_factor", 60),
- (str_store_string, s0, "@Ragged"),
- (else_try),
- (eq, ":imod", imod_battered),
- (assign, ":armor", -2),
- (assign, ":price_factor", 75),
- (str_store_string, s0, "@Battered"),
- (else_try),
- (eq, ":imod", imod_crude),
- (assign, ":armor", -1),
- (assign, ":price_factor", 83),
- (str_store_string, s0, "@Crude"),
- (else_try),
- (eq, ":imod", imod_sturdy),
- (assign, ":armor", 1),
- (assign, ":price_factor", 120),
- (str_store_string, s0, "@Sturdy"),
- (else_try),
- (eq, ":imod", imod_thick),
- (assign, ":armor", 2),
- (assign, ":price_factor", 140),
- (str_store_string, s0, "@Thick"),
- (else_try),
- (eq, ":imod", imod_hardened),
- (assign, ":armor", 3),
- (assign, ":price_factor", 160),
- (str_store_string, s0, "@Hardened"),
- (else_try),
- (eq, ":imod", imod_reinforced),
- (assign, ":armor", 4),
- (assign, ":price_factor", 180),
- (str_store_string, s0, "@Reinforced"),
- (else_try),
- (eq, ":imod", imod_lordly),
- (assign, ":armor", 5),
- (assign, ":price_factor", 400),
- (str_store_string, s0, "@Lordly"),
- (try_end),
-
- (else_try),
- (this_or_next | eq, ":type", itp_type_one_handed_wpn),
- (this_or_next | eq, ":type", itp_type_two_handed_wpn),
- (this_or_next | eq, ":type", itp_type_polearm),
- (this_or_next | eq, ":type", itp_type_bow),
- (this_or_next | eq, ":type", itp_type_crossbow),
- (this_or_next | eq, ":type", itp_type_pistol),
- (eq, ":type", itp_type_musket),
-
- (try_begin),
- (eq, ":imod", imod_rotten), #idea is to use this for a completly broken weapon
- (assign, ":damage", -20),
- (assign, ":price_factor", 5),
- (str_store_string, s0, "@Broken"),
- (else_try),
- (eq, ":imod", imod_cracked),
- (assign, ":damage", -5),
- (assign, ":price_factor", 40),
- (str_store_string, s0, "@Cracked"),
- (else_try),
- (eq, ":imod", imod_rusty),
- (assign, ":damage", -3),
- (assign, ":price_factor", 55),
- (str_store_string, s0, "@Rusty"),
- (else_try),
- (eq, ":imod", imod_bent),
- (assign, ":damage", -3),
- (assign, ":speed", -3),
- (assign, ":price_factor", 60),
- (str_store_string, s0, "@Bent"),
- (else_try),
- (eq, ":imod", imod_chipped),
- (assign, ":damage", -1),
- (assign, ":price_factor", 72),
- (str_store_string, s0, "@Chipped"),
- (else_try),
- (eq, ":imod", imod_heavy),
- (assign, ":damage", 2),
- (assign, ":speed", -2),
- (assign, ":difficulty", 1),
- (assign, ":price_factor", 120),
- (str_store_string, s0, "@Heavy"),
- (else_try),
- (eq, ":imod", imod_strong),
- (assign, ":damage", 3),
- (assign, ":speed", -3),
- (assign, ":difficulty", 2),
- (assign, ":price_factor", 150),
- (str_store_string, s0, "@Strong"),
- (else_try),
- (eq, ":imod", imod_balanced),
- (assign, ":damage", 3),
- (assign, ":speed", 3),
- (assign, ":price_factor", 165),
- (str_store_string, s0, "@Balanced"),
- (else_try),
- (eq, ":imod", imod_tempered),
- (assign, ":damage", 4),
- (assign, ":price_factor", 180),
- (str_store_string, s0, "@Tempered"),
- (else_try),
- (eq, ":imod", imod_masterwork),
- (assign, ":damage", 5),
- (assign, ":speed", 1),
- (assign, ":difficulty", 4),
- (assign, ":price_factor", 400),
- (str_store_string, s0, "@Masterwork"),
- (else_try),
- (eq, ":imod", imod_crude),
- (assign, ":damage", -2),
- (assign, ":price_factor", 83),
- (try_end),
-
- (else_try),
- (this_or_next | eq, ":type", itp_type_arrows),
- (this_or_next | eq, ":type", itp_type_bolts),
- (this_or_next | eq, ":type", itp_type_bullets),
- (eq, ":type", itp_type_thrown),
-
- (try_begin),
- (eq, ":imod", imod_large_bag),
- # (assign, ":damage", 1), #just make better than plain
- (assign, ":price_factor", 110),
- (str_store_string, s0, "@Large Bag of"),
- (else_try),
- (eq, ":imod", imod_bent),
- (assign, ":damage", -3),
- (assign, ":price_factor", 65),
- (str_store_string, s0, "@Bent"),
- (else_try),
- (eq, ":imod", imod_cracked),
- (assign, ":damage", -5),
- (assign, ":price_factor", 50),
- (str_store_string, s0, "@Cracked"),
- (else_try),
- (eq, ":imod", imod_heavy),
- (assign, ":damage", 2),
- (assign, ":price_factor", 130),
- (str_store_string, s0, "@Heavy"),
- (else_try),
- (eq, ":imod", imod_balanced),
- (assign, ":damage", 3),
- (assign, ":price_factor", 150),
- (str_store_string, s0, "@Balanced"),
- (try_end),
- (try_end),
-
- (assign, reg0, ":damage"),
- (assign, reg1, ":speed"),
- (assign, reg2, ":armor"),
- (assign, reg3, ":hit_points"),
- (assign, reg4, ":difficulty"),
- (assign, reg5, ":price_factor"),]),
复制代码
|