Commit 5dfc2590 authored by 聖園ミカ's avatar 聖園ミカ 🐟

update

parent 225b717c
No preview for this file type
--内心羞涩的二叶柚实
local m=17292096
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--Activate(summon)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SPSUMMON)
e1:SetCondition(aux.NegateSummonCondition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target1)
e1:SetOperation(cm.activate1)
c:RegisterEffect(e1)
--Activate(effect)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_CHAINING)
e2:SetCondition(cm.condition2)
e2:SetCost(cm.cost)
e2:SetTarget(cm.target2)
e2:SetOperation(cm.activate2)
c:RegisterEffect(e2)
end
cm.has_text_type=TYPE_DUAL
function cm.cfilter(c)
return c:IsType(TYPE_DUAL) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function cm.activate1(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function cm.activate2(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
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