Commit 0d2442bd authored by wind2009's avatar wind2009

Merge branch 'fix' into 'master'

Fix error

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