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