Commit e02302d8 authored by REIKAI's avatar REIKAI 💬

update bug

parent ca8dc862
Pipeline #17230 passed with stages
in 23 minutes and 26 seconds
......@@ -270,7 +270,7 @@ Scl.Effect_Type_List = {
Scl.Summon_Type_List = {
["SpecialSummon"] = SUMMON_TYPE_SPECIAL,
["AdvanceSummon"] = SUMMON_TYPE_ADVANCE,
["TributeSummon"] = SUMMON_TYPE_ADVANCE,
["RitualSummon"] = SUMMON_TYPE_RITUAL,
["FusionSummon"] = SUMMON_TYPE_FUSION,
["SynchroSummon"] = SUMMON_TYPE_SYNCHRO,
......@@ -475,7 +475,7 @@ function s.create_category_list()
["Draw"] = { "Draw", CATEGORY_DRAW, 0, { 4732017, 0 }, { 3679218, 1 }, { s.draw_special, 2, sg, r } },
["Damage"] = { "Inflict/take Damage", CATEGORY_DAMAGE, 0, { 3775068, 0 }, { 12541409, 1 } },
["GainLP"] = { "Gain LP", CATEGORY_RECOVER, 0, { 16259549, 0 }, { 54527349, 0 } },
["NormalSummon"] = { "Normal Summon", CATEGORY_SUMMON, HINTMSG_SUMMON, { 65247798, 0 }, { 41139112, 0 }, { s.summon, 6, sg, tp, false, nil } },
["NormalSummon"] = { "Normal Summon", CATEGORY_SUMMON, HINTMSG_SUMMON, { 65247798, 0 }, { 41139112, 0 }, { s.normal_summon, 6, sg, tp, true, nil } },
["Token"] = { "Token", CATEGORY_TOKEN, 0, { 9929398, 0 }, { 2625939, 0 } },
["SpecialSummon"] = { "Special Summon", CATEGORY_SPECIAL_SUMMON, HINTMSG_SPSUMMON, { 74892653, 2 }, { 17535764, 1 }, { Scl.SpecialSummon, 10, sg, 0, tp, tp, false, false, POS_FACEUP } },
["SpecialSummonInFaceupDefensePosition"] = { "Special summon in defense position", CATEGORY_SPECIAL_SUMMON, HINTMSG_SPSUMMON, { 74892653, 2 }, { 17535764, 1 }, { Scl.SpecialSummon, 10, sg, 0, tp, tp, false, false, POS_FACEUP_DEFENSE } },
......@@ -2736,14 +2736,18 @@ end
--Normal summon sum_card, same as Duel.Summon, but switch the sequences of the parama "sum_pl" and "sum_card"
--//return summon count, summon group, first summon card
function s.summon(sum_card, sum_pl, ignore_ct, sum_eff, min_tri_ct, zone)
function s.normal_summon(sum_card, sum_pl, ignore_ct, sum_eff, min_tri_ct, zone)
local g = Scl.Mix2Group(sum_card)
local tc = g:GetFirst()
if Scl.Operate_Check == 0 then
return tc:IsSummonable(ignore_ct, sum_eff, min_tri_ct, zone)
end
local res = tc:IsSummonable(ignore_ct, sum_eff, min_tri_ct, zone)
if zone then
Duel.Summon(sum_pl, tc, ignore_ct, sum_eff, min_tri_ct, zone)
else
Duel.Summon(sum_pl, tc, ignore_ct, sum_eff, min_tri_ct)
end
return res and 1 or 0, res and Group.CreateGroup() or g, res and tc or nil
end
--Check if tp is affected by "Blue - Eyes Spirit Dragon" (cannot summon 2+ the same time)
......@@ -3607,13 +3611,14 @@ function s.operate_selected_objects(sel_obj, ctgy_str, reason, chk, e, tp, eg, e
return 0, Group.CreateGroup()
end
local para_len = 0
local str_arr = { "solve_parama", "activate_player", "activate_effect", "reason" }
if op_arr then
op_fun = op_arr[1]
para_len = op_arr[2]
local val, val2
for idx = 3, para_len + 2 do
val = op_arr[idx]
if type(val) == "string" then
if type(val) == "string" and Scl.IsArrayContains_Single(str_arr, val) then
if val == "solve_parama" then
val2 = sel_obj
elseif val == "activate_player" then
......@@ -6580,8 +6585,12 @@ function Scl.CloneArray(arr)
return { }
end
for idx, elm in pairs(arr) do
if type(elm) == "table" then
arr2[idx] = Scl.CloneArray(elm)
else
arr2[idx] = elm
end
end
return arr2
end
--Mix 2+ arrays in to a new array.
......
......@@ -1391,7 +1391,7 @@ function rssf.CheckTokenSummonable(e, tp, tk_code_or_fun, sum_pos, tg_p, sum_zon
local tk_code, tk_set, tk_type, tk_atk, tk_def, tk_lv, tk_race, tk_att, sum_pos2, sp, sum_type
if type(tk_code_or_fun) == "number" then
if not rstg.tk_list[tk_code_or_fun] then
local ge1 = rsef.FC_Global(0, EVENT_ADJUST, tk_code_or_fun, nil, rsop.token_reg(tk_code_or_fun))
local ge1 = rsef.FC_Global(0, EVENT_ADJUST, tk_code_or_fun, nil, rsop.AddTokenList_Op(tk_code_or_fun))
Duel.RaiseEvent(c,EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
end
tk = rstg.tk_list[tk_code_or_fun][tp]
......
......@@ -74,6 +74,7 @@ rsrst.ret = RESET_EVENT + RESETS_REDIRECT
--Code Variable
rscode.Attach_Effect = m + 100 --"Attach Effect"
rscode.Attach_Effect_2 = m + 101
rscode.Phase_Leave_Flag = m + 200 --"Summon Flag for SummonBuff"
rscode.Extra_Synchro_Material = m + 300 --"Extra Synchro Material"
......@@ -87,6 +88,8 @@ rscode.Summon_Count_Limit = m + 201 --"for rsop.SetSpecialSummonCount"
rscode.Set = m + 800 --"EVENT_SET"
--Hint Message Variable
rshint.nohint = false
......@@ -109,6 +112,8 @@ rshint.scl_exproc = aux.Stringid(m,12) -- "special extra monster spsummon proc"
rshint.attach_card = aux.Stringid(m, 8)
rshint.attach_effect = aux.Stringid(m, 9)
rshint.copy = aux.Stringid(m, 10)
--Effect type Variable
rsef.type_list = {
......@@ -252,6 +257,8 @@ function rsof.Get_Cate_Hint_Op_List()
, ["ms"] = { "Move Sequence", 0, { m,3 }, { 25163979,1 } }
, ["dum"] = { "Dummy Operate", 0, HINTMSG_OPERATECARD, 0, 0, { rsop.DummyOperate, 1, sg } }
, ["self"] = { "Select Your Card(s)", 0, HINTMSG_OPERATECARD, 0, 0, { rsop.DummyOperate, 1, sg } }
, ["oppo"] = { "Select Your Card(s)", 0, HINTMSG_OPERATECARD, 0, 0, { rsop.DummyOperate, 1, sg } }
}
......@@ -311,7 +318,7 @@ rsloc.all = 0xff
function rsef.Get_Value_Effect_Attribute_List()
--[string] = { eff_code, eff_val, eff_ctlimit, extra_flag_for_singel, extra_flag_for_field, extra_reset }
--[string] = { eff_code, eff_hint, eff_val, eff_ctlimit, extra_flag_for_singel, extra_flag_for_field, extra_reset }
local code_list = {
["atk"] = { EFFECT_SET_ATTACK }, ["def"] = { EFFECT_SET_DEFENSE }
, ["batk"] = { EFFECT_SET_BASE_ATTACK }, ["bdef"] = { EFFECT_SET_BASE_DEFENSE }
......@@ -337,7 +344,7 @@ function rsef.Get_Value_Effect_Attribute_List()
, ["indb"] = { EFFECT_INDESTRUCTABLE_BATTLE }, ["inde"] = { EFFECT_INDESTRUCTABLE_EFFECT }
, ["indct"] = { EFFECT_INDESTRUCTABLE_COUNT, rsval.indct, nil, 1 }, ["ind"] = { EFFECT_INDESTRUCTABLE }
, ["indct"] = { EFFECT_INDESTRUCTABLE_COUNT, nil, rsval.indct, nil, 1 }, ["ind"] = { EFFECT_INDESTRUCTABLE }
, ["im"] = { EFFECT_IMMUNE_EFFECT, rsval.imes }
......@@ -446,8 +453,11 @@ function rsof.Escape_Old_Functions()
rsrst.est_pend = rsrst.std_ep
rsrst.ered = rsrst.ret
--// rszsf.get
rszsf.GetUseAbleMZoneCount = function(c, p1, leave_val, p2, zone)
return rszsf.GetMZoneCount(p1, leave_val, p2, c, zone)
end
rszsf.GetUseAblePZoneCount = rszsf.GetPZoneCount
--//
rscf.FilterFaceUp = rscf.fufilter
......@@ -600,7 +610,7 @@ function rsof.Escape_Old_Functions()
end
return para1(g, table.unpack(para_list))
else
return rsop.OperateCards(sel_hint, sp, filter, tp, loc_self, loc_oppo, minct, maxct, except_obj, solve_list, ...)
return rsop.SelectOperate(sel_hint, sp, filter, tp, loc_self, loc_oppo, minct, maxct, except_obj, solve_list, ...)
end
end
rsgf.SelectSolve = function(g, sel_hint, sp, filter, minct, maxct, except_obj, solve_list, ...)
......@@ -619,7 +629,7 @@ function rsof.Escape_Old_Functions()
end
return para1(g, table.unpack(para_list))
else
return rsgf.OperateCards(sel_hint, g, sp, filter, minct, maxct, except_obj, solve_list, ...)
return rsgf.SelectOperate(sel_hint, g, sp, filter, minct, maxct, except_obj, solve_list, ...)
end
end
local selectfun_list = {
......@@ -636,24 +646,18 @@ function rsof.Escape_Old_Functions()
end
--//
end
function rsop.SelectOperate(sel_hint, sp, filter, tp, loc_self, loc_oppo, minct, maxct, except_obj, solve_list, ...)
local sg = rsop.SelectCards(sel_hint, sp, filter, tp, loc_self, loc_oppo, minct, maxct, except_obj, ...)
if #sg == 0 then
return 0, #sg
else
return rsop.Operation_Solve(sg, sel_hint, REASON_EFFECT, solve_list, 1, nil, sp)
--Function: Select and solve
function rsop.SelectOperate(sel_hint, sp, filter, tp, loc_self, loc_oppo, minct, maxct, except_obj, solve_arr, ...)
return rsop.OperateCards(sel_hint, sp, filter, tp, loc_self, loc_oppo, minct, maxct, except_obj, ...)(table.unpack(solve_arr))
end
end
function rsgf.SelectOperate(sel_hint, g, sp, filter, minct, maxct, except_obj, solve_list, ...)
local sg = rsgf.SelectCards(sel_hint, g, sp, filter, minct, maxct, except_obj, ...)
if #sg == 0 then
return 0, #sg
else
return rsop.Operation_Solve(sg, sel_hint, REASON_EFFECT, solve_list, 1, e, tp, eg, ep, ev, re, r, rp)
function rsgf.SelectOperate(sel_hint, g, sp, filter, minct, maxct, except_obj, solve_arr, ...)
return rsgf.OperateCards(sel_hint, g, sp, filter, minct, maxct, except_obj, ...)(table.unpack(solve_arr))
end
--//
end
-- Old functions # effects
-- Cannot destroed
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment