Commit 3f95d3a1 authored by sidschingis's avatar sidschingis

fix

fixed interaction with copy effects
(e.g. Junk Collector )
parent 133e3024
......@@ -6,11 +6,11 @@ function c84968490.initial_effect(c)
e1:SetCategory(CATEGORY_DECKDES)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCost(c84968490.discost)
e1:SetTarget(c84968490.distarget)
e1:SetOperation(c84968490.disop)
c:RegisterEffect(e1)
end
function c84968490.discost(e,tp,eg,ep,ev,re,r,rp,chk)
function c84968490.distarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,5) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(5)
......@@ -18,5 +18,5 @@ function c84968490.discost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c84968490.disop(e,tp,eg,ep,ev,re,r,rp)
local p,val=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.DiscardDeck(p,val,REASON_EFFECT)
Duel.DiscardDeck(tp,val,REASON_EFFECT)
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