Commit b5cacd78 authored by wind2009's avatar wind2009

Fix Start for VS!

parent 97d17127
...@@ -16,7 +16,7 @@ function s.initial_effect(c) ...@@ -16,7 +16,7 @@ function s.initial_effect(c)
e2:SetCountLimit(1,id) e2:SetCountLimit(1,id)
e2:SetTarget(s.sptg) e2:SetTarget(s.sptg)
e2:SetOperation(s.spop) e2:SetOperation(s.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--destroy replace --destroy replace
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
...@@ -41,9 +41,9 @@ function s.initial_effect(c) ...@@ -41,9 +41,9 @@ function s.initial_effect(c)
end end
function s.filter(c,tp) function s.filter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x195) return c:IsFaceup() and c:IsSetCard(0x195)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,tp,c:GetAttribute()) and Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_DECK,0,1,nil,c:GetAttribute())
end end
function s.spfilter(c,tp,attr) function s.sfilter(c,attr)
return not c:IsAttribute(attr) and c:IsSetCard(0x195) return not c:IsAttribute(attr) and c:IsSetCard(0x195)
and c:IsAbleToHand() and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end end
...@@ -57,10 +57,10 @@ end ...@@ -57,10 +57,10 @@ 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()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToChain() and tc:IsFaceup() and tc:IsType(TYPE_MONSTER) then
local attr=tc:GetAttribute() local attr=tc:GetAttribute()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,tp,attr) local g=Duel.SelectMatchingCard(tp,s.sfilter,tp,LOCATION_DECK,0,1,1,nil,tp,attr)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
...@@ -98,15 +98,15 @@ function s.setcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -98,15 +98,15 @@ function s.setcon(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(s.onfilter,tp,LOCATION_MZONE,0,nil) local ct=Duel.GetMatchingGroupCount(s.onfilter,tp,LOCATION_MZONE,0,nil)
return Duel.GetTurnPlayer()==tp and ct>=2 return Duel.GetTurnPlayer()==tp and ct>=2
end end
function s.sfilter(c) function s.setfilter(c)
return c:IsSetCard(0x195) and c:IsType(TYPE_TRAP) and c:IsSSetable() return c:IsSetCard(0x195) and c:IsType(TYPE_TRAP) and c:IsSSetable()
end end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end
end end
function s.setop(e,tp,eg,ep,ev,re,r,rp) function s.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,s.sfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SSet(tp,g) Duel.SSet(tp,g)
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