Lines of
script/c0.lua
from check-in 8210af4dfb
that are changed by the sequence of edits moving toward
check-in 7592a88912:
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:
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: fun["通关邀请"] = function()
24: local effect_1
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: cache_1 = true
33: else
34: cache_1 = false
35: end
36: return cache_1
37: end
38: effect_1:SetCondition(cache_1)
39: function cache_1()
40: Debug.ShowHint("残局群181175613")
41: return
42: end
43: effect_1:SetOperation(cache_1)
44:
45: Duel.RegisterEffect(effect_1
46: , 0)
47: fun["开局说明"]()
48: end
49:
50: fun["是否效果卡"] = function(card)
51:
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:
56: if cache_1
57: or cache_2
58: or cache_3 then
59: return true
60: end
61: return false
62: end
63:
64: fun["开局说明"] = function()
65: cache_1 = 0
66: cache_1 = cache_1 + LOCATION_DECK
67: cache_1 = cache_1 + LOCATION_HAND
68: cache_1 = cache_1 + LOCATION_MZONE
69: cache_1 = cache_1 + LOCATION_SZONE
70: cache_1 = cache_1 + LOCATION_GRAVE
71: cache_1 = cache_1 + LOCATION_REMOVED
72: cache_1 = cache_1 + LOCATION_EXTRA
73:
74: str["这个残局的效果卡数量"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,cache_1,cache_1,nil)
75:
76: cache_1 = Duel.GetOverlayGroup(0, LOCATION_MZONE, LOCATION_MZONE)
77:
78: for k in aux.Next(cache_1) do
79: cache_1 = fun["是否效果卡"](k)
80: if cache_1 then
81: str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + 1
82: end
83: end
84:
85: str["开局说明"] =""
86:
87: str["开局说明"] = str["开局说明"] .. str["这个残局的效果卡数量"]
88: str["开局说明"] = str["开局说明"] .. "卡 "
89:
90: str["开局说明"] = str["开局说明"] .. str["规则"]
91:
92: if str["不洗牌"] == 0 then
93: else
94: str["开局说明"] = str["开局说明"] .. "伪洗牌 "
95: end
96:
97: if str["开局添加手卡"] then
98: str["开局说明"] = str["开局说明"] .. "选"
99: str["开局说明"] = str["开局说明"] .. str["开局添加手卡"]
100: str["开局说明"] = str["开局说明"] .. "卡 "
101: end
102:
103: Debug.ShowHint(str["开局说明"])
104: end
105:
106: fun["开局添加手卡"] = function(str_1)
107: str["开局添加手卡"] = str_1
108: effect_1 = Effect.GlobalEffect()
109: effect_1:SetType(EFFECT_TYPE_FIELD
110: + EFFECT_TYPE_CONTINUOUS)
111: effect_1:SetCode(EVENT_ADJUST)
112: effect_1:SetCountLimit(1)
113: function cache_1()
114: if str["已添加手卡"] == 1 then
115: return false
116: else
117: str["已添加手卡"] = 1
118: return true
119: end
120:
121: end
122: effect_1:SetCondition(cache_1)
123: function cache_1(effect_event
124: , player_who_activate_the_effect)
125:
126: str["玩家选定的卡"] = Duel.SelectMatchingCard(player_who_activate_the_effect
127: , Card.IsAbleToHand
128: , player_who_activate_the_effect
129: , LOCATION_DECK
130: , 0
131: , str_1
132: , str_1
133: , nil)
134: Duel.SendtoHand(str["玩家选定的卡"]
135: , nil
136: , REASON_RULE)
137: end
138: effect_1:SetOperation(cache_1)
139: Duel.RegisterEffect(effect_1
140: , 0)
141: fun["开局说明"]()
142: end