游戏王残局简化版

Annotation For script/c0.lua
Login

Annotation For script/c0.lua

Origin for each line in script/c0.lua from check-in c291f89d7e:

eeeff3c24b 2023-07-15    1: 
e59d27b43b 2023-07-17    2: local str = {}
e59d27b43b 2023-07-17    3: 
6f9888787e 2023-08-02    4: local math = math
6f9888787e 2023-08-02    5: local string = string
6f9888787e 2023-08-02    6: local table = table
6f9888787e 2023-08-02    7: 
6f9888787e 2023-08-02    8: _G.fun = {}
6f9888787e 2023-08-02    9: 
6f9888787e 2023-08-02   10: ---------------------------------
6f9888787e 2023-08-02   11: 
3e5c876e42 2023-07-28   12: local cache_1
3e5c876e42 2023-07-28   13: local cache_2
3e5c876e42 2023-07-28   14: local cache_3
3e5c876e42 2023-07-28   15: local cache_4
3e5c876e42 2023-07-28   16: local cache_5
3e5c876e42 2023-07-28   17: local cache_6
3e5c876e42 2023-07-28   18: local cache_7
3e5c876e42 2023-07-28   19: local cache_8
3e5c876e42 2023-07-28   20: local cache_9
3e5c876e42 2023-07-28   21: 
0f75e3f03e 2023-08-02   22: local _
9f9e2c9f7f 2023-07-28   23: 
9f9e2c9f7f 2023-07-28   24: str["效果卡的种类表"] = {
9f9e2c9f7f 2023-07-28   25:   
9f9e2c9f7f 2023-07-28   26:   TYPE_SPELL
9f9e2c9f7f 2023-07-28   27:   , TYPE_TRAP
9f9e2c9f7f 2023-07-28   28:   , TYPE_EFFECT
9f9e2c9f7f 2023-07-28   29:   }
9f9e2c9f7f 2023-07-28   30:   
9f9e2c9f7f 2023-07-28   31: str["无效果灵摆怪兽表"] = {
9f9e2c9f7f 2023-07-28   32:   
9f9e2c9f7f 2023-07-28   33:   28363749
9f9e2c9f7f 2023-07-28   34:   , 19474136
9f9e2c9f7f 2023-07-28   35:   , 17390179
9f9e2c9f7f 2023-07-28   36:   , 83980492
9f9e2c9f7f 2023-07-28   37:   }
9f9e2c9f7f 2023-07-28   38:   
3e5c876e42 2023-07-28   39: cache_1 = 0
3e5c876e42 2023-07-28   40: 
3e5c876e42 2023-07-28   41: cache_1 = cache_1 + LOCATION_HAND
3e5c876e42 2023-07-28   42: + LOCATION_MZONE
3e5c876e42 2023-07-28   43: + LOCATION_SZONE
3e5c876e42 2023-07-28   44: + LOCATION_GRAVE
3e5c876e42 2023-07-28   45: + LOCATION_REMOVED
3e5c876e42 2023-07-28   46: 
3e5c876e42 2023-07-28   47: str["除卡组与额外卡组以外的区域"] = cache_1
3e5c876e42 2023-07-28   48: 
3e5c876e42 2023-07-28   49: cache_1 = cache_1 + LOCATION_DECK
3e5c876e42 2023-07-28   50: + LOCATION_EXTRA
3e5c876e42 2023-07-28   51: 
3e5c876e42 2023-07-28   52: str["所有区域"] = cache_1
3e5c876e42 2023-07-28   53: 
dd1a253607 2023-08-02   54: --第一层-------------------------------
dd1a253607 2023-08-02   55: 
dd1a253607 2023-08-02   56: local cache_1
dd1a253607 2023-08-02   57: local cache_2
dd1a253607 2023-08-02   58: local cache_3
dd1a253607 2023-08-02   59: local cache_4
dd1a253607 2023-08-02   60: local cache_5
dd1a253607 2023-08-02   61: local cache_6
dd1a253607 2023-08-02   62: local cache_7
dd1a253607 2023-08-02   63: local cache_8
dd1a253607 2023-08-02   64: local cache_9
dd1a253607 2023-08-02   65: 
dd1a253607 2023-08-02   66: local _
dd1a253607 2023-08-02   67: 
c291f89d7e 2023-08-02   68: fun["一_失败得分"] = function() --{
c291f89d7e 2023-08-02   69:   
c291f89d7e 2023-08-02   70:   str["失败得分表"] = {
c291f89d7e 2023-08-02   71:     
c291f89d7e 2023-08-02   72:     [0] = "神龙之圣刻印"
c291f89d7e 2023-08-02   73:     , [100] = "调和支援士"
c291f89d7e 2023-08-02   74:     , [200] = "深渊的暗杀者"
c291f89d7e 2023-08-02   75:     , [300] = "救援猫"
c291f89d7e 2023-08-02   76:     , [400] = "注射天使 莉莉"
c291f89d7e 2023-08-02   77:     , [500] = "不知火的隐者"
c291f89d7e 2023-08-02   78:     , [600] = "影依猎鹰"
c291f89d7e 2023-08-02   79:     , [700] = "铁兽战线 姬特"
c291f89d7e 2023-08-02   80:     , [800] = "召唤僧"
c291f89d7e 2023-08-02   81:     , [900] = "恩底弥翁的仆从"
c291f89d7e 2023-08-02   82:     , [1000] = "机壳工具 丑恶"
c291f89d7e 2023-08-02   83:     , [1100] = "欧尼斯特"
c291f89d7e 2023-08-02   84:     , [1200] = "次元吸引者"
c291f89d7e 2023-08-02   85:     , [1300] = "黑羽-疾风之盖尔"
c291f89d7e 2023-08-02   86:     , [1400] = "加农炮兵"
c291f89d7e 2023-08-02   87:     , [1500] = "教导的大神祗官"
c291f89d7e 2023-08-02   88:     , [1600] = "地中族导师"
c291f89d7e 2023-08-02   89:     , [1700] = "相剑师-莫邪"
c291f89d7e 2023-08-02   90:     , [1800] = "宝玉兽-青玉飞马"
c291f89d7e 2023-08-02   91:     , [1900] = "命运英雄 血魔-D"
c291f89d7e 2023-08-02   92:     , [2000] = "流离的狮鹫骑手"
c291f89d7e 2023-08-02   93:     , [2100] = "电子龙"
c291f89d7e 2023-08-02   94:     , [2200] = "古遗物-死镰"
c291f89d7e 2023-08-02   95:     , [2300] = "能朋克 调狐"
c291f89d7e 2023-08-02   96:     , [2400] = "俱舍怒威族·芬里尔狼"
c291f89d7e 2023-08-02   97:     , [2500] = "黑魔术师"
c291f89d7e 2023-08-02   98:     , [2600] = "雅典娜"
c291f89d7e 2023-08-02   99:     , [2700] = "暗黑界的龙神 格拉法"
c291f89d7e 2023-08-02  100:     , [2800] = "魔导兽 刻耳柏洛斯尊主"
c291f89d7e 2023-08-02  101:     , [2900] = "元素英雄 永生侠"
c291f89d7e 2023-08-02  102:     , [3000] = "青眼白龙"
c291f89d7e 2023-08-02  103:     }
c291f89d7e 2023-08-02  104:     
c291f89d7e 2023-08-02  105:   str["对方玩家的初始生命值"] = Duel.GetLP(1)
c291f89d7e 2023-08-02  106:   
c291f89d7e 2023-08-02  107:   str["效果"] = Effect.GlobalEffect()
c291f89d7e 2023-08-02  108:   
c291f89d7e 2023-08-02  109:   str["效果"]:SetType(EFFECT_TYPE_FIELD
c291f89d7e 2023-08-02  110:   + EFFECT_TYPE_CONTINUOUS)
c291f89d7e 2023-08-02  111:   
c291f89d7e 2023-08-02  112:   str["效果"]:SetCode(EVENT_PHASE_START+PHASE_END)
c291f89d7e 2023-08-02  113:   
c291f89d7e 2023-08-02  114:   function cache_1(effect_event
c291f89d7e 2023-08-02  115:   , player_who_activate_the_effect) --{
c291f89d7e 2023-08-02  116:     
c291f89d7e 2023-08-02  117:     cache_1 = Duel.GetLP(1) - str["对方玩家的初始生命值"]
c291f89d7e 2023-08-02  118:     
c291f89d7e 2023-08-02  119:     if cache_1 > 0 then --{
c291f89d7e 2023-08-02  120:       
c291f89d7e 2023-08-02  121:       return
c291f89d7e 2023-08-02  122:       
c291f89d7e 2023-08-02  123:       --}
c291f89d7e 2023-08-02  124:       
c291f89d7e 2023-08-02  125:     else --{
c291f89d7e 2023-08-02  126:       
c291f89d7e 2023-08-02  127:       cache_1 = math.abs(cache_1) / (str["对方玩家的初始生命值"] - 100)
c291f89d7e 2023-08-02  128:       
c291f89d7e 2023-08-02  129:       cache_1 = math.tointeger(cache_1 * 3000 // 100 * 100)
c291f89d7e 2023-08-02  130:       
c291f89d7e 2023-08-02  131:       end --}
c291f89d7e 2023-08-02  132:       
c291f89d7e 2023-08-02  133:     if cache_1 > 3000 then --{
c291f89d7e 2023-08-02  134:       
c291f89d7e 2023-08-02  135:       --}
c291f89d7e 2023-08-02  136:       
c291f89d7e 2023-08-02  137:     else --{
c291f89d7e 2023-08-02  138:       
c291f89d7e 2023-08-02  139:       Debug.ShowHint("这局,您的得分是 "
c291f89d7e 2023-08-02  140:       .. cache_1
c291f89d7e 2023-08-02  141:       .. " 分!\n处于「"
c291f89d7e 2023-08-02  142:       .. str["失败得分表"][cache_1]
c291f89d7e 2023-08-02  143:       .. "」级别!")
c291f89d7e 2023-08-02  144:       
c291f89d7e 2023-08-02  145:       end --}
c291f89d7e 2023-08-02  146:       
c291f89d7e 2023-08-02  147:     effect_event:Reset()
c291f89d7e 2023-08-02  148:     
c291f89d7e 2023-08-02  149:     end --}
c291f89d7e 2023-08-02  150:     
c291f89d7e 2023-08-02  151:   str["效果"]:SetOperation(cache_1)
c291f89d7e 2023-08-02  152:   
c291f89d7e 2023-08-02  153:   Duel.RegisterEffect(str["效果"]
c291f89d7e 2023-08-02  154:   , 0)
c291f89d7e 2023-08-02  155:   
c291f89d7e 2023-08-02  156:   end --}
c291f89d7e 2023-08-02  157: 
89efe6af3d 2023-08-02  158: fun["该效果不能被连锁"] = function() --{
89efe6af3d 2023-08-02  159:   
89efe6af3d 2023-08-02  160:   Duel.SetChainLimit(aux.FALSE)
89efe6af3d 2023-08-02  161:   
89efe6af3d 2023-08-02  162:   return true
89efe6af3d 2023-08-02  163:   end --}
89efe6af3d 2023-08-02  164: 
ad4e2a7693 2023-08-02  165: fun["一_通关邀请"] = function() --{
ad4e2a7693 2023-08-02  166:   
ad4e2a7693 2023-08-02  167:   str["效果"] = Effect.GlobalEffect()
ad4e2a7693 2023-08-02  168:   
ad4e2a7693 2023-08-02  169:   str["效果"]:SetType(EFFECT_TYPE_FIELD
ad4e2a7693 2023-08-02  170:   + EFFECT_TYPE_CONTINUOUS)
ad4e2a7693 2023-08-02  171:   
ad4e2a7693 2023-08-02  172:   str["效果"]:SetCode(EVENT_DAMAGE)
ad4e2a7693 2023-08-02  173:   
ad4e2a7693 2023-08-02  174:   function cache_1() --{
ad4e2a7693 2023-08-02  175:     
ad4e2a7693 2023-08-02  176:     cache_1 = Duel.GetLP(1)
ad4e2a7693 2023-08-02  177:     
ad4e2a7693 2023-08-02  178:     if cache_1 <= 0 then --{
ad4e2a7693 2023-08-02  179:       
ad4e2a7693 2023-08-02  180:       if cache_1 == 0 then --{
ad4e2a7693 2023-08-02  181:         
ad4e2a7693 2023-08-02  182:         --}
ad4e2a7693 2023-08-02  183:         
ad4e2a7693 2023-08-02  184:       else  --{
ad4e2a7693 2023-08-02  185:         
ad4e2a7693 2023-08-02  186:         Debug.ShowHint("QB:「你居然二解了,请加群告诉我怎么二解。」")
ad4e2a7693 2023-08-02  187:         
ad4e2a7693 2023-08-02  188:         end --}
ad4e2a7693 2023-08-02  189:         
ad4e2a7693 2023-08-02  190:       Debug.ShowHint("残局群181175613")
ad4e2a7693 2023-08-02  191:       
ad4e2a7693 2023-08-02  192:       --}
ad4e2a7693 2023-08-02  193:       
ad4e2a7693 2023-08-02  194:     else --{
ad4e2a7693 2023-08-02  195:       
ad4e2a7693 2023-08-02  196:       return false
ad4e2a7693 2023-08-02  197:       
ad4e2a7693 2023-08-02  198:       end --}
ad4e2a7693 2023-08-02  199:       
ad4e2a7693 2023-08-02  200:     end --}
ad4e2a7693 2023-08-02  201:     
ad4e2a7693 2023-08-02  202:   str["效果"]:SetCondition(cache_1)
ad4e2a7693 2023-08-02  203:   
ad4e2a7693 2023-08-02  204:   str["效果"]:SetOperation(aux.NULL)
ad4e2a7693 2023-08-02  205:   
ad4e2a7693 2023-08-02  206:   Duel.RegisterEffect(str["效果"]
ad4e2a7693 2023-08-02  207:   , 0)
ad4e2a7693 2023-08-02  208:   
ad4e2a7693 2023-08-02  209:   end --}
fffb53847d 2023-08-02  210:   
fffb53847d 2023-08-02  211: fun["一_是否效果卡"] = function(card) --{
fffb53847d 2023-08-02  212:   
fffb53847d 2023-08-02  213:   for i = 1, #str["效果卡的种类表"] do --{
fffb53847d 2023-08-02  214:     
fffb53847d 2023-08-02  215:     if Card.IsType(card, str["效果卡的种类表"][i]) then --{
fffb53847d 2023-08-02  216:       
fffb53847d 2023-08-02  217:       return true
fffb53847d 2023-08-02  218:       end --}
fffb53847d 2023-08-02  219:       
fffb53847d 2023-08-02  220:     end --}
fffb53847d 2023-08-02  221:     
fffb53847d 2023-08-02  222:   if Card.IsType(card, TYPE_PENDULUM) then --{
fffb53847d 2023-08-02  223:     
fffb53847d 2023-08-02  224:     for i = 1, #str["无效果灵摆怪兽表"] do --{
fffb53847d 2023-08-02  225:       
fffb53847d 2023-08-02  226:       if Card.IsCode(card, str["无效果灵摆怪兽表"][i]) then --{
fffb53847d 2023-08-02  227:         
fffb53847d 2023-08-02  228:         --}
fffb53847d 2023-08-02  229:         
fffb53847d 2023-08-02  230:       else  --{
fffb53847d 2023-08-02  231:         
fffb53847d 2023-08-02  232:         return true
fffb53847d 2023-08-02  233:         
fffb53847d 2023-08-02  234:         end --}
fffb53847d 2023-08-02  235:         
fffb53847d 2023-08-02  236:       end --}
fffb53847d 2023-08-02  237:       
fffb53847d 2023-08-02  238:     end --}
fffb53847d 2023-08-02  239:     
fffb53847d 2023-08-02  240:   return false
ba4bd27237 2023-08-02  241:   
ba4bd27237 2023-08-02  242:   end --}
ba4bd27237 2023-08-02  243:   
ba4bd27237 2023-08-02  244: fun["一_开局添加手卡"] = function(str_1) --{
ba4bd27237 2023-08-02  245:   
ba4bd27237 2023-08-02  246:   str["开局添加手卡的数量"] = str_1
ba4bd27237 2023-08-02  247:   
ba4bd27237 2023-08-02  248:   str["效果"] = Effect.GlobalEffect()
ba4bd27237 2023-08-02  249:   
ba4bd27237 2023-08-02  250:   str["效果"]:SetType(EFFECT_TYPE_FIELD
ba4bd27237 2023-08-02  251:   + EFFECT_TYPE_CONTINUOUS)
ba4bd27237 2023-08-02  252:   
ba4bd27237 2023-08-02  253:   str["效果"]:SetCode(EVENT_ADJUST)
ba4bd27237 2023-08-02  254:   
ba4bd27237 2023-08-02  255:   str["效果"]:SetCondition(aux.TRUE)
ba4bd27237 2023-08-02  256:   
ba4bd27237 2023-08-02  257:   function cache_1(effect_event
ba4bd27237 2023-08-02  258:   , player_who_activate_the_effect) --{
ba4bd27237 2023-08-02  259:     
ba4bd27237 2023-08-02  260:     str["玩家选定的卡"] = Duel.SelectMatchingCard(player_who_activate_the_effect
ba4bd27237 2023-08-02  261:     , Card.IsAbleToHand
ba4bd27237 2023-08-02  262:     , player_who_activate_the_effect
ba4bd27237 2023-08-02  263:     , LOCATION_DECK
ba4bd27237 2023-08-02  264:     , 0
ba4bd27237 2023-08-02  265:     , str_1
ba4bd27237 2023-08-02  266:     , str_1
ba4bd27237 2023-08-02  267:     , nil)
ba4bd27237 2023-08-02  268:     
ba4bd27237 2023-08-02  269:     Duel.SendtoHand(str["玩家选定的卡"]
ba4bd27237 2023-08-02  270:     , nil
ba4bd27237 2023-08-02  271:     , REASON_RULE)
ba4bd27237 2023-08-02  272:     
ba4bd27237 2023-08-02  273:     effect_event:Reset()
ba4bd27237 2023-08-02  274:     
ba4bd27237 2023-08-02  275:     end --}
ba4bd27237 2023-08-02  276:     
ba4bd27237 2023-08-02  277:   str["效果"]:SetOperation(cache_1)
ba4bd27237 2023-08-02  278:   
ba4bd27237 2023-08-02  279:   Duel.RegisterEffect(str["效果"]
ba4bd27237 2023-08-02  280:   , 0)
e78ba68423 2023-08-02  281:   
e78ba68423 2023-08-02  282:   end --}
e78ba68423 2023-08-02  283:   
e78ba68423 2023-08-02  284: fun["一_禁格"] = function(str_1) --{
e78ba68423 2023-08-02  285:   
e78ba68423 2023-08-02  286:   str["禁格的数量"] = str_1
e78ba68423 2023-08-02  287:   
e78ba68423 2023-08-02  288:   str["效果"] = Effect.GlobalEffect()
e78ba68423 2023-08-02  289:   
e78ba68423 2023-08-02  290:   str["效果"]:SetCode(EFFECT_USE_EXTRA_MZONE)
e78ba68423 2023-08-02  291:   
e78ba68423 2023-08-02  292:   str["效果"]:SetValue(str_1)
e78ba68423 2023-08-02  293:   
e78ba68423 2023-08-02  294:   Duel.RegisterEffect(str["效果"],0)
97b92271b2 2023-08-02  295:   
97b92271b2 2023-08-02  296:   end --}
ad4e2a7693 2023-08-02  297: 
c458c143fc 2023-08-02  298: --第二层-------------------------------
fbca5305b2 2023-08-02  299: 
fbca5305b2 2023-08-02  300: local cache_1
fbca5305b2 2023-08-02  301: local cache_2
fbca5305b2 2023-08-02  302: local cache_3
fbca5305b2 2023-08-02  303: local cache_4
fbca5305b2 2023-08-02  304: local cache_5
fbca5305b2 2023-08-02  305: local cache_6
fbca5305b2 2023-08-02  306: local cache_7
fbca5305b2 2023-08-02  307: local cache_8
fbca5305b2 2023-08-02  308: local cache_9
fbca5305b2 2023-08-02  309: 
fbca5305b2 2023-08-02  310: local _
fbca5305b2 2023-08-02  311: 
97b92271b2 2023-08-02  312: fun["二_开局说明"] = function() --{
fbca5305b2 2023-08-02  313:   
fbca5305b2 2023-08-02  314:   str["这个残局的效果卡数量"] = Duel.GetMatchingGroupCount(fun["是否效果卡"]
fbca5305b2 2023-08-02  315:   , 0
fbca5305b2 2023-08-02  316:   , str["所有区域"]
fbca5305b2 2023-08-02  317:   , str["所有区域"]
fbca5305b2 2023-08-02  318:   , nil)
fbca5305b2 2023-08-02  319:   
fbca5305b2 2023-08-02  320:   str["超量素材组"] = Duel.GetOverlayGroup(0
fbca5305b2 2023-08-02  321:   , LOCATION_MZONE
fbca5305b2 2023-08-02  322:   , LOCATION_MZONE)
fbca5305b2 2023-08-02  323:   
fbca5305b2 2023-08-02  324:   for k in aux.Next(str["超量素材组"]) do --{
fbca5305b2 2023-08-02  325:     
fbca5305b2 2023-08-02  326:     if fun["一_是否效果卡"](k) then --{
fbca5305b2 2023-08-02  327:       
fbca5305b2 2023-08-02  328:       str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + 1
fbca5305b2 2023-08-02  329:       
fbca5305b2 2023-08-02  330:       end --}
fbca5305b2 2023-08-02  331:       
fbca5305b2 2023-08-02  332:     end --}
fbca5305b2 2023-08-02  333:     
fbca5305b2 2023-08-02  334:   str["开局说明"] = str["这个残局的效果卡数量"]
fbca5305b2 2023-08-02  335:   .. "卡 "
fbca5305b2 2023-08-02  336:   .. str["规则"]
fbca5305b2 2023-08-02  337:   
fbca5305b2 2023-08-02  338:   if str["不洗牌"] == 0 then --{
fbca5305b2 2023-08-02  339:     
fbca5305b2 2023-08-02  340:     --}
fbca5305b2 2023-08-02  341:     
fbca5305b2 2023-08-02  342:   else --{
fbca5305b2 2023-08-02  343:     
fbca5305b2 2023-08-02  344:     str["开局说明"] = str["开局说明"] .. "伪洗牌 "
fbca5305b2 2023-08-02  345:     
fbca5305b2 2023-08-02  346:     end --}
fbca5305b2 2023-08-02  347:     
fbca5305b2 2023-08-02  348:   if str["无BP"] == 0 then --{
fbca5305b2 2023-08-02  349:     
fbca5305b2 2023-08-02  350:     str["开局说明"] = str["开局说明"] .. "无BP "
fbca5305b2 2023-08-02  351:     
fbca5305b2 2023-08-02  352:     end --}
fbca5305b2 2023-08-02  353:     
fbca5305b2 2023-08-02  354:   if str["开局添加手卡"] then --{
fbca5305b2 2023-08-02  355:     
fbca5305b2 2023-08-02  356:     str["开局说明"] = str["开局说明"]
fbca5305b2 2023-08-02  357:     .. "选"
fbca5305b2 2023-08-02  358:     .. str["开局添加手卡的数量"]
fbca5305b2 2023-08-02  359:     .. "卡 "
fbca5305b2 2023-08-02  360:     
fbca5305b2 2023-08-02  361:     end --}
fbca5305b2 2023-08-02  362:     
fbca5305b2 2023-08-02  363:   if str["禁格"] then --{
fbca5305b2 2023-08-02  364:     
fbca5305b2 2023-08-02  365:     str["开局说明"] = str["开局说明"]
fbca5305b2 2023-08-02  366:     .. "禁"
fbca5305b2 2023-08-02  367:     .. str["禁格的数量"]
fbca5305b2 2023-08-02  368:     .. "格 "
fbca5305b2 2023-08-02  369:     
fbca5305b2 2023-08-02  370:     end --}
fbca5305b2 2023-08-02  371:     
fbca5305b2 2023-08-02  372:   if str["随机抽卡的数量"] then --{
fbca5305b2 2023-08-02  373:     
fbca5305b2 2023-08-02  374:     str["开局说明"] = str["开局说明"]
fbca5305b2 2023-08-02  375:     .. "抽"
fbca5305b2 2023-08-02  376:     .. str["随机抽卡的数量"]
fbca5305b2 2023-08-02  377:     .. "卡 "
fbca5305b2 2023-08-02  378:     end --}
fbca5305b2 2023-08-02  379:     
fbca5305b2 2023-08-02  380:   Debug.ShowHint(str["开局说明"])
fbca5305b2 2023-08-02  381:   
fbca5305b2 2023-08-02  382:   end --}
97b92271b2 2023-08-02  383:   
295249c2b0 2023-08-02  384: --第三层-------------------------------
97b92271b2 2023-08-02  385: 
97b92271b2 2023-08-02  386: local cache_1
97b92271b2 2023-08-02  387: local cache_2
97b92271b2 2023-08-02  388: local cache_3
97b92271b2 2023-08-02  389: local cache_4
97b92271b2 2023-08-02  390: local cache_5
97b92271b2 2023-08-02  391: local cache_6
97b92271b2 2023-08-02  392: local cache_7
97b92271b2 2023-08-02  393: local cache_8
97b92271b2 2023-08-02  394: local cache_9
97b92271b2 2023-08-02  395: 
97b92271b2 2023-08-02  396: local _
c458c143fc 2023-08-02  397: 
c458c143fc 2023-08-02  398: --兼容层-------------------------------
c458c143fc 2023-08-02  399: 
9f9e2c9f7f 2023-07-28  400: fun["Debug.ReloadFieldBegin"] = Debug.ReloadFieldBegin
9f9e2c9f7f 2023-07-28  401: 
9f9e2c9f7f 2023-07-28  402: Debug.ReloadFieldBegin = function(str_1, str_2) --{
9f9e2c9f7f 2023-07-28  403:   
9f9e2c9f7f 2023-07-28  404:   str["不洗牌"] = str_1 & DUEL_PSEUDO_SHUFFLE
9f9e2c9f7f 2023-07-28  405:   
9f9e2c9f7f 2023-07-28  406:   str["无BP"] = str_1 & DUEL_ATTACK_FIRST_TURN
9f9e2c9f7f 2023-07-28  407:   
9f9e2c9f7f 2023-07-28  408:   str["规则表"] = {
9f9e2c9f7f 2023-07-28  409:     
1c6488a768 2023-07-28  410:     [3] = "大师3 "
1c6488a768 2023-07-28  411:     , [4] = "新大师 "
1c6488a768 2023-07-28  412:     , [5] = "大师2020 "
9f9e2c9f7f 2023-07-28  413:     }
9f9e2c9f7f 2023-07-28  414:     
9f9e2c9f7f 2023-07-28  415:   if str_2 then --{
9f9e2c9f7f 2023-07-28  416:     
9f9e2c9f7f 2023-07-28  417:     str["规则"] = str["规则表"][str_2]
9f9e2c9f7f 2023-07-28  418:     
9f9e2c9f7f 2023-07-28  419:     --}
9f9e2c9f7f 2023-07-28  420:     
9f9e2c9f7f 2023-07-28  421:   else --{
9f9e2c9f7f 2023-07-28  422:     
9f9e2c9f7f 2023-07-28  423:     str["规则"] = str["规则表"][5]
9f9e2c9f7f 2023-07-28  424:     
9f9e2c9f7f 2023-07-28  425:     end --}
9f9e2c9f7f 2023-07-28  426:     
9f9e2c9f7f 2023-07-28  427:   fun["Debug.ReloadFieldBegin"](str_1, str_2)
9f9e2c9f7f 2023-07-28  428:   
9f9e2c9f7f 2023-07-28  429:   end --}
9f9e2c9f7f 2023-07-28  430:   
9f9e2c9f7f 2023-07-28  431: fun["Debug.ReloadFieldEnd"] = Debug.ReloadFieldEnd
9f9e2c9f7f 2023-07-28  432: 
9f9e2c9f7f 2023-07-28  433: Debug.ReloadFieldEnd = function(str_1) --{
9f9e2c9f7f 2023-07-28  434:   
9f9e2c9f7f 2023-07-28  435:   fun["Debug.ReloadFieldEnd"]()
9f9e2c9f7f 2023-07-28  436:   
9f9e2c9f7f 2023-07-28  437:   if str_1 then --{
9f9e2c9f7f 2023-07-28  438:     
9f9e2c9f7f 2023-07-28  439:     fun["随机抽卡"](str_1)
9f9e2c9f7f 2023-07-28  440:     
9f9e2c9f7f 2023-07-28  441:     end --}
9f9e2c9f7f 2023-07-28  442:     
9f9e2c9f7f 2023-07-28  443:   end --}
9f9e2c9f7f 2023-07-28  444:   
9f9e2c9f7f 2023-07-28  445: fun["aux.BeginPuzzle"] = aux.BeginPuzzle
9f9e2c9f7f 2023-07-28  446: 
9f9e2c9f7f 2023-07-28  447: aux.BeginPuzzle = function(str_1, str_2) --{
9f9e2c9f7f 2023-07-28  448:   
9f9e2c9f7f 2023-07-28  449:   fun["aux.BeginPuzzle"]()
9f9e2c9f7f 2023-07-28  450:   
9f9e2c9f7f 2023-07-28  451:   if str_1 then --{
9f9e2c9f7f 2023-07-28  452:     
9f9e2c9f7f 2023-07-28  453:     fun["开局添加手卡"](str_1)
9f9e2c9f7f 2023-07-28  454:     
9f9e2c9f7f 2023-07-28  455:     end --}
9f9e2c9f7f 2023-07-28  456:     
9f9e2c9f7f 2023-07-28  457:   if str_2 then --{
9f9e2c9f7f 2023-07-28  458:     
9f9e2c9f7f 2023-07-28  459:     fun["禁格"](str_2)
9f9e2c9f7f 2023-07-28  460:     
9f9e2c9f7f 2023-07-28  461:     end --}
9f9e2c9f7f 2023-07-28  462:     
9f9e2c9f7f 2023-07-28  463:   fun["开局说明"]()
9f9e2c9f7f 2023-07-28  464:   
9f9e2c9f7f 2023-07-28  465:   fun["通关邀请"]()
9f9e2c9f7f 2023-07-28  466:   
9f9e2c9f7f 2023-07-28  467:   fun["失败得分"]()
9f9e2c9f7f 2023-07-28  468:   
9f9e2c9f7f 2023-07-28  469:   end --}
9f9e2c9f7f 2023-07-28  470:   
ad4e2a7693 2023-08-02  471: 
ad4e2a7693 2023-08-02  472:   
fffb53847d 2023-08-02  473: 
89efe6af3d 2023-08-02  474: 
1d7748bbd7 2023-07-20  475:   
1d7748bbd7 2023-07-20  476: fun["印卡"] = function(str_1, str_2, str_3) --{
993a6dbc45 2023-07-13  477:   
993a6dbc45 2023-07-13  478:   if str_3 then --{
993a6dbc45 2023-07-13  479:     
993a6dbc45 2023-07-13  480:     --}
993a6dbc45 2023-07-13  481:     
993a6dbc45 2023-07-13  482:   else --{
993a6dbc45 2023-07-13  483:     
d5d0e03305 2023-07-11  484:     str_3 = str_2
45478ef823 2023-07-13  485:     
d5d0e03305 2023-07-11  486:     end --}
993a6dbc45 2023-07-13  487:     
0d5ba0fc61 2023-07-23  488:   Debug.ShowHint("点击对方额外卡组可以进行印卡。\n手卡只能印 "
0d5ba0fc61 2023-07-23  489:   .. str_2
0d5ba0fc61 2023-07-23  490:   .. " 张。\n最多可以印 "
0d5ba0fc61 2023-07-23  491:   .. str_3
0d5ba0fc61 2023-07-23  492:   .. " 张")
6254eda63a 2023-07-23  493:   
6254eda63a 2023-07-23  494:   str["效果"] = Effect.CreateEffect(str_1)
9a1184f29f 2023-07-22  495:   
9a1184f29f 2023-07-22  496:   str["当前印卡数"] = 1
9a1184f29f 2023-07-22  497:   
6254eda63a 2023-07-23  498:   str["效果"]:SetType(EFFECT_TYPE_IGNITION)
9a1184f29f 2023-07-22  499:   
6254eda63a 2023-07-23  500:   str["效果"]:SetProperty(EFFECT_FLAG_BOTH_SIDE
d5d0e03305 2023-07-11  501:   + EFFECT_FLAG_UNCOPYABLE
d5d0e03305 2023-07-11  502:   + EFFECT_FLAG_CANNOT_NEGATE
d5d0e03305 2023-07-11  503:   + EFFECT_FLAG_CANNOT_DISABLE)
d5d0e03305 2023-07-11  504:   
8a01ebbad2 2023-07-23  505:   str["效果"]:SetTarget(fun["该效果不能被连锁"])
6254eda63a 2023-07-23  506:   
6254eda63a 2023-07-23  507:   str["效果"]:SetRange(LOCATION_EXTRA)
d5d0e03305 2023-07-11  508:   
d5d0e03305 2023-07-11  509:   function print_hand(effect_event
d5d0e03305 2023-07-11  510:   , player_who_activate_the_effect) --{
993a6dbc45 2023-07-13  511:     
d5d0e03305 2023-07-11  512:     announce_card = Duel.AnnounceCard(player_who_activate_the_effect)
d5d0e03305 2023-07-11  513:     
d5d0e03305 2023-07-11  514:     card = Duel.CreateToken(player_who_activate_the_effect
d5d0e03305 2023-07-11  515:     , announce_card)
d5d0e03305 2023-07-11  516:     
d5d0e03305 2023-07-11  517:     if str["当前印卡数"] <= str_2 then --{
993a6dbc45 2023-07-13  518:       
d5d0e03305 2023-07-11  519:       str["当前印卡数"] = str["当前印卡数"] + 1
d5d0e03305 2023-07-11  520:       
d5d0e03305 2023-07-11  521:       Duel.SendtoHand(card,nil,REASON_RULE)
45478ef823 2023-07-13  522:       
d5d0e03305 2023-07-11  523:       --}
993a6dbc45 2023-07-13  524:       
d5d0e03305 2023-07-11  525:     else --{
993a6dbc45 2023-07-13  526:       
d5d0e03305 2023-07-11  527:       if str["当前印卡数"] <= str_3 then --{
993a6dbc45 2023-07-13  528:         
d5d0e03305 2023-07-11  529:         str["当前印卡数"] = str["当前印卡数"] + 1
d5d0e03305 2023-07-11  530:         
d5d0e03305 2023-07-11  531:         Duel.Remove(card,POS_FACEUP,REASON_RULE)
d5d0e03305 2023-07-11  532:         
d5d0e03305 2023-07-11  533:         Duel.SendtoDeck(card,player_who_activate_the_effect,0,REASON_RULE)
45478ef823 2023-07-13  534:         
d5d0e03305 2023-07-11  535:         --}
993a6dbc45 2023-07-13  536:         
993a6dbc45 2023-07-13  537:       else --{
993a6dbc45 2023-07-13  538:         
27c36deea8 2023-07-23  539:         Debug.ShowHint("印卡过多!")
993a6dbc45 2023-07-13  540:         
a30b9aba5d 2023-07-16  541:         effect_event:Reset()
a30b9aba5d 2023-07-16  542:         
993a6dbc45 2023-07-13  543:         end --}
993a6dbc45 2023-07-13  544:         
993a6dbc45 2023-07-13  545:       end --}
993a6dbc45 2023-07-13  546:       
993a6dbc45 2023-07-13  547:     end --}
993a6dbc45 2023-07-13  548:     
6254eda63a 2023-07-23  549:   str["效果"]:SetOperation(print_hand)
0852ed07b8 2023-07-22  550:   
6254eda63a 2023-07-23  551:   str_1:RegisterEffect(str["效果"])
0852ed07b8 2023-07-22  552:   
0852ed07b8 2023-07-22  553:   end --}
0852ed07b8 2023-07-22  554:   
0852ed07b8 2023-07-22  555: fun["随机抽卡"] = function(str_1) --{
a469e38404 2023-07-22  556:   
0852ed07b8 2023-07-22  557:   str["随机抽卡的数量"] = str_1
0852ed07b8 2023-07-22  558:   
6254eda63a 2023-07-23  559:   str["效果"] = Effect.GlobalEffect()
63daf9144a 2023-07-22  560:   
6254eda63a 2023-07-23  561:   str["效果"]:SetType(EFFECT_TYPE_FIELD
63daf9144a 2023-07-22  562:   + EFFECT_TYPE_CONTINUOUS)
63daf9144a 2023-07-22  563:   
6254eda63a 2023-07-23  564:   str["效果"]:SetCode(EVENT_ADJUST)
63daf9144a 2023-07-22  565:   
6254eda63a 2023-07-23  566:   str["效果"]:SetCondition(aux.TRUE)
63daf9144a 2023-07-22  567:   
63daf9144a 2023-07-22  568:   function cache_1(effect_event
63daf9144a 2023-07-22  569:   , player_who_activate_the_effect) --{
a469e38404 2023-07-22  570:     
63daf9144a 2023-07-22  571:     Duel.ShuffleDeck(0)
a469e38404 2023-07-22  572:     
63daf9144a 2023-07-22  573:     Duel.Draw(0,str_1,REASON_RULE)
63daf9144a 2023-07-22  574:     
63daf9144a 2023-07-22  575:     effect_event:Reset()
63daf9144a 2023-07-22  576:     
63daf9144a 2023-07-22  577:     end --}
63daf9144a 2023-07-22  578:     
6254eda63a 2023-07-23  579:   str["效果"]:SetOperation(cache_1)
63daf9144a 2023-07-22  580:   
6254eda63a 2023-07-23  581:   Duel.RegisterEffect(str["效果"]
63daf9144a 2023-07-22  582:   , 0)
a469e38404 2023-07-22  583:   
ae6f66c606 2023-07-20  584:   end --}
9c53880fae 2023-07-23  585:   
c291f89d7e 2023-08-02  586: 
15c47f6d38 2023-07-23  587: