Commit 7f0aebc6 authored by 聖園ミカ's avatar 聖園ミカ 🐟

54188

parent 577ad2c4
Pipeline #30756 passed with stage
in 10 minutes and 15 seconds
No preview for this file type
--剑与魔法石 骑士
local m=17243575
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon
-- special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(TIMING_BATTLE_START+TIMING_BATTLE_END)
e1:SetCountLimit(1,m)
e1:SetHintTiming(TIMING_BATTLE_START + TIMING_BATTLE_END)
e1:SetCountLimit(1, m)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--search
-- search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCategory(CATEGORY_TOHAND + CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,m+1)
e2:SetCountLimit(1, m + 1)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
cm.SetCard_JYMFS=true
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
function cm.spcon(e, tp, eg, ep, ev, re, r, rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
return ph >= PHASE_BATTLE_START and ph <= PHASE_BATTLE
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
function cm.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0
and e:GetHandler():IsCanBeSpecialSummoned(e, 0, tp, false, false) end
Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, e:GetHandler(), 1, 0, 0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
function cm.spop(e, tp, eg, ep, ev, re, r, rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP)
end
end
......@@ -54,15 +54,17 @@ end
function cm.thfilter(c)
return c.SetCard_JYMFS and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
function cm.thtg(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then return Duel.IsExistingMatchingCard(cm.thfilter, tp, LOCATION_DECK, 0, 1, nil) end
Duel.SetOperationInfo(0, CATEGORY_TOHAND, nil, 1, tp, LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
function cm.thop(e, tp, eg, ep, ev, re, r, rp)
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp, cm.thfilter, tp, LOCATION_DECK, 0, 1, 1, nil)
if g:GetCount() > 0 then
Duel.SendtoHand(g, nil, REASON_EFFECT)
Duel.ConfirmCards(1 - tp, g)
end
end
\ No newline at end of file
--剑与魔法石 刮刮乐
local m=17243623
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
-- Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
......@@ -12,9 +12,10 @@ function cm.initial_effect(c)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--to deck+draw
-- to deck
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m+1)
......@@ -30,10 +31,12 @@ cm.SetCard_JYMFS=true
function cm.filter(c)
return c.SetCard_JYMFS and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
......@@ -48,16 +51,16 @@ end
function cm.tdfilter(c)
return c.SetCard_JYMFS and c:IsAbleToDeck()
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsPlayerCanDraw(tp,1) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tdfilter),tp,LOCATION_GRAVE,0,1,5,nil)
if #g>0 and Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and Duel.IsPlayerCanDraw(tp,1) then
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tdfilter),tp,LOCATION_GRAVE,0,1,3,nil)
if #g>0 and Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then
Duel.ShuffleDeck(tp)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
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