Commit 84e521c8 authored by nekrozar's avatar nekrozar

update Drumming with Excitement

use CheckSubGroup and SelectSubGroup
parent 1fef3317
...@@ -19,36 +19,23 @@ end ...@@ -19,36 +19,23 @@ end
function c33298291.spfilter(c,e,tp) function c33298291.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c33298291.spfilter1(c,e,tp,chk) function c33298291.fcheck(c,g)
return c33298291.spfilter(c,e,tp) return g:IsExists(Card.IsOriginalCodeRule,1,c,c:GetOriginalCodeRule())
and Duel.IsExistingMatchingCard(c33298291.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetOriginalCode(),chk)
end end
function c33298291.spfilter2(c,e,tp,code1,chk) function c33298291.fselect(g)
return c33298291.spfilter(c,e,tp) return g:GetClassCount(Card.GetLocation)==g:GetCount() and not g:IsExists(c33298291.fcheck,1,nil,g)
and c:GetOriginalCode()~=code1
and Duel.IsExistingMatchingCard(c33298291.spfilter3,tp,LOCATION_GRAVE,0,1,nil,e,tp,code1,c:GetOriginalCode(),chk)
end
function c33298291.spfilter3(c,e,tp,code1,code2,chk)
return c33298291.spfilter(c,e,tp)
and c:GetOriginalCode()~=code1 and c:GetOriginalCode()~=code2
and (not chk or not (c:IsHasEffect(EFFECT_NECRO_VALLEY) and Duel.IsChainDisablable(0)))
end end
function c33298291.target(e,tp,eg,ep,ev,re,r,rp,chk) function c33298291.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>=3 and not Duel.IsPlayerAffectedByEffect(tp,59822133) local g=Duel.GetMatchingGroup(c33298291.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
and Duel.IsExistingMatchingCard(c33298291.spfilter1,tp,LOCATION_HAND,0,1,nil,e,tp,false) end if chk==0 then return g:CheckSubGroup(c33298291.fselect,3,3) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end end
function c33298291.activate(e,tp,eg,ep,ev,re,r,rp) function c33298291.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>=3 and not Duel.IsPlayerAffectedByEffect(tp,59822133) if Duel.GetLocationCount(tp,LOCATION_MZONE)<3 or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
and Duel.IsExistingMatchingCard(c33298291.spfilter1,tp,LOCATION_HAND,0,1,nil,e,tp,true) then local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c33298291.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg1=Duel.SelectMatchingCard(tp,c33298291.spfilter1,tp,LOCATION_HAND,0,1,1,nil,e,tp,true)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg2=Duel.SelectMatchingCard(tp,c33298291.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,sg1:GetFirst():GetOriginalCode(),true)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg3=Duel.SelectMatchingCard(tp,c33298291.spfilter3,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,sg1:GetFirst():GetOriginalCode(),sg2:GetFirst():GetOriginalCode(),true) local sg=g:SelectSubGroup(tp,c33298291.fselect,false,3,3)
sg1:Merge(sg2) if sg:GetCount()==3 then
sg1:Merge(sg3) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_ATTACK)
Duel.SpecialSummon(sg1,0,tp,tp,false,false,POS_FACEUP_ATTACK)
end end
end 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