Commit f039909f authored by Tachibana's avatar Tachibana

ybb

parent d4cd4a9c
...@@ -34,17 +34,25 @@ function cm.initial_effect(c) ...@@ -34,17 +34,25 @@ function cm.initial_effect(c)
e3:SetTarget(cm.tgtg) e3:SetTarget(cm.tgtg)
e3:SetOperation(cm.tgop) e3:SetOperation(cm.tgop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--spsummon --search
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_LEAVE_FIELD_P)
e0:SetRange(LOCATION_SZONE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetOperation(cm.regop)
c:RegisterEffect(e0)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_LEAVE_FIELD) e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetRange(LOCATION_REMOVED) e4:SetRange(LOCATION_REMOVED)
e4:SetCountLimit(1,m+900) e4:SetCountLimit(1,m+900)
e4:SetCondition(cm.lspcon) e4:SetCondition(cm.lspcon)
e4:SetTarget(cm.lsptg) e4:SetTarget(cm.lsptg)
e4:SetOperation(cm.lspop) e4:SetOperation(cm.lspop)
e4:SetLabelObject(e0)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function cm.ffilter(c,fc,sub,mg,sg) function cm.ffilter(c,fc,sub,mg,sg)
...@@ -83,15 +91,15 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -83,15 +91,15 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.lcfilter(c,tp) function cm.lcfilter(c,tp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) return c:IsLocation(LOCATION_MZONE) and c:IsType(TYPE_FUSION) and c:IsRace(RACE_PLANT) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsPosition(POS_FACEUP) and c:IsControler(tp)
and bit.band(c:GetPreviousTypeOnField(),TYPE_FUSION)~=0 end
and bit.band(c:GetPreviousRaceOnField(),RACE_PLANT)~=0 function cm.regop(e,tp,eg,ep,ev,re,r,rp)
and bit.band(c:GetPreviousAttributeOnField(),ATTRIBUTE_EARTH)~=0 if eg:IsExists(cm.lcfilter,1,nil,tp) and not eg:IsContains(e:GetHandler()) then
and bit.band(c:GetPreviousCodeOnField(),m)==0 e:SetLabel(1)
and c:IsPreviousLocation(LOCATION_MZONE) else e:SetLabel(0) end
end end
function cm.lspcon(e,tp,eg,ep,ev,re,r,rp) function cm.lspcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.lcfilter,1,nil,tp) and not eg:IsContains(e:GetHandler()) return e:GetLabelObject():GetLabel()==1
end end
function cm.lsptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.lsptg(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
......
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