Commit b10f0195 authored by VanillaSalt's avatar VanillaSalt

fix

parent f4aa960b
...@@ -21,22 +21,21 @@ function c32441317.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -21,22 +21,21 @@ function c32441317.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end end
function c32441317.mgfilter(c,e,tp,sync) function c32441317.mgfilter(c,e,tp,sync)
return not c:IsControler(tp) or not c:IsLocation(LOCATION_GRAVE) return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE)
or bit.band(c:GetReason(),0x80008)~=0x80008 or c:GetReasonCard()~=sync and bit.band(c:GetReason(),0x80008)==0x80008 and c:GetReasonCard()==sync
or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsHasEffect(EFFECT_NECRO_VALLEY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end end
function c32441317.activate(e,tp,eg,ep,ev,re,r,rp) function c32441317.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end
local mg=tc:GetMaterial() local mg=tc:GetMaterial()
local sumable=true local ct=mg:GetCount()
local sumtype=tc:GetSummonType() local sumtype=tc:GetSummonType()
if Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)==0 or sumtype~=SUMMON_TYPE_SYNCHRO or mg:GetCount()==0 if Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)~=0 and sumtype==SUMMON_TYPE_SYNCHRO
or mg:GetCount()>Duel.GetLocationCount(tp,LOCATION_MZONE) and ct>0 and not Duel.IsPlayerAffectedByEffect(tp,59822133)
or mg:IsExists(c32441317.mgfilter,1,nil,e,tp,tc) then and ct<=Duel.GetLocationCount(tp,LOCATION_MZONE)
sumable=false and mg:IsExists(c32441317.mgfilter,1,nil,e,tp,tc)==ct
end and Duel.SelectYesNo(tp,aux.Stringid(32441317,0)) then
if sumable and Duel.SelectYesNo(tp,aux.Stringid(32441317,0)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(mg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(mg,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -38,9 +38,9 @@ end ...@@ -38,9 +38,9 @@ end
function c54447022.spop(e,tp,eg,ep,ev,re,r,rp) function c54447022.spop(e,tp,eg,ep,ev,re,r,rp)
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
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e) local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if sg:GetCount()>ft then if sg:GetCount()>ft then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=sg:Select(tp,ft,ft,nil) sg=sg:Select(tp,ft,ft,nil)
......
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