Commit 956f422a authored by POLYMER's avatar POLYMER

fix

parent fbd28cc3
...@@ -96,9 +96,15 @@ function cm.adop(e,tp,eg,ep,ev,re,r,rp) ...@@ -96,9 +96,15 @@ function cm.adop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,cm.fselect,false,1,math.min(#g,ft),e,tp,ft1,ft2) local sg=g:SelectSubGroup(tp,cm.fselect,false,1,math.min(#g,ft),e,tp,ft1,ft2)
local tg=Group.CreateGroup() local tg=Group.CreateGroup()
if #sg>ft2 or (ft1>0 and not Duel.SelectYesNo(tp,aux.Stringid(m,6))) then if ft1>0 then --#sg>ft2 or (ft1>0 and not Duel.SelectYesNo(tp,aux.Stringid(m,6))) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
tg=sg:FilterSelect(tp,cm.spfilter1,math.max(0,#sg-ft2),math.min(#sg,ft1),nil,e,tp,sg,ft1,ft2) sg=sg:Filter(cm.spfilter1,nil,e,tp,sg,ft1,ft2)
if #sg-ft2>0 then
tg=sg:Select(tp,1,math.min(#sg,ft1),nil)
else
tg=sg:CancelableSelect(tp,1,math.min(#sg,ft1),nil)
end
if not tg then tg=Group.CreateGroup() end
sg:Sub(tg) sg:Sub(tg)
end end
for tc in aux.Next(tg) do for tc in aux.Next(tg) do
......
...@@ -35,6 +35,29 @@ function c9910006.initial_effect(c) ...@@ -35,6 +35,29 @@ function c9910006.initial_effect(c)
e4:SetTarget(c9910006.sctg) e4:SetTarget(c9910006.sctg)
e4:SetOperation(c9910006.scop) e4:SetOperation(c9910006.scop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--adjust(disablecheck)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCode(EVENT_ADJUST)
e5:SetRange(0xff)
e5:SetLabelObject(e2)
e5:SetOperation(c9910006.adjustop)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetLabelObject(e3)
c:RegisterEffect(e6)
end
function c9910006.eqcfilter(c)
return c:GetEquipTarget() or (c:IsFaceup() and c:IsType(TYPE_EQUIP))
end
function c9910006.adjustop(e,tp,eg,ep,ev,re,r,rp)
local e1=e:GetLabelObject()
if Duel.IsExistingMatchingCard(c9910006.eqcfilter,tp,LOCATION_ONFIELD,0,1,nil) then
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CAN_FORBIDDEN)
else
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
end
end end
function c9910006.rpcon(e,tp,eg,ep,ev,re,r,rp) function c9910006.rpcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(nil,tp,LOCATION_PZONE,0,1,e:GetHandler()) return not Duel.IsExistingMatchingCard(nil,tp,LOCATION_PZONE,0,1,e:GetHandler())
...@@ -69,19 +92,11 @@ function c9910006.rpop(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,19 +92,11 @@ function c9910006.rpop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function c9910006.eqcfilter(c)
return c:GetEquipTarget() or (c:IsFaceup() and c:IsType(TYPE_EQUIP))
end
function c9910006.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c9910006.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if Duel.IsExistingMatchingCard(c9910006.eqcfilter,tp,LOCATION_ONFIELD,0,1,nil)then
e:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CAN_FORBIDDEN)
else
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
end
end end
function c9910006.desop(e,tp,eg,ep,ev,re,r,rp) function c9910006.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
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