Lines of
script/c0.lua
from check-in 4b62d7ac4f
that are changed by the sequence of edits moving toward
check-in 13c0c971de:
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: str["无BP"] = str_1 & DUEL_ATTACK_FIRST_TURN
9:
10: if str_2 then
11: if str_2 == 3 then
12: str["规则"] = "大师3 "
13: elseif str_2 == 4 then
14: str["规则"] = "新大师 "
15: elseif str_2 == 5 then
16: str["规则"] = "大师2020 "
17: end
18: else
19: str["规则"] = "大师2020 "
20: end
21: str["Debug.ReloadFieldBegin"](str_1, str_2)
22: end
23:
24: fun["通关邀请"] = function(str_1, str_2)
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:
34: if cache_1 < 0 then
35: if str_2 then
36: Debug.ShowHint(str_2)
37: end
38: end
39:
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: end
56:
57: fun["是否效果卡"] = function(card)
58:
59: cache_1 = Card.IsType(card, TYPE_SPELL)
60: cache_2 = Card.IsType(card, TYPE_TRAP)
61: cache_3 = Card.IsType(card, TYPE_EFFECT)
62:
63: if cache_1
64: or cache_2
65: or cache_3 then
66: return true
67: end
68: cache_1 = Card.IsType(card, TYPE_PENDULUM)
69:
70: if cache_1 then
71: cache_1 = Card.IsCode(card, 28363749)
72: cache_2 = Card.IsCode(card, 19474136)
73: cache_3 = Card.IsCode(card, 17390179)
74: cache_4 = Card.IsCode(card, 83980492)
75: if cache_1
76: or cache_2
77: or cache_3
78: or cache_4 then
79: else
80: return true
81: end
82: end
83:
84: return false
85: end
86:
87: fun["开局说明"] = function()
88: if str["开局说明吗"] == 1 then
89: return
90: else
91: str["开局说明吗"] = 1
92: end
93:
94: cache_1 = 0
95: cache_1 = cache_1 + LOCATION_DECK
96: cache_1 = cache_1 + LOCATION_HAND
97: cache_1 = cache_1 + LOCATION_MZONE
98: cache_1 = cache_1 + LOCATION_SZONE
99: cache_1 = cache_1 + LOCATION_GRAVE
100: cache_1 = cache_1 + LOCATION_REMOVED
101: cache_1 = cache_1 + LOCATION_EXTRA
102:
103: str["这个残局的效果卡数量"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,cache_1,cache_1,nil)
104:
105: cache_1 = Duel.GetOverlayGroup(0, LOCATION_MZONE, LOCATION_MZONE)
106:
107: for k in aux.Next(cache_1) do
108: cache_1 = fun["是否效果卡"](k)
109: if cache_1 then
110: str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + 1
111: end
112: end
113:
114: str["开局说明"] =""
115:
116: str["开局说明"] = str["开局说明"] .. str["这个残局的效果卡数量"]
117: str["开局说明"] = str["开局说明"] .. "卡 "
118:
119: str["开局说明"] = str["开局说明"] .. str["规则"]
120:
121: if str["不洗牌"] == 0 then
122: else
123: str["开局说明"] = str["开局说明"] .. "伪洗牌 "
124: end
125: if str["无BP"] == 0 then
126: str["开局说明"] = str["开局说明"] .. "无BP "
127: end
128:
129: if str["开局添加手卡"] then
130: str["开局说明"] = str["开局说明"] .. "选"
131: str["开局说明"] = str["开局说明"] .. str["开局添加手卡"]
132: str["开局说明"] = str["开局说明"] .. "卡 "
133: end
134:
135: if str["禁格"] then
136: str["开局说明"] = str["开局说明"] .. "禁"
137: str["开局说明"] = str["开局说明"] .. str["禁格"]
138: str["开局说明"] = str["开局说明"] .. "格 "
139: end
140:
141: if str["印卡"] then
142: str["开局说明"] = str["开局说明"] .. "印卡 "
143: end
144:
145: Debug.ShowHint(str["开局说明"])
146: fun["通关邀请"]()
147: end
148:
149: fun["开局添加手卡"] = function(str_1)
150: str["开局添加手卡"] = str_1
151: effect_1 = Effect.GlobalEffect()
152: effect_1:SetType(EFFECT_TYPE_FIELD
153: + EFFECT_TYPE_CONTINUOUS)
154: effect_1:SetCode(EVENT_ADJUST)
155: effect_1:SetCountLimit(1)
156: function cache_1()
157: if str["已添加手卡"] == 1 then
158: return false
159: else
160: str["已添加手卡"] = 1
161: return true
162: end
163:
164: end
165: effect_1:SetCondition(cache_1)
166: function cache_1(effect_event
167: , player_who_activate_the_effect)
168:
169: str["玩家选定的卡"] = Duel.SelectMatchingCard(player_who_activate_the_effect
170: , Card.IsAbleToHand
171: , player_who_activate_the_effect
172: , LOCATION_DECK
173: , 0
174: , str_1
175: , str_1
176: , nil)
177: Duel.SendtoHand(str["玩家选定的卡"]
178: , nil
179: , REASON_RULE)
180: end
181: effect_1:SetOperation(cache_1)
182: Duel.RegisterEffect(effect_1
183: , 0)
184: fun["开局说明"]()
185: end
186:
187: fun["禁格"] = function(str_1)
188: str["禁格"] = str_1
189: effect_1 = Effect.GlobalEffect()
190: effect_1:SetType(EFFECT_TYPE_FIELD)
191: effect_1:SetCode(EFFECT_USE_EXTRA_MZONE)
192: effect_1:SetValue(str_1)
193: Duel.RegisterEffect(effect_1,0)
194: end
195:
196: fun["印卡"] = function(str_1, str_2, str_3)
197: str["印卡"] = 1
198:
199: if str_3 then
200: else
201: str_3 = str_2
202: end
203:
204: str["当前印卡数"] = 1
205:
206: effect_1 = Effect.CreateEffect(str_1)
207:
208: effect_1:SetType(EFFECT_TYPE_IGNITION)
209:
210: effect_1:SetProperty(EFFECT_FLAG_BOTH_SIDE
211: + EFFECT_FLAG_UNCOPYABLE
212: + EFFECT_FLAG_CANNOT_NEGATE
213: + EFFECT_FLAG_CANNOT_DISABLE)
214:
215:
216: cache_1 = function()
217: Duel.SetChainLimit(aux.FALSE)
218: return true
219: end
220:
221: effect_1:SetTarget(cache_1)
222:
223: effect_1:SetRange(LOCATION_EXTRA)
224:
225: function print_hand(effect_event
226: , player_who_activate_the_effect)
227: announce_card = Duel.AnnounceCard(player_who_activate_the_effect)
228: card = Duel.CreateToken(player_who_activate_the_effect
229: , announce_card)
230: if str["当前印卡数"] <= str_2 then
231: str["当前印卡数"] = str["当前印卡数"] + 1
232: Duel.SendtoHand(card,nil,REASON_RULE)
233: else
234: if str["当前印卡数"] <= str_3 then
235: str["当前印卡数"] = str["当前印卡数"] + 1
236: Duel.Remove(card,POS_FACEUP,REASON_RULE)
237: Duel.SendtoDeck(card,player_who_activate_the_effect,0,REASON_RULE)
238: else
239: Debug.ShowHint("印卡过多!")
240: end
241:
242: end
243: end
244: effect_1:SetOperation(print_hand)
245: str_1:RegisterEffect(effect_1)
246: end
247:
248:
249: --~ fun["QB"] = function(str_1)
250: --~ effect_1 = Effect.GlobalEffect()
251: --~ effect_1:SetType(EFFECT_TYPE_FIELD
252: --~ + EFFECT_TYPE_CONTINUOUS)
253: --~ effect_1:SetCode(EVENT_ADJUST)
254: --~ effect_1:SetCountLimit(1)
255: --~ function cache_1()
256: --~ if str["已添加手卡"] == 1 then
257: --~ return false
258: --~ else
259: --~ str["已添加手卡"] = 1
260: --~ return true
261: --~ end
262:
263: --~ end
264: --~ effect_1:SetCondition(cache_1)
265: --~ announce_card = Duel.AnnounceCard(0)
266: --~ card = Duel.CreateToken(0
267: --~ , announce_card)
268: --~ end