Commit 50007db9 authored by JoyJ's avatar JoyJ

fix

parent b57dca15
......@@ -14,7 +14,7 @@ function c20049999.initial_effect(c)
end
e:SetValue(newv)
orig(c,e,...)
else if c:GetAttack()>0 and ((e:GetCode()==EFFECT_SET_ATTACK_FINAL and val == 0) or (e:GetCode()==EFFECT_UPDATE_ATTACK and c:GetAttack() + val == 0)) then
elseif c:GetAttack()>0 and ((e:GetCode()==EFFECT_SET_ATTACK_FINAL and val == 0) or (e:GetCode()==EFFECT_UPDATE_ATTACK and c:GetAttack() + val == 0)) then
Duel.RaiseEvent(EVENT_CUSTOM+20049999)
orig(c,e,...)
end
......
......@@ -71,7 +71,7 @@ function c20140001.mkcostfilter(c)
and c:IsRace(RACE_BEAST) and c:IsAbleToRemoveAsCost()
end
function c20140001.mkcostfilter2(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsCanBeEffectTarget(e)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsCanBeEffectTarget(e) and
Duel.IsExistingMatchingCard(c20140001.mkcostfilter,tp,LOCATION_MZONE,0,3,c)
end
function c20140001.mktgfilter(c,e,tp)
......
......@@ -20,7 +20,7 @@ function c20140002.mkcostfilter(c)
and c:IsRace(RACE_MACHINE) and c:IsAbleToRemoveAsCost()
end
function c20140002.mkcostfilter2(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsCanBeEffectTarget(e)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsCanBeEffectTarget(e) and
Duel.IsExistingMatchingCard(c20140002.mkcostfilter,tp,LOCATION_MZONE,0,3,c)
end
function c20140002.mktgfilter(c,e,tp)
......
......@@ -71,7 +71,7 @@ function c20150001.mkcostfilter(c)
and c:IsRace(RACE_BEAST) and c:IsAbleToRemoveAsCost()
end
function c20150001.mkcostfilter2(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsCanBeEffectTarget(e)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsCanBeEffectTarget(e) and
Duel.IsExistingMatchingCard(c20150001.mkcostfilter,tp,LOCATION_MZONE,0,3,c)
end
function c20150001.mktgfilter(c,e,tp)
......
......@@ -20,7 +20,7 @@ function c20150002.mkcostfilter(c)
and c:IsRace(RACE_WARRIOR) and c:IsAbleToRemoveAsCost()
end
function c20150002.mkcostfilter2(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsCanBeEffectTarget(e)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsCanBeEffectTarget(e) and
Duel.IsExistingMatchingCard(c20150002.mkcostfilter,tp,LOCATION_MZONE,0,3,c)
end
function c20150002.mktgfilter(c,e,tp)
......
......@@ -71,7 +71,7 @@ function c20160001.mkcostfilter(c)
and c:IsRace(RACE_FAIRY) and c:IsAbleToRemoveAsCost()
end
function c20160001.mkcostfilter2(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsCanBeEffectTarget(e)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsCanBeEffectTarget(e) and
Duel.IsExistingMatchingCard(c20160001.mkcostfilter,tp,LOCATION_MZONE,0,3,c)
end
function c20160001.mktgfilter(c,e,tp)
......
......@@ -8,7 +8,7 @@ function c20160002.initial_effect(c)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_PZONE)
e0:SetProperty(EFFECT_FLAG_CARD_TARGET)
s e0:SetTarget(c20160002.mkcost)
e0:SetTarget(c20160002.mkcost)
e0:SetTarget(c20160002.mktg)
e0:SetOperation(c20160002.mkop)
c:RegisterEffect(e0)
......@@ -19,7 +19,7 @@ function c20160002.mkcostfilter(c)
and c:IsRace(RACE_WARRIOR) and c:IsAbleToRemoveAsCost()
end
function c20160002.mkcostfilter2(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsCanBeEffectTarget(e)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsCanBeEffectTarget(e) and
Duel.IsExistingMatchingCard(c20160002.mkcostfilter,tp,LOCATION_MZONE,0,3,c)
end
function c20160002.mktgfilter(c,e,tp)
......
--[决斗编年史]抽卡的创造者
function c66666004.initial_effect(c)
if c66666004.reg then return end
c66666004.reg = true
c66666004.active = {[0]=false,[1]=false}
local e1=Effect.GlobalEffect()
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ADJUST)
e1:SetOperation(c66666004.init)
Duel.RegisterEffect(e1,0)
local e2=Effect.GlobalEffect()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_PREDRAW)
e2:SetCondition(c66666004.cfcon)
e2:SetOperation(c66666004.cfop)
Duel.RegisterEffect(e2,0)
end
c66666004.tag = true
function c66666004.init(e)
for tp = 0,1 do
local g = Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_HAND,0,nil,66666004)
local i = g:GetCount()
if i > 0 then
c66666004.active[tp] = true
c66666004.active[tp+10] = true
Duel.Exile(g,REASON_RULE)
local top = Duel.GetDecktopGroup(tp,i)
top:ForEach(c66666004.exile)
Duel.Exile(top,REASON_RULE)
end
local g2 = Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_DECK,0,nil,66666004)
if g2:GetCount() > 0 then
c66666004.active[tp] = true
c66666004.active[tp+10] = true
Duel.Exile(g2,REASON_RULE)
end
end
e:Reset()
end
function c66666004.exile(c)
local tp = c:GetOwner()
Duel.SendtoHand(Duel.CreateToken(tp,c:GetOriginalCode()),tp,REASON_RULE)
end
function c66666004.cfcon(e,tp,eg,ep,ev,re,r,rp)
tp = Duel.GetTurnPlayer()
return c66666004.active[tp]
and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
end
c66666004.announcefilter = {TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
function c66666004.filter(c,code)
return c:GetOriginalCode()==code and c:GetOwner() == c:GetControler()
end
function c66666004.cfop(e,tp,eg,ep,ev,re,r,rp)
tp = Duel.GetTurnPlayer()
c66666004.active[tp+10] = not c66666004.active[tp+10]
if c66666004.tag and c66666004.active[tp+10] then return end
local top = Duel.GetDecktopGroup(tp,1):GetFirst()
if not top or top:IsFaceup() then return end
Duel.Hint(HINT_MESSAGE,tp,aux.Stringid(66666004,1))
Duel.Hint(HINT_MESSAGE,1-tp,aux.Stringid(66666004,1))
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(66666004,0))
local code = 66666000
while code ~= 66666000 do
code = Duel.AnnounceCardFilter(tp,table.unpack(c66666004.announcefilter))
end
Duel.Exile(top,REASON_RULE)
local newc = Duel.CreateToken(tp,code)
Duel.SendtoDeck(newc,nil,0,REASON_RULE)
if Duel.GetMatchingGroupCount(c66666004.filter,tp,
LOCATION_DECK+LOCATION_ONFIELD+LOCATION_EXTRA+LOCATION_GRAVE+LOCATION_HAND+LOCATION_OVERLAY+LOCATION_REMOVED
,0,nil,code) and
Duel.SelectYesNo(1-tp,aux.Stringid(66666004,2)) then
Duel.Win(1-tp,0x0)
end
--[决斗编年史]抽卡的创造者
function c66666004.initial_effect(c)
if c66666004.reg then return end
c66666004.reg = true
c66666004.active = {[0]=false,[1]=false}
local e1=Effect.GlobalEffect()
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ADJUST)
e1:SetOperation(c66666004.init)
Duel.RegisterEffect(e1,0)
local e2=Effect.GlobalEffect()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_PREDRAW)
e2:SetCondition(c66666004.cfcon)
e2:SetOperation(c66666004.cfop)
Duel.RegisterEffect(e2,0)
end
c66666004.tag = true
function c66666004.init(e)
for tp = 0,1 do
local g = Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_HAND,0,nil,66666004)
local i = g:GetCount()
if i > 0 then
c66666004.active[tp] = true
c66666004.active[tp+10] = true
Duel.Exile(g,REASON_RULE)
local top = Duel.GetDecktopGroup(tp,i)
top:ForEach(c66666004.exile)
Duel.Exile(top,REASON_RULE)
end
local g2 = Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_DECK,0,nil,66666004)
if g2:GetCount() > 0 then
c66666004.active[tp] = true
c66666004.active[tp+10] = true
Duel.Exile(g2,REASON_RULE)
end
end
e:Reset()
end
function c66666004.exile(c)
local tp = c:GetOwner()
Duel.SendtoHand(Duel.CreateToken(tp,c:GetOriginalCode()),tp,REASON_RULE)
end
function c66666004.cfcon(e,tp,eg,ep,ev,re,r,rp)
tp = Duel.GetTurnPlayer()
return c66666004.active[tp]
and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
end
c66666004.announcefilter = {TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
function c66666004.filter(c,code)
return c:GetOriginalCode()==code and c:GetOwner() == c:GetControler()
end
function c66666004.cfop(e,tp,eg,ep,ev,re,r,rp)
tp = Duel.GetTurnPlayer()
c66666004.active[tp+10] = not c66666004.active[tp+10]
if c66666004.tag and c66666004.active[tp+10] then return end
local top = Duel.GetDecktopGroup(tp,1):GetFirst()
if not top or top:IsFaceup() then return end
Duel.Hint(HINT_MESSAGE,tp,aux.Stringid(66666004,1))
Duel.Hint(HINT_MESSAGE,1-tp,aux.Stringid(66666004,1))
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(66666004,0))
local code = 66666000
while code ~= 66666000 do
code = Duel.AnnounceCardFilter(tp,table.unpack(c66666004.announcefilter))
end
Duel.Exile(top,REASON_RULE)
local newc = Duel.CreateToken(tp,code)
Duel.SendtoDeck(newc,nil,0,REASON_RULE)
if Duel.GetMatchingGroupCount(c66666004.filter,tp,
LOCATION_DECK+LOCATION_ONFIELD+LOCATION_EXTRA+LOCATION_GRAVE+LOCATION_HAND+LOCATION_OVERLAY+LOCATION_REMOVED
,0,nil,code) and
Duel.SelectYesNo(1-tp,aux.Stringid(66666004,2)) then
Duel.Win(1-tp,0x0)
end
end
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