游戏王残局简化版

Annotation For script/c0.lua
Login

Annotation For script/c0.lua

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

af6ca14c70 2024-02-13  顽雨沉风: local string = string
af6ca14c70 2024-02-13  顽雨沉风: local table = table
6fdfa2454c 2024-02-14  顽雨沉风: local Debug = Debug
6fdfa2454c 2024-02-14  顽雨沉风: local Effect = Effect
6fdfa2454c 2024-02-14  顽雨沉风: local Duel = Duel
6fdfa2454c 2024-02-14  顽雨沉风: local Card = Card
8388ccc6c5 2024-02-14  顽雨沉风: local s = {}
8388ccc6c5 2024-02-14  顽雨沉风: s["效牌之类排"] = {
8388ccc6c5 2024-02-14  顽雨沉风: TYPE_SPELL
8388ccc6c5 2024-02-14  顽雨沉风: , TYPE_TRAP
8388ccc6c5 2024-02-14  顽雨沉风: , TYPE_EFFECT
8388ccc6c5 2024-02-14  顽雨沉风: }
21cd94e151 2024-02-14  顽雨沉风: s["无效灵摆怪兽之卡编排"] = {
8388ccc6c5 2024-02-14  顽雨沉风: 28363749
8388ccc6c5 2024-02-14  顽雨沉风: , 19474136
8388ccc6c5 2024-02-14  顽雨沉风: , 17390179
8388ccc6c5 2024-02-14  顽雨沉风: , 83980492
ef7b6d6995 2024-02-14  顽雨沉风: }
ef7b6d6995 2024-02-14  顽雨沉风: s["全区"] = LOCATION_HAND + LOCATION_MZONE + LOCATION_SZONE + LOCATION_GRAVE + LOCATION_REMOVED + LOCATION_DECK + LOCATION_EXTRA
1301c8be40 2024-02-13  顽雨沉风: do
1301c8be40 2024-02-13  顽雨沉风:   local h1
1301c8be40 2024-02-13  顽雨沉风:   --~ 则对
1301c8be40 2024-02-13  顽雨沉风:   h1 = {
1301c8be40 2024-02-13  顽雨沉风:   [3] = "大师3 "
1301c8be40 2024-02-13  顽雨沉风:   , [4] = "新大师 "
1301c8be40 2024-02-13  顽雨沉风:   , [5] = "大师2020 "
1301c8be40 2024-02-13  顽雨沉风:   }
1301c8be40 2024-02-13  顽雨沉风:   s["Debug.ReloadFieldBegin"] = _G.Debug.ReloadFieldBegin
1301c8be40 2024-02-13  顽雨沉风:   --~ 模
1301c8be40 2024-02-13  顽雨沉风:   --~ 则数
1301c8be40 2024-02-13  顽雨沉风:   function _G.Debug.ReloadFieldBegin(u1, u2)
719cb47a61 2024-02-13  顽雨沉风:     s["伪洗牌"] = u1 & DUEL_PSEUDO_SHUFFLE
719cb47a61 2024-02-13  顽雨沉风:     s["战段"] = u1 & DUEL_ATTACK_FIRST_TURN
1301c8be40 2024-02-13  顽雨沉风:     s["机智"] = u1 & DUEL_SIMPLE_AI
1301c8be40 2024-02-13  顽雨沉风:     if u2 then
1301c8be40 2024-02-13  顽雨沉风:       s["则"] = h1[u2]
1301c8be40 2024-02-13  顽雨沉风:     else
1301c8be40 2024-02-13  顽雨沉风:       s["则"] = h1[5]
1301c8be40 2024-02-13  顽雨沉风:       end
1301c8be40 2024-02-13  顽雨沉风:     s["Debug.ReloadFieldBegin"](u1, u2)
1301c8be40 2024-02-13  顽雨沉风:     end
1301c8be40 2024-02-13  顽雨沉风:   end
ad8a165722 2024-02-14  顽雨沉风: do
ac819336b2 2024-02-14  顽雨沉风:   local h1
14fe398ae9 2024-02-14  顽雨沉风:   --~ “调该效果”的效果
ac819336b2 2024-02-14  顽雨沉风:   function s["_开局洗牌抽牌"](u1)
ac819336b2 2024-02-14  顽雨沉风:     Duel.ShuffleDeck(0)
ac819336b2 2024-02-14  顽雨沉风:     --~ 抽卡之数
ac819336b2 2024-02-14  顽雨沉风:     Duel.Draw(0, h1, REASON_RULE)
ac819336b2 2024-02-14  顽雨沉风:     u1:Reset()
ac819336b2 2024-02-14  顽雨沉风:     end
ad8a165722 2024-02-14  顽雨沉风:   function s["开局洗牌抽牌"](u1)
ac819336b2 2024-02-14  顽雨沉风:     local h2
ad8a165722 2024-02-14  顽雨沉风:     s["开局洗牌抽牌之数"] = u1
ad8a165722 2024-02-14  顽雨沉风:     --~ 效果
ac819336b2 2024-02-14  顽雨沉风:     h2 = Effect.GlobalEffect()
ac819336b2 2024-02-14  顽雨沉风:     h2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
ac819336b2 2024-02-14  顽雨沉风:     h2:SetCode(EVENT_ADJUST)
ac819336b2 2024-02-14  顽雨沉风:     h2:SetCondition(aux.TRUE)
ac819336b2 2024-02-14  顽雨沉风:     h1 = u1
ac819336b2 2024-02-14  顽雨沉风:     h2:SetOperation(s["_开局洗牌抽牌"])
ac819336b2 2024-02-14  顽雨沉风:     Duel.RegisterEffect(h2, 0)
ad8a165722 2024-02-14  顽雨沉风:     end
1301c8be40 2024-02-13  顽雨沉风:   end
e14f5fd087 2024-02-14  顽雨沉风: function s.["不被连锁"]()
af6ca14c70 2024-02-13  顽雨沉风:   Duel.SetChainLimit(aux.FALSE)
af6ca14c70 2024-02-13  顽雨沉风:   return true
d3790b56e8 2024-02-13  顽雨沉风:   end
951ea1b58f 2024-02-13  顽雨沉风: do
951ea1b58f 2024-02-13  顽雨沉风:   local h1, h2
951ea1b58f 2024-02-13  顽雨沉风:   --~ 原解邀请
951ea1b58f 2024-02-13  顽雨沉风:   h1 = "残局群181175613"
951ea1b58f 2024-02-13  顽雨沉风:   --~ 二解邀请,备用:圣魔术师
951ea1b58f 2024-02-13  顽雨沉风:   h2 = "爆貘团:「你居然二解了,请加群告诉我怎么二解。」"
14fe398ae9 2024-02-14  顽雨沉风:     --~ 通关之邀
14fe398ae9 2024-02-14  顽雨沉风:   function s["_通关之邀"]()
14fe398ae9 2024-02-14  顽雨沉风:     local h3
14fe398ae9 2024-02-14  顽雨沉风:     --~ 对方之血
14fe398ae9 2024-02-14  顽雨沉风:     h3 = Duel.GetLP(1)
14fe398ae9 2024-02-14  顽雨沉风:     if h3 <= 0 then
14fe398ae9 2024-02-14  顽雨沉风:       if h3 == 0 then
14fe398ae9 2024-02-14  顽雨沉风:         Debug.ShowHint(h1)
14fe398ae9 2024-02-14  顽雨沉风:       else
14fe398ae9 2024-02-14  顽雨沉风:         Debug.ShowHint(h2)
14fe398ae9 2024-02-14  顽雨沉风:         end
14fe398ae9 2024-02-14  顽雨沉风:       end
14fe398ae9 2024-02-14  顽雨沉风:     end
14fe398ae9 2024-02-14  顽雨沉风:   function s["通关之邀"]()
14fe398ae9 2024-02-14  顽雨沉风:     local h1, h2
14fe398ae9 2024-02-14  顽雨沉风:     --~ 效果
14fe398ae9 2024-02-14  顽雨沉风:     h1 = Effect.GlobalEffect()
14fe398ae9 2024-02-14  顽雨沉风:     h1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
14fe398ae9 2024-02-14  顽雨沉风:     h1:SetCode(EVENT_DAMAGE)
14fe398ae9 2024-02-14  顽雨沉风:     h1:SetCondition(s["_通关之邀"])
14fe398ae9 2024-02-14  顽雨沉风:     h1:SetOperation(aux.NULL)
14fe398ae9 2024-02-14  顽雨沉风:     Duel.RegisterEffect(h1, 0)
f4490a058a 2024-02-14  顽雨沉风:     end
f4490a058a 2024-02-14  顽雨沉风:   end
f4490a058a 2024-02-14  顽雨沉风: function s.["是否效牌"](card)
f4490a058a 2024-02-14  顽雨沉风:   for i = 1, #s["效牌之类排"] do
f4490a058a 2024-02-14  顽雨沉风:     if Card.IsType(card, s["效牌之类排"][i]) then
f4490a058a 2024-02-14  顽雨沉风:       return true
f4490a058a 2024-02-14  顽雨沉风:       end
f4490a058a 2024-02-14  顽雨沉风:     end
f4490a058a 2024-02-14  顽雨沉风:   if Card.IsType(card, TYPE_PENDULUM) then
f4490a058a 2024-02-14  顽雨沉风:     for i = 1, #s["无效灵摆怪兽之卡编排"] do
f4490a058a 2024-02-14  顽雨沉风:       if Card.IsCode(card, s["无效灵摆怪兽之卡编排"][i]) then
f4490a058a 2024-02-14  顽雨沉风:       else
f4490a058a 2024-02-14  顽雨沉风:         return true
f4490a058a 2024-02-14  顽雨沉风:         end
f4490a058a 2024-02-14  顽雨沉风:       end
f4490a058a 2024-02-14  顽雨沉风:     end
f4490a058a 2024-02-14  顽雨沉风:   end
046e84141b 2024-02-14  顽雨沉风: do
046e84141b 2024-02-14  顽雨沉风:   --~ “调该效果”的效果
046e84141b 2024-02-14  顽雨沉风:   --~ “调该效果”的玩家
d1652d7fa4 2024-02-13  顽雨沉风:   function h2(u2, u3)
d1652d7fa4 2024-02-13  顽雨沉风:     local h3
d1652d7fa4 2024-02-13  顽雨沉风:     --~ 玩家选定的牌
a6c06c688b 2024-02-13  顽雨沉风:     h3 = Duel.SelectMatchingCard(u3, Card.IsAbleToHand, u3, LOCATION_DECK, 0, u1, u1, nil)
a6c06c688b 2024-02-13  顽雨沉风:     Duel.SendtoHand(h3, nil, REASON_RULE)
a6c06c688b 2024-02-13  顽雨沉风:     u2:Reset()
a6c06c688b 2024-02-13  顽雨沉风:     end
046e84141b 2024-02-14  顽雨沉风:   function s["开局选牌入手"](u1)
046e84141b 2024-02-14  顽雨沉风:     local h1, h2
046e84141b 2024-02-14  顽雨沉风:     str["开局选牌入手之数"] = u1
046e84141b 2024-02-14  顽雨沉风:     --~ 效果
046e84141b 2024-02-14  顽雨沉风:     h1 = Effect.GlobalEffect()
046e84141b 2024-02-14  顽雨沉风:     h1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
046e84141b 2024-02-14  顽雨沉风:     h1:SetCode(EVENT_ADJUST)
046e84141b 2024-02-14  顽雨沉风:     h1:SetCondition(aux.TRUE)
046e84141b 2024-02-14  顽雨沉风:     --~ 调该效果的效果
046e84141b 2024-02-14  顽雨沉风:     --~ 调该效果的玩家
046e84141b 2024-02-14  顽雨沉风:     function h2(u2, u3)
046e84141b 2024-02-14  顽雨沉风:       local h3
046e84141b 2024-02-14  顽雨沉风:       --~ 玩家选定的牌
046e84141b 2024-02-14  顽雨沉风:       h3 = Duel.SelectMatchingCard(u3, Card.IsAbleToHand, u3, LOCATION_DECK, 0, u1, u1, nil)
046e84141b 2024-02-14  顽雨沉风:       Duel.SendtoHand(h3, nil, REASON_RULE)
046e84141b 2024-02-14  顽雨沉风:       u2:Reset()
046e84141b 2024-02-14  顽雨沉风:       end
046e84141b 2024-02-14  顽雨沉风:     h1:SetOperation(h2)
046e84141b 2024-02-14  顽雨沉风:     Duel.RegisterEffect(h1, 0)
046e84141b 2024-02-14  顽雨沉风:     end
a6c06c688b 2024-02-13  顽雨沉风:   end
fbb83a06ea 2024-02-13  顽雨沉风: function s["禁格"](u1)
f7d8ee14bc 2024-02-13  顽雨沉风:   local h1
f7d8ee14bc 2024-02-13  顽雨沉风:   s["禁格之数"] = u1
af6ca14c70 2024-02-13  顽雨沉风:   --~ 效果
af6ca14c70 2024-02-13  顽雨沉风:   h1 = Effect.GlobalEffect()
af6ca14c70 2024-02-13  顽雨沉风:   h1:SetCode(EFFECT_USE_EXTRA_MZONE)
af6ca14c70 2024-02-13  顽雨沉风:   h1:SetValue(u1)
af6ca14c70 2024-02-13  顽雨沉风:   Duel.RegisterEffect(h1, 0)
af6ca14c70 2024-02-13  顽雨沉风:   end
1301c8be40 2024-02-13  顽雨沉风: do
1301c8be40 2024-02-13  顽雨沉风:   s["Debug.ReloadFieldEnd"] = _G.Debug.ReloadFieldEnd
d1652d7fa4 2024-02-13  顽雨沉风:   --~ 开局洗牌抽牌之数
1301c8be40 2024-02-13  顽雨沉风:   function _G.Debug.ReloadFieldEnd(u1)
1301c8be40 2024-02-13  顽雨沉风:     s["Debug.ReloadFieldEnd"]()
1301c8be40 2024-02-13  顽雨沉风:     if u1 then
d1652d7fa4 2024-02-13  顽雨沉风:       s["开局洗牌抽牌"](u1)
d1652d7fa4 2024-02-13  顽雨沉风:       end
d1652d7fa4 2024-02-13  顽雨沉风:     end
d1652d7fa4 2024-02-13  顽雨沉风:   end
fd436744e5 2024-02-14  顽雨沉风: do
fd436744e5 2024-02-14  顽雨沉风:   local h1, h2, h3, h4
fd436744e5 2024-02-14  顽雨沉风:   --~ 印牌过多之示
fd436744e5 2024-02-14  顽雨沉风:   h1 = "印牌过多"
e14f5fd087 2024-02-14  顽雨沉风:   --~ 现之印牌数
e14f5fd087 2024-02-14  顽雨沉风:   h2 = 1
fd436744e5 2024-02-14  顽雨沉风:   --~ 印手牌之上限
fd436744e5 2024-02-14  顽雨沉风:   h3 = 0
fd436744e5 2024-02-14  顽雨沉风:   --~ 总印牌之上限
fd436744e5 2024-02-14  顽雨沉风:   h4 = 0
fd436744e5 2024-02-14  顽雨沉风:   --~ 「调该效果」的效果
fd436744e5 2024-02-14  顽雨沉风:   --~ 「调该效果」的玩家
fd436744e5 2024-02-14  顽雨沉风:   function s["_印牌"](u1, u2)
fd436744e5 2024-02-14  顽雨沉风:     local h5, h6
e14f5fd087 2024-02-14  顽雨沉风:     --~ 印卡之卡编
fd436744e5 2024-02-14  顽雨沉风:     h5 = Duel.AnnounceCard(u2)
e14f5fd087 2024-02-14  顽雨沉风:     --~ 卡
fd436744e5 2024-02-14  顽雨沉风:     h6 = Duel.CreateToken(u2, h5)
fd436744e5 2024-02-14  顽雨沉风:     if h2 <= h3 then
fd436744e5 2024-02-14  顽雨沉风:       h2 = h2 + 1
fd436744e5 2024-02-14  顽雨沉风:       Duel.SendtoHand(h6, nil, REASON_RULE)
fd436744e5 2024-02-14  顽雨沉风:     else
fd436744e5 2024-02-14  顽雨沉风:       if h2 <= h4 then
fd436744e5 2024-02-14  顽雨沉风:         h2 = h2 + 1
fd436744e5 2024-02-14  顽雨沉风:         Duel.Remove(h6, POS_FACEUP, REASON_RULE)
fd436744e5 2024-02-14  顽雨沉风:         Duel.SendtoDeck(card, u2, 0, REASON_RULE)
fd436744e5 2024-02-14  顽雨沉风:       else
7029b5245e 2024-02-14  顽雨沉风:         Debug.ShowHint(h1)
7029b5245e 2024-02-14  顽雨沉风:         u1:Reset()
e14f5fd087 2024-02-14  顽雨沉风:         end
e14f5fd087 2024-02-14  顽雨沉风:       end
e14f5fd087 2024-02-14  顽雨沉风:     end
fd436744e5 2024-02-14  顽雨沉风:   function s.["印牌"](u1, u2, u3)
7029b5245e 2024-02-14  顽雨沉风:     local h5, h6
7029b5245e 2024-02-14  顽雨沉风:     h3 = u2
7029b5245e 2024-02-14  顽雨沉风:     h4 = u3 or u2
fd436744e5 2024-02-14  顽雨沉风:     Debug.ShowHint("点击对方额外牌组可以进行印牌。\n手牌只能印 " .. u2 .. " 张。\n最多可以印 " .. u3 .. " 张")
7029b5245e 2024-02-14  顽雨沉风:     h5 = Effect.CreateEffect(u1)
7029b5245e 2024-02-14  顽雨沉风:     h5:SetType(EFFECT_TYPE_IGNITION)
7029b5245e 2024-02-14  顽雨沉风:     h5:SetProperty(EFFECT_FLAG_BOTH_SIDE + EFFECT_FLAG_UNCOPYABLE + EFFECT_FLAG_CANNOT_NEGATE + EFFECT_FLAG_CANNOT_DISABLE)
7029b5245e 2024-02-14  顽雨沉风:     h5:SetTarget(s["不被连锁"])
7029b5245e 2024-02-14  顽雨沉风:     h5:SetRange(LOCATION_EXTRA)
7029b5245e 2024-02-14  顽雨沉风:     h5:SetOperation(s["_印牌"])
7029b5245e 2024-02-14  顽雨沉风:     u1:RegisterEffect(h5)
fd436744e5 2024-02-14  顽雨沉风:     end
e14f5fd087 2024-02-14  顽雨沉风:   end
e14f5fd087 2024-02-14  顽雨沉风: function s.["开局之示"]()
e14f5fd087 2024-02-14  顽雨沉风:   local h1, h2, h3
e14f5fd087 2024-02-14  顽雨沉风:   --~ 此局效牌之数
e14f5fd087 2024-02-14  顽雨沉风:   h2 = Duel.GetMatchingGroupCount(s["是否效牌"], 0, s["全区"], s["全区"], nil)
ef7b6d6995 2024-02-14  顽雨沉风:   --~ 超量材组
ef7b6d6995 2024-02-14  顽雨沉风:   h3 = Duel.GetOverlayGroup(0, LOCATION_MZONE, LOCATION_MZONE)
ef7b6d6995 2024-02-14  顽雨沉风:   for u1 in aux.Next(h3) do
e14f5fd087 2024-02-14  顽雨沉风:     if s["是否效牌"](u1) then
ef7b6d6995 2024-02-14  顽雨沉风:       h2 = h2 + 1
091f486d37 2024-02-13  顽雨沉风:       end
091f486d37 2024-02-13  顽雨沉风:     end
091f486d37 2024-02-13  顽雨沉风:   --~ 开局说明
e14f5fd087 2024-02-14  顽雨沉风:   h1 = h2 .. "牌 " .. s["则"]
719cb47a61 2024-02-13  顽雨沉风:   if s["伪洗牌"] == 0 then
091f486d37 2024-02-13  顽雨沉风:   else
091f486d37 2024-02-13  顽雨沉风:     h1 = h1 .. "伪洗牌 "
091f486d37 2024-02-13  顽雨沉风:     end
719cb47a61 2024-02-13  顽雨沉风:   if s["战段"] == 0 then
719cb47a61 2024-02-13  顽雨沉风:     h1 = h1 .. "无战段 "
d1652d7fa4 2024-02-13  顽雨沉风:     end
ef7b6d6995 2024-02-14  顽雨沉风:   if s["机智"] == 0 then
ef7b6d6995 2024-02-14  顽雨沉风:     h1 = h1 .. "无机智 "
d1652d7fa4 2024-02-13  顽雨沉风:     end
d1652d7fa4 2024-02-13  顽雨沉风:   if s["开局选牌入手之数"] then
d1652d7fa4 2024-02-13  顽雨沉风:     h1 = h1 .. "选" .. s["开局选牌入手之数"] .. "牌 "
f7d8ee14bc 2024-02-13  顽雨沉风:     end
f7d8ee14bc 2024-02-13  顽雨沉风:   if s["禁格之数"] then
f7d8ee14bc 2024-02-13  顽雨沉风:     h1 = h1 .. "禁" .. s["禁格之数"] .. "格 "
f7d8ee14bc 2024-02-13  顽雨沉风:     end
d1652d7fa4 2024-02-13  顽雨沉风:   if s["开局洗牌抽牌之数"] then
d1652d7fa4 2024-02-13  顽雨沉风:     h1 = h1 .. "抽" .. s["开局洗牌抽牌之数"] .. "牌 "
091f486d37 2024-02-13  顽雨沉风:     end
091f486d37 2024-02-13  顽雨沉风:   Debug.ShowHint(h1)
091f486d37 2024-02-13  顽雨沉风:   end
1301c8be40 2024-02-13  顽雨沉风: do
1301c8be40 2024-02-13  顽雨沉风:   s["aux.BeginPuzzle"] = _G.aux.BeginPuzzle
d1652d7fa4 2024-02-13  顽雨沉风:   --~ 开局选牌入手之数
1301c8be40 2024-02-13  顽雨沉风:   --~ 禁格之数
1301c8be40 2024-02-13  顽雨沉风:   function _G.aux.BeginPuzzle(u1, u2)
1301c8be40 2024-02-13  顽雨沉风:     s["aux.BeginPuzzle"]()
1301c8be40 2024-02-13  顽雨沉风:     if u1 then
d1652d7fa4 2024-02-13  顽雨沉风:       s["开局选牌入手"](u1)
1301c8be40 2024-02-13  顽雨沉风:       end
1301c8be40 2024-02-13  顽雨沉风:     if u2 then
1301c8be40 2024-02-13  顽雨沉风:       s["禁格"](u2)
1301c8be40 2024-02-13  顽雨沉风:       end
e14f5fd087 2024-02-14  顽雨沉风:     s["开局之示"]()
1301c8be40 2024-02-13  顽雨沉风:     s["通关之邀"]()
1301c8be40 2024-02-13  顽雨沉风:     end
1301c8be40 2024-02-13  顽雨沉风:   end