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)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.spcon2)
e2:SetTarget(s.sptg2)
e2:SetOperation(s.spop2)
......@@ -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))
end
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())
end
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)
end
function s.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......
......@@ -19,7 +19,7 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id)
e2:SetCountLimit(1,id+o)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
......
......@@ -19,7 +19,7 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id)
e2:SetCountLimit(1,id+o)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
......
......@@ -61,21 +61,33 @@ function s.thfilter(c,typ)
end
function s.gcheck(g)
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
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
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
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+LOCATION_GRAVE)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
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)
local sg=g:SelectSubGroup(tp,s.gcheck,false,1,2)
if sg then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
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
function s.cfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
......
......@@ -78,7 +78,7 @@ end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.NegateEffect(ev) then return end
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
Duel.BreakEffect()
Duel.Destroy(eg,REASON_EFFECT)
......
......@@ -11,11 +11,11 @@ function s.initial_effect(c)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetCondition(s.accon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--special summon
--to deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TODECK)
......@@ -24,7 +24,7 @@ function s.initial_effect(c)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.spcon)
e2:SetCondition(s.accon)
e2:SetTarget(s.tdtg)
e2:SetOperation(s.tdop)
c:RegisterEffect(e2)
......@@ -42,7 +42,7 @@ function s.initial_effect(c)
e3:SetOperation(s.spop2)
c:RegisterEffect(e3)
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)
end
function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
......@@ -68,12 +68,12 @@ end
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 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)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
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
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
......
......@@ -5,16 +5,16 @@ function s.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
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:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
......@@ -44,8 +44,8 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local op=0
if b1 or b2 then
op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(id,1),1},
{b2,aux.Stringid(id,2),2})
{b1,aux.Stringid(id,2),1},
{b2,aux.Stringid(id,3),2})
end
e:SetLabel(op)
if op==1 then
......@@ -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)
elseif op==2 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)
end
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)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain() then
if c:IsRelateToChain() and aux.NecroValleyFilter()(c) then
Duel.SSet(tp,c)
end
end
\ No newline at end of file
......@@ -8,13 +8,13 @@ function s.initial_effect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
......@@ -23,12 +23,6 @@ function s.initial_effect(c)
e2:SetOperation(s.setop)
c:RegisterEffect(e2)
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
......@@ -44,8 +38,8 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local op=0
if b1 or b2 then
op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(id,1),1},
{b2,aux.Stringid(id,2),2})
{b1,aux.Stringid(id,2),1},
{b2,aux.Stringid(id,3),2})
end
e:SetLabel(op)
if op==1 then
......@@ -88,7 +82,7 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain() then
if c:IsRelateToChain() and aux.NecroValleyFilter()(c) then
Duel.SSet(tp,c)
end
end
\ No newline at end of file
......@@ -8,13 +8,13 @@ function s.initial_effect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_DRAW+CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
......@@ -23,15 +23,6 @@ function s.initial_effect(c)
e2:SetOperation(s.setop)
c:RegisterEffect(e2)
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)
return c:IsCode(5318639) and c:IsAbleToHand()
end
......@@ -44,8 +35,8 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local op=0
if b1 or b2 then
op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(id,1),1},
{b2,aux.Stringid(id,2),2})
{b1,aux.Stringid(id,2),1},
{b2,aux.Stringid(id,3),2})
end
e:SetLabel(op)
if op==1 then
......@@ -65,19 +56,22 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
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
function s.activate(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==1 then
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
Duel.ShuffleHand(p)
Duel.BreakEffect()
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
local sg=Duel.GetFieldGroup(p,LOCATION_HAND,0)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD,p)
end
elseif e:GetLabel()==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......@@ -98,7 +92,7 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain() then
if c:IsRelateToChain() and aux.NecroValleyFilter()(c) then
Duel.SSet(tp,c)
end
end
\ No newline at end of file
......@@ -14,9 +14,9 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
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:SetOperation(s.drop)
c:RegisterEffect(e2)
......@@ -35,8 +35,7 @@ function s.initial_effect(c)
c:RegisterEffect(e3)
--set
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetDescription(aux.Stringid(id,2))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_DESTROYED)
......@@ -45,29 +44,26 @@ function s.initial_effect(c)
e4:SetOperation(s.setop)
c:RegisterEffect(e4)
end
function s.tdfilter(c,tp)
return c:IsSetCard(0x2d1) and c:IsType(TYPE_QUICKPLAY) and c:IsAbleToDeck()
and Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_GRAVE,0,2,c)
function s.tdfilter(c)
return c:IsType(TYPE_QUICKPLAY) and c:IsAbleToDeck() and c:IsCanBeEffectTarget()
end
function s.tdfilter2(c,tp)
return c:IsType(TYPE_QUICKPLAY) and c:IsAbleToDeck()
function s.gcheck(g)
return g:FilterCount(Card.IsSetCard,nil,0x2d1)>0
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
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)
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)
local g=Duel.SelectTarget(tp,s.tdfilter2,tp,LOCATION_GRAVE,0,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,0,2,2,g)
g:Merge(g2)
local g=dg:SelectSubGroup(tp,s.gcheck,false,3,3)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,3,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetTargetsRelateToChain()
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.Draw(tp,1,REASON_EFFECT)
end
......@@ -135,7 +131,7 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain() then
if c:IsRelateToChain() and aux.NecroValleyFilter()(c) then
Duel.SSet(tp,c)
end
end
\ No newline at end of file
......@@ -2,4 +2,4 @@
!counter 0x106f 少女指示物
!setname 0x2cf 树熊
!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