Commit 7e40b5e5 authored by VanillaSalt's avatar VanillaSalt

fix

parent 43a6b6ea
...@@ -63,7 +63,7 @@ function c23603403.valcheck(e,c) ...@@ -63,7 +63,7 @@ function c23603403.valcheck(e,c)
e:GetLabelObject():SetLabel(0) e:GetLabelObject():SetLabel(0)
end end
end end
function c23603403.condition(e,tp,eg,ep,ev,re,r,rp) function c23603403.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end end
function c23603403.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) function c23603403.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -90,7 +90,7 @@ function c47819246.mtop(e,tp,eg,ep,ev,re,r,rp) ...@@ -90,7 +90,7 @@ function c47819246.mtop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(2) e1:SetValue(2)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
ec:RegisterEffect(e1) ec:RegisterEffect(e1)
end end
end end
...@@ -62,18 +62,21 @@ function c62709239.spfilter2(c,lv,e,tp) ...@@ -62,18 +62,21 @@ function c62709239.spfilter2(c,lv,e,tp)
end end
function c62709239.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c62709239.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c62709239.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsExistingTarget(c62709239.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectTarget(tp,c62709239.spfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g1=Duel.SelectTarget(tp,c62709239.spfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc1=g1:GetFirst() local tc1=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectTarget(tp,c62709239.spfilter2,tp,LOCATION_GRAVE,0,1,1,tc1,tc1:GetLevel(),e,tp) local g2=Duel.SelectTarget(tp,c62709239.spfilter2,tp,LOCATION_GRAVE,0,1,1,tc1,tc1:GetLevel(),e,tp)
g1:Merge(g2) g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,2,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,2,0,0)
end end
function c62709239.spop(e,tp,eg,ep,ev,re,r,rp) function c62709239.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local g=tg:Filter(Card.IsRelateToEffect,nil,e) local g=tg:Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then if ft>0 and g:GetCount()<=ft then
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
......
...@@ -51,14 +51,14 @@ function c77462146.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,14 +51,14 @@ function c77462146.spcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c77462146.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c77462146.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,77462146,0,0x11,4,0,300,RACE_WARRIOR,ATTRIBUTE_DARK) end and Duel.IsPlayerCanSpecialSummonMonster(tp,77462146,0x10db,0x11,4,0,300,RACE_WARRIOR,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c77462146.spop(e,tp,eg,ep,ev,re,r,rp) function c77462146.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) if c:IsRelateToEffect(e)
and Duel.IsPlayerCanSpecialSummonMonster(tp,77462146,0,0x11,4,0,300,RACE_WARRIOR,ATTRIBUTE_DARK) then and Duel.IsPlayerCanSpecialSummonMonster(tp,77462146,0x10db,0x11,4,0,300,RACE_WARRIOR,ATTRIBUTE_DARK) then
c:SetStatus(STATUS_NO_LEVEL,false) c:SetStatus(STATUS_NO_LEVEL,false)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -31,14 +31,14 @@ function c84025439.initial_effect(c) ...@@ -31,14 +31,14 @@ function c84025439.initial_effect(c)
e3:SetCode(EFFECT_CANNOT_TO_HAND) e3:SetCode(EFFECT_CANNOT_TO_HAND)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_DECK) e3:SetTargetRange(0,LOCATION_DECK)
e3:SetCondition(c84025439.con1) e3:SetCondition(c84025439.drcon)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD) e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_CANNOT_DRAW) e4:SetCode(EFFECT_CANNOT_DRAW)
e4:SetCondition(c84025439.con2) e4:SetCondition(c84025439.drcon)
e4:SetTargetRange(0,1) e4:SetTargetRange(0,1)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--spsummon --spsummon
...@@ -50,19 +50,6 @@ function c84025439.initial_effect(c) ...@@ -50,19 +50,6 @@ function c84025439.initial_effect(c)
e6:SetTarget(c84025439.sptg) e6:SetTarget(c84025439.sptg)
e6:SetOperation(c84025439.spop) e6:SetOperation(c84025439.spop)
c:RegisterEffect(e6) c:RegisterEffect(e6)
if not c84025439.global_check then
c84025439.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_PREDRAW)
ge1:SetOperation(c84025439.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_DRAW)
ge2:SetOperation(c84025439.clearop)
Duel.RegisterEffect(ge2,0)
end
end end
function c84025439.tdcon(e,tp,eg,ep,ev,re,r,rp) function c84025439.tdcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():GetClassCount(Card.GetCode)>=2 and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) return e:GetHandler():GetOverlayGroup():GetClassCount(Card.GetCode)>=2 and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
...@@ -84,27 +71,16 @@ function c84025439.tdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -84,27 +71,16 @@ function c84025439.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
end end
end end
function c84025439.imcon(e,tp,eg,ep,ev,re,r,rp) function c84025439.imcon(e)
return e:GetHandler():GetOverlayGroup():GetClassCount(Card.GetCode)>=4 return e:GetHandler():GetOverlayGroup():GetClassCount(Card.GetCode)>=4
end end
function c84025439.efilter(e,te) function c84025439.efilter(e,te)
return not te:GetHandler():IsSetCard(0xdc) return not te:GetHandler():IsSetCard(0xdc)
end end
function c84025439.con1(e) function c84025439.drcon(e)
return e:GetHandler():GetOverlayGroup():GetClassCount(Card.GetCode)>=6 return e:GetHandler():GetOverlayGroup():GetClassCount(Card.GetCode)>=6
end end
function c84025439.con2(e) function c84025439.spfilter(c,e,tp)
return e:GetHandler():GetOverlayGroup():GetClassCount(Card.GetCode)>=6 and Duel.GetFlagEffect(tp,84025439)==0
end
function c84025439.checkop(e)
local p=Duel.GetTurnPlayer()
Duel.RegisterFlagEffect(p,84025439,RESET_PHASE+PHASE_DRAW,0,1)
end
function c84025439.clearop(e)
local p=Duel.GetTurnPlayer()
Duel.ResetFlagEffect(p,84025439)
end
function c84025439.spfilter(c,e,tp,tc)
return c:IsSetCard(0x20dc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) return c:IsSetCard(0x20dc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end end
function c84025439.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c84025439.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -22,7 +22,7 @@ function c86196216.checkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -22,7 +22,7 @@ function c86196216.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst() local tc=eg:GetFirst()
while tc do while tc do
if tc:IsSetCard(0xba) and tc:IsType(TYPE_XYZ) and tc:IsReason(REASON_DESTROY) and tc:IsReason(REASON_BATTLE) then if tc:IsSetCard(0xba) and tc:IsType(TYPE_XYZ) and tc:IsReason(REASON_DESTROY) and tc:IsReason(REASON_BATTLE) then
tc:RegisterFlagEffect(86196216,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END,0,1) tc:RegisterFlagEffect(86196216,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end end
tc=eg:GetNext() tc=eg:GetNext()
end end
......
...@@ -58,32 +58,33 @@ function c97219708.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -58,32 +58,33 @@ function c97219708.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c97219708.spop(e,tp,eg,ep,ev,re,r,rp) function c97219708.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local g=Duel.SelectMatchingCard(tp,c97219708.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=g:GetFirst() local g=Duel.SelectMatchingCard(tp,c97219708.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) then local tc=g:GetFirst()
local e1=Effect.CreateEffect(c) if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) then
e1:SetType(EFFECT_TYPE_SINGLE) local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_DISABLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetCode(EFFECT_DISABLE)
tc:RegisterEffect(e1) e1:SetReset(RESET_EVENT+0x1fe0000)
local e2=Effect.CreateEffect(c) tc:RegisterEffect(e1)
e2:SetType(EFFECT_TYPE_SINGLE) local e2=Effect.CreateEffect(c)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetReset(RESET_EVENT+0x1fe0000) e2:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e2) e2:SetReset(RESET_EVENT+0x1fe0000)
local e3=Effect.CreateEffect(c) tc:RegisterEffect(e2)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) local e3=Effect.CreateEffect(c)
e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE) e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCountLimit(1) e3:SetRange(LOCATION_MZONE)
e3:SetOperation(c97219708.tdop) e3:SetCountLimit(1)
e3:SetReset(RESET_EVENT+0x1fe0000) e3:SetOperation(c97219708.tdop)
tc:RegisterEffect(e3) e3:SetReset(RESET_EVENT+0x1fe0000)
Duel.SpecialSummonComplete() tc:RegisterEffect(e3)
Duel.SpecialSummonComplete()
end
end end
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD) e4:SetType(EFFECT_TYPE_FIELD)
......
...@@ -55,7 +55,7 @@ function c99315585.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,7 +55,7 @@ function c99315585.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c99315585.thfilter(c) function c99315585.thfilter(c)
return c:IsSetCard(0x10db) or (c:IsSetCard(0xdb) and c:IsType(TYPE_SPELL+TYPE_TRAP)) and c:IsAbleToHand() return (c:IsSetCard(0x10db) or (c:IsSetCard(0xdb) and c:IsType(TYPE_SPELL+TYPE_TRAP))) and c:IsAbleToHand()
and not c:IsHasEffect(EFFECT_NECRO_VALLEY) and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end end
function c99315585.thcon(e,tp,eg,ep,ev,re,r,rp) function c99315585.thcon(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