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