Commit 34cd0f3c authored by Chen Bill's avatar Chen Bill

fix: target effect

parent 17291cfa
...@@ -43,6 +43,7 @@ end ...@@ -43,6 +43,7 @@ end
function c13093792.spellcon(e,tp,eg,ep,ev,re,r,rp) function c13093792.spellcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetTurnID()~=Duel.GetTurnCount() return e:GetHandler():GetTurnID()~=Duel.GetTurnCount()
end end
---dynamic target
function c13093792.spelltg(e,tp,eg,ep,ev,re,r,rp,chk) function c13093792.spelltg(e,tp,eg,ep,ev,re,r,rp,chk)
local ae=e:GetHandler():GetActivateEffect() local ae=e:GetHandler():GetActivateEffect()
local ftg=ae:GetTarget() local ftg=ae:GetTarget()
......
...@@ -31,8 +31,9 @@ end ...@@ -31,8 +31,9 @@ end
function c47171541.cfilter(c) function c47171541.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_LINK) return c:IsFaceup() and c:IsType(TYPE_LINK)
end end
function c47171541.target(e,tp,eg,ep,ev,re,r,rp,chk) function c47171541.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local res=e:GetLabel()==1 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local res=e:GetLabel()==1 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c47171541.spfilter(chkc,e,tp) end
if chk==0 then if chk==0 then
e:SetLabel(0) e:SetLabel(0)
return res and Duel.IsExistingTarget(c47171541.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) return res and Duel.IsExistingTarget(c47171541.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
......
...@@ -32,7 +32,7 @@ end ...@@ -32,7 +32,7 @@ end
function c99910751.thfilter(c) function c99910751.thfilter(c)
return not c:IsCode(99910751) and c:IsSetCard(0x183) and c:IsAbleToHand() return not c:IsCode(99910751) and c:IsSetCard(0x183) and c:IsAbleToHand()
end end
function c99910751.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c99910751.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c99910751.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c99910751.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
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