|
本帖最后由 高原命 于 2014-5-27 01:47 编辑
ZVSE
ERMS_ScriptName=script85
ERMS_ScriptAuthor=poet
ERMS_ScriptVersion=2.0.0
ERMS_ScriptDate=29.4(April).2010
ERMS_ScriptERMVersion=2.70
ERMS_ScriptLanguage=中文(中国) or 中文(简体) (native)
ERMS_ScriptUsedVariables=v2458-v2512,w140-w143
ERMS_ScriptUsedFunctions=2458-2477
_WARNING_#1=IMPORTANT! This file is not in a plain text format. NEVER use any editor except ERM_S for making any kind of changes!
ERMS_PoweredBy=ERM Scripter v. 2004.10.5.945
** Read WoG Options
!#UN:P257/?v2487; ** feature 1: restore stacks after every battle based on exp
!#UN:P258/?v2488; ** feature 2: summon hero level pets as 3rd henchmen
!#UN:P259/?v2489; ** feature 3: all stacks on battle field are Ace level
!#UN:P260/?v2490; ** feature 4: summon 3rd stack henchman
!#UN:P261/?v2506; ** feature 5: exchange troops or exp (necromancy enhancement)
!#UN:P262/?v2511; ** feature 6: 1st henchman summons
** x1: hero id, x2: monster, x16, hero slot, w143: saved exp for necromancy
!?FU2512;
!!IF:Wx1;
!!HEx1:C0/x16/?y2/?y3; [check stack x16]
!!VRy5:Sx2 +1;
!!FU&y2<>x2/y2<>y5:E; [exit if not the monster]
!!MA:Fy2/?y4; [check monster fight value]
!!VRy1:Sy3 *y4;
!!VRy7:Sw143 +y1;
!!VRw143:Sy7;
!!HEx1:C0/x16/-1/0; [remove stacks]
!!VRx16:S6; [只收复第一队,避免强制合兵]
** all monsters in the battlefield will have Ace level
!?FU2458; ** x1=1: call in BR, x1=0 call in BF
!!FU&v2489=0:E; [ check WoG option ]
!!BMx16:N?y2; [ get stack count into y2 ]
!!FU&y2<1:E; [ break if no stack ]
!!VRy1:S-1 -x16; [ calculate the stack number into y1 ]
!!EAy1&x1=0:E10/12/d/d; [ in BF trigger, set level to 10 ]
!!FU&x1=0:E; [ quit for BF trigger ]
!!BMx16:T?y22; [ check if it is commander ]
!!FU&y22>=174/y22<=191:E; [ break if commander ]
!!BMx16:O?y19; [ in BR trigger, check if summoned creature first ]
!!FU&y19<>-1:E; [ break for normal stack creature ]
!!EAy1:R?y20/?y21; [ get warlord flag ]
!!FU&y20=156:E; [ break if warlord flag present ]
!!EAy1&y19=-1:E10/12/d/d; [ set summoned creature level to 10 ]
!!EAy1:R156/5; [ add warlord's flag on battlefield ]
** 去掉追随者的召唤能力设置,在BR触发器中恢复
!?BG0;
!!BMv2507&v2507>0/v2507<41/v2490=1:O-1;
!!BMv2508&v2508>0/v2508<41/v2490=1:O-1;
!!BMv2509&v2509>0/v2500<41/v2488=1:O-1;
!!BMv2510&v2510>0/v2510<41/v2488=1:O-1;
!!BMv7207&v7207>0/v7207<41/v2511=1:O-1;
!!BMv7208&v7208>0/v7208<41/v2511=1:O-1;
** summon commander stack according to hero level
!?FU2459;
!!FU&v2488=0:E; [ check WoG option ]
!!BA:Hx1/?y1; [ get hero number into y1]
!!FU&y1<0:E; [ exit if no hero]
!!HEy1:Ed/?y4; [ check level of hero into y4]
!!HEy1:O?y3; [ get attacker's owner]
!!OW:Iy3/?y6; [ check if AI]
!!HEy1:B2/?y5; [ check race of hero: y5]
!!VRy5: :2; [ get town type]
!!VRy19&y5=5:Sy4 :10 +2;
!!VRy4&y5=5:Sy4 +y19;
!!VRy18&x1=0:S174 +y5; [ set creature number in y18]
!!VRy18&x1=1:S183 +y5; [ set creature number]
!!FU2472:Px1; [ check position]
!!FU&v2497<0:E; [ exit if all occupied]
!!BU:Sy18/y4/v2497/x1/-1/0; [ add creatures to attacker's army at position v2497]
!!BU:Ev2497/?y2; [ get stack into y2]
!!BMy2:E0; [ set spells to zero to avoid bugs]
!!VRy9:S-1 -y2; [ calculate stack number into y9]
!!EAy9:D?y10; [ check if bonus lines copied]
!!EAy9&y10=0:Oy18; [ copy the bonus lines]
!!EAy9&y4>=10:E10/12/d/d; [ set level to 10 if hero level >10]
!!VRy4&y4<0:S0;
!!EAy9&y4<10:Ey4/12/d/d; [ set level to hero level if <10]
!!EAy9:R156/y5; [ add warlord's flag on battlefield]
!!VRv2509&y6=0:Sy2; [ 保存追随者占用的槽]
!!VRv2510&y6=1:Sy2;
** check AI monster x1 = hero id
!?FU2468;
!!HEx1:X?y1/?y2/d/d/d/d/?y7;
!!VRw142&w142=0/y1=1/y2<>146:Sy2;
!!VRw142&w142=0/y1=4:Sy2;
!!VRw142&w142=0/y1=6:Sy7;
!!VRw142&w142=0/y1=7:S82; [red dragon for dragon master]
!!VRw140&w140=0/y1=1/y2<>146:Sy2;
!!VRw140&w140=0/y1=4:Sy2;
!!VRw140&w140=0/y1=6:Sy7;
!!VRw140&w140=0/y1=7:S82; [red dragon for dragon master]
** check player monster x1 = hero id
!?FU2469;
!!IF:Wx1;
!!VRv2491:Sw140;
!!VRv2492:Sw141;
** check AI monster x1 = hero id
!?FU2477;
!!IF:Wx1;
!!VRv2491:Sw142;
!!VRv2492:Sw141;
** check for available stack position
** x1 = 0 for attacker, 1 for defender return value in v2497
!?FU2472;
!!VRy1:Sx1 *10;
!!VRy8:S54 +y1; [set position]
!!BU:Ey8/?y2; [get stack into y2]
!!VRv2497&y2<0:Sy8;
!!FU&y2<0:E; [exit if found]
!!VRy8:S122 +y1; [set position]
!!BU:Ey8/?y2; [get stack into y2]
!!VRv2497&y2<0:Sy8;
!!FU&y2<0:E; [exit if found]
!!VRy8:S20 +y1; [set position]
!!BU:Ey8/?y2; [get stack into y2]
!!VRv2497&y2<0:Sy8;
!!FU&y2<0:E; [exit if found]
!!VRy8:S156 +y1; [set position]
!!BU:Ey8/?y2; [get stack into y2]
!!VRv2497&y2<0:Sy8;
!!FU&y2<0:E; [exit if found]
** summon stack henchman
!?FU2466;
!!FU&v2490=0:E; [ check WoG option ]
!!BA:Hx1/?y1; [ get hero number into y1 ]
!!FU&y1<0:E; [ exit if no hero ]
!!HEy1:E?y11/?y4; [ check level of hero into y4 ]
!!HEy1:O?y3; [ get attacker's owner ]
!!OW:Iy3/?y6; [ check if AI ]
!!FU2477&y6=1:Py1; [ check AI monster into v2491 ]
!!FU2469&y6=0:Py1; [ check player monster into v2491 ]
!!VRy18:Sv2491; [ set creature number in y18 ]
!!FU2472:Px1; [ check position ]
!!FU&v2497<0:E; [ exit if all occupied ]
!!MA:Fy18/?y12; [ check monster fight value ]
!!VRy19&v2492=5:Sy11 :2;
!!VRy11&v2492=5:Sy11 +y19; [ if warlord flag 5 ]
!!VRy11: :y12;
!!VRy11&y11<1:S1; [ calculate the count ]
!!BU:Sy18/y11/v2497/x1/-1/0; [ add creatures to attacker's army at position v2497 ]
!!BU:Ev2497/?y2; [ get stack into y2 ]
!!VRy9:S-1 -y2; [ calculate stack number into y9 ]
!!EAy9:D?y10; [ check if bonus lines copied ]
!!EAy9&y10=0:Oy18; [ copy the bonus lines ]
!!EAy9&y4>=10:E10/12/d/d; [ set level to 10 if hero level >10 ]
!!VRy4&y4<0:S0;
!!EAy9&y4<10:Ey4/12/d/d; [ set level to hero level if <10 ]
!!EAy9:R156/v2492; [ add warlord's flag on battlefield ]
!!VRv2507&y6=0:Sy2; [ 保存追随者占用的槽 ]
!!VRv2508&y6=1:Sy2;
** Battlefield trigger
!?BF;
!!FU2466:P0; ** add the stack henchman for attacker
!!FU2459:P1; ** add the pet henchman for defender
!!FU2459:P0; ** add the pet henchman for attacker
!!FU2466:P1; ** add the stack henchman for defender
!!DO2458/0/41/1:P0;
!!BMv2507&v2507>0/v2507<41/v2490=1:O6; [ 让追随者具有召唤能力,BG0触发器中恢复 ]
!!BMv2508&v2508>0/v2508<41/v2490=1:O6;
!!BMv2509&v2509>0/v2509<41/v2488=1:O6;
!!BMv2510&v2510>0/v2510<41/v2488=1:O6;
!!BMv7207&v7207>0/v7207<41/v2511=1:O6;
!!BMv7208&v7208>0/v7208<41/v2511=1:O6;
** Battleround trigger
!?BR&v997>=0;
!!DO2458/0/41/1:P1;
!!BMv2507&v2507>0/v2507<41/v2490=1:O6; [ 让追随者具有召唤能力,BG0触发器中恢复 ]
!!BMv2508&v2508>0/v2508<41/v2490=1:O6;
!!BMv2509&v2509>0/v2509<41/v2488=1:O6;
!!BMv2510&v2510>0/v2510<41/v2488=1:O6;
!!BMv7207&v7207>0/v7207<41/v2511=1:O6;
!!BMv7208&v7208>0/v7208<41/v2511=1:O6;
** x1==hero id, x2=defence, x3=exp, x16==slot number;
!?FU2461;
!!VRy6:Sx2 *14 +2458 +x16;
!!VRy7:Sx2 *14 +2458 +7 +x16;
!!HEx1:C0/x16/?y2/?y3; [check stack x16]
!!VRvy6:S0;
!!VRvy7:S-1;
!!FU&y2<0:E; [exit if no stack]
!!MA:Fy2/?y4; [check monster fight value]
!!VRy5:Sy4 *y3; [calculate the target exp]
!!VRy5&y5>x3:Sx3; [restrict to x3]
*!IF:M^save %X1 %X2 slot %X16 with %Y5 %Y2^;
!!VRvy6:Sy5; [save monster exp]
!!VRvy7:Sy2; [save monster type]
** save heroes status before battle
** x1 == hero id, x2 == 0 for attacker, 1 for defence
!?FU2460;
!!HEx1:E?y1/?y4; [get experience into y1, level into y4]
!!DO2461/0/6/1:Px1/x2/y1; [save stacks]
!!HEx1:I?y3; [get magic points into y3]
!!VRy2:S2495 +x2;
!!VRy5:Sy4 *10; [target magic point]
!!VRvy2:Sy3; [save magic points]
!!VRvy2&y5<y3:Sy5; [use level*10 for a high magic point]
!!HEx1:A2/3/d/?y6; [get catapult]
!!HEx1:A2/4/d/?y7; [get ballista]
!!HEx1:A2/5/d/?y8; [get ammo cart]
!!HEx1:A2/6/d/?y9; [get first aid tent]
!!VRy10:S2498 +x2; [save war machines]
!!VRvy10:Sy6;
!!VRvy10&y4<y6:Sy4;
!!VRy10:S2500 +x2;
!!VRvy10:Sy7;
!!VRvy10&y4<y7:Sy4;
!!VRy10:S2502 +x2;
!!VRvy10:Sy8;
!!VRvy10&y4<y8:Sy4;
!!VRy10:S2504 +x2;
!!VRvy10:Sy9;
!!VRvy10&y4<y9:Sy4;
** x1==hero id, x2=defence, x16==slot number;
!?FU2463;
!!VRy6:Sx2 *14 +2458 +x16;
!!VRy7:Sx2 *14 +2458 +7 +x16;
!!VRy8:Svy6;
!!VRy9:Svy7;
!!HEx1:C0/x16/?y2/?y3; [check stack x16]
!!VRy2&y2<0:Sy9; [if stack type empty set to saved]
*!IF:M^restore %X1 %X2 slot %X16 with %Y8 %Y9^;
!!FU&y2<0:E; [exit if saved is empty]
!!MA:Fy2/?y4; [check monster fight value]
!!VRy5:Sy4 *y3; [calculate the current exp]
!!FU&y5>=y8:E; [exit if current exp >= saved]
!!VRy3:Sy8 :y4; [reset to initial value]
!!HEx1:C0/x16/y2/y3/10/12; [set stack x16 and level to Ace]
** x1=hero id, x2 = artifact, x3=position
!?FU2473;
!!HEx1:A1/x2/x3;
** restore heroes stack after battle
** x1 == hero id, x2 == 0 for attacker, 1 for defence
!?FU2462;
!!DO2463/0/6/1:Px1/x2; [restore stacks]
!!VRy2:S2495 +x2;
!!VRy3:Svy2; [get saved magic point]
!!HEx1:I?y5; [get current magic point]
!!HEx1&y3>y5:Iy3; [restore magic point]
!!IF:Wx1;
!!VRw119:S1; [restore 1st henchman]
!!COx1:D0; [restore commander]
!!HEx1:A-4 A-5 A-6; [remove all war machines]
!!VRy10:S2500 +x2; [restore ballista]
!!VRy11:Svy10;
!!DO2473/1/y11/1:Px1/4/13;
!!VRy10:S2502 +x2; [restore ammo cart ]
!!VRy11:Svy10;
!!DO2473/1/y11/1:Px1/5/14;
!!VRy10:S2504 +x2; [restore first-aid tent]
!!VRy11:Svy10;
!!DO2473/1/y11/1:Px1/6/15;
** convert necromancy stacks into desired
** x1 == hero id, x2 == 0 for attacker, 1 for defence
!?FU2478;
!!HEx1:A2/130/?y1/?y7; [check 鬼王披风]
!!VRy6&y7<1:S56;
!!HEx1&y7>0:S12/?y9; [检查招魂术的等级,确定招魂货币类型]
!!VRy6&y7>0/y9=0:S56; !!VRy6&y7>0/y9=1:S58;
!!VRy6&y7>0/y9=2:S60; !!VRy6&y7>0/y9=3:S64;
!!DO2512/0/6/1:Px1/y6; [remove normal necromancy stacks]
!!HEx1:C0/0/?y2/?y3; [check stack 0]
!!IF:Wx1;
!!VRy2&y2<0:Sw140;
!!VRy2&y2<0:S56;
!!MA:Fy2/?y5; [ y5 为单兵战力]
!!FU&w143<y5:E;
!!VRy4:Sw143 :y5; [ y4=保存的战力/单兵战力]
!!VRy8:Sw143 %y5; [ 计算整除数 ]
!!VRw143:Sy8; [ 修正 w143 ]
!!HEx1:C2/y2/y4/0/10/12;
** set experience limit
!?FU2465; ** x1=limit
!!FU&v2489=0:E; [ check WoG option ]
!!EAx16:Lx1;
** stack henchman ** x16=hero
** w140: type of stack for Player ** w141: type of warlord flag ** w142: type of stack for AI
!?FU2464;
*!FU&v2490=0:E; [ check WoG option ]
!!IF:Wx16;
!!FU2468:Px16; [ set for hero specialties]
!!HEx16:B2/?y5; [ check race of hero: y5]
!!VRy5: :2; [ get town type]
!!UN:Ty5/0/0/?y6; [ get level 1 lower monster]
!!VRw140&w140=0:Sy6;
!!VRw141&w141=0:Sy5;
!!UN:Ty5/4/1/?y6; [ get level 5 higher monster]
!!VRw142&w142=0:Sy6;
** begin-of-battle trigger
!?BA0&v2487=1;
!!BA:H0/?v710 H1/?v711; [ Store attacking hero # in v710, defending hero # in v711]
!!FU2460&v710>=0:Pv710/0;
!!FU2460&v711>=0:Pv711/1;
** end-of-battle trigger
!?BA1;
!!FU2462&v710>=0/v2487=1:Pv710/0;
!!FU2462&v711>=0/v2487=1:Pv711/1;
!!FU2478&v710>=0/v2506=1:Pv710/0;
!!FU2478&v711>=0/v2506=1:Pv711/1;
!!UN|v2487=1/v2506=1:R1; [must refresh after stack restore]
** pop-up dialog-box for stack henchman setting
** x1 = hero id
!?FU2471;
!!IF:Wx1; [enable hero variable]
!!VRy7:Sw140;
!!HE-1:E?y10/?y2; [get exp and level]
!!MA:Fy7/?y12; [check monster fight value]
!!VRy6:Sy10 :y12;
!!VRy6&y6<1:S1;
!!VRz141:S^{当前等级: %Y2}
经验值: %Y10
{援军号:%W140 数量:%Y6}
是否需要更换下列生物援军?^;
!!IF:Q2/21/y7/2/z141;
!!VRx16&-2:S196; [quit if user cancels]
!!FU&-2:E; [quit if user cancels]
!!VRz-1:S^生物编号速查表
00-07-13:人族生物 14-21-27:森林生物
28-35-41:雪地生物 42-49-55:地域生物
56-63-69:亡灵生物 70-77-83:地穴生物
84-91-97:野人生物 98-105-111:训兽生物
112-118-131:元素生物(122,4,6,8 除外)
132-136-144:中立生物 150-159:八级生物
164-168-173,192-196:追随神迹新生物
^;
!!VRz-2:S^当前生物为%W140,请输入新生物编号^;
!!VRz-3:S^^;
!!IF:D58/-1/-2/-3////////////; [setup dialog 58]
!!IF:F58/////1; [enable cancel button]
!!IF:E2493/58; [display dialog, save return value in v2493]
!!FU&v2493=-1:E; [if user click cancel, then exit]
!!VRy1:Vz1; [convert inputed string z1 into number y1]
!!IF|y1<0/y1>196:M^非法的生物编号^;
!!FU|y1<0/y1>196:E;
!!IF&y1>173/y1<192:M^非法的生物编号,如使用宠物请直接在 WoG 选项中启用宠物援军^;
!!FU&y1>173/y1<192:E;
!!IF&y1>159/y1<164:M^不允许使用神使作为援军^;
!!FU&y1>159/y1<164:E;
!!IF&y1>144/y1<150:M^不允许使用战争机器作为援军^;
!!FU&y1>144/y1<150:E;
!!IF|y1=122/y1=124/y1=126/y1=128:M^不允许使用非法生物作为援军^;
!!FU|y1=122/y1=124/y1=126/y1=128:E;
!!MA:Fy1/?y12; [check monster fight value]
!!IF&y12>y10:M^英雄的经验值不足 {%Y12} ,不能调遣这个援军
多一些历练之后再试试吧。^;
!!FU&y12>y10:E;
!!VRy6:Sy10 :y12;
!!VRz141:S^请确认选择下列生物援军
{援军号:%Y1 数量: %Y6}^;
!!IF:Q2/21/y1/2/z141;
!!FU&-2:E; [quit if user cancels]
!!VRw140:Sy1;
!!VRx16:S196; [quit if finished]
** for stack henchman settings
!?FU2470;
!!CM:R0;
!!CM:H?y9/?y8;
!!FU&y9<0:E;
!!DO2471/0/196/1:Py9; [loop for selections]
** for stack henchman warload flag setting
!?FU2467;
!!CM:R0; [disable standard action]
!!CM:H?y9/?y8; [get the active hero]
!!FU&y9<0:E;
!!IF:Wy9; [enable hero variable]
!!VRy1:Sw141; [get the current status]
!!VRy2&y1=0:S1; !!VRy2&y1=1:S2; !!VRy2&y1=2:S4;
!!VRy2&y1=3:S8; !!VRy2&y1=4:S16; !!VRy2&y1=5:S32;
!!VRy2&y1=6:S64; !!VRy2&y1=7:S128; !!VRy2&y1=8:S256;
!!VRz-1:S^选择生物援军战神旗的类型^;
!!VRz-2:S^加生命^; [1]
!!VRz-3:S^加攻击^; [2]
!!VRz-4:S^加防御^; [4]
!!VRz-5:S^加伤害^; [8]
!!VRz-6:S^加速度^; [16]
!!VRz-7:S^加经验值^; [32]
!!VRz-8:S^降敌人防御^; [64]
!!VRz-9:S^加偏移^; [128]
!!VRz-10:S^加反击次数^; [256]
!!IF:G1/2494/y2/-1/-2/-3/-4/-5/-6/-7/-8/-9/-10;
!!VRw141&v2494=1:S0; !!VRw141&v2494=2:S1; !!VRw141&v2494=4:S2;
!!VRw141&v2494=8:S3; !!VRw141&v2494=16:S4; !!VRw141&v2494=32:S5;
!!VRw141&v2494=64:S6; !!VRw141&v2494=128:S7; !!VRw141&v2494=256:S8;
** pop-up dialog-box for stack exchange
** x1 = hero id, x2 = slot id, x3 = monster id, x4 = monster count
!?FU2475;
!!VRy7:Sx3;
!!MA:Fy7/?y12; [check monster fight value]
!!VRy2:Sy12 *x4; [get combat value in y2]
!!VRz141:S^{生物号:%X3 数量:%X4}
经验值: %Y2
是否需要更换该生物?^;
!!IF:Q2/21/y7/2/z141;
!!VRx16&-2:S196; [quit if user cancels]
!!FU&-2:E; [quit if user cancels]
!!VRz-1:S^生物编号速查表
00-07-13:人族生物 14-21-27:森林生物
28-35-41:雪地生物 42-49-55:地域生物
56-63-69:亡灵生物 70-77-83:地穴生物
84-91-97:野人生物 98-105-111:训兽生物
112-118-131:元素生物(122,4,6,8 除外)
132-136-144:中立生物 150-159:八级生物
164-168-173,192-196:追随神迹新生物
^;
!!VRz-2:S^当前生物为%X3,请输入新生物编号^;
!!VRz-3:S^^;
!!IF:D58/-1/-2/-3////////////; [setup dialog 58]
!!IF:F58/////1; [enable cancel button]
!!IF:E2493/58; [display dialog, save return value in v2493]
!!FU&v2493=-1:E; [if user click cancel, then exit]
!!VRy1:Vz1; [convert inputed string z1 into number y1]
!!IF|y1<0/y1>196:M^非法的生物编号^;
!!FU|y1<0/y1>196:E;
!!IF&y1>173/y1<192:M^不允许使用宠物^;
!!FU&y1>173/y1<192:E;
!!IF&y1>159/y1<164:M^不允许使用神使^;
!!FU&y1>159/y1<164:E;
!!IF&y1>144/y1<150:M^不允许使用战争机器^;
!!FU&y1>144/y1<150:E;
!!IF|y1=122/y1=124/y1=126/y1=128:M^不允许使用非法生物^;
!!FU|y1=122/y1=124/y1=126/y1=128:E;
!!MA:Fy1/?y13 Ly1/?y15 Uy1/?y16; [check monster fight value, level, upgrade]
!!VRy17:S0; [ 初始化 y17 变量 ]
!!MA&y15=0/y16>=0:Fy16/?y17; [ 如果是一级未升级兵种,按照升级兵种计算战力 ]
!!MA&y16=11:Fy16/?y17; [ 如果是骑士,按照升级白骑士计算战力 ]
!!VRy18&y17<=y13:Sy13; [ assign y18 to max(y13, y17) ]
!!VRy18&y17>y13:Sy17;
!!MA:F57/?y14; [ 如果战力小于骷髅战士,按照骷髅战士计算 ]
!!VRy12&y18<=y14:Sy14; [ assign y12 to max(y18, y14) ]
!!VRy12&y18>y14:Sy18;
!!IF&y12>y2:M^现有生物的总战斗力不足 {%Y12} ,不能转换为这个生物
积攒多一些再试试吧^;
!!FU&y12>y2:E;
!!IF:Wx1;
!!VRy3:Sw143; [ y3 为 w143 ]
!!VRy6:Sy2 +y3 :y12;
!!VRz141:S^请确认更换为下列生物
{生物号:%Y1 数量: %Y6}^;
!!IF:Q2/21/y1/2/z141;
!!FU&-2:E; [quit if user cancels]
!!HEx1:C0/x2/y1/y6; [set new monster]
!!VRy6:Sy2 +y3 %y12; [ 取余数 ]
!!VRw143:Sy6; [ 保存余数到 w143 ]
!!VRx16:S196; [quit if finished]
** x1=slot, x2=hero id
!?FU2474;
!!HEx2:C0/x1/?y1/?y2; [y1 = monster id, y2 = monster count]
!!MA:Fy1/?y3; [monster fight value in y3]
!!HEx2:S21/?y7; [检查学习术的等级]
!!VRy4&y7=0:Sy3 *y2 :2; [monster total fight value in y4 divide 2]
!!VRy4&y7=1:Sy3 *y2 *21 :40; [初级学习术 +5%]
!!VRy4&y7=2:Sy3 *y2 *11 :20; [中级学习术 +10%]
!!VRy4&y7=3:Sy3 *y2 *23 :40; [高级学习术 +15%]
!!IF&y4<0:M^生物战斗力溢出,请分队再试^;
!!FU&y4<0:E;
!!IF:Q7/21/y1/17/y4/10^您是需要{按照战斗力转换为其它生物}
还是{转换战斗力为一半经验值}?^;
!!HEx2:E?y5;
!!VRy6:Sy5+y4;
!!HEx2&v7=2:Ey6; [add the exp]
!!HEx2&v7=2:C0/x1/-1/0; [clear the stack]
!!UN&v7=2:R3/x2; [redraw hero screen here]
!!FU&v7<>1:E; [exit if choose exp or cancel]
!!DO2475/0/196/1:Px2/x1/y1/y2;
!!UN:R3/x2; [redraw hero screen here]
** x1=slot
!?FU2476;
!!CM:R0; [disable standard operation only when necessary]
!!CM:H?y9/?y8; [y9 is hero number]
!!FU&y9<0:E; [exit if no hero]
!!VRy1:Sx1 -68; [y1 is slot number]
!!HEy9:C0/y1/?y2/?y3; [y2 = monster id]
!!FU&y2<0:E; [exit if no stack at the slot]
!!FU2474:Py1/y9; [ctrl-left click, push]
** mouse trigger in hero screen for stack henchman settings
!?CM2&v2490=1|v2506=1;
!!CM:I?y3 F?y4 S?y5; [get mouse click, flag, subtype]
!!FU2470&v2490=1/y3=108/y4=0/y5=12:P; [left click, push]
!!FU2470&v2490=1/y3=112/y4=0/y5=12:P; [left click, push]
!!FU2467&v2490=1/y3=108/y4=4/y5=12:P; [ctrl-left click, push]
!!FU2467&v2490=1/y3=112/y4=4/y5=12:P; [ctrl-left click, push]
!!FU2476&v2506=1/y3>67/y3<75/y4=4/y5=12:Py3; [call for troops]
-----------------------------------------------------------------------------
** change health exp property
!?FU2479&v2489=1/v5700=0; ** x16==creatureid
!!MA:Fx16/?y1; [y1 is fight value]
!!VRy4&y1<80:S1; !!VRy4&y1>=80/y1<270:S2; !!VRy4&y1>=270/y1<640:S3;
!!VRy4&y1>=640/y1<1250:S4; !!VRy4&y1>=1250/y1<2160:S5; !!VRy4&y1>=2160/y1<3430:S6;
!!VRy4&y1>=3430/y1<5120:S7; !!VRy4&y1>=5120/y1<7290:S8; !!VRy4&y1>=7290/y1<10000:S9;
!!VRy4&y1>=10000/y1<13310:S10; !!VRy4&y1>=13310/y1<17280:S11; !!VRy4&y1>=17280:S12;
!!VRy3:S72; [ y3==72 is health ]
!!EAx16:Fy3/?y2;
!!VRy11:Sy4; [divide the bonus into 10 portions]
!!VRy12:Sy11 +y4; !!VRy13:Sy12 +y4; !!VRy14:Sy13 +y4;
!!VRy15:Sy14 +y4; !!VRy16:Sy15 +y4; !!VRy17:Sy16 +y4;
!!VRy18:Sy17 +y4; !!VRy19:Sy18 +y4; !!VRy20:Sy19 +y4;
!!EAx16:By2/1/y3/43/0/y11/y12/y13/y14/y15/y16/y17/y18/y19/y20;
** the post-instruction trigger
!?PI;
!!DO2464/0/155/1:P; ** call FU2464 for all heros.
!!DO2465/0/196/1:P10; ** change all experience limit
!!DO2479/0/196/1:P; ** change hp % into +
----------------------------------------------------------
这是poet在10年写的代码,我想了解里面关于战后兵力复原的部分,但苦于全英文不懂。请问哪位大大能帮忙把相关部分提取出来加点解释。谢谢
|
|