骑马与砍杀中文站论坛

 找回密码
 注册(Register!)

QQ登录

只需一步,快速开始

搜索
购买CDKEY 小黑盒加速器
查看: 1587|回复: 0

[功能与代码] 用技能增加围城补给消耗

[复制链接]

16

主题

152

回帖

160

积分

见习骑士

Rank: 3

UID
3048044
第纳尔
2061
精华
0
互助
18
荣誉
2
贡献
20
魅力
289
注册时间
2018-12-15
鲜花(34) 鸡蛋(0)
发表于 2022-8-13 18:41:42 | 显示全部楼层 |阅读模式
本帖最后由 黑暗路西法 于 2022-8-14 17:21 编辑

搜索script,  # script_center_get_food_consumption然后把原本的代码改成
  1.       (store_script_param_1, ":center_no"),
  2.       (assign, ":food_consumption", 0),
  3.       (try_begin),
  4.         (party_slot_eq, ":center_no", slot_party_type, spt_town),
  5.         (store_skill_level,reg1,skl_tactics,"trp_player"),
  6.         (store_skill_level,reg2,skl_persuasion,"trp_player"),
  7.         (store_add,reg3,reg1,reg2),
  8.         (val_mul,reg3,250),
  9.         (val_add,reg3,500),
  10.         (assign, ":food_consumption", reg3),
  11.       (else_try),
  12.         (party_slot_eq, ":center_no", slot_party_type, spt_castle),
  13.         (store_skill_level,reg1,skl_tactics,"trp_player"),
  14.         (store_skill_level,reg2,skl_persuasion,"trp_player"),
  15.         (store_add,reg3,reg1,reg2),
  16.         (val_mul,reg3,15),
  17.         (val_add,reg3,50),
  18.         (assign, ":food_consumption", reg3),
  19.       (try_end),
  20.       (assign, reg0, ":food_consumption"),
复制代码
这个的效果是,玩家的每一级战术和说服力将增加城市粮食消耗250点,城堡粮食消耗15点如果想用队伍中最高技能来决定围城粮食消耗,可以改成
  1.       (store_script_param_1, ":center_no"),
  2.       (assign, ":food_consumption", 0),
  3.       (try_begin),
  4.         (party_slot_eq, ":center_no", slot_party_type, spt_town),
  5.         (call_script, "script_get_max_skill_of_player_party", "skl_tactics"),
  6.         (assign,":tactic",reg0),
  7.         (call_script, "script_get_max_skill_of_player_party", "skl_engineer"),
  8.         (assign,":engineer",reg0),
  9.         (store_add,reg3,":tactic",":engineer"),
  10.         (val_mul,reg3,400),
  11.         (val_add,reg3,500),
  12.         (assign, ":food_consumption", reg3),
  13.       (else_try),
  14.         (party_slot_eq, ":center_no", slot_party_type, spt_castle),
  15.         (call_script, "script_get_max_skill_of_player_party", "skl_tactics"),
  16.         (assign,":tactic",reg0),
  17.         (call_script, "script_get_max_skill_of_player_party", "skl_engineer"),
  18.         (assign,":engineer",reg0),
  19.         (store_add,reg3,":tactic",":engineer"),
  20.         (val_mul,reg3,25),
  21.         (val_add,reg3,50),
  22.         (assign, ":food_consumption", reg3),
  23.       (try_end),
  24.       (assign, reg0, ":food_consumption"),
复制代码


效果同上,不过换成了检查玩家队伍中最高的战术和工程
skl是技能,可以参考header_skill来更改(或者直接看汉化也可以)
更正,这个计数器不能用,得换成局部变量,代码已更新

评分

参与人数 1第纳尔 +20 收起 理由
Aomine Daiki + 20 文章不错,继续努力!

查看全部评分

您需要登录后才可以回帖 登录 | 注册(Register!)

本版积分规则

Archiver|手机版|小黑屋|骑马与砍杀中文站

GMT+8, 2024-11-19 12:23 , Processed in 0.102708 second(s), 19 queries , Gzip On, MemCached On.

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表