游戏王残局简化版

Annotation For script/c0.lua
Login

Annotation For script/c0.lua

Lines of script/c0.lua from check-in 15b94d8040 that are changed by the sequence of edits moving toward check-in 36a332440b:

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