Commit f039909f authored by Tachibana's avatar Tachibana

ybb

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