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