Lines of
script/c0.lua
from check-in 34fc7277c8
that are changed by the sequence of edits moving toward
check-in 4fcb88f615:
1: local str = {}
2: local fun = {}
3:
4: local cache_1
5: local cache_2
6: local cache_3
7:
8:
9:
10: _G["通关邀请"] = function()
11: local effect_1
12: effect_1 = Effect.GlobalEffect()
13: effect_1:SetType(EFFECT_TYPE_FIELD
14: + EFFECT_TYPE_CONTINUOUS)
15: effect_1:SetCode(EVENT_DAMAGE)
16: function cache_1()
17: cache_1 = Duel.GetLP(1)
18: if cache_1 <= 0 then
19: cache_1 = true
20: else
21: cache_1 = false
22: end
23: return cache_1
24: end
25: effect_1:SetCondition(cache_1)
26: function cache_1()
27: Debug.ShowHint("残局群181175613")
28: return
29: end
30: effect_1:SetOperation(cache_1)
31:
32: Duel.RegisterEffect(effect_1
33: , 0)
34: end
35:
36: fun["是否效果卡"] = function(card)
37: local cache_1
38: local cache_2
39: local cache_3
40:
41: cache_1 = Card.IsType(card, TYPE_SPELL)
42: cache_2 = Card.IsType(card, TYPE_TRAP)
43: cache_3 = Card.IsType(card, TYPE_EFFECT)
44:
45: if cache_1
46: or cache_2
47: or cache_3 then
48: return true
49: end
50: return false
51: end
52:
53: _G["开局说明"] = function()
54: str["我方卡组"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,LOCATION_DECK,0,nil)
55: str["我方墓地"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,LOCATION_GRAVE,0,nil)
56: str["我方怪兽区"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,LOCATION_MZONE,0,nil)
57: str["我方手卡"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,LOCATION_HAND,0,nil)
58: str["我方灵摆区"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,LOCATION_PZONE,0,nil)
59: str["我方除外区"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,LOCATION_REMOVED,0,nil)
60: str["我方额外卡组"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,LOCATION_EXTRA,0,nil)
61: str["我方魔陷区"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,LOCATION_SZONE,0,nil)
62:
63:
64: --~ Debug.ShowHint(Duel.GetMatchingGroupCount(fun["是否效果卡"],0,LOCATION_GRAVE,0,nil))
65:
66: --~ local cache_1 = {}
67:
68: --~ cache_2 = Duel.GetFieldGroup(0,LOCATION_DECK,0)
69: --~ cache_1:insert(cache_2)
70: --~ cache_2 = Duel.GetFieldGroup(0,LOCATION_GRAVE,0)
71: --~ cache_1:insert(cache_2)
72: --~ cache_2 = Duel.GetFieldGroup(0,LOCATION_MZONE,0)
73: --~ cache_1:insert(cache_2)
74: --~ cache_2 = Duel.GetFieldGroup(0,LOCATION_HAND,0)
75: --~ cache_1:insert(cache_2)
76: --~ cache_2 = Duel.GetFieldGroup(0,LOCATION_PZONE,0)
77: --~ cache_1:insert(cache_2)
78: --~ cache_2 = Duel.GetFieldGroup(0,LOCATION_REMOVED,0)
79: --~ cache_1:insert(cache_2)
80: --~ cache_2 = Duel.GetFieldGroup(0,LOCATION_EXTRA,0)
81: --~ cache_1:insert(cache_2)
82: --~ cache_2 = Duel.GetFieldGroup(0,LOCATION_SZONE,0)
83: --~ cache_1:insert(cache_2)
84:
85: --~ cache_2 = Duel.GetFieldGroup(0,0,LOCATION_DECK)
86: --~ cache_1:insert(cache_2)
87: --~ cache_2 = Duel.GetFieldGroup(0,0,LOCATION_GRAVE)
88: --~ cache_1:insert(cache_2)
89: --~ cache_2 = Duel.GetFieldGroup(0,0,LOCATION_MZONE)
90: --~ cache_1:insert(cache_2)
91: --~ cache_2 = Duel.GetFieldGroup(0,0,LOCATION_HAND)
92: --~ cache_1:insert(cache_2)
93: --~ cache_2 = Duel.GetFieldGroup(0,0,LOCATION_PZONE)
94: --~ cache_1:insert(cache_2)
95: --~ cache_2 = Duel.GetFieldGroup(0,0,LOCATION_REMOVED)
96: --~ cache_1:insert(cache_2)
97: --~ cache_2 = Duel.GetFieldGroup(0,0,LOCATION_EXTRA)
98: --~ cache_1:insert(cache_2)
99: --~ cache_2 = Duel.GetFieldGroup(0,0,LOCATION_SZONE)
100: --~ cache_1:insert(cache_2)
101:
102: --~ cache_2 = Duel.GetOverlayGroup(0,LOCATION_MZONE,0)
103: --~ cache_1:insert(cache_2)
104: --~ cache_2 = Duel.GetOverlayGroup(0,0,LOCATION_SZONE)
105: --~ cache_1:insert(cache_2)
106:
107: --~ for i=1, #cache_1 do
108: --~ end
109:
110:
111: str["这个残局的效果卡数量"] = 0
112:
113: --~ str["我方卡组"] = Duel.GetFieldGroupCount(0,LOCATION_DECK,0)
114: --~ str["我方墓地"] = Duel.GetFieldGroupCount(0,LOCATION_GRAVE,0)
115: --~ str["我方怪兽区"] = Duel.GetFieldGroupCount(0,LOCATION_MZONE,0)
116: --~ str["我方手卡"] = Duel.GetFieldGroupCount(0,LOCATION_HAND,0)
117: --~ str["我方灵摆区"] = Duel.GetFieldGroupCount(0,LOCATION_PZONE,0)
118: --~ str["我方除外区"] = Duel.GetFieldGroupCount(0,LOCATION_REMOVED,0)
119: --~ str["我方额外卡组"] = Duel.GetFieldGroupCount(0,LOCATION_EXTRA,0)
120: --~ str["我方魔陷区"] = Duel.GetFieldGroupCount(0,LOCATION_SZONE,0)
121:
122: --~ str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["我方卡组"]
123: --~ str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["我方墓地"]
124: --~ str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["我方怪兽区"]
125: --~ str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["我方手卡"]
126: --~ str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["我方灵摆区"]
127: --~ str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["我方除外区"]
128: --~ str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["我方额外卡组"]
129: --~ str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["我方魔陷区"]
130:
131: --~ str["对方卡组"] = Duel.GetFieldGroupCount(0,0,LOCATION_DECK)
132: --~ str["对方墓地"] = Duel.GetFieldGroupCount(0,0,LOCATION_GRAVE)
133: --~ str["对方怪兽区"] = Duel.GetFieldGroupCount(0,0,LOCATION_MZONE)
134: --~ str["对方手卡"] = Duel.GetFieldGroupCount(0,0,LOCATION_HAND)
135: --~ str["对方灵摆区"] = Duel.GetFieldGroupCount(0,0,LOCATION_PZONE)
136: --~ str["对方除外区"] = Duel.GetFieldGroupCount(0,0,LOCATION_REMOVED)
137: --~ str["对方额外卡组"] = Duel.GetFieldGroupCount(0,0,LOCATION_EXTRA)
138: --~ str["对方魔陷区"] = Duel.GetFieldGroupCount(0,0,LOCATION_SZONE)
139:
140: --~ str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["对方卡组"]
141: --~ str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["对方墓地"]
142: --~ str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["对方怪兽区"]
143: --~ str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["对方手卡"]
144: --~ str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["对方灵摆区"]
145: --~ str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["对方除外区"]
146: --~ str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["对方额外卡组"]
147: --~ str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["对方魔陷区"]
148:
149: --~ str["我方超量素材"] = Duel.GetOverlayCount(0, LOCATION_MZONE, 0)
150: --~ str["对方超量素材"] = Duel.GetOverlayCount(0, 0, LOCATION_MZONE)
151:
152: --~ str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["我方超量素材"]
153: --~ str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["对方超量素材"]
154:
155: --~ Debug.ShowHint(str["这个残局的效果卡数量"])
156: end
157:
158: