Commit cd4ad31d authored by Nemo Ma's avatar Nemo Ma

fix

parent bf4d6a9b
...@@ -299,7 +299,7 @@ function s.create_timing_list() ...@@ -299,7 +299,7 @@ function s.create_timing_list()
["DuringBP"] = { EVENT_FREE_CHAIN, scl.cond_during_phase("BP") }, ["DuringBP"] = { EVENT_FREE_CHAIN, scl.cond_during_phase("BP") },
["DuringM2"] = { EVENT_FREE_CHAIN, scl.cond_during_phase("M2") }, ["DuringM2"] = { EVENT_FREE_CHAIN, scl.cond_during_phase("M2") },
["DuringEP"] = { EVENT_PHASE + PHASE_END }, ["DuringEP"] = { EVENT_PHASE + PHASE_END },
["Move"] = { EVENT_MOVE }, ["BeMoved"] = { EVENT_MOVE },
["BeSummoned"] = { EVENT_SUMMON_SUCCESS, aux.TRUE, aux.TRUE, EVENT_SPSUMMON_SUCCESS, aux.TRUE, aux.TRUE, EVENT_FLIP_SUMMON_SUCCESS, aux.TRUE, aux.TRUE }, ["BeSummoned"] = { EVENT_SUMMON_SUCCESS, aux.TRUE, aux.TRUE, EVENT_SPSUMMON_SUCCESS, aux.TRUE, aux.TRUE, EVENT_FLIP_SUMMON_SUCCESS, aux.TRUE, aux.TRUE },
["BeNormalSummoned"] = { EVENT_SUMMON_SUCCESS }, ["BeNormalSummoned"] = { EVENT_SUMMON_SUCCESS },
["BeSpecialSummoned"] = { EVENT_SPSUMMON_SUCCESS }, ["BeSpecialSummoned"] = { EVENT_SPSUMMON_SUCCESS },
...@@ -319,7 +319,7 @@ function s.create_timing_list() ...@@ -319,7 +319,7 @@ function s.create_timing_list()
["NegateNomralSummon"] = { EVENT_SUMMON_NEGATED }, ["NegateNomralSummon"] = { EVENT_SUMMON_NEGATED },
["NegateSpecialSummon"] = { EVENT_SPSUMMON_NEGATED }, ["NegateSpecialSummon"] = { EVENT_SPSUMMON_NEGATED },
["NegateFlipSummon"] = { EVENT_FLIP_SUMMON_NEGATED }, ["NegateFlipSummon"] = { EVENT_FLIP_SUMMON_NEGATED },
["BeFlip"] = { EVENT_FLIP }, ["BeFlippedFaceup"] = { EVENT_FLIP },
["DeclareAttack"] = { EVENT_ATTACK_ANNOUNCE }, ["DeclareAttack"] = { EVENT_ATTACK_ANNOUNCE },
["BeAttackTarget"] = { EVENT_BE_BATTLE_TARGET }, ["BeAttackTarget"] = { EVENT_BE_BATTLE_TARGET },
["AttackBeNegated"] = { EVENT_ATTACK_DISABLED }, ["AttackBeNegated"] = { EVENT_ATTACK_DISABLED },
...@@ -350,7 +350,7 @@ function s.create_timing_list() ...@@ -350,7 +350,7 @@ function s.create_timing_list()
["BeReturned2Deck"] = { EVENT_TO_DECK }, ["BeReturned2Deck"] = { EVENT_TO_DECK },
["BeforeLeavingField"] = { EVENT_LEAVE_FIELD_P }, ["BeforeLeavingField"] = { EVENT_LEAVE_FIELD_P },
["LeaveField"] = { EVENT_LEAVE_FIELD }, ["LeaveField"] = { EVENT_LEAVE_FIELD },
["FaceupLeaveField"] = { EVENT_LEAVE_FIELD, { Card.IsPreviousPosition, POS_FACEUP } }, ["FaceupCardLeavesField"] = { EVENT_LEAVE_FIELD, { Card.IsPreviousPosition, POS_FACEUP } },
["SetSpell/Trap"] = { EVENT_SSET }, ["SetSpell/Trap"] = { EVENT_SSET },
["BeSet"] = { EVENT_SET_SCL }, ["BeSet"] = { EVENT_SET_SCL },
["PositionBeChanged"] = { EVENT_CHANGE_POS }, ["PositionBeChanged"] = { EVENT_CHANGE_POS },
...@@ -3407,7 +3407,7 @@ function s.cost_or_target_or_operation_feasibility_check(e, tp, eg, ep, ev, re, ...@@ -3407,7 +3407,7 @@ function s.cost_or_target_or_operation_feasibility_check(e, tp, eg, ep, ev, re,
if Scl.CheckBoolean(minct, true) then if Scl.CheckBoolean(minct, true) then
chk_minct, chk_maxct = #mandatory_group, #mandatory_group chk_minct, chk_maxct = #mandatory_group, #mandatory_group
end end
return mandatory_group:CheckSubGroup(s.cost_or_target_or_operation_group_check, chk_minct, chk_maxct, e, tp, eg, ep, ev, re, r, rp, reuse_idx, used_arr2, group_filter, arr2, ...) return mandatory_group:CheckSubGroup(s.cost_or_target_or_operation_group_check, chk_minct, chk_maxct, {e, tp, eg, ep, ev, re, r, rp, reuse_idx, used_arr2, group_filter}, arr2, ...)
end end
end end
end end
...@@ -3502,7 +3502,7 @@ function s.do_cost_or_target_or_operation(e, tp, eg, ep, ev, re, r, rp, current_ ...@@ -3502,7 +3502,7 @@ function s.do_cost_or_target_or_operation(e, tp, eg, ep, ev, re, r, rp, current_
else else
if need_sel then if need_sel then
Scl.SelectHint(tp, category_str) Scl.SelectHint(tp, category_str)
mandatory_group = mandatory_group:SelectSubGroup(tp, s.cost_or_target_or_operation_group_check, false, minct, maxct, e, tp, eg, ep, ev, re, r, rp, reuse_idx, used_arr2, group_filter, arr2, ...) mandatory_group = mandatory_group:SelectSubGroup(tp, s.cost_or_target_or_operation_group_check, false, minct, maxct, {e, tp, eg, ep, ev, re, r, rp, reuse_idx, used_arr2, group_filter}, arr2, ...)
end end
end end
--case6 no more cards --case6 no more cards
...@@ -3544,7 +3544,9 @@ function s.do_cost_or_target_or_operation(e, tp, eg, ep, ev, re, r, rp, current_ ...@@ -3544,7 +3544,9 @@ function s.do_cost_or_target_or_operation(e, tp, eg, ep, ev, re, r, rp, current_
return s.do_cost_or_target_or_operation(e, tp, eg, ep, ev, re, r, rp, mandatory_group, total_sel_group2, used_arr2, arr2, ...) return s.do_cost_or_target_or_operation(e, tp, eg, ep, ev, re, r, rp, mandatory_group, total_sel_group2, used_arr2, arr2, ...)
end end
end end
function s.cost_or_target_or_operation_group_check(g, e, tp, eg, ep, ev, re, r, rp, reuse_idx, used_arr, group_filter, arr1, ...) function s.cost_or_target_or_operation_group_check(g, parama, arr1, ...)
--for some shenbi reasons, koshipro will lost paramas during the spell/trap card call this function, so I must use a table to protect the paramas, but original edition ygopro don't have this problem.
local e, tp, eg, ep, ev, re, r, rp, reuse_idx, used_arr, group_filter = table.unpack(parama)
local used_arr2, used_group_this_reuse_idx = s.cost_or_target_or_operation_reuse_cards_check(used_arr, reuse_idx, g) local used_arr2, used_group_this_reuse_idx = s.cost_or_target_or_operation_reuse_cards_check(used_arr, reuse_idx, g)
if not s.operate_filter(group_filter)(g, e, tp, eg, ep, ev, re, r, rp) then if not s.operate_filter(group_filter)(g, e, tp, eg, ep, ev, re, r, rp) then
return false return false
......
...@@ -716,15 +716,19 @@ rssf.SpecialSummonToken = Scl.SpecialSummonToken ...@@ -716,15 +716,19 @@ rssf.SpecialSummonToken = Scl.SpecialSummonToken
function rstg.neg(dn_str, ex_tg) function rstg.neg(dn_str, ex_tg)
return function(e, tp, eg, ep, ev, re, r, rp, chk, chkc) return function(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
dn_str = dn_str or "dum" dn_str = dn_str or "dum"
local dn_str2 = s.ctgy_list[dn_str]
local c = e:GetHandler() local c = e:GetHandler()
local rc = re:GetHandler() local rc = re:GetHandler()
if chkc then return ex_tg(e, tp, eg, ep, ev, re, r, rp, chk, chkc) end if chkc then return ex_tg(e, tp, eg, ep, ev, re, r, rp, chk, chkc) end
if chk == 0 then return (dn_str ~= "rm" or aux.nbcon(tp, re)) and (ex_tg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)) end if chk == 0 then return (dn_str ~= "rm" or aux.nbcon(tp, re)) and (ex_tg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)) end
local op_cate = rscate.cate_selhint_list[dn_str][2] local op_cate = Scl.Category_List[dn_str2][2]
if op_cate and op_cate ~= 0 and rc:IsRelateToEffect(re) then local ctgy_list = type(op_cate) == "number" and {op_cate} or op_cate
if #ctgy_list > 0 and rc:IsRelateToEffect(re) then
local res = rsop.Operation_Solve(eg, dn_str, REASON_EFFECT, { }, 0, e, tp, eg, ep, ev, re, r, rp) local res = rsop.Operation_Solve(eg, dn_str, REASON_EFFECT, { }, 0, e, tp, eg, ep, ev, re, r, rp)
if res then if res then
Duel.SetOperationInfo(0, op_cate, eg, 1, 0, 0) for ctgy in pairs(ctgy_list) do
Duel.SetOperationInfo(0, ctgy, eg, 1, 0, 0)
end
end end
end end
ex_tg(e, tp, eg, ep, ev, re, r, rp, 1) ex_tg(e, tp, eg, ep, ev, re, r, rp, 1)
...@@ -1323,7 +1327,10 @@ rstg.chainlimit = rstg.chnlim ...@@ -1323,7 +1327,10 @@ rstg.chainlimit = rstg.chnlim
rsop.SelectYesNo = rshint.SelectYesNo rsop.SelectYesNo = rshint.SelectYesNo
rsop.SelectOption = rshint.SelectOption rsop.SelectOption = rshint.SelectOption
rsop.eqop = rsop.Equip rsop.eqop = rsop.Equip
rsop.SelectOC = Scl.SetExtraSelectAndOperateParama
function rsop.SelectOC(would_string, break_able, select_string)
return Scl.SetExtraSelectAndOperateParama(not would_string or s.ctgy_list[wolud_string], break_able, select_string)
end
rsop.CheckOperateSuccess = rsop.CheckOperateCorrectly rsop.CheckOperateSuccess = rsop.CheckOperateCorrectly
......
...@@ -28,6 +28,12 @@ function cm.initial_effect(c) ...@@ -28,6 +28,12 @@ function cm.initial_effect(c)
e3:SetCondition(cm.damcon) e3:SetCondition(cm.damcon)
e3:SetOperation(cm.damop) e3:SetOperation(cm.damop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--pierce
local e3_1=Effect.CreateEffect(c)
e3_1:SetType(EFFECT_TYPE_SINGLE)
e3_1:SetCode(EFFECT_PIERCE)
e3_1:SetCondition(cm.damcon)
c:RegisterEffect(e3_1)
--negate --negate
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,0)) e4:SetDescription(aux.Stringid(m,0))
......
...@@ -41,7 +41,7 @@ end ...@@ -41,7 +41,7 @@ end
function c33200801.filter(c,e,tp,lv1) function c33200801.filter(c,e,tp,lv1)
local lv2=c:GetLevel() local lv2=c:GetLevel()
local lv3=lv1-lv2 local lv3=lv1-lv2
return lv3>0 and c:IsFaceup() and not c:IsType(TYPE_TUNER) and Duel.IsExistingMatchingCard(c33200801.cfilter,tp,LOCATION_EXTRA,0,1,nil,e,lv3) return lv2>0 and lv3>0 and c:IsFaceup() and not c:IsType(TYPE_TUNER) and Duel.IsExistingMatchingCard(c33200801.cfilter,tp,LOCATION_EXTRA,0,1,nil,e,lv3)
end end
function c33200801.cfilter(c,e,lv3) function c33200801.cfilter(c,e,lv3)
return c:IsType(TYPE_SYNCHRO) and c:IsLevel(lv3) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) return c:IsType(TYPE_SYNCHRO) and c:IsLevel(lv3) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
......
...@@ -37,7 +37,7 @@ end ...@@ -37,7 +37,7 @@ end
function c33200802.filter(c,e,tp,lv1) function c33200802.filter(c,e,tp,lv1)
local lv2=c:GetLevel() local lv2=c:GetLevel()
local lv3=lv1-lv2 local lv3=lv1-lv2
return lv3>0 and c:IsFaceup() and not c:IsType(TYPE_TUNER) and Duel.IsExistingMatchingCard(c33200802.cfilter,tp,LOCATION_EXTRA,0,1,nil,e,lv3) return lv2>0 and lv3>0 and c:IsFaceup() and not c:IsType(TYPE_TUNER) and Duel.IsExistingMatchingCard(c33200802.cfilter,tp,LOCATION_EXTRA,0,1,nil,e,lv3)
end end
function c33200802.cfilter(c,e,lv3) function c33200802.cfilter(c,e,lv3)
return c:IsType(TYPE_SYNCHRO) and c:IsLevel(lv3) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) return c:IsType(TYPE_SYNCHRO) and c:IsLevel(lv3) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
......
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end if not pcall(function() require("expansions/script/c10100000") end) then require("script/c10100000") end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
local m=53716001 local m=53716001
local cm=_G["c"..m] local cm=_G["c"..m]
...@@ -51,7 +51,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,7 +51,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
for i=1,#list do filter=filter|1<<(list[i]+8) end for i=1,#list do filter=filter|1<<(list[i]+8) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local flag=Duel.SelectDisableField(tp,1,LOCATION_SZONE,0,filter) local flag=Duel.SelectDisableField(tp,1,LOCATION_SZONE,0,filter)
if flag and rsop.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true,2^(math.log(flag,2)-8)) then if flag and Scl.Place2Field(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true,2^(math.log(flag,2)-8)) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end if not pcall(function() require("expansions/script/c10100000") end) then require("script/c10100000") end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
local m=53716004 local m=53716004
local cm=_G["c"..m] local cm=_G["c"..m]
...@@ -80,7 +80,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,7 +80,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
for i=1,#list do filter=filter|1<<(list[i]+8) end for i=1,#list do filter=filter|1<<(list[i]+8) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local flag=Duel.SelectDisableField(tp,1,LOCATION_SZONE,0,filter) local flag=Duel.SelectDisableField(tp,1,LOCATION_SZONE,0,filter)
if flag and rsop.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true,2^(math.log(flag,2)-8)) then if flag and Scl.Place2Field(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true,2^(math.log(flag,2)-8)) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end if not pcall(function() require("expansions/script/c10100000") end) then require("script/c10100000") end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
local m=53716010 local m=53716010
local cm=_G["c"..m] local cm=_G["c"..m]
...@@ -58,7 +58,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,7 +58,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
for i=1,#list do filter=filter|1<<(list[i]+8) end for i=1,#list do filter=filter|1<<(list[i]+8) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local flag=Duel.SelectDisableField(tp,1,LOCATION_SZONE,0,filter) local flag=Duel.SelectDisableField(tp,1,LOCATION_SZONE,0,filter)
if flag and rsop.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true,2^(math.log(flag,2)-8)) then if flag and Scl.Place2Field(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true,2^(math.log(flag,2)-8)) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end if not pcall(function() require("expansions/script/c10100000") end) then require("script/c10100000") end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
local m=53716011 local m=53716011
local cm=_G["c"..m] local cm=_G["c"..m]
...@@ -58,7 +58,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,7 +58,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
for i=1,#list do filter=filter|1<<(list[i]+8) end for i=1,#list do filter=filter|1<<(list[i]+8) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local flag=Duel.SelectDisableField(tp,1,LOCATION_SZONE,0,filter) local flag=Duel.SelectDisableField(tp,1,LOCATION_SZONE,0,filter)
if flag and rsop.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true,2^(math.log(flag,2)-8)) then if flag and Scl.Place2Field(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true,2^(math.log(flag,2)-8)) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end if not pcall(function() require("expansions/script/c10100000") end) then require("script/c10100000") end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
local m=53716013 local m=53716013
local cm=_G["c"..m] local cm=_G["c"..m]
...@@ -54,7 +54,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,7 +54,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
for i=1,#list do filter=filter|1<<(list[i]+8) end for i=1,#list do filter=filter|1<<(list[i]+8) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local flag=Duel.SelectDisableField(tp,1,LOCATION_SZONE,0,filter) local flag=Duel.SelectDisableField(tp,1,LOCATION_SZONE,0,filter)
if flag and rsop.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true,2^(math.log(flag,2)-8)) then if flag and Scl.Place2Field(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true,2^(math.log(flag,2)-8)) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
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