NSummon working but not conditional

This commit is contained in:
2021-11-29 13:24:25 +01:00
parent cbeee3115b
commit 5ea8f8f6da

View File

@@ -16,27 +16,18 @@ function s.initial_effect(c)
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:SetCode(EVENT_FREE_CHAIN)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) --quick effect | copied from obelisk
e2:SetCode(EVENT_SUMMON_SUCCESS) --added from obelisk | works on summon but need to chain in order to activate effect
e2:SetRange(LOCATION_MZONE)
--e2:SetCost(s.spcost)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
function s.efilter(e,c)
return c:IsType(TYPE_NORMAL)
return c:IsType(TYPE_NORMAL) --change to archetype code maybe | Pendulum effect
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
function s.spfilter(c,e,tp)
return c:IsCode(561586057) and c:IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP_DEFENSE) --card id for sp summon
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)