Commit b7ff68c6 authored by TanakaKotoha's avatar TanakaKotoha

foo foo

parent 5a7b9ce2
No preview for this file type
local m=16104242
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c16104200") end,function() require("script/c16104200") end)
local m,cm=rscf.DefineCard(16104242,"CHURCH_KNIGHT")
function cm.initial_effect(c)
--Summon
local e1=Effect.CreateEffect(c)
......@@ -52,6 +53,17 @@ function cm.solvefun(g,tp)
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
if tc:IsSetCard(0xccb) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.Summon(tp,tc,true,nil,0)
local e2=Effect.CreateEffect(tc)
e2:SetDescription(aux.Stringid(m,3))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SUMMON_PROC)
e2:SetReset(rsreset.pend)
e2:SetCondition(cm.ntcon)
tc:RegisterEffect(e2)
Duel.Summon(tp,tc,true,nil)
end
end
function cm.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
\ No newline at end of file
......@@ -24,7 +24,7 @@ function c33400201.initial_effect(c)
c:RegisterEffect(e4)
end
function c33400201.thfilter(c,tp)
return c:IsCode(33400200) and (c:IsAbleToHand() or c:GetActivateEffect():IsActivatable(tp))
return c:IsSetCard(0x6342) and (c:IsAbleToHand() or c:GetActivateEffect():IsActivatable(tp)) and (c:GetType()==0x20004 or c:GetType()==0x20002)
end
function c33400201.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33400201.thfilter,tp,LOCATION_DECK,0,1,nil,tp) end
......
......@@ -128,7 +128,7 @@ function cm.dmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(1-tp,500,REASON_EFFECT)
if Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE+LOCATION_DECK,LOCATION_GRAVE+LOCATION_DECK,1,1,nil)
local g1=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,1,nil)
Duel.SendtoDeck(g1,nil,0,REASON_EFFECT)
end
end
......
......@@ -13,28 +13,28 @@ function c33401305.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x341) and c:IsLevelBelow(4)
end
function c33401305.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_HAND+LOCATION_REMOVED) and c33401305.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)+Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c33401305.filter,tp,LOCATION_HAND+LOCATION_REMOVED,0,1,nil,e,tp) end
and Duel.IsExistingTarget(c33401305.filter,tp,LOCATION_HAND+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c33401305.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local pd=0
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local pd=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)+Duel.GetLocationCount(1-tp,LOCATION_MZONE)==0 then return end
local g=Duel.SelectMatchingCard(tp,c33401305.filter,tp,LOCATION_HAND+LOCATION_REMOVED,0,1,1,nil,e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if Duel.SelectYesNo(tp,aux.Stringid(33401305,0)) then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
else pd=1
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if Duel.SelectYesNo(tp,aux.Stringid(33401305,0)) then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
else
pd=1
end
end
if pd==1 then
if pd==1 then
if Duel.SpecialSummon(g,0,tp,1-tp,false,false,POS_FACEUP)~=0 then
if Duel.SelectYesNo(tp,aux.Stringid(33401305,1)) then
if Duel.SelectYesNo(tp,aux.Stringid(33401305,1)) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
end
end
end
......@@ -54,7 +54,6 @@ function c65060050.drop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local eeg=eg:Filter(c65060050.drconfil,nil)
Duel.SendtoHand(eeg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,eeg)
end
function c65060050.excostfil(c)
return c:IsSummonType(SUMMON_TYPE_ADVANCE) and c:IsReleasable()
......
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