Commit 008e5c25 authored by salix5's avatar salix5
parent 986735bd
......@@ -4,17 +4,9 @@ function c67048711.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c67048711.target)
e1:SetOperation(c67048711.operation)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67048711,0))
e2:SetCategory(CATEGORY_DRAW+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_CUSTOM+67048711)
e2:SetTarget(c67048711.drtg)
e2:SetOperation(c67048711.drop)
c:RegisterEffect(e2)
--recover
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67048711,1))
......@@ -30,24 +22,22 @@ end
function c67048711.filter(c)
return c:IsFaceup() and c:IsCode(67048711)
end
function c67048711.operation(e,tp,eg,ep,ev,re,r,rp)
function c67048711.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if Duel.GetMatchingGroupCount(c67048711.filter,tp,LOCATION_SZONE,0,nil)==3 then
Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+67048711,e,0,0,0,0)
local g=Duel.GetMatchingGroup(c67048711.filter,tp,LOCATION_ONFIELD,0,nil)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,3)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
end
function c67048711.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(c67048711.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,3)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c67048711.drop(e,tp,eg,ep,ev,re,r,rp)
function c67048711.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMatchingGroupCount(c67048711.filter,tp,LOCATION_SZONE,0,nil)==3 then
Duel.Draw(tp,3,REASON_EFFECT)
if Duel.Draw(tp,3,REASON_EFFECT)~=0 then
Duel.BreakEffect()
local g=Duel.GetMatchingGroup(c67048711.filter,tp,LOCATION_ONFIELD,0,nil)
Duel.Destroy(g,REASON_EFFECT)
end
end
Duel.BreakEffect()
local g=Duel.GetMatchingGroup(c67048711.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.Destroy(g,REASON_EFFECT)
end
function c67048711.reccon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
......
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