Commit c8b9c0d8 authored by 聖園ミカ's avatar 聖園ミカ 🐟

str

parent a2a3632c
--水之魔女·觉醒 瑟莉亚
local m=96026035
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,96026001)
--synchro summon
function c96026035.initial_effect(c)
aux.EnableChangeCode(c,96026004,LOCATION_ONFIELD+LOCATION_GRAVE)
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.synlimit)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetDescription(aux.Stringid(96026035,0))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(cm.hspcon)
e2:SetOperation(cm.hspop)
e2:SetCondition(c96026035.hspcon)
e2:SetOperation(c96026035.hspop)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE+CATEGORY_DISABLE)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
e3:SetCountLimit(1,96026040+EFFECT_COUNT_CODE_DUEL)
e3:SetCost(c96026035.cost)
e3:SetTarget(c96026035.tg)
e3:SetOperation(c96026035.op)
c:RegisterEffect(e3)
--atk up
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCountLimit(1,m+EFFECT_COUNT_CODE_DUEL)
e4:SetOperation(cm.operation)
e4:SetCountLimit(1,96026039+EFFECT_COUNT_CODE_DUEL)
e4:SetOperation(c96026035.op2)
c:RegisterEffect(e4)
--return
aux.EnableNeosReturn(c,cm.retop,cm.set_category)
end
--spsummon
function cm.hspfilter(c,tp,sc)
return c:IsCode(96026004) and c:IsControler(tp) and Duel.GetLocationCountFromEx(tp,tp,c,sc)>0
and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL) and not c:IsCode(m)
function c96026035.hspfilter(c,tp,sc)
return c:IsOriginalCodeRule(96026004) and c:IsControler(tp) and Duel.GetLocationCountFromEx(tp,tp,c,sc)>0 and c:IsAbleToGraveAsCost()
end
function cm.hspcon(e,c)
local c=e:GetHandler()
function c96026035.hspcon(e,c)
if c==nil then return true end
return Duel.CheckReleaseGroupEx(c:GetControler(),cm.hspfilter,1,REASON_SPSUMMON,false,nil,c:GetControler(),c)
local p=e:GetHandler():GetControler()
return Duel.IsExistingMatchingCard(c96026035.hspfilter,p,LOCATION_HAND+LOCATION_MZONE,0,1,nil,p,c)
end
function cm.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler()
local g=Duel.SelectReleaseGroupEx(tp,cm.hspfilter,1,1,REASON_SPSUMMON,false,nil,tp,c)
c:SetMaterial(g)
Duel.Release(g,REASON_SPSUMMON)
function c96026035.hspop(e,tp,eg,ep,ev,re,r,rp)
local p=e:GetHandler():GetControler()
local g=Duel.SelectMatchingCard(p,c96026035.hspfilter,p,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,p,e:GetHandler())
Duel.SendtoGrave(g,REASON_COST)
end
function c96026035.q(c,e,tp)
return c:IsCode(96026001) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
--special summon
function cm.spfilter(c,e,tp)
return c:IsCode(96026001) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
function c96026035.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
function c96026035.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(c96026035.q,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
function c96026035.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
local res=Duel.SpecialSummonStep(tc,0,tp,tp,true,true,POS_FACEUP)
if res then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(2500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
local dg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if res and #dg>0 then
Duel.BreakEffect()
local dc=dg:GetFirst()
while dc do
local atk=dc:GetAttack()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_ATTACK_FINAL)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(math.ceil(atk/2))
dc:RegisterEffect(e2)
Duel.NegateRelatedChain(dc,RESET_TURN_SET)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
dc:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_DISABLE_EFFECT)
e4:SetValue(RESET_TURN_SET)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
dc:RegisterEffect(e4)
dc=dg:GetNext()
end
end
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c96026035.q,e,tp),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--atk up
function cm.filter(c)
function c96026035.filter(c)
return c:IsFaceup() and c:IsCode(96026001)
end
function cm.con22(e,tp,eg,ep,ev,re,r,rp)
function c96026035.con22(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and eg and eg:Filter(Card.IsCode,nil,96026004):GetCount()>0
end
function cm.op22(e,tp,eg,ep,ev,re,r,rp)
function c96026035.op22(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(e:GetHandler():GetControler(),96026002,0,0,1)
end
function cm.val(e,tp,eg,ep,ev,re,r,rp)
function c96026035.val(e,tp,eg,ep,ev,re,r,rp)
local sum1=Duel.GetFlagEffect(e:GetHandler():GetControler(),96026001)
local sum2=Duel.GetFlagEffect(e:GetHandler():GetControler(),96026002)
if sum2 and sum2>0 then return sum1*1500+sum2*500
......@@ -132,58 +87,28 @@ function cm.val(e,tp,eg,ep,ev,re,r,rp)
return sum1*1500
end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
function c96026035.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFlagEffect(e:GetHandler():GetControler(),96026001)==0 then
Duel.RegisterFlagEffect(e:GetHandler():GetControler(),96026001,0,0,1) end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.con22)
e1:SetOperation(cm.op22)
e1:SetCondition(c96026035.con22)
e1:SetOperation(c96026035.op22)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetTarget(aux.TargetBoolFunction(function(c) return c:IsFaceup() and c:IsCode(96026001) end))
e2:SetValue(cm.val)
e2:SetValue(c96026035.val)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetCode(EFFECT_UPDATE_DEFENSE)
e3:SetTarget(aux.TargetBoolFunction(function(c) return c:IsFaceup() and c:IsCode(96026001) end))
e3:SetValue(cm.val)
e3:SetValue(c96026035.val)
Duel.RegisterEffect(e3,tp)
end
--return
function cm.filter(c,e,tp)
return c:IsCode(96026004) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end
function cm.set_category(e,tp,eg,ep,ev,re,r,rp)
e:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
if c:IsLocation(LOCATION_EXTRA) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.filter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP)~=0 then
--atk
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(2500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
g:GetFirst():RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
g:GetFirst():RegisterEffect(e2)
end
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