游戏王残局简化版

Annotation For script/c0.lua
Login

Annotation For script/c0.lua

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

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