Commit d869638c authored by gg123gg's avatar gg123gg Committed by GitHub

Add files via upload

parent c6d47580
......@@ -23,7 +23,7 @@ function tayu_frtlk.load_metatable(code)
end
function tayu_frtlk.CostCharge(c,mm)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetDescription(aux.Stringid(m,4))
e1:SetCategory(CATEGORY_DRAW+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_HAND)
......@@ -66,7 +66,7 @@ function tayu_frtlk.thop(e,tp,eg,ep,ev,re,r,rp)
tc=th:GetNext()
end
end
function tayu_frtlk.summon_effect(c,mm,cate,con,tg,op)
function tayu_frtlk.summon_effect(c,mm,cate,tt,con,tg,op)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(mm,3))
......@@ -80,9 +80,11 @@ function tayu_frtlk.summon_effect(c,mm,cate,con,tg,op)
e1:SetTarget(tg)
e1:SetOperation(op)
c:RegisterEffect(e1)
if tt then
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
return e1 and e2
end
function tayu_frtlk.SpecialSummonFun(c)
......@@ -115,7 +117,7 @@ function tayu_frtlk.rfilter(c)
end
function tayu_frtlk.efspcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ( c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsReason(REASON_EFFECT) ) or c:IsSummonType(SUMMON_TYPE_NORMAL)
return ( c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:GetReasonEffect(REASON_EFFECT) ) or c:IsSummonType(SUMMON_TYPE_NORMAL)
end
function tayu_frtlk.efspcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -23,7 +23,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_RELEASE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCondition(cm.spcon)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
......
......@@ -6,15 +6,37 @@ function cm.initial_effect(c)
c:SetSPSummonOnce(m)
--special summon proc
local e1=tayu_frtlk.SpecialSummonFun(c,m)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(cm.sptg1)
e2:SetOperation(cm.spop1)
c:RegisterEffect(e2)
--
local e2=tayu_frtlk.summon_effect(c,m,CATEGORY_TOHAND,tayu_frtlk.efspcon1,cm.sptg1,cm.spop1)
--
local e2=tayu_frtlk.summon_effect(c,m,CATEGORY_SPECIAL_SUMMON,tayu_frtlk.efspcon,cm.sptg2,cm.spop2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetTarget(cm.sptg2)
e3:SetOperation(cm.spop2)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCondition(cm.spcon)
c:RegisterEffect(e4)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(12043000)==0
end
function cm.spfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsLevelBelow(5) and c:IsAbleToGraveAsCost() and tayu_frtlk.rfilter(c)
end
function cm.spfilter(c)
function cm.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsLevelBelow(5) and c:IsAbleToHand()
end
function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -30,7 +52,7 @@ function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end
if chk==0 then return true end
end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end
......
......@@ -6,10 +6,32 @@ function cm.initial_effect(c)
c:SetSPSummonOnce(m)
--special summon proc
local e1=tayu_frtlk.SpecialSummonFun(c,m)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(cm.sptg1)
e2:SetOperation(cm.spop1)
c:RegisterEffect(e2)
--
local e2=tayu_frtlk.summon_effect(c,m,CATEGORY_TOHAND,tayu_frtlk.efspcon1,cm.sptg1,cm.spop1)
--
local e3=tayu_frtlk.summon_effect(c,m,CATEGORY_TOHAND,tayu_frtlk.efspcon,cm.sptg2,cm.spop2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetTarget(cm.sptg2)
e3:SetOperation(cm.spop2)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCondition(cm.spcon)
c:RegisterEffect(e4)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(12043000)==0
end
function cm.spfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsLevelBelow(5) and c:IsAbleToGraveAsCost() and tayu_frtlk.rfilter(c)
......@@ -19,19 +41,18 @@ function cm.thfilter(c)
end
function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
end
function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.Destroy(g,REASON_EFFECT)
end
end
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end
......
......@@ -6,16 +6,38 @@ function cm.initial_effect(c)
c:SetSPSummonOnce(m)
--special summon proc
local e1=tayu_frtlk.SpecialSummonFun(c,m)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(cm.sptg1)
e2:SetOperation(cm.spop1)
c:RegisterEffect(e2)
--
local e2=tayu_frtlk.summon_effect(c,m,CATEGORY_TOHAND,nil,cm.sptg1,cm.spop1)
--
local e3=tayu_frtlk.summon_effect(c,m,CATEGORY_TOHAND,tayu_frtlk.efspcon,cm.sptg2,cm.spop2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetTarget(cm.sptg2)
e3:SetOperation(cm.spop2)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCondition(cm.spcon)
c:RegisterEffect(e4)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(12043000)==0
end
function cm.spfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToGraveAsCost() and tayu_frtlk.rfilter(c)
end
function cm.filter(c)
return c:IsReason(REASON_RETURN) and c:GetReasonCard():IsSetCard(0xcfaa)
return c:IsReason(REASON_RETURN) and c:GetReasonEffect():GetHandler():IsSetCard(0xcfaa)
end
function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
......
......@@ -15,7 +15,7 @@ function cm.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,3))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCode(EVENT_RETURN_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon)
......
......@@ -31,7 +31,7 @@ function cm.initial_effect(c)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,3))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCode(EVENT_RETURN_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,m)
e4:SetCondition(cm.thcon)
......@@ -51,7 +51,7 @@ function cm.costfilter(c)
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end
local cc=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil)
local cc=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil)
Duel.SendtoGrave(cc,REASON_COST)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -4,6 +4,7 @@ local m=12043030
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
c:SetSPSummonOnce(m)
aux.AddFusionProcFun2(c,cm.mfiter,cm.mfiter1,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_ONFIELD+LOCATION_GRAVE,0,Duel.Remove,POS_FACEUP,REASON_COST)
--spsummon condition
......
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