- 积分
- 551
- 威望
- 0
- 魅力
- 0
- 经验
- 21
- 热心度
- 0
- 注册时间
- 2008-12-14
- 最后登录
- 2020-6-20
- 主题
- 41
- 回帖
- 286
- 精华
- 1
- 阅读权限
- 30
TA的每日心情 | 慵懒 2020-6-16 08:57 |
---|
签到天数: 1 天 连续签到: 1 天 [LV.1]投石矮人
3级 Known Hero
- 积分
- 551
|
2013/4/14 更新:修复些小BUG(具体忘了,因为是早就修复了但没到论坛更新……)。
2012/4/23 更新:修复检测出错BUG。
2012/3/16 更新:加入疗伤魔法判定,毁灭之光判定。
开启英雄特技后,魔法特技英雄会自动施法,不过原来的自动施法有很大瑕疵。比如状态魔法会不停对同一个目标不停施法,对其他生物完全不理会。而且由于堆栈算法的缺陷,导致某些堆栈是100%随机不到的。
于是我做了优化。目前测试情况良好。
以下为原代码
!?FU805;
!!VRv428&v425=0/w30=0:S0; //v428 is side which will under spell
!!VRv428&v425=0/w30=1:S1;
!!VRv428&v425=1/w30=0:S1;
!!VRv428&v425=1/w30=1:S0;
·
· (中间的我这里省略,但是也要去掉)
·
·
!!BHv425:Mv434;
!!HEv433:Sw32/v435;
!!HEv433:Iv429/1;
!!VRv429:Sw29+w31;
!!VRw31&v429<2:S-1*w29+2; //if chance is more than 1/2 then decrease to 1/2
以下为替换代码
!?FU805;
!!VRv428&v425=0/w30=0:S0; //v428 is side which will under spell
!!VRv428&v425=0/w30=1:S1;
!!VRv428&v425=1/w30=0:S1;
!!VRv428&v425=1/w30=1:S0;
!!VRy28:S1;
!!VRy28&w28>65/w28<70:S0; //元素召唤 检测
!!VRv437: *5 +3 %8;
!!VRv430:R20 *y28;
!!VRx16:S0;
!!BMv430&v430>-1/v430<42:N?v429; //v429 - number of monsters
!!BMv430&v430>-1/v430<42:T?v435; //v435 - type of monster
!!VRv429&v435>=145/v435<=149:S0; //tower arrows and ballistas cannot be target
!!VRv429|v435=122/v435=124/v435=128:S0;
;//小检测段
!!BMv430&v430>-1/v430<42:Gw28/?y20/?y21; //y20 当前持续时间
!!VRy20&v430>-1/v430<42/w28=47:S0; //毁灭之光 检测
!!VRy29:Sy20*y28;
!!VRv430|y29>1/v429<=0:R6; 新查找
!!VRv430&v428=0:%21; //堆栈矫正
!!VRv430&v428=1:%21+21; //堆栈矫正
!!BMv430&v430>-1/v430<42:N?v429;
!!BMv430&v430>-1/v430<42:T?v435;
!!VRv429&v435>=145/v435<=149:S0;
!!VRv429|v435=122/v435=124/v435=128:S0;
;//
!!BMv430&v430>-1/v430<42:Gw28/?y20/?y21; //y20 当前持续时间
!!VRy20&w28=47/v430>-1/v430<42:S0; //毁灭之光 检测
!!VRy29:Sy20*y28;
!!VRv430|y29>1/v429<=0:R6; 新查找
!!VRv430&v428=0:%21; //堆栈矫正
!!VRv430&v428=1:%21+21; //堆栈矫正
!!BMv430&v430>-1/v430<42:N?v429;
!!BMv430&v430>-1/v430<42:T?v435;
!!VRv429&v435>=145/v435<=149:S0;
!!VRv429|v435=122/v435=124/v435=128:S0;
;//
!!BMv430&v430>-1/v430<42:Gw28/?y20/?y21; //y20 当前持续时间
!!VRy20&w28=47/v430>-1/v430<42:S0; //毁灭之光 检测
!!VRy29:Sy20*y28;
!!VRv430|y29>1/v429<=0:R6; 新查找
!!VRv430&v428=0:%21; //堆栈矫正
!!VRv430&v428=1:%21+21; //堆栈矫正
!!BMv430&v430>-1/v430<42:N?v429;
!!BMv430&v430>-1/v430<42:T?v435;
!!VRv429&v435>=145/v435<=149:S0;
!!VRv429|v435=122/v435=124/v435=128:S0;
!!DO646/0/41/1:P; //循环检测
!!VRv431:S0; //v431 - position to cast if 0 then do not cast
!!BMv430&v429>0:P?v431;
!!VRv429:Sw29+w31-1; //v429 - chance is 1 of (w29+w31)
!!VRv432&v431>0/v429>0:S0Rv429; //randomize v432
!!BMv430&v430>-1/v430<42:Gw28/?y20/?y21; //y20 当前持续时间
!!BMv430&w28=47/v430>-1/v430<42:D?y22;
!!VRy20&w28=47/y22>0/v430>-1/v430<42:S0; //毁灭之光 检测
!!VRy23:S0; //疗伤魔法
!!VRy24:S0;
!!BMv430&w28=37:L?y23; //疗伤 检测是否损血
!!VRy24&y23>0:S1;
!!BMv430&y24=0:G42/?y23/?y21; //疗伤 异常状态检测 检测
!!VRy24&y23>0:S1;
!!BMv430&y24=0:G54/?y23/?y21;
!!VRy24&y23>0:S1;
!!BMv430&y24=0:G45/?y23/?y21;
!!VRy24&y23>0:S1;
!!BMv430&y24=0:G62/?y23/?y21;
!!VRy24&y23>0:S1;
!!BMv430&y24=0:G45/?y23/?y21;
!!VRy24&y23>0:S1;
!!BMv430&y24=0:G52/?y23/?y21;
!!VRy24&y23>0:S1;
!!BMv430&y24=0:G60/?y23/?y21;
!!VRy24&y23>0:S1;
!!BMv430&y24=0:G61/?y23/?y21;
!!VRy24&y23>0:S1;
!!BMv430&y24=0:G50/?y23/?y21;
!!VRy24&y23>0:S1;
!!BMv430&y24=0:G59/?y23/?y21;
!!VRy20&y24=0/w28=37:S10;
!!VRv432&v431>0/v429<1/y20<2:S1; //if (w29+w31)<=1 that means the time to cast
!!HEv433:I?v429/1;
!!HEv433:I100/1;
!!HEv433:Sw32/?v435;
!!BHv425:M?v434;
!!BG:A?v430; //if hero or monster casts spell do not randomly spell
!!VRv432|v430=1/v430=10:S2;
!!BHv425&v432=1/v431>0/y20<2/v429>0:Cw28/v431/v435/0; //v432=1 means that time to cast 施法
!!VRw31&v432=1/v431>0/y20<2/w28>0/w28<1000:+w29; //if hero casts spell then w31 increasing by w29 value
!!VRw31&w28>0/w28<1000|v432<>1/v431<=0/y20>1:-1; //w43 keeps addition value that added to w29. w31 decrement every turn and the chance is increasing
!!VRv430:+1;
!!BHv425:Mv434;
!!HEv433:Sw32/v435;
!!HEv433:Iv429/1;
!!VRv429:Sw29+w31;
!!VRw31&v429<2:S-1*w29+2; //if chance is more than 1/2 then decrease to 1/2
!?FU646;
*//循环段
!!BMv430&v430>-1/v430<42:Gw28/?y20/?y21; //y20 当前持续时间
!!VRy20&w28=47/v430>-1/v430<42:S0; //毁灭之光 检测
!!VRy29:Sy20*y28;
!!VRv430|y29>1/v429<=0:+1; 新查找
!!VRv430&v428=0:%21; //堆栈矫正
!!VRv430&v428=1:%21+21; //堆栈矫正
!!BMv430&v430>-1/v430<42:N?v429;
!!BMv430&v430>-1/v430<42:T?v435;
!!VRv429&v435>=145/v435<=149:S0;
!!VRv429|v435=122/v435=124/v435=128:S0;
!!FU&y20<2/v429>0:E;
请将红色字段用绿色字段替换掉。省略部分的也要替换掉。
或者可以用我的脚本文件替换。不过里面还修改了其他特技,修改样例如图。
script39.rar
(14.08 KB, 下载次数: 496)
[ 本帖最后由 异界行者 于 2013-4-14 13:59 编辑 ] |
评分
-
5
查看全部评分
-
|