e59d27b43b 2023-07-17 1: local str = {}
6f9888787e 2023-08-02 2: local string = string
6f9888787e 2023-08-02 3: local table = table
7282130e6b 2023-10-12 4: _G.fun = {}
7282130e6b 2023-10-12 5: ---------------------------------
7282130e6b 2023-10-12 6: local cache_1
7282130e6b 2023-10-12 7: local cache_2
7282130e6b 2023-10-12 8: local cache_3
7282130e6b 2023-10-12 9: local cache_4
7282130e6b 2023-10-12 10: local cache_5
7282130e6b 2023-10-12 11: local cache_6
7282130e6b 2023-10-12 12: local cache_7
7282130e6b 2023-10-12 13: local cache_8
7282130e6b 2023-10-12 14: local cache_9
7282130e6b 2023-10-12 15: local _
7282130e6b 2023-10-12 16: str["效果卡的种类表"] = {
674765ddf2 2024-02-13 17: TYPE_SPELL,
674765ddf2 2024-02-13 18: TYPE_TRAP,
674765ddf2 2024-02-13 19: TYPE_EFFECT,
a2e76b01c2 2024-01-26 20: }
7282130e6b 2023-10-12 21: str["无效果灵摆怪兽表"] = {
674765ddf2 2024-02-13 22: 28363749,
674765ddf2 2024-02-13 23: 19474136,
674765ddf2 2024-02-13 24: 17390179,
674765ddf2 2024-02-13 25: 83980492,
a2e76b01c2 2024-01-26 26: }
7282130e6b 2023-10-12 27: cache_1 = 0
a2e76b01c2 2024-01-26 28: cache_1 = cache_1 + LOCATION_HAND + LOCATION_MZONE + LOCATION_SZONE + LOCATION_GRAVE + LOCATION_REMOVED
7282130e6b 2023-10-12 29: str["除卡组与额外卡组以外的区域"] = cache_1
a2e76b01c2 2024-01-26 30: cache_1 = cache_1 + LOCATION_DECK + LOCATION_EXTRA
7282130e6b 2023-10-12 31: str["所有区域"] = cache_1
7282130e6b 2023-10-12 32: --第一层-------------------------------
7282130e6b 2023-10-12 33: local cache_1
7282130e6b 2023-10-12 34: local cache_2
7282130e6b 2023-10-12 35: local cache_3
7282130e6b 2023-10-12 36: local cache_4
7282130e6b 2023-10-12 37: local cache_5
7282130e6b 2023-10-12 38: local cache_6
7282130e6b 2023-10-12 39: local cache_7
7282130e6b 2023-10-12 40: local cache_8
7282130e6b 2023-10-12 41: local cache_9
7282130e6b 2023-10-12 42: local _
7282130e6b 2023-10-12 43: fun["Debug.ReloadFieldBegin"] = Debug.ReloadFieldBegin
f56b114da9 2024-02-13 44: Debug.ReloadFieldBegin = function(u1, u2)
f56b114da9 2024-02-13 45: str["不洗牌"] = u1 & DUEL_PSEUDO_SHUFFLE
f56b114da9 2024-02-13 46: str["无BP"] = u1 & DUEL_ATTACK_FIRST_TURN
f56b114da9 2024-02-13 47: str["无AI"] = u1 & DUEL_SIMPLE_AI
674765ddf2 2024-02-13 48: str["规则表"] = {
674765ddf2 2024-02-13 49: [3] = "大师3 ",
674765ddf2 2024-02-13 50: [4] = "新大师 ",
674765ddf2 2024-02-13 51: [5] = "大师2020 ",
674765ddf2 2024-02-13 52: }
f56b114da9 2024-02-13 53: if u2 then
f56b114da9 2024-02-13 54: str["规则"] = str["规则表"][u2]
46bd1a8cd5 2024-02-13 55: else
46bd1a8cd5 2024-02-13 56: str["规则"] = str["规则表"][5]
46bd1a8cd5 2024-02-13 57: end
f56b114da9 2024-02-13 58: fun["Debug.ReloadFieldBegin"](u1, u2)
46bd1a8cd5 2024-02-13 59: end
f56b114da9 2024-02-13 60: fun["一_随机抽卡"] = function(u1)
af6ca14c70 2024-02-13 61: local h1, h2
f56b114da9 2024-02-13 62: str["随机抽卡的数量"] = u1
af6ca14c70 2024-02-13 63: --~ 效果
af6ca14c70 2024-02-13 64: h1 = Effect.GlobalEffect()
af6ca14c70 2024-02-13 65: h1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
af6ca14c70 2024-02-13 66: h1:SetCode(EVENT_ADJUST)
af6ca14c70 2024-02-13 67: h1:SetCondition(aux.TRUE)
af6ca14c70 2024-02-13 68: --~ 随机抽卡
af6ca14c70 2024-02-13 69: function h2(effect_event)
46bd1a8cd5 2024-02-13 70: Duel.ShuffleDeck(0)
f56b114da9 2024-02-13 71: Duel.Draw(0, u1, REASON_RULE)
46bd1a8cd5 2024-02-13 72: effect_event:Reset()
af6ca14c70 2024-02-13 73: end
af6ca14c70 2024-02-13 74: h1:SetOperation(h2)
af6ca14c70 2024-02-13 75: Duel.RegisterEffect(h1, 0)
46bd1a8cd5 2024-02-13 76: end
46bd1a8cd5 2024-02-13 77: fun["一_该效果不能被连锁"] = function()
674765ddf2 2024-02-13 78: Duel.SetChainLimit(aux.FALSE)
674765ddf2 2024-02-13 79: return true
46bd1a8cd5 2024-02-13 80: end
46bd1a8cd5 2024-02-13 81: fun["一_通关邀请"] = function()
674765ddf2 2024-02-13 82: --备用:圣魔术师
674765ddf2 2024-02-13 83: str["原解邀请"] = "残局群181175613"
674765ddf2 2024-02-13 84: str["二解邀请"] = "爆貘团:「你居然二解了,请加群告诉我怎么二解。」"
674765ddf2 2024-02-13 85: str["效果"] = Effect.GlobalEffect()
674765ddf2 2024-02-13 86: str["效果"]:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
674765ddf2 2024-02-13 87: str["效果"]:SetCode(EVENT_DAMAGE)
46bd1a8cd5 2024-02-13 88: function cache_1()
674765ddf2 2024-02-13 89: cache_1 = Duel.GetLP(1)
46bd1a8cd5 2024-02-13 90: if cache_1 <= 0 then
46bd1a8cd5 2024-02-13 91: if cache_1 == 0 then
46bd1a8cd5 2024-02-13 92: else
674765ddf2 2024-02-13 93: Debug.ShowHint(str["二解邀请"])
46bd1a8cd5 2024-02-13 94: end
674765ddf2 2024-02-13 95: Debug.ShowHint(str["原解邀请"])
46bd1a8cd5 2024-02-13 96: else
674765ddf2 2024-02-13 97: return false
46bd1a8cd5 2024-02-13 98: end
46bd1a8cd5 2024-02-13 99: end
674765ddf2 2024-02-13 100: str["效果"]:SetCondition(cache_1)
674765ddf2 2024-02-13 101: str["效果"]:SetOperation(aux.NULL)
674765ddf2 2024-02-13 102: Duel.RegisterEffect(str["效果"], 0)
46bd1a8cd5 2024-02-13 103: end
46bd1a8cd5 2024-02-13 104: fun["一_是否效果卡"] = function(card)
46bd1a8cd5 2024-02-13 105: for i = 1, #str["效果卡的种类表"] do
46bd1a8cd5 2024-02-13 106: if Card.IsType(card, str["效果卡的种类表"][i]) then
46bd1a8cd5 2024-02-13 107: return true
46bd1a8cd5 2024-02-13 108: end
46bd1a8cd5 2024-02-13 109: end
46bd1a8cd5 2024-02-13 110: if Card.IsType(card, TYPE_PENDULUM) then
46bd1a8cd5 2024-02-13 111: for i = 1, #str["无效果灵摆怪兽表"] do
46bd1a8cd5 2024-02-13 112: if Card.IsCode(card, str["无效果灵摆怪兽表"][i]) then
46bd1a8cd5 2024-02-13 113: else
46bd1a8cd5 2024-02-13 114: return true
46bd1a8cd5 2024-02-13 115: end
46bd1a8cd5 2024-02-13 116: end
46bd1a8cd5 2024-02-13 117: end
46bd1a8cd5 2024-02-13 118: end
f56b114da9 2024-02-13 119: fun["一_开局添加手卡"] = function(u1)
46bd1a8cd5 2024-02-13 120: str["开局添加手卡"] = true
f56b114da9 2024-02-13 121: str["开局添加手卡的数量"] = u1
674765ddf2 2024-02-13 122: str["效果"] = Effect.GlobalEffect()
674765ddf2 2024-02-13 123: str["效果"]:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
674765ddf2 2024-02-13 124: str["效果"]:SetCode(EVENT_ADJUST)
674765ddf2 2024-02-13 125: str["效果"]:SetCondition(aux.TRUE)
46bd1a8cd5 2024-02-13 126: function cache_1(effect_event, player_who_activate_the_effect)
674765ddf2 2024-02-13 127: str["玩家选定的卡"] = Duel.SelectMatchingCard(
674765ddf2 2024-02-13 128: player_who_activate_the_effect,
674765ddf2 2024-02-13 129: Card.IsAbleToHand,
674765ddf2 2024-02-13 130: player_who_activate_the_effect,
674765ddf2 2024-02-13 131: LOCATION_DECK,
674765ddf2 2024-02-13 132: 0,
f56b114da9 2024-02-13 133: u1,
f56b114da9 2024-02-13 134: u1,
674765ddf2 2024-02-13 135: nil
674765ddf2 2024-02-13 136: )
674765ddf2 2024-02-13 137: Duel.SendtoHand(str["玩家选定的卡"], nil, REASON_RULE)
674765ddf2 2024-02-13 138: effect_event:Reset()
46bd1a8cd5 2024-02-13 139: end
674765ddf2 2024-02-13 140: str["效果"]:SetOperation(cache_1)
674765ddf2 2024-02-13 141: Duel.RegisterEffect(str["效果"], 0)
46bd1a8cd5 2024-02-13 142: end
f56b114da9 2024-02-13 143: fun["一_禁格"] = function(u1)
af6ca14c70 2024-02-13 144: local h1
674765ddf2 2024-02-13 145: str["禁格"] = true
f56b114da9 2024-02-13 146: str["禁格的数量"] = u1
af6ca14c70 2024-02-13 147: --~ 效果
af6ca14c70 2024-02-13 148: h1 = Effect.GlobalEffect()
af6ca14c70 2024-02-13 149: h1:SetCode(EFFECT_USE_EXTRA_MZONE)
af6ca14c70 2024-02-13 150: h1:SetValue(u1)
af6ca14c70 2024-02-13 151: Duel.RegisterEffect(h1, 0)
af6ca14c70 2024-02-13 152: end
155b00bc3f 2024-01-23 153: --第二层-------------------------------
e59d27b43b 2023-07-17 154: local cache_1
e59d27b43b 2023-07-17 155: local cache_2
e59d27b43b 2023-07-17 156: local cache_3
e59d27b43b 2023-07-17 157: local cache_4
e59d27b43b 2023-07-17 158: local cache_5
27cb01cd8e 2023-07-17 159: local cache_6
27cb01cd8e 2023-07-17 160: local cache_7
27cb01cd8e 2023-07-17 161: local cache_8
27cb01cd8e 2023-07-17 162: local cache_9
c110227920 2023-08-02 163: local _
c110227920 2023-08-02 164: fun["Debug.ReloadFieldEnd"] = Debug.ReloadFieldEnd
f56b114da9 2024-02-13 165: Debug.ReloadFieldEnd = function(u1)
f56b114da9 2024-02-13 166: fun["Debug.ReloadFieldEnd"]()
f56b114da9 2024-02-13 167: if u1 then
f56b114da9 2024-02-13 168: fun["一_随机抽卡"](u1)
f56b114da9 2024-02-13 169: end
f56b114da9 2024-02-13 170: end
04eb866260 2024-02-13 171: fun["二_印卡"] = function(u1, u2, u3)
43ea8c8217 2024-02-13 172: u3 = u3 or u2
f56b114da9 2024-02-13 173: Debug.ShowHint(
f56b114da9 2024-02-13 174: "点击对方额外卡组可以进行印卡。\n手卡只能印 "
f56b114da9 2024-02-13 175: .. u2
f56b114da9 2024-02-13 176: .. " 张。\n最多可以印 "
04eb866260 2024-02-13 177: .. u3
f56b114da9 2024-02-13 178: .. " 张"
f56b114da9 2024-02-13 179: )
f56b114da9 2024-02-13 180: str["效果"] = Effect.CreateEffect(u1)
674765ddf2 2024-02-13 181: str["当前印卡数"] = 1
674765ddf2 2024-02-13 182: str["效果"]:SetType(EFFECT_TYPE_IGNITION)
674765ddf2 2024-02-13 183: str["效果"]:SetProperty(
674765ddf2 2024-02-13 184: EFFECT_FLAG_BOTH_SIDE + EFFECT_FLAG_UNCOPYABLE + EFFECT_FLAG_CANNOT_NEGATE + EFFECT_FLAG_CANNOT_DISABLE
674765ddf2 2024-02-13 185: )
674765ddf2 2024-02-13 186: str["效果"]:SetTarget(fun["一_该效果不能被连锁"])
674765ddf2 2024-02-13 187: str["效果"]:SetRange(LOCATION_EXTRA)
46bd1a8cd5 2024-02-13 188: function print_hand(effect_event, player_who_activate_the_effect)
674765ddf2 2024-02-13 189: announce_card = Duel.AnnounceCard(player_who_activate_the_effect)
674765ddf2 2024-02-13 190: card = Duel.CreateToken(player_who_activate_the_effect, announce_card)
f56b114da9 2024-02-13 191: if str["当前印卡数"] <= u2 then
674765ddf2 2024-02-13 192: str["当前印卡数"] = str["当前印卡数"] + 1
674765ddf2 2024-02-13 193: Duel.SendtoHand(card, nil, REASON_RULE)
46bd1a8cd5 2024-02-13 194: else
04eb866260 2024-02-13 195: if str["当前印卡数"] <= u3 then
674765ddf2 2024-02-13 196: str["当前印卡数"] = str["当前印卡数"] + 1
674765ddf2 2024-02-13 197: Duel.Remove(card, POS_FACEUP, REASON_RULE)
674765ddf2 2024-02-13 198: Duel.SendtoDeck(card, player_who_activate_the_effect, 0, REASON_RULE)
46bd1a8cd5 2024-02-13 199: else
674765ddf2 2024-02-13 200: Debug.ShowHint("印卡过多!")
674765ddf2 2024-02-13 201: effect_event:Reset()
46bd1a8cd5 2024-02-13 202: end
46bd1a8cd5 2024-02-13 203: end
46bd1a8cd5 2024-02-13 204: end
674765ddf2 2024-02-13 205: str["效果"]:SetOperation(print_hand)
f56b114da9 2024-02-13 206: u1:RegisterEffect(str["效果"])
46bd1a8cd5 2024-02-13 207: end
46bd1a8cd5 2024-02-13 208: fun["二_开局说明"] = function()
674765ddf2 2024-02-13 209: str["这个残局的效果卡数量"] =
674765ddf2 2024-02-13 210: Duel.GetMatchingGroupCount(fun["是否效果卡"], 0, str["所有区域"], str["所有区域"], nil)
674765ddf2 2024-02-13 211: str["超量素材组"] = Duel.GetOverlayGroup(0, LOCATION_MZONE, LOCATION_MZONE)
46bd1a8cd5 2024-02-13 212: for k in aux.Next(str["超量素材组"]) do
46bd1a8cd5 2024-02-13 213: if fun["一_是否效果卡"](k) then
674765ddf2 2024-02-13 214: str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + 1
46bd1a8cd5 2024-02-13 215: end
46bd1a8cd5 2024-02-13 216: end
674765ddf2 2024-02-13 217: str["开局说明"] = str["这个残局的效果卡数量"] .. "卡 " .. str["规则"]
46bd1a8cd5 2024-02-13 218: if str["不洗牌"] == 0 then
46bd1a8cd5 2024-02-13 219: else
674765ddf2 2024-02-13 220: str["开局说明"] = str["开局说明"] .. "伪洗牌 "
46bd1a8cd5 2024-02-13 221: end
46bd1a8cd5 2024-02-13 222: if str["无BP"] == 0 then
674765ddf2 2024-02-13 223: str["开局说明"] = str["开局说明"] .. "无BP "
46bd1a8cd5 2024-02-13 224: end
46bd1a8cd5 2024-02-13 225: if str["无AI"] == 0 then
674765ddf2 2024-02-13 226: str["开局说明"] = str["开局说明"] .. "无AI "
46bd1a8cd5 2024-02-13 227: end
46bd1a8cd5 2024-02-13 228: if str["开局添加手卡"] then
674765ddf2 2024-02-13 229: str["开局说明"] = str["开局说明"] .. "选" .. str["开局添加手卡的数量"] .. "卡 "
46bd1a8cd5 2024-02-13 230: end
46bd1a8cd5 2024-02-13 231: if str["禁格"] then
674765ddf2 2024-02-13 232: str["开局说明"] = str["开局说明"] .. "禁" .. str["禁格的数量"] .. "格 "
46bd1a8cd5 2024-02-13 233: end
46bd1a8cd5 2024-02-13 234: if str["随机抽卡的数量"] then
674765ddf2 2024-02-13 235: str["开局说明"] = str["开局说明"] .. "抽" .. str["随机抽卡的数量"] .. "卡 "
46bd1a8cd5 2024-02-13 236: end
674765ddf2 2024-02-13 237: Debug.ShowHint(str["开局说明"])
46bd1a8cd5 2024-02-13 238: end
1d67d9f6e3 2023-08-02 239: fun["aux.BeginPuzzle"] = aux.BeginPuzzle
f56b114da9 2024-02-13 240: aux.BeginPuzzle = function(u1, u2)
674765ddf2 2024-02-13 241: fun["aux.BeginPuzzle"]()
f56b114da9 2024-02-13 242: if u1 then
f56b114da9 2024-02-13 243: fun["一_开局添加手卡"](u1)
46bd1a8cd5 2024-02-13 244: end
f56b114da9 2024-02-13 245: if u2 then
f56b114da9 2024-02-13 246: fun["一_禁格"](u2)
46bd1a8cd5 2024-02-13 247: end
674765ddf2 2024-02-13 248: fun["二_开局说明"]()
674765ddf2 2024-02-13 249: fun["一_通关邀请"]()
46bd1a8cd5 2024-02-13 250: end
ba4bd27237 2023-08-02 251: --兼容层-------------------------------
1d67d9f6e3 2023-08-02 252: fun["印卡"] = fun["二_印卡"]
30619e5bbd 2023-08-02 253: fun["开局添加手卡"] = fun["一_开局添加手卡"]
30619e5bbd 2023-08-02 254: fun["是否效果卡"] = fun["一_是否效果卡"]
e61778909e 2023-08-02 255: fun["禁格"] = fun["一_禁格"]
30619e5bbd 2023-08-02 256: fun["随机抽卡"] = fun["一_随机抽卡"]