Commit 124c8b59 authored by wind2009's avatar wind2009

Fix 絢嵐

parent 4db79078
Pipeline #37447 passed with stages
in 4 minutes and 13 seconds
No preview for this file type
...@@ -20,7 +20,7 @@ function s.initial_effect(c) ...@@ -20,7 +20,7 @@ function s.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id) e2:SetCountLimit(1,id+o)
e2:SetCondition(s.spcon2) e2:SetCondition(s.spcon2)
e2:SetTarget(s.sptg2) e2:SetTarget(s.sptg2)
e2:SetOperation(s.spop2) e2:SetOperation(s.spop2)
...@@ -37,7 +37,7 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,7 +37,7 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
or re:GetHandler():IsSetCard(0x2d1) and re:IsActiveType(TYPE_QUICKPLAY)) or re:GetHandler():IsSetCard(0x2d1) and re:IsActiveType(TYPE_QUICKPLAY))
end end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return not c:IsCode(id) and c:IsSetCard(0x2d1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x2d1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not Duel.IsExistingMatchingCard(aux.AND(Card.IsFaceup,Card.IsCode),tp,LOCATION_ONFIELD,0,1,nil,c:GetCode()) and not Duel.IsExistingMatchingCard(aux.AND(Card.IsFaceup,Card.IsCode),tp,LOCATION_ONFIELD,0,1,nil,c:GetCode())
end end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -47,11 +47,12 @@ function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -47,11 +47,12 @@ function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function s.spop2(e,tp,eg,ep,ev,re,r,rp) function s.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
...@@ -19,7 +19,7 @@ function s.initial_effect(c) ...@@ -19,7 +19,7 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id) e2:SetCountLimit(1,id+o)
e2:SetTarget(s.thtg) e2:SetTarget(s.thtg)
e2:SetOperation(s.thop) e2:SetOperation(s.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
......
...@@ -19,7 +19,7 @@ function s.initial_effect(c) ...@@ -19,7 +19,7 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id) e2:SetCountLimit(1,id+o)
e2:SetTarget(s.thtg) e2:SetTarget(s.thtg)
e2:SetOperation(s.thop) e2:SetOperation(s.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
......
...@@ -61,21 +61,33 @@ function s.thfilter(c,typ) ...@@ -61,21 +61,33 @@ function s.thfilter(c,typ)
end end
function s.gcheck(g) function s.gcheck(g)
return g:FilterCount(Card.IsCode,nil,5318639)<=1 return g:FilterCount(Card.IsCode,nil,5318639)<=1
and g:FilterCount(aux.NOT(Card.IsCode),nil,5318639)<=1 and g:FilterCount(Card.IsSetCard,nil,0x2d1)<=1
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil)
if #g>0 then if #g>0 and g:CheckSubGroup(s.gcheck,1,2) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:SelectSubGroup(tp,s.gcheck,false,1,2) local sg=g:SelectSubGroup(tp,s.gcheck,false,1,2)
if sg then if sg then
Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end end
end end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c,tp,sumtp,sumpos)
return not c:IsAttribute(ATTRIBUTE_WIND)
end end
function s.cfilter(c) function s.cfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
......
...@@ -78,7 +78,7 @@ end ...@@ -78,7 +78,7 @@ end
function s.disop(e,tp,eg,ep,ev,re,r,rp) function s.disop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.NegateEffect(ev) then return end if not Duel.NegateEffect(ev) then return end
if Duel.IsExistingMatchingCard(s.confilter,tp,LOCATION_GRAVE,0,2,nil) if Duel.IsExistingMatchingCard(s.confilter,tp,LOCATION_GRAVE,0,2,nil)
and re:GetHandler():IsRelateToEffect(re) and re:GetHandler():IsRelateToChain()
and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
......
...@@ -11,11 +11,11 @@ function s.initial_effect(c) ...@@ -11,11 +11,11 @@ function s.initial_effect(c)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon) e1:SetCondition(s.accon)
e1:SetTarget(s.sptg) e1:SetTarget(s.sptg)
e1:SetOperation(s.spop) e1:SetOperation(s.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --to deck
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TODECK) e2:SetCategory(CATEGORY_TODECK)
...@@ -24,7 +24,7 @@ function s.initial_effect(c) ...@@ -24,7 +24,7 @@ function s.initial_effect(c)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+o) e2:SetCountLimit(1,id+o)
e2:SetCondition(s.spcon) e2:SetCondition(s.accon)
e2:SetTarget(s.tdtg) e2:SetTarget(s.tdtg)
e2:SetOperation(s.tdop) e2:SetOperation(s.tdop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -42,7 +42,7 @@ function s.initial_effect(c) ...@@ -42,7 +42,7 @@ function s.initial_effect(c)
e3:SetOperation(s.spop2) e3:SetOperation(s.spop2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.accon(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_QUICKPLAY) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_QUICKPLAY)
end end
function s.spcon2(e,tp,eg,ep,ev,re,r,rp) function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
...@@ -68,12 +68,12 @@ end ...@@ -68,12 +68,12 @@ end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToDeck() end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToDeck() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,2,nil) local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end end
function s.tdop(e,tp,eg,ep,ev,re,r,rp) function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToChain,nil) local g=Duel.GetTargetsRelateToChain()
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end end
......
...@@ -5,16 +5,16 @@ function s.initial_effect(c) ...@@ -5,16 +5,16 @@ function s.initial_effect(c)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--set --set
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED) e2:SetCode(EVENT_DESTROYED)
...@@ -44,8 +44,8 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -44,8 +44,8 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local op=0 local op=0
if b1 or b2 then if b1 or b2 then
op=aux.SelectFromOptions(tp, op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(id,1),1}, {b1,aux.Stringid(id,2),1},
{b2,aux.Stringid(id,2),2}) {b2,aux.Stringid(id,3),2})
end end
e:SetLabel(op) e:SetLabel(op)
if op==1 then if op==1 then
...@@ -56,7 +56,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -56,7 +56,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
elseif op==2 then elseif op==2 then
if e:IsCostChecked() then if e:IsCostChecked() then
e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
Duel.RegisterFlagEffect(tp,id+o,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,id+o,RESET_PHASE+PHASE_END,0,1)
end end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
...@@ -89,7 +89,7 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -89,7 +89,7 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.setop(e,tp,eg,ep,ev,re,r,rp) function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToChain() then if c:IsRelateToChain() and aux.NecroValleyFilter()(c) then
Duel.SSet(tp,c) Duel.SSet(tp,c)
end end
end end
\ No newline at end of file
...@@ -8,13 +8,13 @@ function s.initial_effect(c) ...@@ -8,13 +8,13 @@ function s.initial_effect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TOGRAVE) e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--set --set
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED) e2:SetCode(EVENT_DESTROYED)
...@@ -23,12 +23,6 @@ function s.initial_effect(c) ...@@ -23,12 +23,6 @@ function s.initial_effect(c)
e2:SetOperation(s.setop) e2:SetOperation(s.setop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.tgfilter(c)
return (c:IsRace(RACE_SPELLCASTER) or c:IsType(TYPE_SPELL)) and c:IsAbleToGrave()
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x128,0x150) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.tgfilter(c) function s.tgfilter(c)
return c:IsSetCard(0x2d1) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() return c:IsSetCard(0x2d1) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end end
...@@ -44,8 +38,8 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -44,8 +38,8 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local op=0 local op=0
if b1 or b2 then if b1 or b2 then
op=aux.SelectFromOptions(tp, op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(id,1),1}, {b1,aux.Stringid(id,2),1},
{b2,aux.Stringid(id,2),2}) {b2,aux.Stringid(id,3),2})
end end
e:SetLabel(op) e:SetLabel(op)
if op==1 then if op==1 then
...@@ -88,7 +82,7 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -88,7 +82,7 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.setop(e,tp,eg,ep,ev,re,r,rp) function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToChain() then if c:IsRelateToChain() and aux.NecroValleyFilter()(c) then
Duel.SSet(tp,c) Duel.SSet(tp,c)
end end
end end
\ No newline at end of file
...@@ -8,13 +8,13 @@ function s.initial_effect(c) ...@@ -8,13 +8,13 @@ function s.initial_effect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_DRAW+CATEGORY_HANDES) e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_DRAW+CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--set --set
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED) e2:SetCode(EVENT_DESTROYED)
...@@ -23,15 +23,6 @@ function s.initial_effect(c) ...@@ -23,15 +23,6 @@ function s.initial_effect(c)
e2:SetOperation(s.setop) e2:SetOperation(s.setop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.tgfilter(c)
return (c:IsRace(RACE_SPELLCASTER) or c:IsType(TYPE_SPELL)) and c:IsAbleToGrave()
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x128,0x150) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.tgfilter(c)
return c:IsSetCard(0x2d1) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function s.thfilter(c) function s.thfilter(c)
return c:IsCode(5318639) and c:IsAbleToHand() return c:IsCode(5318639) and c:IsAbleToHand()
end end
...@@ -44,8 +35,8 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -44,8 +35,8 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local op=0 local op=0
if b1 or b2 then if b1 or b2 then
op=aux.SelectFromOptions(tp, op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(id,1),1}, {b1,aux.Stringid(id,2),1},
{b2,aux.Stringid(id,2),2}) {b2,aux.Stringid(id,3),2})
end end
e:SetLabel(op) e:SetLabel(op)
if op==1 then if op==1 then
...@@ -65,19 +56,22 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -65,19 +56,22 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
function s.cfilter(c) function s.cfilter(c)
return (c:IsSetCard(0x2d1) or c:IsCode(5318639)) and c:IsDiscardable() return (c:IsSetCard(0x2d1) or c:IsType(TYPE_QUICKPLAY)) and c:IsDiscardable()
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==1 then if e:GetLabel()==1 then
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT) Duel.Draw(p,d,REASON_EFFECT)
Duel.ShuffleHand(p)
Duel.BreakEffect() Duel.BreakEffect()
if Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) then if Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) then
Duel.DiscardHand(tp,s.cfilter,1,1,REASON_EFFECT+REASON_DISCARD) local dg=Duel.SelectMatchingCard(p,s.cfilter,p,LOCATION_HAND,0,1,1,nil)
if dg:GetCount()>0 then
Duel.ShuffleHand(p)
Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD,p)
end
else else
local sg=Duel.GetFieldGroup(p,LOCATION_HAND,0) local sg=Duel.GetFieldGroup(p,LOCATION_HAND,0)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD,p)
end end
elseif e:GetLabel()==2 then elseif e:GetLabel()==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
...@@ -98,7 +92,7 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -98,7 +92,7 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.setop(e,tp,eg,ep,ev,re,r,rp) function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToChain() then if c:IsRelateToChain() and aux.NecroValleyFilter()(c) then
Duel.SSet(tp,c) Duel.SSet(tp,c)
end end
end end
\ No newline at end of file
...@@ -14,9 +14,9 @@ function s.initial_effect(c) ...@@ -14,9 +14,9 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_END_PHASE+TIMING_DAMAGE_STEP)
e2:SetTarget(s.drtg) e2:SetTarget(s.drtg)
e2:SetOperation(s.drop) e2:SetOperation(s.drop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -35,8 +35,7 @@ function s.initial_effect(c) ...@@ -35,8 +35,7 @@ function s.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--set --set
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1)) e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_DESTROYED) e4:SetCode(EVENT_DESTROYED)
...@@ -45,29 +44,26 @@ function s.initial_effect(c) ...@@ -45,29 +44,26 @@ function s.initial_effect(c)
e4:SetOperation(s.setop) e4:SetOperation(s.setop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function s.tdfilter(c,tp) function s.tdfilter(c)
return c:IsSetCard(0x2d1) and c:IsType(TYPE_QUICKPLAY) and c:IsAbleToDeck() return c:IsType(TYPE_QUICKPLAY) and c:IsAbleToDeck() and c:IsCanBeEffectTarget()
and Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_GRAVE,0,2,c)
end end
function s.tdfilter2(c,tp) function s.gcheck(g)
return c:IsType(TYPE_QUICKPLAY) and c:IsAbleToDeck() return g:FilterCount(Card.IsSetCard,nil,0x2d1)>0
end end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
local dg=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE,0,nil)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end and dg:CheckSubGroup(s.gcheck,3,3) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,s.tdfilter2,tp,LOCATION_GRAVE,0,1,1,nil,tp) local g=dg:SelectSubGroup(tp,s.gcheck,false,3,3)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,0,2,2,g)
g:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,3,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,3,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function s.drop(e,tp,eg,ep,ev,re,r,rp) function s.drop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetTargetsRelateToChain() local g=Duel.GetTargetsRelateToChain()
if #g~=0 then if #g~=0 then
if aux.PlaceCardsOnDeckBottom(tp,g)~=0 then if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
...@@ -135,7 +131,7 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -135,7 +131,7 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.setop(e,tp,eg,ep,ev,re,r,rp) function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToChain() then if c:IsRelateToChain() and aux.NecroValleyFilter()(c) then
Duel.SSet(tp,c) Duel.SSet(tp,c)
end end
end end
\ No newline at end of file
...@@ -2,4 +2,4 @@ ...@@ -2,4 +2,4 @@
!counter 0x106f 少女指示物 !counter 0x106f 少女指示物
!setname 0x2cf 树熊 !setname 0x2cf 树熊
!setname 0x2d0 死伟王 !setname 0x2d0 死伟王
!setname 0x2d0 绚岚 !setname 0x2d1 绚岚
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