Commit 4780711c authored by wind2009's avatar wind2009

Fix

parent 55ea842d
...@@ -40,8 +40,9 @@ function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -40,8 +40,9 @@ function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function s.spop1(e,tp,eg,ep,ev,re,r,rp) function s.spop1(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then local c=e:GetHandler()
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) if c:IsRelateToChain() then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function s.spfilter(c,e,tp,ec) function s.spfilter(c,e,tp,ec)
...@@ -66,8 +67,7 @@ function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -66,8 +67,7 @@ function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function s.spop2(e,tp,eg,ep,ev,re,r,rp) function s.spop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not tc:IsType(TYPE_MONSTER) or not tc:IsRelateToChain() then return end
or not tc:IsRelateToEffect(e) then return end
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,e,tp,tc) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc)
local sc=g:GetFirst() local sc=g:GetFirst()
......
--Sakra Vendirage --Sakra Vendirage
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,id)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,nil,4,2) aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit() c:EnableReviveLimit()
...@@ -46,7 +47,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -46,7 +47,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
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 tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToChain() and aux.NecroValleyFilter()(tc) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
...@@ -62,7 +63,7 @@ end ...@@ -62,7 +63,7 @@ end
function s.codeop(e,tp,eg,ep,ev,re,r,rp) function s.codeop(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 e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE) e1:SetCode(EFFECT_CHANGE_CODE)
......
...@@ -17,6 +17,7 @@ function s.initial_effect(c) ...@@ -17,6 +17,7 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,id) e2:SetCountLimit(1,id)
e2:SetCost(s.spcost) e2:SetCost(s.spcost)
e2:SetTarget(s.sptg) e2:SetTarget(s.sptg)
...@@ -40,7 +41,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -40,7 +41,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,800) Duel.PayLPCost(tp,800)
end end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return not c:IsCode(id) and c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_TRAP) and c:IsFaceupEx() return not c:IsCode(id) and c:IsAllTypes(TYPE_CONTINUOUS+TYPE_TRAP) and c:IsFaceupEx()
and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPES_NORMAL_TRAP_MONSTER,1000,1000,4,RACE_ROCK,ATTRIBUTE_EARTH) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPES_NORMAL_TRAP_MONSTER,1000,1000,4,RACE_ROCK,ATTRIBUTE_EARTH)
end 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)
......
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