Commit 8397f957 authored by mercury233's avatar mercury233

fix

parent aba76760
......@@ -79,9 +79,6 @@ function c101112015.mvop(e,tp,eg,ep,ev,re,r,rp)
if not tc or not Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then return end
Duel.SendtoExtraP(c,nil,REASON_EFFECT)
end
function c101112015.fselect(g)
return g:GetClassCount(Card.GetLocation)==#g
end
function c101112015.rmfilter(c)
return c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT)
end
......@@ -90,11 +87,9 @@ function c101112015.drmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=g:Filter(Card.IsAbleToDeck,nil)
local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil,tp,POS_FACEDOWN)
local ct=math.floor(#g/3)
local ct1=ct
if ct>2 then ct1=2 end
if chk==0 then return ct1>0 and rg:CheckSubGroup(c101112015.fselect,1,ct1) and #tg>=ct1 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,rg,ct1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,ct1,0,0)
if chk==0 then return ct>0 and #tg>0 and #rg>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,rg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,1,0,0)
end
function c101112015.drmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -102,20 +97,17 @@ function c101112015.drmop(e,tp,eg,ep,ev,re,r,rp)
local tg=g:Filter(Card.IsAbleToDeck,nil)
local rg=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsAbleToRemove),tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil,tp,POS_FACEDOWN)
local ct=math.floor(#g/3)
local ct1=ct
if ct>2 then ct1=2 end
if ct1==0 or #tg==0 or #rg==0 then return end
if ct==0 or #tg==0 or #rg==0 then return end
if ct>#tg then ct=#tg end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local mg=rg:SelectSubGroup(tp,c101112015.fselect,false,1,ct1)
if #mg==0 then return end
local mg=rg:Select(tp,1,ct,nil)
Duel.HintSelection(mg)
Duel.Remove(mg,POS_FACEDOWN,REASON_EFFECT)
local og=Duel.GetOperatedGroup():Filter(c101112015.rmfilter,nil)
if #og==0 or #tg<#og then return end
if #og==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg1=tg:Select(tp,1,#og,nil)
if #tg1==0 then return end
local tg1=tg:Select(tp,#og,#og,nil)
Duel.BreakEffect()
Duel.HintSelection(tg1)
Duel.SendtoDeck(tg1,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
\ No newline at end of file
end
......@@ -49,14 +49,14 @@ end
function c101112049.spcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and rp==1-tp
end
function c101112049.spfilter(c,e,tp)
return c:IsSetCard(0x162) and (c:GetCurrentScale()+3)%2==0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,tp,zone)
function c101112049.spfilter(c,e,tp,zone)
return c:IsSetCard(0x162) and c:GetCurrentScale()%2==1
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function c101112049.tefilter(c)
return c:IsSetCard(0x162) and c:IsType(TYPE_PENDULUM) and c:GetCurrentScale()%2==0
end
function c101112049.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local zone=e:GetHandler():GetLinkedZone(tp)
local g=Duel.GetMatchingGroup(c101112049.spfilter,tp,LOCATION_PZONE,0,nil,e,tp,zone)
if chk==0 then return #g>0 end
......
......@@ -49,7 +49,8 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function s.thfilter(c)
return c:IsCode(68468459) or aux.IsCodeListed(c,68468459) and c:IsAbleToHand()
return (c:IsCode(68468459) or aux.IsCodeListed(c,68468459) and c:IsType(TYPE_MONSTER))
and c:IsAbleToHand()
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......@@ -58,7 +59,8 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
function s.spfilter(c,e,tp)
return c:IsCode(68468459) or aux.IsCodeListed(c,68468459) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return (c:IsCode(68468459) or aux.IsCodeListed(c,68468459) and c:IsType(TYPE_MONSTER))
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
......
......@@ -64,7 +64,6 @@ end
function c101112060.mvcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeckAsCost() end
Duel.DisableShuffleCheck()
Duel.SendtoDeck(c,nil,SEQ_DECKBOTTOM,REASON_COST)
end
function c101112060.mvfilter(c)
......@@ -72,9 +71,9 @@ function c101112060.mvfilter(c)
end
function c101112060.mvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101112060.mvfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101112060.mvfilter,tp,LOCATION_MZONE,0,1,nil) end
if chk==0 then return Duel.IsExistingTarget(c101112060.mvfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c101112060.mvfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SelectTarget(tp,c101112060.mvfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
end
function c101112060.mvop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
......@@ -16,7 +16,7 @@ function c101112065.cfilter(c)
end
function c101112065.slfilter(c)
local scal=c:GetCurrentScale()
return scal>0 and (scal+1)%2==0
return scal>0 and scal%2==1
end
function c101112065.spfilter(c,e,tp)
return c:IsSetCard(0x1162) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
......
......@@ -67,8 +67,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
table.insert(nt,OPCODE_ISCODE)
if i>1 then table.insert(nt,OPCODE_OR) end
end
local code=Duel.AnnounceCard(tp,table.unpack(nt))
Duel.Hint(HINT_CARD,1-tp,code)
local code=Duel.AnnounceCard(1-tp,table.unpack(nt))
Duel.Hint(HINT_CARD,tp,code)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,code):GetFirst()
if tc then
......
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