Commit 85be6b08 authored by wind2009's avatar wind2009

Fix

parent 9ca55ae1
No preview for this file type
......@@ -24,7 +24,7 @@ function s.initial_effect(c)
e3:SetTarget(s.thtg)
e3:SetOperation(s.thop)
c:RegisterEffect(e3)
local e4=e2:Clone()
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
--change pos
......
......@@ -32,7 +32,7 @@ function s.initial_effect(c)
e3:SetTarget(s.thtg)
e3:SetOperation(s.thop)
c:RegisterEffect(e3)
local e4=e2:Clone()
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
end
......
......@@ -29,15 +29,11 @@ function s.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetTargetRange(LOCATION_ONFIELD,0)
e3:SetTarget(aux.TargetBoolFunction(aux.AND(Card.IsType,Card.IsFaceup),TYPE_SPELL))
e3:SetValue(1)
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
end
function s.filter(c)
return c:IsFaceup() and not c:IsSetCard(0x2be)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,3,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,e:GetHandler(),1,0,0)
......
......@@ -36,12 +36,8 @@ function s.initial_effect(c)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
end
function s.filter(c)
return c:IsFaceup() and not c:IsSetCard(0x2be)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,1)
......
......@@ -25,11 +25,11 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
end
function s.filter(c,e,tp)
return c:IsSetCard(0x2be) and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE,1-tp))
return c:IsSetCard(0x2be) and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE,1-tp) and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function s.posfilter(c)
......@@ -38,34 +38,34 @@ end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
local s1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
local s2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)
local s2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE,1-tp)
local op=0
Duel.Hint(HINT_SELECTMSG,tp,0)
if s1 and s2 then op=Duel.SelectOption(tp,aux.Stringid(id,0),aux.Stringid(id,1))
elseif s1 then op=Duel.SelectOption(tp,aux.Stringid(id,0))
elseif s2 then op=Duel.SelectOption(tp,aux.Stringid(id,1))+1
if s1 and s2 then op=Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3))
elseif s1 then op=Duel.SelectOption(tp,aux.Stringid(id,2))
elseif s2 then op=Duel.SelectOption(tp,aux.Stringid(id,3))+1
else return end
if op==0 then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.IsExistingMatchingCard(s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
if op==0 then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.IsExistingMatchingCard(s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local sg=Duel.SelectMatchingCard(tp,s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(sg)
local tc=sg:GetFirst()
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
local sc=sg:GetFirst()
Duel.ChangePosition(sc,POS_FACEDOWN_DEFENSE)
end
else
if Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEDOWN_DEFENSE)~=0 and Duel.IsExistingMatchingCard(s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
if Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEDOWN_DEFENSE)~=0 and Duel.IsExistingMatchingCard(s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local sg=Duel.SelectMatchingCard(tp,s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(sg)
local tc=sg:GetFirst()
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
local sc=sg:GetFirst()
Duel.ChangePosition(sc,POS_FACEDOWN_DEFENSE)
end
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