Commit 177e0403 authored by VanillaSalt's avatar VanillaSalt

fix

parent 2167fc3a
...@@ -21,10 +21,12 @@ function c12247206.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -21,10 +21,12 @@ function c12247206.target(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=eg:GetFirst() local tc=eg:GetFirst()
if chk==0 then if chk==0 then
local g=Duel.GetMatchingGroup(c12247206.nfilter,tp,0x13,0,nil,tc) local g=Duel.GetMatchingGroup(c12247206.nfilter,tp,0x13,0,nil,tc)
return g:GetCount()==g:FilterCount(Card.IsCanBeSpecialSummoned,nil,e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and g:GetCount()>0 and g:GetCount()==g:FilterCount(Card.IsCanBeSpecialSummoned,nil,e,0,tp,false,false)
end end
tc:CreateEffectRelation(e) tc:CreateEffectRelation(e)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,PLAYER_ALL,0x13) local g=Duel.GetMatchingGroup(c12247206.filter,tp,0x13,0,nil,tc,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
end end
function c12247206.filter(c,tc,e,tp) function c12247206.filter(c,tc,e,tp)
return c12247206.nfilter(c,tc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c12247206.nfilter(c,tc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -5,6 +5,7 @@ function c14983497.initial_effect(c) ...@@ -5,6 +5,7 @@ function c14983497.initial_effect(c)
e1:SetDescription(aux.Stringid(14983497,0)) e1:SetDescription(aux.Stringid(14983497,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_TO_GRAVE) e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c14983497.spcon) e1:SetCondition(c14983497.spcon)
e1:SetTarget(c14983497.sptg) e1:SetTarget(c14983497.sptg)
......
...@@ -4,7 +4,7 @@ function c18060565.initial_effect(c) ...@@ -4,7 +4,7 @@ function c18060565.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(18060565,0)) e1:SetDescription(aux.Stringid(18060565,0))
e1:SetCategory(CATEGORY_EQUIP) e1:SetCategory(CATEGORY_EQUIP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c18060565.eqtg) e1:SetTarget(c18060565.eqtg)
...@@ -22,11 +22,11 @@ function c18060565.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -22,11 +22,11 @@ function c18060565.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c18060565.filter,tp,LOCATION_MZONE,0,1,nil) end and Duel.IsExistingTarget(c18060565.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c18060565.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c18060565.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK)
end end
function c18060565.eqfilter(c) function c18060565.eqfilter(c)
return c:IsSetCard(0x29) and c:IsRace(RACE_DRAGON) and c:GetLevel()<=3 return c:IsSetCard(0x29) and c:IsRace(RACE_DRAGON) and c:IsLevelBelow(3)
end end
function c18060565.eqop(e,tp,eg,ep,ev,re,r,rp) function c18060565.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
......
...@@ -6,6 +6,7 @@ function c28325165.initial_effect(c) ...@@ -6,6 +6,7 @@ function c28325165.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c28325165.condition) e1:SetCondition(c28325165.condition)
e1:SetTarget(c28325165.target) e1:SetTarget(c28325165.target)
e1:SetOperation(c28325165.activate) e1:SetOperation(c28325165.activate)
......
...@@ -32,7 +32,7 @@ function c34460239.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,7 +32,7 @@ function c34460239.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then
Duel.BreakEffect() Duel.BreakEffect()
local g=Duel.Duel.SelectMatchingCard(tp,c34460239.nfilter2,tp,LOCATION_DECK,0,1,1,nil,tc) local g=Duel.SelectMatchingCard(tp,c34460239.nfilter2,tp,LOCATION_DECK,0,1,1,nil,tc)
local hc=g:GetFirst() local hc=g:GetFirst()
if hc then if hc then
Duel.SendtoHand(hc,nil,REASON_EFFECT) Duel.SendtoHand(hc,nil,REASON_EFFECT)
......
...@@ -34,6 +34,7 @@ function c38844957.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -34,6 +34,7 @@ function c38844957.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
e:SetLabel(0) e:SetLabel(0)
return Duel.IsExistingMatchingCard(c38844957.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) return Duel.IsExistingMatchingCard(c38844957.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil)
end end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c38844957.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c38844957.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil)
local te=g:GetFirst():CheckActivateEffect(true,true,false) local te=g:GetFirst():CheckActivateEffect(true,true,false)
......
...@@ -19,11 +19,13 @@ function c63120904.dfilter(c) ...@@ -19,11 +19,13 @@ function c63120904.dfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
end end
function c63120904.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c63120904.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsDestructable() end if chkc then
if chk==0 then return (Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,90337190) and Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)) if e:GetLabel()==90337190 then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable()
or (Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,95614612) and Duel.IsExistingTarget(c63120904.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)) end else return chkc:IsOnField() and c63120904.dfilter(chkc) end
end
local b1=Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,90337190) and Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) local b1=Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,90337190) and Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
local b2=Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,95614612) and Duel.IsExistingTarget(c63120904.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) local b2=Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,95614612) and Duel.IsExistingTarget(c63120904.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
if chk==0 then return b1 or b2 end
local code=0 local code=0
if b1 and b2 then if b1 and b2 then
local rg=Duel.SelectReleaseGroup(tp,c63120904.rfilter,1,1,nil) local rg=Duel.SelectReleaseGroup(tp,c63120904.rfilter,1,1,nil)
...@@ -38,6 +40,7 @@ function c63120904.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -38,6 +40,7 @@ function c63120904.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
code=95614612 code=95614612
Duel.Release(rg,REASON_COST) Duel.Release(rg,REASON_COST)
end end
e:SetLabel(code)
if code==90337190 then if code==90337190 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
......
...@@ -81,6 +81,7 @@ function c6511113.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -81,6 +81,7 @@ function c6511113.target(e,tp,eg,ep,ev,re,r,rp,chk)
return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)
and Duel.IsExistingMatchingCard(c6511113.filter1,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c6511113.filter1,tp,LOCATION_DECK,0,1,nil)
end end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c6511113.filter1,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c6511113.filter1,tp,LOCATION_DECK,0,1,1,nil)
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true) local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true)
......
...@@ -18,10 +18,14 @@ function c8339504.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -18,10 +18,14 @@ function c8339504.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c8339504.cfilter(c,e,tp) function c8339504.cfilter(c,e,tp)
local rk=c:GetRank() local rk=c:GetRank()
return rk>0 and Duel.IsExistingMatchingCard(c8339504.spfilter,tp,LOCATION_EXTRA,0,1,nil,rk,c:GetRace(),c:GetAttribute(),c:GetCode(),e,tp) return rk>0 and Duel.IsExistingMatchingCard(c8339504.spfilter1,tp,LOCATION_EXTRA,0,1,nil,c,e,tp)
end end
function c8339504.spfilter(c,tc,e,tp) function c8339504.spfilter1(c,tc,e,tp)
return c:GetRank()==tc:GetPreviousRankOnField() and c:IsRace(tc:GetPreviousRaceOnField()) and c:IsAttribute(tc:GetPreviousAttributeOnField()) return c:GetRank()==tc:GetRank() and c:IsRace(tc:GetRace()) and c:IsAttribute(tc:GetAttribute())
and not c:IsCode(tc:GetCode()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c8339504.spfilter2(c,tc,e,tp)
return c:GetRank()==tc:GetPreviousRankOnField() and c:IsRace(tc:GetPreviousRaceOnField()) and c:IsAttribute(tc:GetPreviousAttributeOnField())
and not c:IsCode(tc:GetPreviousCodeOnField()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(tc:GetPreviousCodeOnField()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c8339504.target(e,tp,eg,ep,ev,re,r,rp,chk) function c8339504.target(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -42,7 +46,7 @@ function c8339504.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,7 +46,7 @@ function c8339504.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c8339504.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,tc,e,tp) local g=Duel.SelectMatchingCard(tp,c8339504.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,tc,e,tp)
local sc=g:GetFirst() local sc=g:GetFirst()
if sc then if sc then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
......
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