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()
......@@ -142,4 +144,4 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if th:GetCount()>4 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
\ No newline at end of file
......@@ -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
......@@ -44,4 +66,4 @@ function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
\ No newline at end of file
......@@ -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)
......@@ -70,4 +70,4 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SSet(tp,c)
Duel.ConfirmCards(1-tp,c)
end
end
end
\ No newline at end of file
......@@ -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)
......@@ -81,4 +81,4 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SSet(tp,c)
Duel.ConfirmCards(1-tp,c)
end
end
end
\ No newline at end of file
Duel.LoadScript("c12043000.lua")
--同步的两人 高音协曲
local m=12043030
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
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
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(cm.splimit)
c:RegisterEffect(e1)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.thcost)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--Remove
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_DRAW)
e2:SetCountLimit(1,m+100)
e2:SetCondition(cm.condition)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
function cm.mfiter(c)
return c:IsSetCard(0xafaa)
end
function cm.mfiter1(c)
return c:IsSetCard(0xcfaa)
end
function cm.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function cm.costfilter(c)
return c:IsAbleToGraveAsCost()
end
function cm.thcost(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.cfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil)
Duel.SendtoGrave(cc,REASON_COST)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local h1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local h2=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
return Duel.GetCurrentPhase()~=PHASE_DRAW and Duel.IsPlayerCanRemove(tp) and Duel.IsPlayerCanRemove(1-tp) and h1>0 and h2>0
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local h1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local h2=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
if h1<1 or h2<1 then return end
local turnp=Duel.GetTurnPlayer()
Duel.Hint(HINT_SELECTMSG,turnp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(turnp,aux.TRUE,turnp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-turnp,g1)
Duel.Hint(HINT_SELECTMSG,1-turnp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(1-turnp,aux.TRUE,1-turnp,LOCATION_HAND,0,1,1,nil)
g1:Merge(g2)
Duel.Remove(g1,POS_FACEUP,REASON_EFFECT)
Duel.LoadScript("c12043000.lua")
--同步的两人 高音协曲
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
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(cm.splimit)
c:RegisterEffect(e1)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.thcost)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--Remove
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_DRAW)
e2:SetCountLimit(1,m+100)
e2:SetCondition(cm.condition)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
function cm.mfiter(c)
return c:IsSetCard(0xafaa)
end
function cm.mfiter1(c)
return c:IsSetCard(0xcfaa)
end
function cm.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function cm.costfilter(c)
return c:IsAbleToGraveAsCost()
end
function cm.thcost(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.cfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil)
Duel.SendtoGrave(cc,REASON_COST)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local h1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local h2=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
return Duel.GetCurrentPhase()~=PHASE_DRAW and Duel.IsPlayerCanRemove(tp) and Duel.IsPlayerCanRemove(1-tp) and h1>0 and h2>0
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local h1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local h2=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
if h1<1 or h2<1 then return end
local turnp=Duel.GetTurnPlayer()
Duel.Hint(HINT_SELECTMSG,turnp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(turnp,aux.TRUE,turnp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-turnp,g1)
Duel.Hint(HINT_SELECTMSG,1-turnp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(1-turnp,aux.TRUE,1-turnp,LOCATION_HAND,0,1,1,nil)
g1:Merge(g2)
Duel.Remove(g1,POS_FACEUP,REASON_EFFECT)
end
\ No newline at end of file
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