Commit 58eb4477 authored by wind2009's avatar wind2009

Fix

parent 2357d3f2
Pipeline #39259 passed with stages
in 2 minutes and 58 seconds
No preview for this file type
--星辰響手プリクル
local s,id=GetID()
local s,id,o=GetID()
function s.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
......@@ -18,9 +18,8 @@ function s.initial_effect(c)
--set
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,id+o)
e3:SetCondition(s.setcon)
......@@ -33,7 +32,8 @@ function s.spfilter(c,e,tp)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
......@@ -41,18 +41,19 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToChain() and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
if tc and aux.NecroValleyFilter()(tc) and tc:IsRelateToChain() and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_MZONE,0,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
end
function s.setcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_FUSION) and c:IsReason(REASON_MATERIAL)
return c:IsLocation(LOCATION_GRAVE) and r==REASON_FUSION
end
function s.setfilter(c)
return c:IsSetCard(0x1c9) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
......@@ -67,4 +68,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp)
if #g>0 then
Duel.SSet(tp,g)
end
end
\ No newline at end of file
end
--星辰の刺毒
local s,id=GetID()
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_REMOVE+CATEGORY_TODECK+CATEGORY_DRAW)
......@@ -9,6 +9,7 @@ function s.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END+TIMING_END_PHASE)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
......@@ -22,22 +23,29 @@ function s.tdfilter(c)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.GetMatchingGroupCount(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,nil)>0 end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,nil)
if chk==0 then return Duel.GetMatchingGroupCount(aux.AND(Card.IsAbleToRemove,Card.IsCanBeEffectTarget),tp,0,LOCATION_GRAVE,nil,e)>0 end
local g=Duel.GetMatchingGroup(aux.AND(Card.IsAbleToRemove,Card.IsCanBeEffectTarget),tp,0,LOCATION_GRAVE,nil,e)
local sg=g:SelectSubGroup(tp,s.fselect,false,1,2)
Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tg,#tg,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,sg,#sg,0,0)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local rg=Duel.GetTargetsRelateToChain()
if #rg==0 then return end
local rg=Duel.GetTargetsRelateToChain():Filter(aux.NecroValleyFilter(),nil)
if #rg==0 or rg:IsExists(aux.NOT(Card.IsAbleToRemove),1,nil) then return end
local dg=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)>0 and dg:GetCount()>0 and Duel.IsPlayerCanDraw(tp) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
if Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)>0
and dg:GetCount()>0 and Duel.IsPlayerCanDraw(tp)
and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sc=dg:Select(tp,1,1,nil)
if Duel.SendtoDeck(sc,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 then
local sg=dg:Select(tp,1,1,nil)
local dtc=sg:GetFirst()
if dtc then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
Duel.HintSelection(sg)
if Duel.SendtoDeck(dtc,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 and dtc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
end
\ No newline at end of file
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