SP from deck and hand worked once
This commit is contained in:
@@ -12,7 +12,45 @@ function s.initial_effect(c)
|
|||||||
e1:SetTarget(s.efilter)
|
e1:SetTarget(s.efilter)
|
||||||
e1:SetValue(400)
|
e1:SetValue(400)
|
||||||
c:RegisterEffect(e1)
|
c:RegisterEffect(e1)
|
||||||
|
--Special summon 2 "Universe Seed" from hand or deck (Water dragon cluster)
|
||||||
|
local e2=Effect.CreateEffect(c)
|
||||||
|
e2:SetDescription(aux.Stringid(id,1))
|
||||||
|
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
|
||||||
|
e2:SetType(EFFECT_TYPE_QUICK_O) --quick effect
|
||||||
|
e2:SetType(EFFECT_TYPE_TRIGGER_O) --does not work
|
||||||
|
e2:SetCode(EVENT_FREE_CHAIN)
|
||||||
|
e2:SetRange(LOCATION_MZONE)
|
||||||
|
--e2:SetCost(s.spcost)
|
||||||
|
e2:SetTarget(s.sptg)
|
||||||
|
e2:SetOperation(s.spop)
|
||||||
|
c:RegisterEffect(e2)
|
||||||
end
|
end
|
||||||
function s.efilter(e,c)
|
function s.efilter(e,c)
|
||||||
return c:IsType(TYPE_NORMAL)
|
return c:IsType(TYPE_NORMAL)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--Added from water dragon cluster
|
||||||
|
--tributing to activate (not needed)
|
||||||
|
--[[function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
|
||||||
|
if chk==0 then return e:GetHandler():IsReleasable() end it is not needed but infinite chain and not on summon
|
||||||
|
Duel.Release(e:GetHandler(),REASON_COST)
|
||||||
|
end]]
|
||||||
|
|
||||||
|
function s.spfilter(c,e,tp) --water dragon id changed to s(card id)
|
||||||
|
return c:IsCode(561586057) and c:IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP_DEFENSE) --id is water dragon that this sm-s
|
||||||
|
end
|
||||||
|
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
|
||||||
|
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
|
||||||
|
if e:GetHandler():GetSequence()<5 then ft=ft+1 end --getting the targets
|
||||||
|
if chk==0 then return ft>1 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,2,nil,e,tp)
|
||||||
|
and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) end
|
||||||
|
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK)
|
||||||
|
end
|
||||||
|
function s.spop(e,tp,eg,ep,ev,re,r,rp) --special summon part
|
||||||
|
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end
|
||||||
|
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
|
||||||
|
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,2,2,nil,e,tp)
|
||||||
|
if #g==2 then
|
||||||
|
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP_DEFENSE)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user