Commit 99dd3dc0 authored by VanillaSalt's avatar VanillaSalt

fix

parent aaf28153
...@@ -11,38 +11,44 @@ function c11109820.initial_effect(c) ...@@ -11,38 +11,44 @@ function c11109820.initial_effect(c)
e1:SetOperation(c11109820.operation) e1:SetOperation(c11109820.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c11109820.filter1(c,e,tp) function c11109820.filter1(c,e,tp,ft)
if c:IsControler(tp) then ft=ft+1 end
return c:IsFaceup() and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsType(TYPE_XYZ)
and Duel.IsExistingTarget(c11109820.filter2,tp,LOCATION_MZONE,0,1,nil,e,tp,c:GetRank()) and Duel.IsExistingTarget(c11109820.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,e,tp,c:GetRank(),ft)
end end
function c11109820.filter2(c,e,tp,rk) function c11109820.filter2(c,e,tp,rk,ft)
if c:IsControler(tp) then ft=ft+1 end
return c:IsFaceup() and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(c11109820.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,rk+c:GetRank()) and Duel.IsExistingMatchingCard(c11109820.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,rk+c:GetRank(),ft)
end end
function c11109820.spfilter(c,e,tp,rk) function c11109820.spfilter(c,e,tp,rk,ft)
local crk=c:GetRank() local crk=c:GetRank()
return (crk==rk or crk==rk-1) and not c:IsSetCard(0x48) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return ft>0 and (crk==rk or crk==rk-1) and not c:IsSetCard(0x48) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c11109820.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c11109820.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
and Duel.IsExistingTarget(c11109820.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingTarget(c11109820.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp,ft) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectTarget(tp,c11109820.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) local g1=Duel.SelectTarget(tp,c11109820.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp,ft)
local tc=g1:GetFirst()
if tc:IsControler(tp) then ft=ft+1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectTarget(tp,c11109820.filter2,tp,LOCATION_MZONE,0,1,1,nil,e,tp,g1:GetFirst():GetRank()) local g2=Duel.SelectTarget(tp,c11109820.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,tc,e,tp,tc:GetRank(),ft)
g1:Merge(g2) g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g1,2,0,0) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g1,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c11109820.operation(e,tp,eg,ep,ev,re,r,rp) function c11109820.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc1=g:GetFirst() local tc1=g:GetFirst()
local tc2=g:GetNext() local tc2=g:GetNext()
if not tc1:IsRelateToEffect(e) or not tc2:IsRelateToEffect(e) then return end if not tc1:IsRelateToEffect(e) or not tc2:IsRelateToEffect(e) then return end
local sg=Duel.GetMatchingGroup(c11109820.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp,tc1:GetRank()+tc2:GetRank()) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if tc1:IsControler(tp) then ft=ft+1 end
if tc2:IsControler(tp) then ft=ft+1 end
local sg=Duel.GetMatchingGroup(c11109820.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp,tc1:GetRank()+tc2:GetRank(),ft)
if sg:GetCount()==0 then return end if sg:GetCount()==0 then return end
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -24,7 +24,7 @@ function c24658418.initial_effect(c) ...@@ -24,7 +24,7 @@ function c24658418.initial_effect(c)
end end
function c24658418.condition(e,tp,eg,ep,ev,re,r,rp) function c24658418.condition(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttackTarget() local at=Duel.GetAttackTarget()
return at:IsControler(tp) and at:IsSetCard(0x7b) return at:IsFaceup() and at:IsControler(tp) and at:IsSetCard(0x7b)
end end
function c24658418.target(e,tp,eg,ep,ev,re,r,rp,chk) function c24658418.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -25,7 +25,6 @@ function c32603633.tg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -25,7 +25,6 @@ function c32603633.tg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end end
function c32603633.op(e,tp,eg,ep,ev,re,r,rp) function c32603633.op(e,tp,eg,ep,ev,re,r,rp)
local count=0
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end if ft<=0 then return end
local g=Duel.GetMatchingGroup(c32603633.filter,tp,LOCATION_GRAVE,0,nil,e,tp) local g=Duel.GetMatchingGroup(c32603633.filter,tp,LOCATION_GRAVE,0,nil,e,tp)
......
...@@ -6,6 +6,7 @@ function c45286019.initial_effect(c) ...@@ -6,6 +6,7 @@ function c45286019.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CHAIN_UNIQUE)
e1:SetCondition(c45286019.spcon) e1:SetCondition(c45286019.spcon)
e1:SetCost(c45286019.spcost) e1:SetCost(c45286019.spcost)
e1:SetTarget(c45286019.sptg) e1:SetTarget(c45286019.sptg)
......
...@@ -33,7 +33,7 @@ function c48716527.actcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -33,7 +33,7 @@ function c48716527.actcon(e,tp,eg,ep,ev,re,r,rp)
and Duel.IsExistingMatchingCard(c48716527.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c48716527.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c48716527.distg(e,c) function c48716527.distg(e,c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==0 return bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)~=SUMMON_TYPE_ADVANCE
end end
function c48716527.tgcon(e,tp,eg,ep,ev,re,r,rp) function c48716527.tgcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp return Duel.GetTurnPlayer()==tp
......
...@@ -74,8 +74,8 @@ function c49838105.cfop(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,8 +74,8 @@ function c49838105.cfop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmDecktop(tp,1) Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1) local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst() local tc=g:GetFirst()
Duel.DisableShuffleCheck()
if tc:IsRace(RACE_PLANT) then if tc:IsRace(RACE_PLANT) then
Duel.DisableShuffleCheck()
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_REVEAL) Duel.SendtoGrave(tc,REASON_EFFECT+REASON_REVEAL)
else else
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
......
...@@ -26,7 +26,6 @@ function c68191243.tg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -26,7 +26,6 @@ function c68191243.tg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c68191243.op(e,tp,eg,ep,ev,re,r,rp) function c68191243.op(e,tp,eg,ep,ev,re,r,rp)
local count=0
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end if ft<=0 then return end
local g=Duel.GetMatchingGroup(c68191243.filter,tp,LOCATION_HAND,0,nil,e,tp) local g=Duel.GetMatchingGroup(c68191243.filter,tp,LOCATION_HAND,0,nil,e,tp)
......
...@@ -22,9 +22,9 @@ function c74100225.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -22,9 +22,9 @@ function c74100225.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.IsExistingTarget(c74100225.filter,tp,LOCATION_GRAVE,0,1,nil,0x604e) and Duel.IsExistingTarget(c74100225.filter,tp,LOCATION_GRAVE,0,1,nil,0x604e)
and Duel.IsExistingMatchingCard(c74100225.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c74100225.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g1=Duel.SelectTarget(tp,c74100225.filter,tp,0,LOCATION_MZONE,1,1,nil,0x304e) local g1=Duel.SelectTarget(tp,c74100225.filter,tp,LOCATION_GRAVE,0,1,1,nil,0x304e)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g2=Duel.SelectTarget(tp,c74100225.filter,tp,0,LOCATION_MZONE,1,1,nil,0x604e) local g2=Duel.SelectTarget(tp,c74100225.filter,tp,LOCATION_GRAVE,0,1,1,nil,0x604e)
g1:Merge(g2) g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g1,2,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g1,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
......
...@@ -31,8 +31,7 @@ function c85827713.sumcon(e) ...@@ -31,8 +31,7 @@ function c85827713.sumcon(e)
end end
function c85827713.limcon(e,tp,eg,ep,ev,re,r,rp) function c85827713.limcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return rp~=tp and c:IsReason(REASON_DESTROY) return rp~=tp and c:IsReason(REASON_DESTROY) and c:GetPreviousControler()==tp
and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp
end end
function c85827713.limop(e,tp,eg,ep,ev,re,r,rp) function c85827713.limop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
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