游戏王残局简化版

Annotation For script/c0.lua
Login

Annotation For script/c0.lua

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

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