Commit 1c668216 authored by mercury233's avatar mercury233

fix

parent d241796a
......@@ -73,7 +73,7 @@ function c100425023.spfilter(c,e,tp)
end
function c100425023.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100425023.spfilter(chkc,e,tp) end
if chk==0 then return GetMZoneCount(tp,e:GetHandler())>0
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingTarget(c100425023.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and e:GetHandler():IsAbleToExtra() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -78,6 +78,8 @@ function c101105040.spop(e,tp,eg,ep,ev,re,r,rp)
end
Duel.SpecialSummonComplete()
local og=Duel.GetOperatedGroup()
Duel.RaiseEvent(e:GetHandler(),EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
if og:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<2 then return end
local tg=Duel.GetMatchingGroup(c101105040.synfilter,tp,LOCATION_EXTRA,0,nil,og)
if og:GetCount()==sg:GetCount() and tg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -20,8 +20,8 @@ function c101105075.condition(e,tp,eg,ep,ev,re,r,rp)
return (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function c101105075.tgfilter(c,e,tp)
if not c:IsType(TYPE_XYZ) or c:IsFacedown() or not c:IsCanBeEffectTarget(e) then return false end
local mg=Duel.GetMatchingGroup(c101105075.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp,c:GetRank())
if c:GetOriginalType()&TYPE_XYZ==0 or c:IsFacedown() then return false end
local mg=Duel.GetMatchingGroup(c101105075.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp,c:GetRank())
return Duel.IsExistingMatchingCard(c101105075.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg)
end
function c101105075.spfilter(c,e,tp,rk)
......@@ -43,15 +43,16 @@ function c101105075.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsExistingTarget(c101105075.tgfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c101105075.tgfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK+LOCATION_HAND)
Duel.SelectTarget(tp,c101105075.tgfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE)
end
function c101105075.activate(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanSpecialSummonCount(tp,2) then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end
local mg=Duel.GetMatchingGroup(c101105075.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp,tc:GetRank())
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c101105075.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp,tc:GetRank())
local exg=Duel.GetMatchingGroup(c101105075.xyzfilter,tp,LOCATION_EXTRA,0,nil,e,tp,mg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=mg:FilterSelect(tp,c101105075.mfilter1,1,1,nil,mg,exg)
......@@ -74,10 +75,12 @@ function c101105075.activate(e,tp,eg,ep,ev,re,r,rp)
tc=g1:GetNext()
end
Duel.SpecialSummonComplete()
Duel.RaiseEvent(e:GetHandler(),EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
if g1:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<2 then return end
local xyzg=Duel.GetMatchingGroup(c101105075.xyzfilter,tp,LOCATION_EXTRA,0,nil,e,tp,g1)
if #xyzg>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xyz=xyzg:Select(tp,1,1,nil):GetFirst()
Duel.XyzSummon(tp,xyz,g1)
end
end
\ No newline at end of file
end
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