Lines of
script/c0.lua
from check-in 4fcb88f615
that are changed by the sequence of edits moving toward
check-in fd8338a5a1:
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: str["我方超量素材"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,LOCATION_OVERLAY,0,nil)
63:
64:
65: --~ Debug.ShowHint(Duel.GetMatchingGroupCount(fun["是否效果卡"],0,LOCATION_GRAVE,0,nil))
66:
67: --~ local cache_1 = {}
68:
69: --~ cache_2 = Duel.GetFieldGroup(0,LOCATION_DECK,0)
70: --~ cache_1:insert(cache_2)
71: --~ cache_2 = Duel.GetFieldGroup(0,LOCATION_GRAVE,0)
72: --~ cache_1:insert(cache_2)
73: --~ cache_2 = Duel.GetFieldGroup(0,LOCATION_MZONE,0)
74: --~ cache_1:insert(cache_2)
75: --~ cache_2 = Duel.GetFieldGroup(0,LOCATION_HAND,0)
76: --~ cache_1:insert(cache_2)
77: --~ cache_2 = Duel.GetFieldGroup(0,LOCATION_PZONE,0)
78: --~ cache_1:insert(cache_2)
79: --~ cache_2 = Duel.GetFieldGroup(0,LOCATION_REMOVED,0)
80: --~ cache_1:insert(cache_2)
81: --~ cache_2 = Duel.GetFieldGroup(0,LOCATION_EXTRA,0)
82: --~ cache_1:insert(cache_2)
83: --~ cache_2 = Duel.GetFieldGroup(0,LOCATION_SZONE,0)
84: --~ cache_1:insert(cache_2)
85:
86: --~ cache_2 = Duel.GetFieldGroup(0,0,LOCATION_DECK)
87: --~ cache_1:insert(cache_2)
88: --~ cache_2 = Duel.GetFieldGroup(0,0,LOCATION_GRAVE)
89: --~ cache_1:insert(cache_2)
90: --~ cache_2 = Duel.GetFieldGroup(0,0,LOCATION_MZONE)
91: --~ cache_1:insert(cache_2)
92: --~ cache_2 = Duel.GetFieldGroup(0,0,LOCATION_HAND)
93: --~ cache_1:insert(cache_2)
94: --~ cache_2 = Duel.GetFieldGroup(0,0,LOCATION_PZONE)
95: --~ cache_1:insert(cache_2)
96: --~ cache_2 = Duel.GetFieldGroup(0,0,LOCATION_REMOVED)
97: --~ cache_1:insert(cache_2)
98: --~ cache_2 = Duel.GetFieldGroup(0,0,LOCATION_EXTRA)
99: --~ cache_1:insert(cache_2)
100: --~ cache_2 = Duel.GetFieldGroup(0,0,LOCATION_SZONE)
101: --~ cache_1:insert(cache_2)
102:
103: --~ cache_2 = Duel.GetOverlayGroup(0,LOCATION_MZONE,0)
104: --~ cache_1:insert(cache_2)
105: --~ cache_2 = Duel.GetOverlayGroup(0,0,LOCATION_SZONE)
106: --~ cache_1:insert(cache_2)
107:
108: --~ for i=1, #cache_1 do
109: --~ end
110:
111:
112: str["这个残局的效果卡数量"] = 0
113:
114: --~ str["我方卡组"] = Duel.GetFieldGroupCount(0,LOCATION_DECK,0)
115: --~ str["我方墓地"] = Duel.GetFieldGroupCount(0,LOCATION_GRAVE,0)
116: --~ str["我方怪兽区"] = Duel.GetFieldGroupCount(0,LOCATION_MZONE,0)
117: --~ str["我方手卡"] = Duel.GetFieldGroupCount(0,LOCATION_HAND,0)
118: --~ str["我方灵摆区"] = Duel.GetFieldGroupCount(0,LOCATION_PZONE,0)
119: --~ str["我方除外区"] = Duel.GetFieldGroupCount(0,LOCATION_REMOVED,0)
120: --~ str["我方额外卡组"] = Duel.GetFieldGroupCount(0,LOCATION_EXTRA,0)
121: --~ str["我方魔陷区"] = Duel.GetFieldGroupCount(0,LOCATION_SZONE,0)
122:
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: --~ str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["我方魔陷区"]
131:
132: --~ str["对方卡组"] = Duel.GetFieldGroupCount(0,0,LOCATION_DECK)
133: --~ str["对方墓地"] = Duel.GetFieldGroupCount(0,0,LOCATION_GRAVE)
134: --~ str["对方怪兽区"] = Duel.GetFieldGroupCount(0,0,LOCATION_MZONE)
135: --~ str["对方手卡"] = Duel.GetFieldGroupCount(0,0,LOCATION_HAND)
136: --~ str["对方灵摆区"] = Duel.GetFieldGroupCount(0,0,LOCATION_PZONE)
137: --~ str["对方除外区"] = Duel.GetFieldGroupCount(0,0,LOCATION_REMOVED)
138: --~ str["对方额外卡组"] = Duel.GetFieldGroupCount(0,0,LOCATION_EXTRA)
139: --~ str["对方魔陷区"] = Duel.GetFieldGroupCount(0,0,LOCATION_SZONE)
140:
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: --~ str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["对方魔陷区"]
149:
150: --~ str["我方超量素材"] = Duel.GetOverlayCount(0, LOCATION_MZONE, 0)
151: --~ str["对方超量素材"] = Duel.GetOverlayCount(0, 0, LOCATION_MZONE)
152:
153: --~ str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["我方超量素材"]
154: --~ str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["对方超量素材"]
155:
156: --~ Debug.ShowHint(str["这个残局的效果卡数量"])
157: end
158:
159: