Commit aaad2787 authored by wind2009's avatar wind2009 Committed by GitHub

Use aux.RegisterMergedDelayedEvent_ToSingleCard (#2935)

parent 57a9c0ab
......@@ -27,11 +27,12 @@ function s.initial_effect(c)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
--destroy
local custom_code=aux.RegisterMergedDelayedEvent_ToSingleCard(c,id,EVENT_SPSUMMON_SUCCESS)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_CUSTOM+id)
e3:SetCode(custom_code)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,id+2*o)
......@@ -39,7 +40,6 @@ function s.initial_effect(c)
e3:SetTarget(s.destg)
e3:SetOperation(s.desop)
c:RegisterEffect(e3)
aux.RegisterMergedDelayedEvent(c,id,EVENT_SPSUMMON_SUCCESS)
end
function s.thfilter(c)
return c:IsSetCard(0x83) and c:IsType(TYPE_TRAP) and c:IsAbleToHand()
......
......@@ -3,12 +3,12 @@ local s,id,o=GetID()
function s.initial_effect(c)
aux.EnablePendulumAttribute(c)
--to extra
aux.RegisterMergedDelayedEvent(c,id,EVENT_DESTROYED)
local custom_code=aux.RegisterMergedDelayedEvent_ToSingleCard(c,id,EVENT_DESTROYED)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOEXTRA)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CUSTOM+id)
e1:SetCode(custom_code)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,id)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
......
......@@ -17,13 +17,14 @@ function c47710198.initial_effect(c)
e1:SetOperation(c47710198.drop)
c:RegisterEffect(e1)
--remove monster
local custom_code=aux.RegisterMergedDelayedEvent_ToSingleCard(c,47710198,EVENT_SPSUMMON_SUCCESS)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(47710198,1))
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_DAMAGE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCode(custom_code)
e2:SetCountLimit(1,47710199)
e2:SetTarget(c47710198.remtg1)
e2:SetOperation(c47710198.remop1)
......
--星遺物-『星杯』
function c57288708.initial_effect(c)
--send to grave
local custom_code=aux.RegisterMergedDelayedEvent_ToSingleCard(c,57288708,EVENT_SPSUMMON_SUCCESS)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(57288708,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCode(custom_code)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c57288708.tgcon)
......
......@@ -26,10 +26,11 @@ function s.initial_effect(c)
e2:SetOperation(s.spop2)
c:RegisterEffect(e2)
--
local custom_code=aux.RegisterMergedDelayedEvent_ToSingleCard(c,id,EVENT_SPSUMMON_SUCCESS)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_CUSTOM+id)
e3:SetCode(custom_code)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_GRAVE+LOCATION_HAND)
e3:SetCountLimit(1,id+o*2)
......@@ -38,7 +39,6 @@ function s.initial_effect(c)
e3:SetTarget(s.mattg)
e3:SetOperation(s.matop)
c:RegisterEffect(e3)
aux.RegisterMergedDelayedEvent(c,id,EVENT_SPSUMMON_SUCCESS)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_DRAW)
......
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