Commit 7b5a7dc7 authored by POLYMER's avatar POLYMER

fix

parent 8b0ec573
......@@ -8,18 +8,22 @@ function cm.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,10401404)
e1:SetCondition(c10401404.con)
e1:SetTarget(c10401404.tg)
e1:SetOperation(c10401404.activate)
c:RegisterEffect(e1)
end
function c10401404.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity()
end
function c10401404.filter(c)
return c:IsType(TYPE_MONSTER)
function c10401404.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.nzatk,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end
function c10401404.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.SelectMatchingCard(tp,c10401404.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local tc=sg:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,aux.nzatk,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if #g==0 then return end
Duel.HintSelection(g)
local tc=g:GetFirst()
local atk=tc:GetAttack()
local lp1=Duel.GetLP(tp)
local lp2=Duel.GetLP(1-tp)
......@@ -55,3 +59,7 @@ function c10401404.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e2,tp)
end
end
function c10401404.damval(e,re,val,r,rp,rc)
if bit.band(r,REASON_EFFECT)~=0 then return 0
else return val end
end
\ No newline at end of file
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