Commit 66566408 authored by Tachibana's avatar Tachibana

ybb

parent d94fb3d5
......@@ -46,8 +46,12 @@ function Color_Song.AddCount(c)
end
end
function Color_Song.AddCount_Op(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,m-1)>=4 then extraCount[1+tp]=extraCount[1+tp]+1 end
if Duel.GetFlagEffect(1-tp,m-1)>=4 then extraCount[tp]=extraCount[tp]+1 end
if Duel.GetFlagEffect(tp,m-1)>=4 then Color_Song.AddC(tp) end
if Duel.GetFlagEffect(1-tp,m-1)>=4 then Color_Song.AddC(1-tp) end
end
function Color_Song.AddC(tp)
if not Color_Song.AddCount_check then return end
extraCount[1+tp]=extraCount[1+tp]+1
end
--适用---------------------------------------------------------
function Color_Song.UseEffect(e,tp)
......@@ -318,7 +322,7 @@ end
--Memory
function Color_Song.Memory_Op(e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=Duel.SelectMatchingCard(tp,Card.IsControlerCanBeChanged,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
local tc=Duel.SelectMatchingCard(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil):GetFirst()
if tc then
Duel.GetControl(tc,tp,PHASE_END,2)
end
......@@ -362,6 +366,7 @@ function Color_Song.Hunter_drcon1(e,tp,eg,ep,ev,re,r,rp)
end
function Color_Song.Hunter_drop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
Duel.Draw(1-tp,1,REASON_EFFECT)
end
function Color_Song.Hunter_regcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Color_Song.Hunter_drFilter,1,nil,1-tp)
......@@ -377,6 +382,7 @@ function Color_Song.Hunter_drop2(e,tp,eg,ep,ev,re,r,rp)
local n=Duel.GetFlagEffect(tp,m-3)
Duel.ResetFlagEffect(tp,m-3)
Duel.Draw(tp,n,REASON_EFFECT)
Duel.Draw(1-tp,n,REASON_EFFECT)
end
function Color_Song.Hunter_Op(e,tp)
local c=e:GetHandler()
......@@ -431,6 +437,7 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.con1)
e1:SetTarget(cm.tg1)
e1:SetOperation(cm.op1)
......@@ -440,6 +447,7 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.tg2)
e2:SetOperation(cm.op2)
......
......@@ -53,7 +53,7 @@ function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,x,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,x,1-tp,LOCATION_MZONE)
end
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local x=Duel.GetFieldGroup(tp,LOCATION_MZONE,0):FilterCount(cm.tgf1,nil)
if not Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,x,nil) then return end
......
......@@ -19,6 +19,7 @@ function cm.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.tg2)
e2:SetOperation(cm.op2)
c:RegisterEffect(e2)
Color_Song.AddCount(c)
......@@ -57,14 +58,13 @@ end
function cm.tgf2(c)
return c:IsAbleToDeck() and c.isColorSong
end
function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.tgf1),tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingMatchingCard(cm.tgf2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
Color_Song.Record_Op(e,tp,eg,ep,ev,re,r,rp)
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local max=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0):FilterCount(aux.NecroValleyFilter(cm.tgf1),nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.tgf2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,max,nil)
......@@ -73,7 +73,7 @@ function cm.op1(e,tp,eg,ep,ev,re,r,rp)
local count=Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tgf1),tp,LOCATION_GRAVE,0,count,count,nil)
if g2:GetCount()>0 then
if g2:GetCount()==count then
Duel.SendtoHand(g2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g2)
end
......
......@@ -94,7 +94,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=g:Select(tp,1,1,nil)
if Duel.SendtoGrave(sg,REASON_EFFECT)>0 then
Duel.BreakEffect()
extraCount[1+tp]=extraCount[1+tp]+1
Color_Song.AddC(tp)
end
end
Color_Song.UseEffect(e,tp)
......@@ -110,8 +110,9 @@ function cm.con2(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetCurrentChain()
if ct<2 then return end
if not Duel.IsPlayerCanDraw(tp,1) or not Duel.IsPlayerCanDraw(1-tp,1) then return false end
local te,p,loc=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION)
return te and te:GetHandler().isColorSong and loc==LOCATION_ONFIELD and p==tp and rp==1-tp
local te,p=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
local tc=te:GetHandler()
return te and tc.isColorSong and tc:IsLocation(LOCATION_ONFIELD) and p==tp and rp==1-tp
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
......
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