Commit 32ad8a72 authored by VanillaSalt's avatar VanillaSalt

fix

parent 283e11ae
...@@ -51,7 +51,7 @@ function c25924653.spgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,7 +51,7 @@ function c25924653.spgop(e,tp,eg,ep,ev,re,r,rp)
if tc and tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,104,tp,tp,false,false,POS_FACEUP)>0 if tc and tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,104,tp,tp,false,false,POS_FACEUP)>0
and c:IsFaceup() and c:IsRelateToEffect(e) then and c:IsFaceup() and c:IsRelateToEffect(e) then
c:SetCardTarget(tc) c:SetCardTarget(tc)
tc:RegisterFlagEffect(25924654,RESET_EVENT+0x13e0000,0,1) tc:RegisterFlagEffect(25924654,RESET_EVENT+0x53e0000,0,1)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
......
...@@ -4,4 +4,8 @@ function c30170981.initial_effect(c) ...@@ -4,4 +4,8 @@ function c30170981.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_SSET) e1:SetCode(EFFECT_CANNOT_SSET)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
c:RegisterEffect(e2)
end end
...@@ -4,4 +4,8 @@ function c31893528.initial_effect(c) ...@@ -4,4 +4,8 @@ function c31893528.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_SSET) e1:SetCode(EFFECT_CANNOT_SSET)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
c:RegisterEffect(e2)
end end
...@@ -13,6 +13,7 @@ function c34620088.initial_effect(c) ...@@ -13,6 +13,7 @@ function c34620088.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_BATTLE_DAMAGE) e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_CHAIN_UNIQUE)
e2:SetCondition(c34620088.spcon) e2:SetCondition(c34620088.spcon)
e2:SetCost(c34620088.spcost) e2:SetCost(c34620088.spcost)
e2:SetTarget(c34620088.sptg) e2:SetTarget(c34620088.sptg)
......
...@@ -29,9 +29,10 @@ function c45950291.filter1(c,e,tp) ...@@ -29,9 +29,10 @@ function c45950291.filter1(c,e,tp)
local rk=c:GetRank() local rk=c:GetRank()
return rk>0 and c:IsFaceup() return rk>0 and c:IsFaceup()
and not Duel.IsExistingMatchingCard(c45950291.cfilter,tp,LOCATION_MZONE,0,1,nil,rk) and not Duel.IsExistingMatchingCard(c45950291.cfilter,tp,LOCATION_MZONE,0,1,nil,rk)
and Duel.IsExistingMatchingCard(c45950291.filter2,tp,LOCATION_EXTRA,0,1,nil,rk+2,c:GetRace(),c:GetAttribute(),e,tp) and Duel.IsExistingMatchingCard(c45950291.filter2,tp,LOCATION_EXTRA,0,1,nil,rk+2,c:GetRace(),c:GetAttribute(),c:GetCode(),e,tp)
end end
function c45950291.filter2(c,rk,rc,att,e,tp) function c45950291.filter2(c,rk,rc,att,code,e,tp)
if c:IsCode(6165656) and code~=48995978 then return false end
return c:GetRank()==rk and c:IsRace(rc) and c:IsAttribute(att) return c:GetRank()==rk and c:IsRace(rc) and c:IsAttribute(att)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end end
...@@ -48,7 +49,7 @@ function c45950291.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,7 +49,7 @@ function c45950291.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c45950291.filter2,tp,LOCATION_EXTRA,0,1,1,nil,tc:GetRank()+2,tc:GetRace(),tc:GetAttribute(),e,tp) local g=Duel.SelectMatchingCard(tp,c45950291.filter2,tp,LOCATION_EXTRA,0,1,1,nil,tc:GetRank()+2,tc:GetRace(),tc:GetAttribute(),tc:GetCode(),e,tp)
local sc=g:GetFirst() local sc=g:GetFirst()
if sc then if sc then
local mg=tc:GetOverlayGroup() local mg=tc:GetOverlayGroup()
......
...@@ -12,9 +12,10 @@ function c47660516.initial_effect(c) ...@@ -12,9 +12,10 @@ function c47660516.initial_effect(c)
end end
function c47660516.filter1(c,e,tp) function c47660516.filter1(c,e,tp)
local rk=c:GetRank() local rk=c:GetRank()
return rk>0 and c:IsFaceup() and Duel.IsExistingMatchingCard(c47660516.filter2,tp,LOCATION_EXTRA,0,1,nil,rk+1,c:GetRace(),e,tp) return rk>0 and c:IsFaceup() and Duel.IsExistingMatchingCard(c47660516.filter2,tp,LOCATION_EXTRA,0,1,nil,rk+1,c:GetRace(),c:GetCode(),e,tp)
end end
function c47660516.filter2(c,rk,rc,e,tp) function c47660516.filter2(c,rk,rc,code,e,tp)
if c:IsCode(6165656) and code~=48995978 then return false end
return c:GetRank()==rk and c:IsRace(rc) and (c:IsSetCard(0x1048) or c:IsSetCard(0x1073)) return c:GetRank()==rk and c:IsRace(rc) and (c:IsSetCard(0x1048) or c:IsSetCard(0x1073))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end end
...@@ -31,7 +32,7 @@ function c47660516.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,7 +32,7 @@ function c47660516.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c47660516.filter2,tp,LOCATION_EXTRA,0,1,1,nil,tc:GetRank()+1,tc:GetRace(),e,tp) local g=Duel.SelectMatchingCard(tp,c47660516.filter2,tp,LOCATION_EXTRA,0,1,1,nil,tc:GetRank()+1,tc:GetRace(),tc:GetCode(),e,tp)
local sc=g:GetFirst() local sc=g:GetFirst()
if sc then if sc then
local mg=tc:GetOverlayGroup() local mg=tc:GetOverlayGroup()
......
...@@ -12,9 +12,10 @@ function c48333324.initial_effect(c) ...@@ -12,9 +12,10 @@ function c48333324.initial_effect(c)
end end
function c48333324.filter1(c,e,tp) function c48333324.filter1(c,e,tp)
local rk=c:GetRank() local rk=c:GetRank()
return rk>0 and c:IsFaceup() and Duel.IsExistingMatchingCard(c48333324.filter2,tp,LOCATION_EXTRA,0,1,nil,rk+1,c:GetRace(),e,tp) return rk>0 and c:IsFaceup() and Duel.IsExistingMatchingCard(c48333324.filter2,tp,LOCATION_EXTRA,0,1,nil,rk+1,c:GetRace(),c:GetCode(),e,tp)
end end
function c48333324.filter2(c,rk,rc,e,tp) function c48333324.filter2(c,rk,rc,code,e,tp)
if c:IsCode(6165656) and code~=48995978 then return false end
return c:GetRank()==rk and c:IsRace(rc) and c:IsSetCard(0x1048) return c:GetRank()==rk and c:IsRace(rc) and c:IsSetCard(0x1048)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end end
...@@ -35,7 +36,7 @@ function c48333324.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,7 +36,7 @@ function c48333324.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c48333324.filter2,tp,LOCATION_EXTRA,0,1,1,nil,tc:GetRank()+1,tc:GetRace(),e,tp) local g=Duel.SelectMatchingCard(tp,c48333324.filter2,tp,LOCATION_EXTRA,0,1,1,nil,tc:GetRank()+1,tc:GetRace(),tc:GetCode(),e,tp)
local sc=g:GetFirst() local sc=g:GetFirst()
if sc then if sc then
local mg=tc:GetOverlayGroup() local mg=tc:GetOverlayGroup()
......
...@@ -4,4 +4,8 @@ function c67287533.initial_effect(c) ...@@ -4,4 +4,8 @@ function c67287533.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_SSET) e1:SetCode(EFFECT_CANNOT_SSET)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
c:RegisterEffect(e2)
end end
...@@ -18,9 +18,7 @@ function c81210420.filter(c) ...@@ -18,9 +18,7 @@ function c81210420.filter(c)
return c:IsFacedown() or c:IsCanTurnSet() return c:IsFacedown() or c:IsCanTurnSet()
end end
function c81210420.spfilter(c,e,tp) function c81210420.spfilter(c,e,tp)
local code=c:GetCode()
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEDOWN) return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEDOWN)
and code~=31893528 and code~=67287533 and code~=94772232 and code~=30170981
end end
function c81210420.target(e,tp,eg,ep,ev,re,r,rp,chk) function c81210420.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c81210420.filter,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(c81210420.filter,tp,LOCATION_MZONE,0,1,nil)
......
...@@ -6,7 +6,7 @@ function c8226374.initial_effect(c) ...@@ -6,7 +6,7 @@ function c8226374.initial_effect(c)
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:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CHAIN_UNIQUE)
e1:SetCost(c8226374.spcost) e1:SetCost(c8226374.spcost)
e1:SetTarget(c8226374.sptg) e1:SetTarget(c8226374.sptg)
e1:SetOperation(c8226374.spop) e1:SetOperation(c8226374.spop)
......
--メンタルプロテクター --メンタルプロテクター
function c85060248.initial_effect(c) function c85060248.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--cannot attack --cannot attack
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
......
...@@ -4,4 +4,8 @@ function c94772232.initial_effect(c) ...@@ -4,4 +4,8 @@ function c94772232.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_SSET) e1:SetCode(EFFECT_CANNOT_SSET)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
c:RegisterEffect(e2)
end end
...@@ -15,6 +15,7 @@ function c96235275.initial_effect(c) ...@@ -15,6 +15,7 @@ function c96235275.initial_effect(c)
e2:SetDescription(aux.Stringid(96235275,0)) e2:SetDescription(aux.Stringid(96235275,0))
e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c96235275.discon) e2:SetCondition(c96235275.discon)
e2:SetTarget(c96235275.distg) e2:SetTarget(c96235275.distg)
e2:SetOperation(c96235275.disop) e2:SetOperation(c96235275.disop)
......
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