Commit a7213ead authored by Tachibana's avatar Tachibana

E

parent d620e14b
Pipeline #15956 passed with stages
in 29 minutes and 23 seconds
......@@ -19,13 +19,14 @@ function cm.initial_effect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_PZONE)
e4:SetCondition(cm.pcon)
e4:SetCondition(cm.spcon)
e4:SetCountLimit(1,m+1)
e4:SetTarget(cm.sptg)
e4:SetOperation(cm.spop)
c:RegisterEffect(e4)
--self spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
......@@ -36,14 +37,13 @@ function cm.initial_effect(c)
c:RegisterEffect(e1)
--spsummon success
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22923081,1))
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(cm.addcon)
e2:SetTarget(cm.addtg)
e2:SetOperation(cm.addop)
e2:SetLabel(3)
e2:SetCondition(cm.drcon)
e2:SetTarget(cm.drtg)
e2:SetOperation(cm.drop)
c:RegisterEffect(e2)
end
--tohand
......@@ -66,6 +66,9 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
--SpecialSummon
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_PZONE,0,1,e:GetHandler())
end
function cm.spfilter(c,e,tp)
return c:IsType(TYPE_SYNCHRO) and c:IsSetCard(0x482) and c:IsLevelBelow(8)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
......
......@@ -30,7 +30,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e3)
end
function cm.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_GRAVE+LOCATION_ONFIELD) and c:IsPreviousControler(1-tp) and c:IsRace(RACE_FAIRY) and not c:IsType(TYPE_FUSION+TYPE_XYZ)
return c:IsPreviousLocation(LOCATION_GRAVE+LOCATION_ONFIELD) and c:IsPreviousControler(tp) and c:IsRace(RACE_FAIRY) and not c:IsType(TYPE_FUSION+TYPE_XYZ)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
......
......@@ -142,11 +142,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD,nil)~=0 then
local sg=Duel.GetOperatedGroup()
local sc=sg:GetFirst()
Duel.Draw(tp,1,REASON_EFFECT)
if Duel.IsPlayerCanDraw(tp,1) and sc:IsSetCard(0xa341) and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
Duel.Draw(tp,2,REASON_EFFECT)
end
end
end
\ No newline at end of file
......@@ -30,7 +30,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e3)
end
function cm.tgfilter(c)
return c:IsSetCard(0x341,0x340) and c:IsType(TYPE_CONTINUOUS) and c:IsAbleToGrave()
return c:IsSetCard(0x341,0x340) and c:IsType(TYPE_CONTINUOUS+TYPE_FIELD) and c:IsAbleToGrave()
end
function cm.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end
......
......@@ -88,7 +88,7 @@ function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc:IsType(TYPE_RITUAL) then Duel.SpecialSummon(tc2,SUMMON_TYPE_RITUAL,tp,tp,true,true,POS_FACEUP)
if tc:IsType(TYPE_RITUAL) then Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,true,true,POS_FACEUP)
else
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
......
......@@ -37,8 +37,30 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local fid=e:GetHandler():GetFieldID()
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetCondition(cm.thcon)
e1:SetOperation(cm.thop)
Duel.RegisterEffect(e1,tp)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(m)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetLabelObject(),nil,REASON_EFFECT)
end
function cm.filter0(c)
return c:IsAbleToRemove()
......
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