Commit bd2d63ab authored by TanakaKotoha's avatar TanakaKotoha

foo foo

parent cf3cb862
Pipeline #828 passed with stages
in 45 minutes and 16 seconds
--世界树·马格纳 --世界树·马格纳
function c47570200.initial_effect(c) function c47570200.initial_effect(c)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,c47570200.synfilter,aux.NonTuner(c47570200.synfilter1),1) aux.AddSynchroProcedure(c,c47570200.synfilter,aux.NonTuner(c47570200.synfilter1),1)
c:EnableReviveLimit() c:EnableReviveLimit()
--splimit --splimit
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(c47570200.psplimit) e1:SetTarget(c47570200.psplimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--inactivatable --inactivatable
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_INACTIVATE) e2:SetCode(EFFECT_CANNOT_INACTIVATE)
e2:SetRange(LOCATION_PZONE) e2:SetRange(LOCATION_PZONE)
e2:SetValue(c47570200.effectfilter) e2:SetValue(c47570200.effectfilter)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_DISEFFECT) e3:SetCode(EFFECT_CANNOT_DISEFFECT)
e3:SetRange(LOCATION_PZONE) e3:SetRange(LOCATION_PZONE)
e3:SetValue(c47570200.effectfilter) e3:SetValue(c47570200.effectfilter)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--special summon --special summon
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS) e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCondition(c47570200.spcon) e4:SetCondition(c47570200.spcon0)
e4:SetOperation(c47570200.spop) e4:SetOperation(c47570200.spop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--special summon2 --special summon2
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(47570200,0)) e5:SetDescription(aux.Stringid(47570200,0))
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_TO_DECK) e5:SetCode(EVENT_TO_DECK+EVENT_TO_GRAVE)
e5:SetRange(LOCATION_MZONE) e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1) e5:SetCountLimit(1)
e5:SetCondition(c47570200.spcon) e5:SetCondition(c47570200.spcon)
e5:SetTarget(c47570200.sptg2) e5:SetTarget(c47570200.sptg2)
e5:SetOperation(c47570200.spop2) e5:SetOperation(c47570200.spop2)
c:RegisterEffect(e5) c:RegisterEffect(e5)
local e6=e5:Clone() -- local e6=e5:Clone()
e6:SetCode(EVENT_TO_GRAVE) -- e6:SetCode(EVENT_TO_GRAVE)
e6:SetCondition(c47570200.spcon2) -- e6:SetCondition(c47570200.spcon2)
c:RegisterEffect(e6) -- c:RegisterEffect(e6)
--cannot effect --cannot effect
local e7=Effect.CreateEffect(c) local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(47570200,1)) e7:SetDescription(aux.Stringid(47570200,1))
e7:SetType(EFFECT_TYPE_QUICK_O) e7:SetType(EFFECT_TYPE_QUICK_O)
e7:SetCode(EVENT_FREE_CHAIN) e7:SetCode(EVENT_FREE_CHAIN)
e7:SetHintTiming(0,TIMING_DRAW_PHASE) e7:SetHintTiming(0,TIMING_DRAW_PHASE)
e7:SetRange(LOCATION_MZONE) e7:SetRange(LOCATION_MZONE)
e7:SetCost(c47570200.efcost) e7:SetCost(c47570200.efcost)
e7:SetOperation(c47570200.efop) e7:SetOperation(c47570200.efop)
c:RegisterEffect(e7) c:RegisterEffect(e7)
end end
function c47570200.synfilter(c) function c47570200.synfilter(c)
return c:IsRace(RACE_PLANT) return c:IsRace(RACE_PLANT)
end end
function c47570200.synfilter1(c) function c47570200.synfilter1(c)
return c:IsRace(RACE_PLANT) or c:IsType(TYPE_PENDULUM) return c:IsRace(RACE_PLANT) or c:IsType(TYPE_PENDULUM)
end end
function c47570200.pefilter(c) function c47570200.pefilter(c)
return c:IsRace(RACE_PLANT) or c:IsSetCard(0x5da) or c:IsAttribute(ATTRIBUTE_EARTH) return c:IsRace(RACE_PLANT) or c:IsSetCard(0x5da) or c:IsAttribute(ATTRIBUTE_EARTH)
end end
function c47570200.psplimit(e,c,tp,sumtp,sumpos) function c47570200.psplimit(e,c,tp,sumtp,sumpos)
return not c47570200.pefilter(c) and bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM return not c47570200.pefilter(c) and bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end end
function c47570200.effectfilter(e,ct) function c47570200.effectfilter(e,ct)
local p=e:GetHandler():GetControler() local p=e:GetHandler():GetControler()
local te,tp,loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION) local te,tp,loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION)
return p==tp and te:GetHandler():IsRace(RACE_PLANT) and bit.band(loc,LOCATION_ONFIELD)~=0 return p==tp and te:GetHandler():IsRace(RACE_PLANT) and bit.band(loc,LOCATION_ONFIELD)~=0
end end
function c47570200.spcon(e,tp,eg,ep,ev,re,r,rp) function c47570200.spcon0(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end end
function c47570200.filter(c,e,tp) function c47570200.filter(c,e,tp)
return c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) return c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end end
function c47570200.spop(e,tp,eg,ep,ev,re,r,rp) function c47570200.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c47570200.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c47570200.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c47570200.tefilter(c,tp) function c47570200.tefilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_EXTRA) and c:IsRace(RACE_PLANT) return c:IsFaceup() and c:IsControler(tp) and (c:IsLocation(LOCATION_EXTRA) or c:IsLocation(LOCATION_GRAVE)) and c:IsRace(RACE_PLANT)
and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousLocation(LOCATION_ONFIELD)
end end
function c47570200.spcon(e,tp,eg,ep,ev,re,r,rp) function c47570200.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c47570200.tefilter,1,nil,tp) return eg:IsExists(c47570200.tefilter,1,nil,tp)
end end
function c47570200.tgfilter(c,tp) --function c47570200.tgfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) and c:IsRace(RACE_PLANT) -- return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) and c:IsRace(RACE_PLANT)
and c:IsPreviousLocation(LOCATION_ONFIELD) -- and c:IsPreviousLocation(LOCATION_ONFIELD)
end --end
function c47570200.spcon2(e,tp,eg,ep,ev,re,r,rp) --function c47570200.spcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c47570200.tgfilter,1,nil,tp) --return eg:IsExists(c47570200.tgfilter,1,nil,tp)
end --end
function c47570200.filter2(c,e,tp) function c47570200.filter2(c,e,tp)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c47570200.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) function c47570200.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c47570200.filter2,tp,LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c47570200.filter2,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c47570200.spop2(e,tp,eg,ep,ev,re,r,rp) function c47570200.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c47570200.filter2,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c47570200.filter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(8) e1:SetValue(8)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCod(EFFECT_ADD_TYPE) e2:SetCod(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_TUNER) e2:SetValue(TYPE_TUNER)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
end end
function c47570200.efcost(e,tp,eg,ep,ev,re,r,rp,chk) function c47570200.efcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function c47570200.efop(e,tp,eg,ep,ev,re,r,rp) function c47570200.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,1) e1:SetTargetRange(1,1)
e1:SetValue(c47570200.aclimit) e1:SetValue(c47570200.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c47570200.aclimit(e,re,tp) function c47570200.aclimit(e,re,tp)
local c=re:GetHandler() local c=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and not c:IsRace(RACE_PLANT) return re:IsActiveType(TYPE_MONSTER) and not c:IsRace(RACE_PLANT)
end end
\ No newline at end of file
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