Lines of
script/c0.lua
from check-in b85035be52
that are changed by the sequence of edits moving toward
check-in 68993756c2:
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: if str_2 then
10: if str_2 == 3 then
11: str["规则"] = "大师3 "
12: elseif str_2 == 4 then
13: str["规则"] = "新大师 "
14: elseif str_2 == 5 then
15: str["规则"] = "大师2020 "
16: end
17: else
18: str["规则"] = "大师2020 "
19: end
20: str["Debug.ReloadFieldBegin"](str_1, str_2)
21: end
22:
23:
24: fun["通关邀请"] = function()
25: effect_1 = Effect.GlobalEffect()
26: effect_1:SetType(EFFECT_TYPE_FIELD
27: + EFFECT_TYPE_CONTINUOUS)
28: effect_1:SetCode(EVENT_DAMAGE)
29: function cache_1()
30: cache_1 = Duel.GetLP(1)
31: if cache_1 <= 0 then
32: if cache_1 < 0 then
33: Debug.ShowHint("QB:「你居然二解了,请加群告诉我怎么二解。」")
34: end
35: cache_1 = true
36: else
37: cache_1 = false
38: end
39: return cache_1
40: end
41: effect_1:SetCondition(cache_1)
42: function cache_1()
43: Debug.ShowHint("残局群181175613")
44: return
45: end
46: effect_1:SetOperation(cache_1)
47: Duel.RegisterEffect(effect_1
48: , 0)
49: end
50:
51: fun["是否效果卡"] = function(card)
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: if cache_1
56: or cache_2
57: or cache_3 then
58: return true
59: end
60: cache_1 = Card.IsType(card, TYPE_PENDULUM)
61: if cache_1 then
62: cache_1 = Card.IsCode(card, 28363749)
63: cache_2 = Card.IsCode(card, 19474136)
64: cache_3 = Card.IsCode(card, 17390179)
65: cache_4 = Card.IsCode(card, 83980492)
66: if cache_1
67: or cache_2
68: or cache_3
69: or cache_4 then
70: else
71: return true
72: end
73: end
74: return false
75: end
76:
77:
78: fun["开局说明"] = function()
79: if str["开局说明吗"] == 1 then
80: return
81: else
82: str["开局说明吗"] = 1
83: end
84: cache_1 = 0
85: cache_1 = cache_1 + LOCATION_DECK
86: cache_1 = cache_1 + LOCATION_HAND
87: cache_1 = cache_1 + LOCATION_MZONE
88: cache_1 = cache_1 + LOCATION_SZONE
89: cache_1 = cache_1 + LOCATION_GRAVE
90: cache_1 = cache_1 + LOCATION_REMOVED
91: cache_1 = cache_1 + LOCATION_EXTRA
92: str["这个残局的效果卡数量"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,cache_1,cache_1,nil)
93: cache_1 = Duel.GetOverlayGroup(0, LOCATION_MZONE, LOCATION_MZONE)
94: for k in aux.Next(cache_1) do
95: cache_1 = fun["是否效果卡"](k)
96: if cache_1 then
97: str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + 1
98: end
99: end
100: str["开局说明"] =""
101: str["开局说明"] = str["开局说明"] .. str["这个残局的效果卡数量"]
102: str["开局说明"] = str["开局说明"] .. "卡 "
103: str["开局说明"] = str["开局说明"] .. str["规则"]
104: if str["不洗牌"] == 0 then
105: else
106: str["开局说明"] = str["开局说明"] .. "伪洗牌 "
107: end
108: if str["无BP"] == 0 then
109: str["开局说明"] = str["开局说明"] .. "无BP "
110: end
111: if str["开局添加手卡"] then
112: str["开局说明"] = str["开局说明"] .. "选"
113: str["开局说明"] = str["开局说明"] .. str["开局添加手卡"]
114: str["开局说明"] = str["开局说明"] .. "卡 "
115: end
116: if str["禁格"] then
117: str["开局说明"] = str["开局说明"] .. "禁"
118: str["开局说明"] = str["开局说明"] .. str["禁格"]
119: str["开局说明"] = str["开局说明"] .. "格 "
120: end
121: if str["印卡"] then
122: str["开局说明"] = str["开局说明"] .. "印卡 "
123: end
124: Debug.ShowHint(str["开局说明"])
125: fun["通关邀请"]()
126: end
127:
128: fun["开局添加手卡"] = function(str_1)
129: str["开局添加手卡"] = str_1
130: effect_1 = Effect.GlobalEffect()
131: effect_1:SetType(EFFECT_TYPE_FIELD
132: + EFFECT_TYPE_CONTINUOUS)
133: effect_1:SetCode(EVENT_ADJUST)
134: effect_1:SetCountLimit(1)
135: function cache_1()
136: if str["已添加手卡"] == 1 then
137: return false
138: else
139: str["已添加手卡"] = 1
140: return true
141: end
b85035be52 2023-07-09 142:
143: end
144: effect_1:SetCondition(cache_1)
145: function cache_1(effect_event
146: , player_who_activate_the_effect)
b85035be52 2023-07-09 147:
148: str["玩家选定的卡"] = Duel.SelectMatchingCard(player_who_activate_the_effect
149: , Card.IsAbleToHand
150: , player_who_activate_the_effect
151: , LOCATION_DECK
152: , 0
153: , str_1
154: , str_1
155: , nil)
156: Duel.SendtoHand(str["玩家选定的卡"]
157: , nil
158: , REASON_RULE)
159: end
160: effect_1:SetOperation(cache_1)
161: Duel.RegisterEffect(effect_1
162: , 0)
163: fun["开局说明"]()
164: end
165:
166: fun["禁格"] = function(str_1)
167: str["禁格"] = str_1
168: effect_1 = Effect.GlobalEffect()
169: effect_1:SetType(EFFECT_TYPE_FIELD)
170: effect_1:SetCode(EFFECT_USE_EXTRA_MZONE)
171: effect_1:SetValue(str_1)
172: Duel.RegisterEffect(effect_1,0)
173: end
174:
175: fun["印卡"] = function(str_1, str_2, str_3)
176: str["印卡"] = 1
177:
178: if str_3 then
179: else
180: str_3 = str_2
181: end
182:
183: str["当前印卡数"] = 1
184:
185: effect_1 = Effect.CreateEffect(str_1)
186:
187: effect_1:SetType(EFFECT_TYPE_IGNITION)
188:
189: effect_1:SetProperty(EFFECT_FLAG_BOTH_SIDE
190: + EFFECT_FLAG_UNCOPYABLE
191: + EFFECT_FLAG_CANNOT_NEGATE
192: + EFFECT_FLAG_CANNOT_DISABLE)
193:
194:
195: cache_1 = function()
196: Duel.SetChainLimit(aux.FALSE)
197: return true
198: end
199:
200: effect_1:SetTarget(cache_1)
201:
202: effect_1:SetRange(LOCATION_EXTRA)
203:
204: function print_hand(effect_event
205: , player_who_activate_the_effect)
206: announce_card = Duel.AnnounceCard(player_who_activate_the_effect)
207: card = Duel.CreateToken(player_who_activate_the_effect
208: , announce_card)
209: if str["当前印卡数"] <= str_2 then
210: str["当前印卡数"] = str["当前印卡数"] + 1
211: Duel.SendtoHand(card,nil,REASON_RULE)
212: else
213: if str["当前印卡数"] <= str_3 then
214: str["当前印卡数"] = str["当前印卡数"] + 1
215: Duel.Remove(card,POS_FACEUP,REASON_RULE)
216: Duel.SendtoDeck(card,player_who_activate_the_effect,0,REASON_RULE)
217: else
218: Debug.ShowHint("印卡过多!")
219: end
220:
221: end
222: end
223: effect_1:SetOperation(print_hand)
224: str_1:RegisterEffect(effect_1)
225: end