Commit 140b5eff authored by Fluorohydride's avatar Fluorohydride

Merge pull request #643 from woodee/patch-40

fix
parents 0e3bd161 cb62740e
--`󥵩` --���`�����󥵩`
function c22842214.initial_effect(c) function c22842214.initial_effect(c)
--equip --equip
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -65,20 +65,23 @@ function c22842214.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,20 +65,23 @@ function c22842214.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.EquipComplete() Duel.EquipComplete()
end end
function c22842214.eqfilter(c,ec) function c22842214.eqfilter(c,ec)
return c:GetFlagEffect(22842214)~=0 and c:IsHasCardTarget(ec) return c:GetFlagEffect(22842214)~=0 and c:IsHasCardTarget(ec) and not c:IsStatus(STATUS_DESTROY_CONFIRMED)
end end
function c22842214.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c22842214.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c22842214.eqfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil,c) end if chk==0 then return not c:IsReason(REASON_REPLACE) and Duel.IsExistingMatchingCard(c22842214.eqfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil,c) end
if Duel.SelectYesNo(tp,aux.Stringid(22842214,1)) then if Duel.SelectYesNo(tp,aux.Stringid(22842214,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local tc=Duel.SelectMatchingCard(tp,c22842214.eqfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil,c):GetFirst() local tc=Duel.SelectMatchingCard(tp,c22842214.eqfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil,c):GetFirst()
e:SetLabelObject(tc) e:SetLabelObject(tc)
tc:SetStatus(STATUS_DESTROY_CONFIRMED,true)
return true return true
else return false end else return false end
end end
function c22842214.desrepop(e,tp,eg,ep,ev,re,r,rp) function c22842214.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetLabelObject(),REASON_EFFECT+REASON_REPLACE) local g=e:GetLabelObject()
g:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(g,REASON_EFFECT+REASON_REPLACE)
end end
function c22842214.atcon(e) function c22842214.atcon(e)
return Duel.IsExistingMatchingCard(c22842214.eqfilter,e:GetHandlerPlayer(),LOCATION_SZONE,LOCATION_SZONE,1,nil,e:GetHandler()) return Duel.IsExistingMatchingCard(c22842214.eqfilter,e:GetHandlerPlayer(),LOCATION_SZONE,LOCATION_SZONE,1,nil,e:GetHandler())
......
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