- 好友
- 0
- 在线时间
- 431 小时
- 最后登录
- 2024-11-1
见习骑士
- UID
- 1564073
- 第纳尔
- 1530
- 精华
- 0
- 互助
- 1
- 荣誉
- 2
- 贡献
- 0
- 魅力
- 0
- 注册时间
- 2013-9-22
鲜花( 34) 鸡蛋( 0)
|
楼主 |
发表于 2023-10-30 17:34:20
|
显示全部楼层
这是原代码,我是只想要个熟练度提升的效果
(ti_on_agent_hit, 0, 0, [],
[
(store_trigger_param_1, ":bgjz"),
(store_trigger_param_2, ":gjz"),
(store_trigger_param_3, ":damage"),
# (get_player_agent_no, ":player_no"),
(try_begin),
(agent_is_ally, ":bgjz"),#玩家,友军npc
(neg|agent_is_ally, ":gjz"),
(try_begin),
# (neg|eq, ":bgjz", ":player_no"),#友军npc效果
(agent_get_troop_id, ":ally", ":bgjz"),
(troop_is_hero, ":ally"),
# (this_or_next|is_between, ":ally", trp_npc_adonja, trp_kingdom_1_lord),
# (eq, ":ally", trp_player),
(store_skill_level, ":npc_skl",skl_ironflesh, ":ally"),
(store_skill_level, ":player_foot", skl_athletics, ":ally"),
(assign, ":bone", ":npc_skl"),
(try_begin),
(val_sub, ":damage", ":bone"),
(val_mul, ":bone", -8),#减伤8%*铁骨等级
(val_add, ":bone", 100),
(val_mul, ":damage", ":bone"),
(val_div, ":damage", 100),
(assign, ":damage_iron", ":damage"),
(try_begin),
(is_between, ":npc_skl", 1, 5), #铁骨1~4级,半血以下伤害减半
(store_agent_hit_points, ":hps", ":bgjz"),
(le, ":hps", 50),
(val_div, ":damage", 2),#血量低于50% 伤害在原有基础上再减伤2分之一
(set_trigger_result, ":damage"),
(else_try),
(is_between, ":npc_skl", 5, 11), #铁骨5~10级
(ge, ":damage_iron", 10), #铁骨8%减伤后,伤害大于10点,减半
(val_div, ":damage", 2),
(store_agent_hit_points, ":hps", ":bgjz"),
(le, ":hps", 50),
(val_div, ":damage", 2),#血量低于50% 伤害在原有基础上再减伤2分之一
(set_trigger_result, ":damage"),
(set_trigger_result, ":damage"),
(set_trigger_result, ":damage"),
(try_end),
(gt, ":player_foot", 0), #跑动增加伤害闪避效果
(try_begin),
(val_mul, ":player_foot", 5), #每级跑动增加5%闪避概率
(store_random_in_range, ":random_f", 0, 100), #循环100
(is_between, ":random_f", 0, ":player_foot"), #概率数字范围
(val_mul, ":damage", 0),
(set_trigger_result, ":damage"),
(set_trigger_result, ":damage"),
(try_end),
(set_trigger_result, ":damage"),
(try_end),
(set_trigger_result, ":damage"),
(try_end),
(set_trigger_result, ":damage"),
# (agent_get_troop_id, ":allyer", ":bgjz"),
# (neg|troop_is_hero, ":allyer"),
# (agent_get_troop_id, ":playarmy", ":player_no"),
# (store_skill_level, ":player_army", skl_leadership, ":playarmy"),
# (assign, ":army", ":player_army"),
# (gt, ":army", 0),
# (val_mul, ":army", -5),
# (val_add, ":army", 100),
# (val_mul, ":damage", ":army"),#减伤damage * (1-统御等级*5%)
# (val_div, ":damage", 100),
# (set_trigger_result, ":damage"),
# (try_end),
# (else_try),
(else_try),
(neg|agent_is_ally, ":bgjz"),#友军npc,玩家,每级武器掌握技能获得5%概率增加所持武器1点熟练度
(agent_is_ally, ":gjz"),
(agent_get_troop_id, ":ally_npc", ":gjz"),
(troop_is_hero, ":ally_npc"),
# (this_or_next|is_between, ":ally_npc", trp_npc_adonja, trp_kingdom_1_lord),
# (eq, ":ally_npc", trp_player),
(try_begin),
(store_skill_level, ":npc_wm", skl_weapon_master, ":ally_npc"),
(agent_get_wielded_item, ":item_no", ":gjz", 0),
(gt, ":item_no", 0),
(item_get_type, ":type", ":item_no"),
(gt, ":npc_wm", 0),
(val_mul, ":npc_wm", 5), #每级武器掌握技能获得5%概率
(store_random_in_range, ":random", 0, 100), #循环100个数字
(is_between, ":random", 0, ":npc_wm"), #概率数字范围
(store_random_in_range, ":random_p", 1, 2), #1点熟练度
(try_begin),
(eq, ":type", itp_type_one_handed_wpn),
(troop_raise_proficiency_linear, ":ally_npc", wpt_one_handed_weapon, ":random_p"),
# (eq, ":gjz", ":player_no"),
# (display_message, "@额 外 获 得 单 手 武 器 熟 练 度 1~3点 ", 0xFF00FF00),
(else_try),
(eq, ":type", itp_type_two_handed_wpn),
(troop_raise_proficiency_linear, ":ally_npc", wpt_two_handed_weapon, ":random_p"),
# (eq, ":gjz", ":player_no"),
# (display_message, "@额 外 获 得 双 手 武 器 熟 练 度 1~3点 ", 0xFF00FF00),
(else_try),
(eq, ":type", itp_type_polearm),
(troop_raise_proficiency_linear, ":ally_npc", wpt_polearm, ":random_p"),
# (eq, ":gjz", ":player_no"),
# (display_message, "@额 外 获 得 长 杆 武 器 熟 练 度 1~3点 ", 0xFF00FF00),
(else_try),
(eq, ":type", itp_type_bow),
(troop_raise_proficiency_linear, ":ally_npc", wpt_archery, ":random_p"),
# (eq, ":gjz", ":player_no"),
# (display_message, "@额 外 获 得 弓 熟 练 度 1~3点 ", 0xFF00FF00),
(else_try),
(eq, ":type", itp_type_crossbow),
(troop_raise_proficiency_linear, ":ally_npc", wpt_crossbow, ":random_p"),
# (eq, ":gjz", ":player_no"),
# (display_message, "@额 外 获 得 弩 熟 练 度 1~3点 ", 0xFF00FF00),
(else_try),
(eq, ":type", itp_type_thrown),
(troop_raise_proficiency_linear, ":ally_npc", wpt_throwing, ":random_p"),
# (eq, ":gjz", ":player_no"),
# (display_message, "@额 外 获 得 投 掷 熟 练 度 1~3点 ", 0xFF00FF00),
(try_end),
(set_trigger_result, ":damage"),
(set_trigger_result, ":damage"),
(else_try),
(store_skill_level, ":npc_ps", skl_power_strike, ":ally_npc"), #强击增加暴击伤害
(store_agent_hit_points, ":g_hps", ":gjz"),
(assign, ":power_dam", ":npc_ps"),
(gt, ":npc_ps", 0),
(try_begin),
(val_mul, ":npc_ps", 5), #每级强击增加5%暴击几率
(store_random_in_range, ":random_pd", 0, 100), #循环100个数字
(is_between, ":random_pd", 0, ":npc_ps"), #随机数字范围
(val_mul, ":power_dam", 10),
(val_add, ":power_dam", 100),
(val_mul, ":damage", ":power_dam"), #每级额外10%暴击伤害
(val_div, ":damage", 100),
(try_begin),
(is_between, ":g_hps", 25, 50), #半血下暴击伤害*2
(val_mul, ":damage", 2),
(set_trigger_result, ":damage"),
(set_trigger_result, ":damage"),
(else_try),
(is_between, ":g_hps", 1, 25), #1/4血量暴击伤害*3
(val_mul, ":damage", 3),
(set_trigger_result, ":damage"),
(set_trigger_result, ":damage"),
(try_end),
(set_trigger_result, ":damage"),
(set_trigger_result, ":damage"),
(try_end),
(set_trigger_result, ":damage"),
(try_end),
(set_trigger_result, ":damage"),
(try_end),
]), |
|