游戏王残局简化版

Annotation For script/c0.lua
Login

Annotation For script/c0.lua

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

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