Commit 51ec6c76 authored by 聖園ミカ's avatar 聖園ミカ 🐟

7

parent 6dd83690
......@@ -3,8 +3,6 @@ local m=18588001
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--same effect send this card to grave and spsummon another card check
local e0=aux.AddThisCardInGraveAlreadyCheck(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
......@@ -18,11 +16,10 @@ function cm.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_REMOVE)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,m)
e2:SetLabelObject(e0)
e2:SetCondition(cm.sscon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.sstg)
......@@ -60,36 +57,29 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c)
return not (c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_PLANT))
return not c:IsAttribute(ATTRIBUTE_EARTH) and not c:IsRace(RACE_PLANT)
end
function cm.cfilter(c,tp,se)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_PLANT) and c:IsType(TYPE_FUSION)
and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp)
and (se==nil or c:GetReasonEffect()~=se)
end
function cm.sscon(e,tp,eg,ep,ev,re,r,rp)
local se=e:GetLabelObject():GetLabelObject()
return eg:IsExists(cm.cfilter,1,nil,tp,se)
function cm.cfilter(c,tp)
return c:IsType(TYPE_FUSION) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_PLANT)
and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp) and c:IsPreviousPosition(POS_FACEUP)
end
function cm.ssfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_PLANT) and c:IsType(TYPE_FUSION)
and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp)
and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sscon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.sstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and eg:IsExists(cm.ssfilter,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg
if #eg==1 then
tg=eg:Clone()
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
tg=eg:FilterSelect(tp,cm.ssfilter,1,1,nil,e,tp)
local mg=eg:Filter(cm.cfilter,nil,tp):Filter(cm.ssfilter,nil,e,tp)
if chkc then return mg:IsContains(chkc) end
if chk==0 then return #mg>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
local g=mg
if #mg>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g=mg:Select(tp,1,1,nil)
end
Duel.SetTargetCard(tg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tg,1,0,0)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.ssop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
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