Commit c3d00f00 authored by wind2009's avatar wind2009

Fix

parent 1efd44c0
Pipeline #41680 canceled with stages
in 4 seconds
No preview for this file type
...@@ -55,7 +55,6 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -55,7 +55,6 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE,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)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -45,7 +45,7 @@ end ...@@ -45,7 +45,7 @@ end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local sp=tp local sp=tp
local pos=POS_FACEUP local pos=POS_FACEUP
if Duel.IsExistingMatchingCard(aux.TURE,tp,0,LOCATION_MZONE,1,nil) then if not Duel.IsExistingMatchingCard(aux.TURE,tp,0,LOCATION_MZONE,1,nil) then
sp=1-tp sp=1-tp
pos=POS_FACEUP_DEFENSE pos=POS_FACEUP_DEFENSE
end end
...@@ -57,7 +57,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,7 +57,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local sp=tp local sp=tp
local pos=POS_FACEUP local pos=POS_FACEUP
if Duel.IsExistingMatchingCard(aux.TURE,tp,0,LOCATION_MZONE,1,nil) then if not Duel.IsExistingMatchingCard(aux.TURE,tp,0,LOCATION_MZONE,1,nil) then
sp=1-tp sp=1-tp
pos=POS_FACEUP_DEFENSE pos=POS_FACEUP_DEFENSE
end end
......
...@@ -8,6 +8,7 @@ function s.initial_effect(c) ...@@ -8,6 +8,7 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(s.cost) e1:SetCost(s.cost)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
...@@ -21,7 +22,10 @@ function s.spfilter(c,e,tp) ...@@ -21,7 +22,10 @@ function s.spfilter(c,e,tp)
return c:IsFaceupEx() and c:IsSetCard(0xef) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) return c:IsFaceupEx() and c:IsSetCard(0xef) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
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)
return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,e,tp) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
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 if chk==0 then
...@@ -29,7 +33,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -29,7 +33,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
return true return true
else else
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_REMOVED,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_REMOVED,0,1,nil,e,tp)
end end
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_REMOVED)
......
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