|
依托官方erm的resistance技能效果反转而来。效果为:
依巫术技能等级,随机提升1-3队低级兵至高级版。比如神怪变灯神等
简单测试有效,大家帮忙debug啊,谢谢
ZVSE
_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_ScriptName=script83
ERMS_ScriptAuthor=Administrator
ERMS_ScriptVersion=1.0.0
ERMS_ScriptDate=4.11(November).2012
ERMS_ScriptERMVersion=2.70
ERMS_ScriptLanguage=中文(中国) or 中文(简体) (native)
*************************************************************************
Sorcery
*************************************************************************
!?BA0; [Pre-battle trigger for Sorcery]
!FU661:P; [set flag 270 to true if a human vs. human network battle (unsupported)]
!!BA:H0/?v900; [get # of attacking hero]
!!HEv900:B0/?z470; [get name of that hero]
!!HEv900:R2/?v911; [get sex of that hero]
!!VRz471&v911=0:Sz103028; [Strings for hero sex]
!!VRz471&v911=1:Sz103029;
!!HEv900:O?v911; [get hero owner]
!!OW:Iv911/?v912; [get AI (1) or human (0)]
!!IF:V5/0;
!!IF&v912=0:V5/1; [set flag 5 if attacker is human...]
!!BA:H1/?v911; [get # of defending hero]
!!HEv911&v911>=0:B0/?z-1; [get name of that hero]
!!VRz-1&v911>=0:+z103056;
!!VRz-1&v911<0:Sz103057;
!!HEv911&v911>=0:O?v912; [get owner of defender if any]
!!OW&v911>=0:Iv912/?v913; [get AI/human of defender]
!!IF&v911>=0/v913=0:V5/1; [set flag 5 if defender is human]
!!HEv900:S25/?v901; [get Sorcery skill level]
!!VRv911:S7;
!!FU658&v901>=1:P0/1/7; [call function once per skill level]
!!VRv589:Sv911; [remember slot changed if any]
!!VRv911:S7;
!!FU658&v901>=2:P0/1/7;
!!VRv588:Sv911; [remember slot changed if any]
!!VRv911:S7;
!!FU658&v901=3:P0/1/7;
!!VRv587:Sv911; [remember slot changed if any]
!!BA&v589<7:M0/v589/?v902/?v914; [get v902 type and v914 qty in slot]
!!BA&v588<7:M0/v588/?v903/?v914; [get v903 type and v914 qty in slot]
!!BA&v587<7:M0/v587/?v904/?v914; [get v904 type and v914 qty in slot]
!!VRz472:Sz103030;
!MM&5/v589<7/v588=7:Sz472;
!MM&5/v588<7/v587=7:Sz472;
!MM&5/v587<7:Sz472;
** Alexis Koz
!!VRv911:S0;
!!BA:H1/?v900; [get # of attacking hero]
!!HEv900&v900>=0:B0/?z470; [get name of that hero]
!!HEv900&v900>=0:R2/?v911; [get sex of that hero]
!!VRz471&v911=0:Sz103031; [Strings for hero sex]
!!VRz471&v911=1:Sz103032;
!!HEv900&v900>=0:O?v911; [get hero owner]
!!OW&v900>=0:Iv911/?v912; [get AI (1) or human (0)]
!!IF:V5/0;
!!IF&v900>=0/v912=0:V5/1; [set flag 5 if attacker is human...]
!!BA:H0/?v911; [get # of defending hero]
!!HEv911&v911>=0:B0/?z-2; [get name of that hero]
!!VRz-2&v911>=0:+z103056;
!!VRz-2&v911<0:Sz103057;
!!HEv911:O?v912; [get owner of defender if any]
!!OW:Iv912/?v913; [get AI/human of defender]
!!IF&v913=0:V5/1; [set flag 5 if defender is human]
!!HEv900&v900>=0:S25/?v901; [get Sorcery skill level]
!!VRv911:S28;
!!FU658&v900>=0/v901>=1:P1/0/28; [call function once per skill level]
!!VRv489:Sv911; [remember slot changed if any]
!!VRv911:S28;
!!FU658&v900>=0/v901>=2:P1/0/28;
!!VRv488:Sv911; [remember slot changed if any]
!!VRv911:S28;
!!FU658&v900>=0/v901=3:P1/0/28;
!!VRv487:Sv911; [remember slot changed if any]
!!BA&v489<28:M1/v489/?v902/?v914; [get v902 type and v914 qty in slot]
!!BA&v488<28:M1/v488/?v903/?v914; [get v903 type and v914 qty in slot]
!!BA&v487<28:M1/v487/?v904/?v914; [get v904 type and v914 qty in slot]
!!VRz472:Sz103033;
!MM&5/v489<28/v488=28:Sz472;
!MM&5/v488<28/v487=28:Sz472;
!MM&5/v487<28:Sz472;
** Alexis Koz end
** End of pre-battle trigger for sorcery
!?BA1; [Post-battle trigger for sorcery]
!!VRv901:Sv587;
!!FU660&v587<7:P0/1; [re-degrade creatures if need be]
!!VRv587:S7;
!!VRv901:Sv588;
!!FU660&v588<7:P0/1;
!!VRv588:S7;
!!VRv901:Sv589;
!!FU660&v589<7:P0/1;
!!VRv589:S7;
** Alexis Koz
!!VRv901:Sv487;
!!FU660&v487<28:P1/0; [re-upgrade creatures if need be]
!!VRv487:S28;
!!VRv901:Sv488;
!!FU660&v488<28:P1/0;
!!VRv488:S28;
!!VRv901:Sv489;
!!FU660&v489<28:P1/0;
!!VRv489:S28;
** Alexis Koz
** End of post-battle trigger for sorcery
!?FU658; [Function to upgrade one defending troop stack in battle]
!!VRv902:Sx2 *20 R6; [random slot # to start search from]
!!DO659/0/6/1:Px1/x2/x3; [check 7 slots for stack to downgrade]
** End of function to upgrade one defending troop stack in battle
!?FU659; [Function to check one stack for upgrading]
!!VRv912:Sv902 %7; [get an actual slot number]
!!VRv912&x2=1: +21;
!!BA:Mx1/v912/?v913/?v914; [get v913 type and v914 qty in slot]
!!VRv915:S1; [assume creature is ungraded]
!!VRv915&v913<0:S0; [treat no creature as a upgraded one]
!!VRv916:Sv913 %2;
!!VRv915&v916=1:S0; [odd creatures are always upgraded]
!!VRv915&v913>=112/v913<=117:S0; [elementals and golems]
!!VRv915&v913>=132:S0; [other neutral creatures]
!!VRv913:+1; [get type of upgraded version]
!!VRv913&v913=122:S115; [special cases for elementals]
!!VRv913&v913=124:S113;
!!VRv913&v913=126:S112;
!!VRv913&v913=128:S114;
!!BA&v911=x3/v915=1:Mx1/v912/v913/v914; [set new upgraded type if we haven't yet]
!!VRv911&v911=x3/v915=1:Sv912; [note we changed a slot]
!!VRv902:+1; [next slot]
** End of function to check one stack for downgrading
!?FU660; [Function to redegrade creatures in defender's slot v901]
!!BA:Mx1/v901/?v913/?v914; [get v913 type and v914 qty in slot]
!!VRv913:-1; [usually this gets us Unupgraded version]
!!VRv913&v913=113:S127; [handle elementals]
!!VRv913&v913=114:S125;
!!VRv913&v913=115:S129;
!!VRv913&v913=116:S123;
!!BA&v913>0/v914>0:Mx1/v901/v913/v914; [set the old, unupgraded type, if creatures survived]
** End of function to reupgrade creatures in defender's slot v901
------------------------------------------------------------------------- |
评分
-
2
查看全部评分
-
|