游戏王残局简化版

Annotation For script/c0.lua
Login

Annotation For script/c0.lua

Lines of script/c0.lua from check-in 6d182363a9 that are changed by the sequence of edits moving toward check-in 66276e699c:

6d182363a9 2023-06-30    1: --~ local str = {}
6d182363a9 2023-06-30    2: --~ local fun = {}
6d182363a9 2023-06-30    3: 
                         4: str = {}
                         5: fun = {}
                         6: 
                         7: str["Debug.ReloadFieldBegin"] = Debug.ReloadFieldBegin
                         8: 
                         9: Debug.ReloadFieldBegin = function(str_1, str_2)
                        10:   str["不洗牌"] = str_1 & DUEL_PSEUDO_SHUFFLE
                        11: 
                        12:   if str_2 then
                        13:     if str_2 == 3 then
                        14:     str["规则"] = "大师3"
                        15:     elseif str_2 == 4 then
                        16:       str["规则"] = "新大师"
                        17:       end
                        18:   else
                        19:     str["规则"] = "大师2020"
                        20:     end
                        21:   str["Debug.ReloadFieldBegin"](str_1, str_2)
                        22:   end
                        23: 
                        24: fun["通关邀请"] = function()
                        25:   local effect_1
                        26:   effect_1 = Effect.GlobalEffect()
                        27:   effect_1:SetType(EFFECT_TYPE_FIELD
                        28:     + EFFECT_TYPE_CONTINUOUS)
                        29:   effect_1:SetCode(EVENT_DAMAGE)
                        30:   function cache_1()
                        31:     cache_1 = Duel.GetLP(1)
                        32:     if cache_1 <= 0 then
                        33:       cache_1 = true
                        34:     else
                        35:       cache_1 = false
                        36:       end
                        37:     return cache_1
                        38:     end
                        39:   effect_1:SetCondition(cache_1)
                        40:   function cache_1()
                        41:     Debug.ShowHint("残局群181175613")
                        42:     return
                        43:     end
                        44:   effect_1:SetOperation(cache_1)
                        45: 
                        46:   Duel.RegisterEffect(effect_1
                        47:     , 0)
                        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:   return false
                        62:   end
                        63: 
                        64: fun["开局说明"] = function()
                        65:   cache_1 = 0
                        66:   cache_1 = cache_1 + LOCATION_DECK
                        67:   cache_1 = cache_1 + LOCATION_HAND
                        68:   cache_1 = cache_1 + LOCATION_MZONE
                        69:   cache_1 = cache_1 + LOCATION_SZONE
                        70:   cache_1 = cache_1 + LOCATION_GRAVE
                        71:   cache_1 = cache_1 + LOCATION_REMOVED
                        72:   cache_1 = cache_1 + LOCATION_EXTRA
                        73:   cache_1 = cache_1 + LOCATION_OVERLAY
                        74: 
                        75:   str["这个残局的效果卡数量"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,cache_1,cache_1,nil)
                        76: 
                        77:   str["开局说明"] =""
                        78: 
                        79:   str["开局说明"] = str["开局说明"] .. str["这个残局的效果卡数量"]
                        80:   str["开局说明"] = str["开局说明"] .. " 卡"
                        81: 
                        82:   str["开局说明"] = str["开局说明"] .. " "
                        83: 
                        84:   str["开局说明"] = str["开局说明"] .. str["规则"]
                        85: 
                        86:   str["开局说明"] = str["开局说明"] .. " "
                        87: 
                        88:   if str["不洗牌"] == 0 then
                        89:   else
                        90:     str["开局说明"] = str["开局说明"] .. "伪洗牌"
                        91:     end
                        92: 
                        93:   Debug.ShowHint(str["开局说明"])
                        94:   end
                        95: 
                        96: _G["开局添加手卡"] = function(str_1)
                        97:   str["开局添加手卡"] = str_1
                        98:   effect_1 = Effect.GlobalEffect()
                        99:   effect_1:SetType(EFFECT_TYPE_FIELD
                       100:     + EFFECT_TYPE_CONTINUOUS)
                       101:   effect_1:SetCode(EVENT_ADJUST)
                       102:   effect_1:SetCountLimit(1)
                       103:   function cache_1()
                       104:     return true
                       105:     end
                       106:   effect_1:SetCondition(cache_1)
                       107:   function cache_1(effect_event
                       108:     , player_who_activate_the_effect)
                       109:     str["玩家选定的卡"] = Duel.SelectMatchingCard(player_who_activate_the_effect
                       110:        , Card.IsAbleToHand
                       111:        , player_who_activate_the_effect
                       112:        , LOCATION_DECK
                       113:        , 0
                       114:        , str_1
                       115:        , str_1
                       116:        , nil)
                       117:     Duel.SendtoHand(str["玩家选定的卡"]
                       118:       , nil
                       119:       , REASON_RULE)
                       120:     end
                       121:   effect_1:SetOperation(cache_1)
                       122:   Duel.RegisterEffect(effect_1
                       123:     , 0)
                       124:   end