游戏王残局简化版

Annotation For script/c0.lua
Login

Annotation For script/c0.lua

Lines of script/c0.lua from check-in e7130db7c4 that are changed by the sequence of edits moving toward check-in d2dde12476:

                         1: local str = {}
                         2: local fun = {}
                         3: 
                         4: local cache_1
                         5: local cache_2
                         6: 
                         7: 
                         8: 
                         9: _G["通关邀请"] = function()
                        10:   local effect_1
                        11:   effect_1 = Effect.GlobalEffect()
                        12:   effect_1:SetType(EFFECT_TYPE_FIELD
                        13:     + EFFECT_TYPE_CONTINUOUS)
                        14:   effect_1:SetCode(EVENT_DAMAGE)
                        15:   function cache_1()
                        16:     cache_1 = Duel.GetLP(1)
                        17:     if cache_1 <= 0 then
                        18:       cache_1 = true
                        19:     else
                        20:       cache_1 = false
                        21:       end
                        22:     return cache_1
                        23:     end
                        24:   effect_1:SetCondition(cache_1)
                        25:   function cache_1()
                        26:     Debug.ShowHint("残局群181175613")
                        27:     return
                        28:     end
                        29:   effect_1:SetOperation(cache_1)
                        30: 
                        31:   Duel.RegisterEffect(effect_1
                        32:     , 0)
                        33:   end
                        34: 
                        35: fun["是否效果卡"] = function(card)
