Commit 2642fb81 authored by GuGu's avatar GuGu

Update c24071.lua

parent a92fedf8
Pipeline #40900 passed with stage
in 1 minute and 15 seconds
......@@ -28,6 +28,7 @@ function c24071.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1)
e3:SetCondition(c24071.thcon)
e3:SetTarget(c24071.thtg)
e3:SetOperation(c24071.thop)
c:RegisterEffect(e3)
......@@ -63,11 +64,14 @@ function c24071.sop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(tg,REASON_EFFECT)
end
end
function c24071.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c24071.thfilter(c)
return c:IsRace(RACE_ZOMBIE) and c:GetLevel()==1 and (c:IsAbleToHand())
end
function c24071.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and Duel.IsExistingMatchingCard(c24071.thfilter,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c24071.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c24071.spfilter(c,e,tp)
......
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