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

7

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