e7130db7c4 2023-06-29   36:   cache_1 = Card.IsType(card, TYPE_MONSTER)
e7130db7c4 2023-06-29   37:   if cache_1 then
                        38:     return true
                        39:     end
                        40:   return false
                        41:   end
                        42: 
                        43: _G["开局说明"] = function()
                        44:   Debug.ShowHint(Duel.GetMatchingGroupCount(fun["是否效果卡"],0,LOCATION_GRAVE,0,nil))
                        45: 
                        46: --~   local cache_1 = {}
                        47: 
                        48: --~   cache_2 = Duel.GetFieldGroup(0,LOCATION_DECK,0)
                        49: --~   cache_1:insert(cache_2)
                        50: --~   cache_2 = Duel.GetFieldGroup(0,LOCATION_GRAVE,0)
                        51: --~   cache_1:insert(cache_2)
                        52: --~   cache_2 = Duel.GetFieldGroup(0,LOCATION_MZONE,0)
                        53: --~   cache_1:insert(cache_2)
                        54: --~   cache_2 = Duel.GetFieldGroup(0,LOCATION_HAND,0)
                        55: --~   cache_1:insert(cache_2)
                        56: --~   cache_2 = Duel.GetFieldGroup(0,LOCATION_PZONE,0)
                        57: --~   cache_1:insert(cache_2)
                        58: --~   cache_2 = Duel.GetFieldGroup(0,LOCATION_REMOVED,0)
                        59: --~   cache_1:insert(cache_2)
                        60: --~   cache_2 = Duel.GetFieldGroup(0,LOCATION_EXTRA,0)
                        61: --~   cache_1:insert(cache_2)
                        62: --~   cache_2 = Duel.GetFieldGroup(0,LOCATION_SZONE,0)
                        63: --~   cache_1:insert(cache_2)
                        64: 
                        65: --~   cache_2 = Duel.GetFieldGroup(0,0,LOCATION_DECK)
                        66: --~   cache_1:insert(cache_2)
                        67: --~   cache_2 = Duel.GetFieldGroup(0,0,LOCATION_GRAVE)
                        68: --~   cache_1:insert(cache_2)
                        69: --~   cache_2 = Duel.GetFieldGroup(0,0,LOCATION_MZONE)
                        70: --~   cache_1:insert(cache_2)
                        71: --~   cache_2 = Duel.GetFieldGroup(0,0,LOCATION_HAND)
                        72: --~   cache_1:insert(cache_2)
                        73: --~   cache_2 = Duel.GetFieldGroup(0,0,LOCATION_PZONE)
                        74: --~   cache_1:insert(cache_2)
                        75: --~   cache_2 = Duel.GetFieldGroup(0,0,LOCATION_REMOVED)
                        76: --~   cache_1:insert(cache_2)
                        77: --~   cache_2 = Duel.GetFieldGroup(0,0,LOCATION_EXTRA)
                        78: --~   cache_1:insert(cache_2)
                        79: --~   cache_2 = Duel.GetFieldGroup(0,0,LOCATION_SZONE)
                        80: --~   cache_1:insert(cache_2)
                        81: 
                        82: --~   cache_2 = Duel.GetOverlayGroup(0,LOCATION_MZONE,0)
                        83: --~   cache_1:insert(cache_2)
                        84: --~   cache_2 = Duel.GetOverlayGroup(0,0,LOCATION_SZONE)
                        85: --~   cache_1:insert(cache_2)
                        86: 
                        87: --~   for i=1, #cache_1 do
                        88: --~     end
                        89: 
                        90: 
                        91:   str["这个残局的效果卡数量"] = 0
                        92: 
                        93: --~   str["我方卡组"] = Duel.GetFieldGroupCount(0,LOCATION_DECK,0)
                        94: --~   str["我方墓地"] = Duel.GetFieldGroupCount(0,LOCATION_GRAVE,0)
                        95: --~   str["我方怪兽区"] = Duel.GetFieldGroupCount(0,LOCATION_MZONE,0)
                        96: --~   str["我方手卡"] = Duel.GetFieldGroupCount(0,LOCATION_HAND,0)
                        97: --~   str["我方灵摆区"] = Duel.GetFieldGroupCount(0,LOCATION_PZONE,0)
                        98: --~   str["我方除外区"] = Duel.GetFieldGroupCount(0,LOCATION_REMOVED,0)
                        99: --~   str["我方额外卡组"] = Duel.GetFieldGroupCount(0,LOCATION_EXTRA,0)
                       100: --~   str["我方魔陷区"] = Duel.GetFieldGroupCount(0,LOCATION_SZONE,0)
                       101: 
                       102: --~   str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["我方卡组"]
                       103: --~   str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["我方墓地"]
                       104: --~   str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["我方怪兽区"]
                       105: --~   str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["我方手卡"]
                       106: --~   str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["我方灵摆区"]
                       107: --~   str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["我方除外区"]
                       108: --~   str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["我方额外卡组"]
                       109: --~   str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["我方魔陷区"]
                       110: 
                       111: --~   str["对方卡组"] = Duel.GetFieldGroupCount(0,0,LOCATION_DECK)
                       112: --~   str["对方墓地"] = Duel.GetFieldGroupCount(0,0,LOCATION_GRAVE)
                       113: --~   str["对方怪兽区"] = Duel.GetFieldGroupCount(0,0,LOCATION_MZONE)
                       114: --~   str["对方手卡"] = Duel.GetFieldGroupCount(0,0,LOCATION_HAND)
                       115: --~   str["对方灵摆区"] = Duel.GetFieldGroupCount(0,0,LOCATION_PZONE)
                       116: --~   str["对方除外区"] = Duel.GetFieldGroupCount(0,0,LOCATION_REMOVED)
                       117: --~   str["对方额外卡组"] = Duel.GetFieldGroupCount(0,0,LOCATION_EXTRA)
                       118: --~   str["对方魔陷区"] = Duel.GetFieldGroupCount(0,0,LOCATION_SZONE)
                       119: 
                       120: --~   str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["对方卡组"]
                       121: --~   str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["对方墓地"]
                       122: --~   str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["对方怪兽区"]
                       123: --~   str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["对方手卡"]
                       124: --~   str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["对方灵摆区"]
                       125: --~   str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["对方除外区"]
                       126: --~   str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["对方额外卡组"]
                       127: --~   str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["对方魔陷区"]
                       128: 
                       129: --~   str["我方超量素材"] = Duel.GetOverlayCount(0, LOCATION_MZONE, 0)
                       130: --~   str["对方超量素材"] = Duel.GetOverlayCount(0, 0, LOCATION_MZONE)
                       131: 
                       132: --~   str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["我方超量素材"]
                       133: --~   str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["对方超量素材"]
                       134: 
                       135: --~   Debug.ShowHint(str["这个残局的效果卡数量"])
                       136:   end
                       137: 
                       138: