- 好友
- 0
- 在线时间
- 134 小时
- 最后登录
- 2024-8-29
见习骑士
![Rank: 3](static/image/common/star_level2.gif)
- UID
- 1411320
- 第纳尔
- 670
- 精华
- 0
- 互助
- 5
- 荣誉
- 2
- 贡献
- 0
- 魅力
- 23
- 注册时间
- 2013-6-13
![](source/plugin/floweregg/images/flower.gif) 鲜花( 9) ![](source/plugin/floweregg/images/egg.gif) 鸡蛋( 0)
|
![](static/image/common/ico_lz.png)
楼主 |
发表于 2024-7-24 20:08:04
|
显示全部楼层
本帖最后由 秦雨子瀾 于 2024-7-24 21:19 编辑
(troop_get_type, ":gender", ":troop_no"),
(try_begin), #ATN - gender conditions
(eq, ":gender", 2),
(assign, ":gender", 0),
(else_try),
(eq, ":gender", 3),
(assign, ":gender", 1),
(else_try),
(eq, ":gender", 4),
(assign, ":gender", 1),
(try_end),
blablablablabla.......
是这样对吗~~
另外我突然想到,能不能自己加一个 troop_get_gender 然后手动替换原有的 troop_get_type 的调用,我自己在 troop_get_gender 里面调 gettype 之后加上这种如果2就强行赋值0的操作~
我在 module_script 里面加了如下:
# ATN - scripts start
# script_atn_fix_troop_type
# Input: arg1 = skin type index in skins
# Output: reg0 = fixed gender 0 male, or 1 female
("atn_fix_troop_type",
[
(store_script_param, ":skin_type", 1),
(assign, reg0, ":skin_type"),
(try_begin),
(eq, ":skin_type", 2),
(assign, reg0, 0),
(else_try),
(ge, ":skin_type", 3),
(assign, reg1, 1),
(end_try),
(set_trigger_result, reg0),
]),
# ATN - scripts end
然后所有调用过 troop_get_type 的地方多加两行:
(troop_get_type, ":gender", ":troop_no"),
(call_script, "script_atn_fix_troop_type", ":gender"),
(assign, ":gender", reg0),
xxxxxx.....
是不是理论上就可以了~
|
|