Commit 5996c714 authored by Uytrewq's avatar Uytrewq Committed by GitHub

fix (#2164)

parent 73bc514f
...@@ -3,12 +3,10 @@ function c4896788.initial_effect(c) ...@@ -3,12 +3,10 @@ function c4896788.initial_effect(c)
--draw --draw
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW) e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c4896788.drcon) e2:SetCondition(c4896788.drcon)
e2:SetTarget(c4896788.drtg)
e2:SetOperation(c4896788.drop) e2:SetOperation(c4896788.drop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
...@@ -16,14 +14,9 @@ function c4896788.drcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -16,14 +14,9 @@ function c4896788.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsAttackPos() return e:GetHandler():IsAttackPos()
and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(55144522) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(55144522)
end end
function c4896788.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(rp,1) end
Duel.SetTargetPlayer(rp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,rp,1)
end
function c4896788.drop(e,tp,eg,ep,ev,re,r,rp) function c4896788.drop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsAttackPos() or not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsAttackPos() or not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) if Duel.IsPlayerCanDraw(rp,1) and Duel.SelectYesNo(rp,aux.Stringid(4896788,0)) then
Duel.Draw(p,d,REASON_EFFECT) Duel.Draw(rp,1,REASON_EFFECT)
end
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