Commit 7c5668a9 authored by VanillaSalt's avatar VanillaSalt

fix

parent 4c8069bb
...@@ -58,7 +58,7 @@ end ...@@ -58,7 +58,7 @@ end
function c11510448.filter2(c) function c11510448.filter2(c)
return c:IsSetCard(0xf1) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0xf1) and c:IsType(TYPE_MONSTER)
end end
function c11510448.target(e,tp,eg,ep,ev,re,r,rp,chk) function c11510448.target(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(c11510448.filter1,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c11510448.filter1,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(c11510448.filter2,tp,LOCATION_GRAVE,0,1,nil) end and Duel.IsExistingTarget(c11510448.filter2,tp,LOCATION_GRAVE,0,1,nil) end
......
...@@ -8,7 +8,6 @@ function c12632096.initial_effect(c) ...@@ -8,7 +8,6 @@ function c12632096.initial_effect(c)
e1:SetCategory(CATEGORY_CONTROL) e1:SetCategory(CATEGORY_CONTROL)
e1:SetDescription(aux.Stringid(12632096,0)) e1:SetDescription(aux.Stringid(12632096,0))
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c12632096.ctcon) e1:SetCondition(c12632096.ctcon)
......
...@@ -46,7 +46,7 @@ function c17328157.tgfilter(c) ...@@ -46,7 +46,7 @@ function c17328157.tgfilter(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() return c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end end
function c17328157.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function c17328157.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c17328157.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c17328157.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end end
function c17328157.tgop(e,tp,eg,ep,ev,re,r,rp) function c17328157.tgop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -15,6 +15,7 @@ function c17540705.initial_effect(c) ...@@ -15,6 +15,7 @@ function c17540705.initial_effect(c)
e2:SetDescription(aux.Stringid(17540705,0)) e2:SetDescription(aux.Stringid(17540705,0))
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE) e2:SetRange(LOCATION_PZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,17540705) e2:SetCountLimit(1,17540705)
e2:SetCondition(c17540705.thcon) e2:SetCondition(c17540705.thcon)
e2:SetTarget(c17540705.thtg) e2:SetTarget(c17540705.thtg)
...@@ -52,7 +53,7 @@ function c17540705.thfilter(c) ...@@ -52,7 +53,7 @@ function c17540705.thfilter(c)
return c:IsSetCard(0x9f) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0x9f) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function c17540705.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c17540705.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and c17540705.thfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c17540705.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c17540705.thfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c17540705.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c17540705.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,c17540705.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
......
...@@ -35,11 +35,12 @@ function c39817919.cfilter(c) ...@@ -35,11 +35,12 @@ function c39817919.cfilter(c)
end end
function c39817919.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) function c39817919.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c39817919.cfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c39817919.cfilter,tp,LOCATION_HAND,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c39817919.cfilter,tp,LOCATION_HAND,0,1,1,nil,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c39817919.cfilter,tp,LOCATION_HAND,0,1,1,nil)
e:SetLabelObject(g:GetFirst()) e:SetLabelObject(g:GetFirst())
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end end
function c39817919.atkop(e,tp,eg,ep,ev,re,r,rp,chk) function c39817919.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
local atk=math.max(tc:GetAttack(),0) local atk=math.max(tc:GetAttack(),0)
......
...@@ -29,7 +29,7 @@ function c4145852.spfilter(c,e,tp) ...@@ -29,7 +29,7 @@ function c4145852.spfilter(c,e,tp)
return c:IsSetCard(0xf1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(4145852) return c:IsSetCard(0xf1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(4145852)
end end
function c4145852.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c4145852.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c4145852.spfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c4145852.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c4145852.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingTarget(c4145852.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
local g=Duel.SelectTarget(tp,c4145852.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c4145852.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
......
...@@ -47,9 +47,9 @@ function c45948430.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,9 +47,9 @@ function c45948430.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(0) Duel.NegateEffect(0)
return return
end end
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc) mg=mg:Filter(Card.IsCanBeRitualMaterial,tc1,tc1)
if tc1.mat_filter then if tc1.mat_filter then
mg=mg:Filter(tc.mat_filter,nil) mg=mg:Filter(tc1.mat_filter,nil)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local mat=Duel.SelectMatchingCard(tp,c45948430.matfilter1,tp,LOCATION_HAND,0,1,1,nil,tp) local mat=Duel.SelectMatchingCard(tp,c45948430.matfilter1,tp,LOCATION_HAND,0,1,1,nil,tp)
......
...@@ -33,6 +33,7 @@ function c47882565.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -33,6 +33,7 @@ function c47882565.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
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 c47882565.activate(e,tp,eg,ep,ev,re,r,rp) function c47882565.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
...@@ -47,7 +48,7 @@ function c47882565.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,7 +48,7 @@ function c47882565.activate(e,tp,eg,ep,ev,re,r,rp)
sc:SetMaterial(Group.FromCards(tc)) sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc)) Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(sc) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
......
...@@ -58,15 +58,12 @@ function c63845230.initial_effect(c) ...@@ -58,15 +58,12 @@ function c63845230.initial_effect(c)
ea:SetOperation(c63845230.rmop) ea:SetOperation(c63845230.rmop)
c:RegisterEffect(ea) c:RegisterEffect(ea)
end end
function c63845230.spfilter(c)
return c:IsSetCard(0xbb) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c63845230.spcon(e,c) function c63845230.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1 local ct=-ft+1
local g=Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_EXTRA,0,c) local g=Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_EXTRA,0,c)
return g:GetCount()>=5 and (ft>0 or g:IsExists(Card.IsLocation,ct,nil,LOCATION_MZONE)) return g:GetCount()>=5 and (ft>0 or g:IsExists(Card.IsLocation,ct,nil,LOCATION_MZONE))
end end
function c63845230.spop(e,tp,eg,ep,ev,re,r,rp,c) function c63845230.spop(e,tp,eg,ep,ev,re,r,rp,c)
......
...@@ -31,7 +31,7 @@ function c67820935.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,7 +31,7 @@ function c67820935.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFESE_FINAL) e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
e2:SetValue(tc:GetDefense()*2) e2:SetValue(tc:GetDefense()*2)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(e:GetHandler()) local e3=Effect.CreateEffect(e:GetHandler())
......
...@@ -24,7 +24,7 @@ end ...@@ -24,7 +24,7 @@ end
function c73271204.filter(c) function c73271204.filter(c)
return c:IsSetCard(0xe6) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0xe6) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function c73271204.target(e,tp,eg,ep,ev,re,r,rp,chk) function c73271204.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c73271204.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c73271204.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c73271204.filter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c73271204.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
...@@ -29,7 +29,7 @@ function c73881652.matfilter(c) ...@@ -29,7 +29,7 @@ function c73881652.matfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xf1) return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xf1)
end end
function c73881652.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c73881652.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c73881652.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c73881652.tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c73881652.tgfilter,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c73881652.tgfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c73881652.matfilter,tp,LOCATION_DECK,0,1,nil) end and Duel.IsExistingMatchingCard(c73881652.matfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
......
...@@ -15,7 +15,7 @@ function c98905.initial_effect(c) ...@@ -15,7 +15,7 @@ function c98905.initial_effect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_TO_GRAVE) ge1:SetCode(EVENT_TO_GRAVE)
ge1:SetOperation(c98905.checkop) ge1:SetOperation(c98905.checkop)
Duel.RegisterEffect(ge1,tp) Duel.RegisterEffect(ge1,0)
end end
end end
function c98905.cfilter(c,tp) function c98905.cfilter(c,tp)
...@@ -26,7 +26,7 @@ function c98905.checkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -26,7 +26,7 @@ function c98905.checkop(e,tp,eg,ep,ev,re,r,rp)
local sg=eg:Filter(c98905.cfilter,nil,tp) local sg=eg:Filter(c98905.cfilter,nil,tp)
local tc=sg:GetFirst() local tc=sg:GetFirst()
while tc do while tc do
tc:RegisterFlagEffect(98905,RESET_EVENT+0x1fe0000-EVENT_TO_GRAVE,0,1) tc:RegisterFlagEffect(98905,RESET_EVENT+0x1fe0000-RESET_TOGRAVE,0,1)
tc=sg:GetNext() tc=sg:GetNext()
end end
end end
...@@ -41,21 +41,24 @@ function c98905.spfilter(c,e,tp,cd) ...@@ -41,21 +41,24 @@ function c98905.spfilter(c,e,tp,cd)
end end
function c98905.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c98905.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and c98905.filter(chkc,e,tp) end if chkc then return eg:IsContains(chkc) and c98905.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and eg:IsExists(c98905.filter,1,nil,e,tp) end if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and eg:IsExists(c98905.filter,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=eg:FilterSelect(tp,c98905.filter,1,1,nil,e,tp) local g=eg:FilterSelect(tp,c98905.filter,1,1,nil,e,tp)
Duel.SetTargetCard(g) Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c98905.activate(e,tp,eg,ep,ev,re,r,rp) function c98905.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then if tc:IsRelateToEffect(e) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,c98905.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc:GetCode()) local g=Duel.SelectMatchingCard(tp,c98905.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc:GetCode())
if g2:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP) g:AddCard(tc)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
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