Commit f91daf19 authored by wind2009's avatar wind2009

Merge branch 'master' into 'master'

Update c101206060.lua

See merge request mycard/pre-release-database-cdb!60
parents cac2e17f 9c59a443
No preview for this file type
......@@ -3,7 +3,6 @@ local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
......@@ -14,14 +13,9 @@ function s.initial_effect(c)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetDescription(aux.Stringid(id,1))
e2:SetCost(s.cost1)
e2:SetCondition(s.con)
c:RegisterEffect(e2)
--set
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,id+o)
......@@ -33,22 +27,21 @@ end
function s.cfilter(c)
return not c:IsCode(id) and (c:IsSetCard(0x2b9) or c:IsType(TYPE_NORMAL)) and not c:IsPublic()
end
function s.confilter(c)
return c:IsFaceup() and not c:IsType(TYPE_TOKEN)
and (c:IsType(TYPE_NORMAL) or c:IsSetCard(0x2b9) and c:IsLevelAbove(5))
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end
local b1 = Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil)
local b2 = Duel.GetMatchingGroupCount(s.confilter,tp,LOCATION_MZONE,0,nil)>0
if chk==0 then return b1 or b2 end
if b1 then
if b2 and not Duel.SelectYesNo(tp,aux.Stringid(id,0)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
function s.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function s.confilter(c)
return c:IsFaceup() and not c:IsType(TYPE_TOKEN)
and (c:IsType(TYPE_NORMAL) or c:IsSetCard(0x2b9) and c:IsLevelAbove(5))
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(s.confilter,tp,LOCATION_MZONE,0,nil)>0
end
end
function s.nbfilter(c)
return c:IsFaceup() and aux.NegateAnyFilter(c) and c:IsAbleToRemove()
......
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