Commit b9819023 authored by wind2009's avatar wind2009

Fix

parent df594677
......@@ -41,7 +41,7 @@ function s.initial_effect(c)
e5:SetOperation(s.spop)
c:RegisterEffect(e5)
end
function s.setfilter(c)
function s.setfilter(c,tp)
return c:IsSetCard(0x2c2) and c:IsType(TYPE_TRAP) and c:IsSSetable()
and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,c:GetCode())
end
......@@ -58,7 +58,7 @@ end
function s.damfilter(e,c)
local lg=c:GetLinkedGroup()
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsSetCard(0x2c2)
and lg and lg:IsContains(e:GetHandler())
and lg and lg:IsContains(e:GetHandler()) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,300) end
......
......@@ -54,7 +54,7 @@ end
function s.immtg(e,c)
local lg=c:GetLinkedGroup()
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsSetCard(0x2c2)
and lg and lg:IsContains(e:GetHandler())
and lg and lg:IsContains(e:GetHandler()) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,300) end
......
......@@ -61,7 +61,7 @@ end
function s.immtg(e,c)
local lg=c:GetLinkedGroup()
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsSetCard(0x2c2)
and lg and lg:IsContains(e:GetHandler())
and lg and lg:IsContains(e:GetHandler()) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,300) end
......
......@@ -53,12 +53,12 @@ end
function s.atktg(e,c)
return c:IsSetCard(0x2c2) and c:IsType(TYPE_LINK)
end
function s.cfilter1(c,tp)
function s.cfilter1(c)
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsSetCard(0x2c2)
end
function s.condition(e)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_ONFIELD,0,1,nil,tp)
return Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_ONFIELD,0,1,nil)
end
function s.alimit(e,c)
return c:IsFacedown() or not (c:IsType(TYPE_LINK) and c:IsSetCard(0x2c2))
......
......@@ -35,14 +35,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
if Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,aux.ExceptThisCard(e))
and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,aux.ExceptThisCard(e))
Duel.HintSelection(rg)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end
end
end
......
......@@ -28,7 +28,8 @@ end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local res=e:GetHandler():IsHasEffect(EFFECT_TRAP_ACT_IN_SET_TURN,tp)
if chk==0 then return res and res:GetHandler()==c or Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,nil) end
if chk==0 then return res and res:GetHandler()==c
or Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function s.lpfilter(c)
......
......@@ -29,7 +29,8 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local co=Duel.GetMatchingGroupCount(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
local res=e:GetHandler():IsHasEffect(EFFECT_TRAP_ACT_IN_SET_TURN,tp)
if chk==0 then return res and res:GetHandler()==c or Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp,co,nil) end
if chk==0 then return res and res:GetHandler()==c
or Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp,co,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
......
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