Commit 01399a8b authored by DailyShana's avatar DailyShana

fix

parent af91f0b1
......@@ -5,8 +5,6 @@ function c24207889.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1c0)
e1:SetTarget(c24207889.acttg)
e1:SetOperation(c24207889.actop)
c:RegisterEffect(e1)
--adjust
local e2=Effect.CreateEffect(c)
......@@ -32,30 +30,16 @@ function c24207889.initial_effect(c)
e6:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
c:RegisterEffect(e6)
end
c24207889[0]=nil
c24207889[1]=nil
function c24207889.sumlimit(e,c,sump,sumtype,sumpos,targetp)
if sumpos and bit.band(sumpos,POS_FACEDOWN)>0 then return false end
local tp=sump
if targetp then tp=targetp end
return Duel.IsExistingMatchingCard(c24207889.rmfilter,tp,LOCATION_MZONE,0,1,nil,c:GetRace())
end
function c24207889.rmfilter(c,rc)
return c:IsFaceup() and c:IsRace(rc)
end
function c24207889.filter(c,g,pg)
if pg:IsContains(c) then return false end
local rc=c:GetRace()
return g:IsExists(Card.IsRace,1,c,rc) or pg:IsExists(Card.IsRace,1,c,rc)
end
function c24207889.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
c24207889[0]=Group.CreateGroup()
c24207889[0]:KeepAlive()
c24207889[1]=Group.CreateGroup()
c24207889[1]:KeepAlive()
end
function c24207889.actop(e,tp,eg,ep,ev,re,r,rp)
function c24207889.adjustop(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase()
if (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL then return end
local sg=Group.CreateGroup()
for p=0,1 do
local g=Duel.GetMatchingGroup(Card.IsFaceup,p,LOCATION_MZONE,0,nil)
local race=1
......@@ -65,36 +49,13 @@ function c24207889.actop(e,tp,eg,ep,ev,re,r,rp)
if rc>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local dg=rg:Select(p,rc-1,rc-1,nil)
Duel.SendtoGrave(dg,REASON_EFFECT)
local g=Duel.GetMatchingGroup(Card.IsFaceup,p,LOCATION_MZONE,0,nil)
sg:Merge(dg)
end
race=race*2
end
end
end
function c24207889.adjustop(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase()
if (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL then return end
local c=e:GetHandler()
if c:GetFlagEffect(24207889)==0 then
c:RegisterFlagEffect(24207889,RESET_EVENT+0x1ff0000,0,1)
c24207889[0]:Clear()
c24207889[1]:Clear()
end
for p=0,1 do
local pg=c24207889[p]
local g=Duel.GetMatchingGroup(Card.IsFaceup,p,LOCATION_MZONE,0,nil)
local dg=g:Filter(c24207889.filter,nil,g,pg)
if dg:GetCount()==0 or Duel.SendtoGrave(dg,REASON_EFFECT)==0 then
pg:Clear()
pg:Merge(g)
pg:Sub(dg)
else
g=Duel.GetMatchingGroup(Card.IsFaceup,p,LOCATION_MZONE,0,nil)
pg:Clear()
pg:Merge(g)
pg:Sub(dg)
Duel.Readjust()
end
if sg:GetCount()>0 then
Duel.SendtoGrave(sg,REASON_RULE)
Duel.Readjust()
end
end
......@@ -49,6 +49,7 @@ function c31759689.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
Duel.BreakEffect()
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
end
end
......
......@@ -65,19 +65,24 @@ end
function c37310367.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c37310367.disfilter,nil,e)
local tc=g:GetFirst()
while tc do
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
tc=g:GetNext()
if g:GetCount()<2 then return end
local rc=re:GetHandler()
local sc=g:GetFirst()
if sc==rc then sc=g:GetNext() end
if sc:IsControler(tp) and sc:IsRace(RACE_CYBERS) and rc:IsControler(1-tp) then
while tc do
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
end
......@@ -23,7 +23,8 @@ function c67744384.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,Card.IsFacedown,tp,LOCATION_MZONE,0,1,3,nil)
if g:GetCount()>0 then
local ct=Duel.ChangePosition(g,POS_FACEUP_DEFENSE)
if ct==g:GetCount() and g:IsExists(Card.IsSetCard,ct,nil,0x10b) then
local og=Duel.GetOperatedGroup()
if og:IsExists(Card.IsSetCard,ct,nil,0x10b) then
local sg=Duel.GetMatchingGroup(c67744384.thfilter,tp,LOCATION_DECK,0,nil)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(67744384,1)) then
Duel.BreakEffect()
......
......@@ -25,6 +25,7 @@ function c74715061.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,74715061)
e3:SetTarget(c74715061.sptg2)
e3:SetOperation(c74715061.spop2)
c:RegisterEffect(e3)
......
......@@ -25,7 +25,6 @@ function c94142993.initial_effect(c)
e3:SetDescription(aux.Stringid(94142993,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,94142995)
......@@ -70,7 +69,7 @@ function c94142993.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c94142993.cfilter,1,nil,tp)
end
function c94142993.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e) end
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c94142993.spop(e,tp,eg,ep,ev,re,r,rp)
......
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