Commit b3dbb8b5 authored by Grajade's avatar Grajade

Update c22201301.lua

parent 7b6ccddf
--咏唱破弃
function c22201301.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22201301,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,22201301+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c22201301.target)
e1:SetOperation(c22201301.operation)
c:RegisterEffect(e1)
end
function c22201301.ritfilter(c,e,tp)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) and not c:IsPublic()
end
function c22201301.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(c22201301.ritfilter,tp,LOCATION_HAND,0,1,nil)
end
end
function c22201301.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c22201301.ritfilter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()<1 then return end
local tc=g:GetFirst()
Duel.ConfirmCards(1-tp,tc)
Duel.ShuffleHand(tp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) or not c:IsReason(REASON_DESTROY) then return end
if Duel.GetMZoneCount(tp)>0 and tc:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,false) and Duel.SelectYesNo(tp,aux.Stringid(22201301,1)) then
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure()
end
end
--咏唱破弃
function c22201301.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22201301,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,22201301+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c22201301.target)
e1:SetOperation(c22201301.operation)
c:RegisterEffect(e1)
end
function c22201301.ritfilter(c,e,tp)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) and not c:IsPublic()
end
function c22201301.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(c22201301.ritfilter,tp,LOCATION_HAND,0,1,nil)
end
end
function c22201301.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c22201301.ritfilter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()<1 then return end
local tc=g:GetFirst()
Duel.ConfirmCards(1-tp,tc)
Duel.ShuffleHand(tp)
local c=e:GetHandler()
if not c:IsPreviousLocation(LOCATION_SZONE) then return end
if c:IsRelateToEffect(e) or not c:IsReason(REASON_DESTROY) then return end
if Duel.GetMZoneCount(tp)>0 and tc:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) and Duel.SelectYesNo(tp,aux.Stringid(22201301,1)) then
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
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