Commit 2b9d1947 authored by 聖園ミカ's avatar 聖園ミカ 🐟

byd

parent 30cb31e7
......@@ -10,7 +10,6 @@ function cm.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
......@@ -26,52 +25,9 @@ function cm.initial_effect(c)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(m,ACTIVITY_SUMMON,cm.counterfilter)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
Duel.AddCustomActivityCounter(m,ACTIVITY_FLIPSUMMON,cm.counterfilter)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,cm.chainfilter)
end
function cm.chainfilter(re,tp,cid)
return not re:IsActiveType(TYPE_MONSTER)
end
function cm.counterfilter(c)
return not c:IsType(TYPE_EFFECT)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SUMMON)==0
and Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0
and Duel.GetCustomActivityCount(m,tp,ACTIVITY_FLIPSUMMON)==0 and Duel.GetCustomActivityCount(m,tp,ACTIVITY_CHAIN)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.sumlimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
Duel.RegisterEffect(e3,tp)
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e4:SetCode(EFFECT_CANNOT_ACTIVATE)
e4:SetTargetRange(1,0)
e4:SetValue(cm.aclimit)
e4:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e4,tp)
end
function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsType(TYPE_EFFECT)
end
function cm.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WIND) and not c:IsType(TYPE_EFFECT)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WIND) and not c:IsType(TYPE_EFFECT)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
......@@ -111,13 +67,10 @@ function cm.spfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemoveAsCost()
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) and cm.cost(e,tp,eg,ep,ev,re,r,rp,0)
and e:GetHandler():GetFlagEffect(m)==0 end
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
cm.cost(e,tp,eg,ep,ev,re,r,rp,1)
Duel.Remove(g,POS_FACEUP,REASON_COST)
e:GetHandler():RegisterFlagEffect(m,RESET_CHAIN,0,1)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -27,7 +27,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_EFFECT)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WIND) and not c:IsType(TYPE_EFFECT)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
......
......@@ -25,7 +25,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_EFFECT)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WIND) and not c:IsType(TYPE_EFFECT)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) then return false end
......
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