Lines of
script/c0.lua
from check-in 119a4b6cdb
that are changed by the sequence of edits moving toward
check-in ad50e1ee46:
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:
129: fun["开局添加手卡"] = function(str_1)
130: str["开局添加手卡"] = str_1
131: effect_1 = Effect.GlobalEffect()
132: effect_1:SetType(EFFECT_TYPE_FIELD
133: + EFFECT_TYPE_CONTINUOUS)
134: effect_1:SetCode(EVENT_ADJUST)
135: effect_1:SetCountLimit(1)
136: function cache_1()
137: if str["已添加手卡"] == 1 then
138: return false
139: else
140: str["已添加手卡"] = 1
141: return true
142: end
143: end
144: effect_1:SetCondition(cache_1)
145: function cache_1(effect_event
146: , player_who_activate_the_effect)
147: str["玩家选定的卡"] = Duel.SelectMatchingCard(player_who_activate_the_effect
148: , Card.IsAbleToHand
149: , player_who_activate_the_effect
150: , LOCATION_DECK
151: , 0
152: , str_1
153: , str_1
154: , nil)
155: Duel.SendtoHand(str["玩家选定的卡"]
156: , nil
157: , REASON_RULE)
158: end
159: effect_1:SetOperation(cache_1)
160: Duel.RegisterEffect(effect_1
161: , 0)
162: fun["开局说明"]()
163: end
164:
165: fun["禁格"] = function(str_1)
166: str["禁格"] = str_1
167: effect_1 = Effect.GlobalEffect()
168: effect_1:SetType(EFFECT_TYPE_FIELD)
169: effect_1:SetCode(EFFECT_USE_EXTRA_MZONE)
170: effect_1:SetValue(str_1)
171: Duel.RegisterEffect(effect_1,0)
172: end
173:
174:
175: fun["印卡"] = function(str_1, str_2, str_3)
176: str["印卡"] = 1
177: if str_3 then
178: else
179: str_3 = str_2
180: end
181: str["当前印卡数"] = 1
182: effect_1 = Effect.CreateEffect(str_1)
183: effect_1:SetType(EFFECT_TYPE_IGNITION)
184: effect_1:SetProperty(EFFECT_FLAG_BOTH_SIDE
185: + EFFECT_FLAG_UNCOPYABLE
186: + EFFECT_FLAG_CANNOT_NEGATE
187: + EFFECT_FLAG_CANNOT_DISABLE)
188: cache_1 = function()
189: Duel.SetChainLimit(aux.FALSE)
190: return true
191: end
192: effect_1:SetTarget(cache_1)
193: effect_1:SetRange(LOCATION_EXTRA)
194: function print_hand(effect_event
195: , player_who_activate_the_effect)
196: announce_card = Duel.AnnounceCard(player_who_activate_the_effect)
197: card = Duel.CreateToken(player_who_activate_the_effect
198: , announce_card)
199: if str["当前印卡数"] <= str_2 then
200: str["当前印卡数"] = str["当前印卡数"] + 1
201: Duel.SendtoHand(card,nil,REASON_RULE)
202: else
203: if str["当前印卡数"] <= str_3 then
204: str["当前印卡数"] = str["当前印卡数"] + 1
205: Duel.Remove(card,POS_FACEUP,REASON_RULE)
206: Duel.SendtoDeck(card,player_who_activate_the_effect,0,REASON_RULE)
207: else
208: Debug.ShowHint("印卡过多!")
209: end
210: end
211: end
212: effect_1:SetOperation(print_hand)
213: str_1:RegisterEffect(effect_1)
214: end