Commit 3734ccbd authored by wind2009's avatar wind2009

Fix error

parent ae900478
...@@ -41,7 +41,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -41,7 +41,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToChain() then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
end end
......
...@@ -66,7 +66,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,7 +66,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(sg1,POS_FACEUP,REASON_EFFECT) Duel.Remove(sg1,POS_FACEUP,REASON_EFFECT)
end end
end end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......
...@@ -49,7 +49,7 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,7 +49,7 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(aux.NecroValleyFilter(Card.IsRelateToEffect),nil,e) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(aux.NecroValleyFilter(Card.IsRelateToEffect),nil,e)
if g:GetCount()>0 and Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) then if g:GetCount()>0 and Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) then
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
if og:IsExists(Cards.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA) if og:IsExists(Card.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA)
and Duel.CheckReleaseGroupEx(1-tp,nil,1,REASON_RULE,false,nil) then and Duel.CheckReleaseGroupEx(1-tp,nil,1,REASON_RULE,false,nil) then
local sg=Duel.SelectReleaseGroupEx(1-tp,nil,1,1,REASON_RULE,false,nil) local sg=Duel.SelectReleaseGroupEx(1-tp,nil,1,1,REASON_RULE,false,nil)
if sg:GetCount()>0 then if sg:GetCount()>0 then
......
...@@ -25,6 +25,7 @@ function s.rlfilter(c,tp) ...@@ -25,6 +25,7 @@ function s.rlfilter(c,tp)
return c:IsOriginalCodeRule(101208192,19899073,55397172) and (c:IsControler(tp) or c:IsFaceup()) return c:IsOriginalCodeRule(101208192,19899073,55397172) and (c:IsControler(tp) or c:IsFaceup())
end end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetReleaseGroup(tp,false):Filter(s.rlfilter,c,tp) local g=Duel.GetReleaseGroup(tp,false):Filter(s.rlfilter,c,tp)
if chk==0 then return g:CheckSubGroupEach(s.spchecks,s.rlcheck,c,tp) end if chk==0 then return g:CheckSubGroupEach(s.spchecks,s.rlcheck,c,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
......
...@@ -76,6 +76,7 @@ function s.spcostfilter(c) ...@@ -76,6 +76,7 @@ function s.spcostfilter(c)
return c:IsSetCard(0x195) and c:IsType(TYPE_MONSTER) and not c:IsPublic() return c:IsSetCard(0x195) and c:IsType(TYPE_MONSTER) and not c:IsPublic()
end end
function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp) if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp)
and Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND,0,1,c) end and Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND,0,1,c) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96) return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
...@@ -84,6 +85,7 @@ function s.repval(e,c) ...@@ -84,6 +85,7 @@ function s.repval(e,c)
return s.repfilter(c,e:GetHandlerPlayer()) return s.repfilter(c,e:GetHandlerPlayer())
end end
function s.repop(e,tp,eg,ep,ev,re,r,rp) function s.repop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND,0,1,1,c) local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND,0,1,1,c)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
......
...@@ -69,7 +69,7 @@ function s.cfilter(c) ...@@ -69,7 +69,7 @@ function s.cfilter(c)
return c:IsSetCard(0x1bb) and c:IsAbleToDeck() and not c:IsPublic() return c:IsSetCard(0x1bb) and c:IsAbleToDeck() and not c:IsPublic()
end end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.SelectMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil)
and Duel.IsPlayerCanDraw(tp,1) end and Duel.IsPlayerCanDraw(tp,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,nil)
......
...@@ -11,7 +11,7 @@ function s.initial_effect(c) ...@@ -11,7 +11,7 @@ function s.initial_effect(c)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function s.cfilter(c) function s.cfilter(c,tp)
local g=c:GetColumnGroup():Filter(Card.IsControler,nil,1-tp) local g=c:GetColumnGroup():Filter(Card.IsControler,nil,1-tp)
return c:IsFaceup() and c:IsSetCard(0x1c5) return c:IsFaceup() and c:IsSetCard(0x1c5)
and g:IsExists(s.dfilter,1,nil) and g:IsExists(s.dfilter,1,nil)
...@@ -25,7 +25,7 @@ function s.dfilter(c) ...@@ -25,7 +25,7 @@ function s.dfilter(c)
return false return false
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
end end
function s.dop(c,e) function s.dop(c,e)
if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsCanBeDisabledByEffect(e,false) then if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsCanBeDisabledByEffect(e,false) then
...@@ -43,7 +43,7 @@ function s.dop(c,e) ...@@ -43,7 +43,7 @@ function s.dop(c,e)
e2:SetValue(RESET_TURN_SET) e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2) c:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then if c:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(e:GetHandler()) local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
...@@ -68,7 +68,7 @@ function s.dop(c,e) ...@@ -68,7 +68,7 @@ function s.dop(c,e)
end end
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE) local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE,0,nil)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
for tc in aux.Next(g) do for tc in aux.Next(g) do
......
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