Lines of
script/c0.lua
from check-in 4e8f89ad97
that are changed by the sequence of edits moving toward
check-in d5d0e03305:
1: str = {}
2:
3: fun = {}
4:
5: str["Debug.ReloadFieldBegin"] = Debug.ReloadFieldBegin
6:
7: Debug.ReloadFieldBegin = function(str_1, str_2) --{
8: str["不洗牌"] = str_1 & DUEL_PSEUDO_SHUFFLE
9:
10: str["无BP"] = str_1 & DUEL_ATTACK_FIRST_TURN
11:
12: if str_2 then --{
13: if str_2 == 3 then --{
14: str["规则"] = "大师3 "
15: --}
16: elseif str_2 == 4 then --{
17: str["规则"] = "新大师 "
18: --}
19: elseif str_2 == 5 then --{
20: str["规则"] = "大师2020 "
21: --}
22: end --}
23: else --{
24: str["规则"] = "大师2020 "
25: end --}
26: str["Debug.ReloadFieldBegin"](str_1, str_2)
27: end --}
28: fun["通关邀请"] = function() --{
29: effect_1 = Effect.GlobalEffect()
30:
31: effect_1:SetType(EFFECT_TYPE_FIELD
32: + EFFECT_TYPE_CONTINUOUS)
33:
34: effect_1:SetCode(EVENT_DAMAGE)
35:
36: function cache_1() --{
37: cache_1 = Duel.GetLP(1)
38:
39: if cache_1 <= 0 then --{
40: if cache_1 < 0 then --{
41: Debug.ShowHint("QB:「你居然二解了,请加群告诉我怎么二解。」")
42: end --}
43: cache_1 = true
44: --}
45: else --{
46: cache_1 = false
47: end --}
48: return cache_1
49: end --}
50: effect_1:SetCondition(cache_1)
51:
52: function cache_1() --{
53: Debug.ShowHint("残局群181175613")
54: end --}
55: effect_1:SetOperation(cache_1)
56:
57: Duel.RegisterEffect(effect_1
58: , 0)
59: end --}
60: fun["是否效果卡"] = function(card) --{
61: cache_1 = Card.IsType(card, TYPE_SPELL)
62:
63: cache_2 = Card.IsType(card, TYPE_TRAP)
64:
65: cache_3 = Card.IsType(card, TYPE_EFFECT)
66:
67: if cache_1
68: or cache_2
69: or cache_3 then --{
70: return true
71: end --}
72: cache_1 = Card.IsType(card, TYPE_PENDULUM)
73:
74: if cache_1 then --{
75: cache_1 = Card.IsCode(card, 28363749)
76:
77: cache_2 = Card.IsCode(card, 19474136)
78:
79: cache_3 = Card.IsCode(card, 17390179)
80:
81: cache_4 = Card.IsCode(card, 83980492)
82:
83: if cache_1
84: or cache_2
85: or cache_3
86: or cache_4 then --{
87: --}
88: else --{
89: return true
90: end --}
91: end --}
92: return false
93: end --}
94:
95: fun["开局说明"] = function() --{
96: if str["开局说明吗"] == 1 then --{
97: return
98: --}
99: else --{
100: str["开局说明吗"] = 1
101: end --}
102: cache_1 = 0
103: cache_1 = cache_1 + LOCATION_DECK
104: cache_1 = cache_1 + LOCATION_HAND
105: cache_1 = cache_1 + LOCATION_MZONE
106: cache_1 = cache_1 + LOCATION_SZONE
107: cache_1 = cache_1 + LOCATION_GRAVE
108: cache_1 = cache_1 + LOCATION_REMOVED
109: cache_1 = cache_1 + LOCATION_EXTRA
110:
111: str["这个残局的效果卡数量"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,cache_1,cache_1,nil)
112:
113: cache_1 = Duel.GetOverlayGroup(0, LOCATION_MZONE, LOCATION_MZONE)
114:
115: for k in aux.Next(cache_1) do --{
116: cache_1 = fun["是否效果卡"](k)
117:
118: if cache_1 then --{
119: str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + 1
120: end --}
121: end --}
122: str["开局说明"] =""
123: str["开局说明"] = str["开局说明"] .. str["这个残局的效果卡数量"]
124: str["开局说明"] = str["开局说明"] .. "卡 "
125: str["开局说明"] = str["开局说明"] .. str["规则"]
126:
127: if str["不洗牌"] == 0 then --{
128: --}
129: else --{
130: str["开局说明"] = str["开局说明"] .. "伪洗牌 "
131: end --}
132: if str["无BP"] == 0 then --{
133: str["开局说明"] = str["开局说明"] .. "无BP "
134: end --}
135: if str["开局添加手卡"] then --{
136: str["开局说明"] = str["开局说明"] .. "选"
137: str["开局说明"] = str["开局说明"] .. str["开局添加手卡"]
138: str["开局说明"] = str["开局说明"] .. "卡 "
139: end --}
140: if str["禁格"] then --{
141: str["开局说明"] = str["开局说明"] .. "禁"
142: str["开局说明"] = str["开局说明"] .. str["禁格"]
143: str["开局说明"] = str["开局说明"] .. "格 "
144: end --}
145: if str["印卡"] then --{
146: str["开局说明"] = str["开局说明"] .. "印卡 "
147: end --}
148: Debug.ShowHint(str["开局说明"])
149:
150: fun["通关邀请"]()
151: end --}
152:
153: fun["开局添加手卡"] = function(str_1) --{
154: str["开局添加手卡"] = str_1
155:
156: effect_1 = Effect.GlobalEffect()
157:
158: effect_1:SetType(EFFECT_TYPE_FIELD
159: + EFFECT_TYPE_CONTINUOUS)
160:
161: effect_1:SetCode(EVENT_ADJUST)
162:
163: effect_1:SetCountLimit(1)
164:
165: function cache_1() --{
166: if str["已添加手卡"] == 1 then --{
167: return false
168: --}
169: else --{
170: str["已添加手卡"] = 1
171:
172: return true
173: end --}
174: end--}
175: effect_1:SetCondition(cache_1)
176:
177: function cache_1(effect_event
178: , player_who_activate_the_effect) --{
179: str["玩家选定的卡"] = Duel.SelectMatchingCard(player_who_activate_the_effect
180: , Card.IsAbleToHand
181: , player_who_activate_the_effect
182: , LOCATION_DECK
183: , 0
184: , str_1
185: , str_1
186: , nil)
187:
188: Duel.SendtoHand(str["玩家选定的卡"]
189: , nil
190: , REASON_RULE)
191: end --}
192: effect_1:SetOperation(cache_1)
193:
194: Duel.RegisterEffect(effect_1
195: , 0)
196:
197: fun["开局说明"]()
198: end --}
199:
200: fun["禁格"] = function(str_1) --{
201: str["禁格"] = str_1
202:
203: effect_1 = Effect.GlobalEffect()
204:
205: effect_1:SetType(EFFECT_TYPE_FIELD)
206:
207: effect_1:SetCode(EFFECT_USE_EXTRA_MZONE)
208:
209: effect_1:SetValue(str_1)
210:
211: Duel.RegisterEffect(effect_1,0)
212: end --}
213:
4e8f89ad97 2023-07-11 214: fun["印卡"] = function(str_1, str_2, str_3)
4e8f89ad97 2023-07-11 215: str["印卡"] = 1
4e8f89ad97 2023-07-11 216: if str_3 then
4e8f89ad97 2023-07-11 217: else
4e8f89ad97 2023-07-11 218: str_3 = str_2
4e8f89ad97 2023-07-11 219: end
4e8f89ad97 2023-07-11 220: str["当前印卡数"] = 1
4e8f89ad97 2023-07-11 221: effect_1 = Effect.CreateEffect(str_1)
4e8f89ad97 2023-07-11 222: effect_1:SetType(EFFECT_TYPE_IGNITION)
4e8f89ad97 2023-07-11 223: effect_1:SetProperty(EFFECT_FLAG_BOTH_SIDE
4e8f89ad97 2023-07-11 224: + EFFECT_FLAG_UNCOPYABLE
4e8f89ad97 2023-07-11 225: + EFFECT_FLAG_CANNOT_NEGATE
4e8f89ad97 2023-07-11 226: + EFFECT_FLAG_CANNOT_DISABLE)
4e8f89ad97 2023-07-11 227: cache_1 = function()
4e8f89ad97 2023-07-11 228: Duel.SetChainLimit(aux.FALSE)
4e8f89ad97 2023-07-11 229: return true
4e8f89ad97 2023-07-11 230: end
4e8f89ad97 2023-07-11 231: effect_1:SetTarget(cache_1)
4e8f89ad97 2023-07-11 232: effect_1:SetRange(LOCATION_EXTRA)
4e8f89ad97 2023-07-11 233: function print_hand(effect_event
4e8f89ad97 2023-07-11 234: , player_who_activate_the_effect)
4e8f89ad97 2023-07-11 235: announce_card = Duel.AnnounceCard(player_who_activate_the_effect)
4e8f89ad97 2023-07-11 236: card = Duel.CreateToken(player_who_activate_the_effect
4e8f89ad97 2023-07-11 237: , announce_card)
4e8f89ad97 2023-07-11 238: if str["当前印卡数"] <= str_2 then
4e8f89ad97 2023-07-11 239: str["当前印卡数"] = str["当前印卡数"] + 1
4e8f89ad97 2023-07-11 240: Duel.SendtoHand(card,nil,REASON_RULE)
4e8f89ad97 2023-07-11 241: else
4e8f89ad97 2023-07-11 242: if str["当前印卡数"] <= str_3 then
4e8f89ad97 2023-07-11 243: str["当前印卡数"] = str["当前印卡数"] + 1
4e8f89ad97 2023-07-11 244: Duel.Remove(card,POS_FACEUP,REASON_RULE)
4e8f89ad97 2023-07-11 245: Duel.SendtoDeck(card,player_who_activate_the_effect,0,REASON_RULE)
4e8f89ad97 2023-07-11 246: else
4e8f89ad97 2023-07-11 247: Debug.ShowHint("印卡过多!")
4e8f89ad97 2023-07-11 248: end
4e8f89ad97 2023-07-11 249: end
4e8f89ad97 2023-07-11 250: end
4e8f89ad97 2023-07-11 251: effect_1:SetOperation(print_hand)
4e8f89ad97 2023-07-11 252: str_1:RegisterEffect(effect_1)
4e8f89ad97 2023-07-11 253: end
4e8f89ad97 2023-07-11 254:
4e8f89ad97 2023-07-11 255: fun["全部回到卡组"] = function()
4e8f89ad97 2023-07-11 256: Debug.ShowHint("胜利条件:让对方的卡回到卡组。")
4e8f89ad97 2023-07-11 257:
4e8f89ad97 2023-07-11 258: effect_1 = Effect.GlobalEffect()
4e8f89ad97 2023-07-11 259:
4e8f89ad97 2023-07-11 260: effect_1:SetType(EFFECT_TYPE_FIELD
4e8f89ad97 2023-07-11 261: + EFFECT_TYPE_CONTINUOUS)
4e8f89ad97 2023-07-11 262:
4e8f89ad97 2023-07-11 263: effect_1:SetCode(EVENT_ADJUST)
4e8f89ad97 2023-07-11 264:
4e8f89ad97 2023-07-11 265: cache_1 = function()
4e8f89ad97 2023-07-11 266: cache_1 = 0
4e8f89ad97 2023-07-11 267: cache_1 = cache_1 + LOCATION_HAND
4e8f89ad97 2023-07-11 268: cache_1 = cache_1 + LOCATION_MZONE
4e8f89ad97 2023-07-11 269: cache_1 = cache_1 + LOCATION_SZONE
4e8f89ad97 2023-07-11 270: cache_1 = cache_1 + LOCATION_GRAVE
4e8f89ad97 2023-07-11 271: cache_1 = cache_1 + LOCATION_REMOVED
4e8f89ad97 2023-07-11 272:
4e8f89ad97 2023-07-11 273: cache_1 = Duel.GetFieldGroupCount(1,cache_1,0)
4e8f89ad97 2023-07-11 274:
4e8f89ad97 2023-07-11 275: if cache_1 == 0 then
4e8f89ad97 2023-07-11 276: return true
4e8f89ad97 2023-07-11 277: else
4e8f89ad97 2023-07-11 278: return false
4e8f89ad97 2023-07-11 279: end
4e8f89ad97 2023-07-11 280: end
4e8f89ad97 2023-07-11 281:
4e8f89ad97 2023-07-11 282: effect_1:SetCondition(cache_1)
4e8f89ad97 2023-07-11 283:
4e8f89ad97 2023-07-11 284: cache_1 = function()
4e8f89ad97 2023-07-11 285: Debug.ShowHint("目标已达成!")
4e8f89ad97 2023-07-11 286: Duel.SetLP(1,0)
4e8f89ad97 2023-07-11 287: end
4e8f89ad97 2023-07-11 288:
4e8f89ad97 2023-07-11 289: effect_1:SetOperation(cache_1)
4e8f89ad97 2023-07-11 290:
4e8f89ad97 2023-07-11 291: Duel.RegisterEffect(effect_1,0)
4e8f89ad97 2023-07-11 292: end
293:
294:
295: