游戏王残局简化版

Annotation For script/c0.lua
Login

Annotation For script/c0.lua

Lines of script/c0.lua from check-in 1d09fc48b2 that are changed by the sequence of edits moving toward check-in 5c3d90f056:

                         1: str = {}
                         2: fun = {}
                         3: 
                         4: str["Debug.ReloadFieldBegin"] = Debug.ReloadFieldBegin
                         5: 
                         6: Debug.ReloadFieldBegin = function(str_1, str_2)
                         7:   str["不洗牌"] = str_1 & DUEL_PSEUDO_SHUFFLE
                         8: 
                         9:   if str_2 then
                        10:     if str_2 == 3 then
                        11:     str["规则"] = "大师3 "
                        12:     elseif str_2 == 4 then
                        13:       str["规则"] = "新大师 "
                        14:     elseif str_2 == 5 then
                        15:       str["规则"] = "大师2020 "
                        16:       end
                        17:   else
                        18:     str["规则"] = "大师2020 "
                        19:     end
                        20:   str["Debug.ReloadFieldBegin"](str_1, str_2)
                        21:   end
                        22: 
                        23: fun["通关邀请"] = function()
                        24:   local effect_1
                        25:   effect_1 = Effect.GlobalEffect()
                        26:   effect_1:SetType(EFFECT_TYPE_FIELD
                        27:     + EFFECT_TYPE_CONTINUOUS)
                        28:   effect_1:SetCode(EVENT_DAMAGE)
                        29:   function cache_1()
                        30:     cache_1 = Duel.GetLP(1)
                        31:     if cache_1 <= 0 then
                        32:       cache_1 = true
                        33:     else
                        34:       cache_1 = false
                        35:       end
                        36:     return cache_1
                        37:     end
                        38:   effect_1:SetCondition(cache_1)
                        39:   function cache_1()
                        40:     Debug.ShowHint("残局群181175613")
                        41:     return
                        42:     end
                        43:   effect_1:SetOperation(cache_1)
                        44: 
                        45:   Duel.RegisterEffect(effect_1
                        46:     , 0)
                        47:   fun["开局说明"]()
                        48:   end
                        49: 
                        50: fun["是否效果卡"] = function(card)
                        51: 
                        52:   cache_1 = Card.IsType(card, TYPE_SPELL)
                        53:   cache_2 = Card.IsType(card, TYPE_TRAP)
                        54:   cache_3 = Card.IsType(card, TYPE_EFFECT)
                        55: 
                        56:   if cache_1
                        57:   or cache_2
                        58:   or cache_3 then
                        59:     return true
                        60:     end
                        61:   cache_1 = Card.IsType(card, TYPE_PENDULUM)
                        62: 
                        63:   if cache_1 then
                        64:     cache_1 = Card.IsCode(card, 28363749)
                        65:     cache_2 = Card.IsCode(card, 19474136)
                        66:     cache_3 = Card.IsCode(card, 17390179)
                        67:     cache_4 = Card.IsCode(card, 83980492)
                        68:     if cache_1
                        69:     or cache_2
                        70:     or cache_3
                        71:     or cache_4 then
                        72:       return true
                        73:       end
                        74:     end
                        75: 
                        76:   return false
                        77:   end
                        78: 
                        79: fun["开局说明"] = function()
                        80:   if str["开局说明吗"] == 1 then
                        81:     return
                        82:   else
                        83:     str["开局说明吗"] = 1
                        84:     end
                        85: 
                        86:   cache_1 = 0
                        87:   cache_1 = cache_1 + LOCATION_DECK
                        88:   cache_1 = cache_1 + LOCATION_HAND
                        89:   cache_1 = cache_1 + LOCATION_MZONE
                        90:   cache_1 = cache_1 + LOCATION_SZONE
                        91:   cache_1 = cache_1 + LOCATION_GRAVE
                        92:   cache_1 = cache_1 + LOCATION_REMOVED
                        93:   cache_1 = cache_1 + LOCATION_EXTRA
                        94: 
                        95:   str["这个残局的效果卡数量"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,cache_1,cache_1,nil)
                        96: 
                        97:   cache_1 = Duel.GetOverlayGroup(0, LOCATION_MZONE, LOCATION_MZONE)
                        98: 
                        99:   for k in aux.Next(cache_1) do
                       100:     cache_1 = fun["是否效果卡"](k)
                       101:     if cache_1 then
                       102:       str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + 1
                       103:       end
                       104:     end
                       105: 
                       106:   str["开局说明"] =""
                       107: 
                       108:   str["开局说明"] = str["开局说明"] .. str["这个残局的效果卡数量"]
                       109:   str["开局说明"] = str["开局说明"] .. "卡 "
                       110: 
                       111:   str["开局说明"] = str["开局说明"] .. str["规则"]
                       112: 
                       113:   if str["不洗牌"] == 0 then
                       114:   else
                       115:     str["开局说明"] = str["开局说明"] .. "伪洗牌 "
                       116:     end
                       117: 
                       118:   if str["开局添加手卡"] then
                       119:     str["开局说明"] = str["开局说明"] .. "选"
                       120:     str["开局说明"] = str["开局说明"] .. str["开局添加手卡"]
                       121:     str["开局说明"] = str["开局说明"] .. "卡 "
                       122:     end
                       123: 
                       124:   Debug.ShowHint(str["开局说明"])
                       125:   end
                       126: 
                       127: fun["开局添加手卡"] = function(str_1)
                       128:   str["开局添加手卡"] = str_1
                       129:   effect_1 = Effect.GlobalEffect()
                       130:   effect_1:SetType(EFFECT_TYPE_FIELD
                       131:     + EFFECT_TYPE_CONTINUOUS)
                       132:   effect_1:SetCode(EVENT_ADJUST)
                       133:   effect_1:SetCountLimit(1)
                       134:   function cache_1()
                       135:     if str["已添加手卡"] == 1 then
                       136:       return false
                       137:     else
                       138:       str["已添加手卡"] = 1
                       139:       return true
                       140:       end
                       141: 
                       142:     end
                       143:   effect_1:SetCondition(cache_1)
                       144:   function cache_1(effect_event
                       145:     , player_who_activate_the_effect)
                       146: 
                       147:     str["玩家选定的卡"] = Duel.SelectMatchingCard(player_who_activate_the_effect
                       148:        , Card.IsAbleToHand
                       149:        , player_who_activate_the_effect
                       150:        , LOCATION_DECK
                       151:        , 0
                       152:        , str_1
                       153:        , str_1
                       154:        , nil)
                       155:     Duel.SendtoHand(str["玩家选定的卡"]
                       156:       , nil
                       157:       , REASON_RULE)
                       158:     end
                       159:   effect_1:SetOperation(cache_1)
                       160:   Duel.RegisterEffect(effect_1
                       161:     , 0)
                       162:   fun["通关邀请"]()
                       163:   end