Commit 0fc6b2a5 authored by wind2009's avatar wind2009

Fix

parent 2533b01f
Pipeline #32511 passed with stages
in 1 minute and 22 seconds
...@@ -10,7 +10,7 @@ function s.initial_effect(c) ...@@ -10,7 +10,7 @@ function s.initial_effect(c)
local custom_code=aux.RegisterMergedDelayedEvent_ToSingleCard(c,id,EVENT_REMOVE) local custom_code=aux.RegisterMergedDelayedEvent_ToSingleCard(c,id,EVENT_REMOVE)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0)) e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) e2:SetCategory(CATEGORY_DISABLE+CATEGORY_REMOVE+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(custom_code) e2:SetCode(custom_code)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
...@@ -49,7 +49,6 @@ end ...@@ -49,7 +49,6 @@ end
function s.cfilter(c) function s.cfilter(c)
return c:IsFaceup() return c:IsFaceup()
and c:IsReason(REASON_COST) and c:IsReason(REASON_COST)
and c:GetFlagEffect(id)~=0
and c:IsPreviousLocation(LOCATION_ONFIELD+LOCATION_HAND) and c:IsPreviousLocation(LOCATION_ONFIELD+LOCATION_HAND)
end end
function s.disfiter(c) function s.disfiter(c)
...@@ -64,6 +63,11 @@ function s.actg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -64,6 +63,11 @@ function s.actg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local b3=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) local b3=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and g:IsExists(Card.IsType,1,nil,TYPE_TRAP) and g:IsExists(Card.IsType,1,nil,TYPE_TRAP)
if chk==0 then return b1 or b2 or b3 end if chk==0 then return b1 or b2 or b3 end
local category=0
if b1 then category=category|CATEGORY_NEGATE end
if b2 then category=category|CATEGORY_DRAW end
if b3 then category=category|CATEGORY_REMOVE end
e:SetCategory(category)
end end
function s.acop(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.acop(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -16,7 +16,7 @@ function s.initial_effect(c) ...@@ -16,7 +16,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--remove --remove
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE) e3:SetCategory(CATEGORY_REMOVE+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
...@@ -36,9 +36,6 @@ function s.initial_effect(c) ...@@ -36,9 +36,6 @@ function s.initial_effect(c)
e4:SetOperation(s.setop) e4:SetOperation(s.setop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function s.filter(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR+RACE_SPELLCASTER)
end
function s.GetType(c) function s.GetType(c)
if c:IsType(TYPE_MONSTER) then if c:IsType(TYPE_MONSTER) then
return TYPE_MONSTER return TYPE_MONSTER
......
...@@ -43,10 +43,10 @@ function s.posfilter(c) ...@@ -43,10 +43,10 @@ function s.posfilter(c)
return c:IsCanChangePosition() return c:IsCanChangePosition()
end end
function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.posfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.posfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,s.posfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end end
function s.posop(e,tp,eg,ep,ev,re,r,rp) function s.posop(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