Commit ebb324f4 authored by wind2009's avatar wind2009

Fix

parent 5f9f6114
Pipeline #42474 passed with stages
in 2 minutes and 29 seconds
No preview for this file type
......@@ -13,6 +13,7 @@
101304012
101304013
101304014
101304015
101304016
101304017
101304018
......@@ -22,8 +23,10 @@
101304025
101304026
101304027
101304029
101304030
101304031
101304032
101304033
101304034
101304035
......@@ -31,9 +34,11 @@
101304206
101304038
101304039
101304040
101304043
101304044
101304045
101304046
101304047
101304048
101304049
......@@ -46,6 +51,9 @@
101304056
101304057
101304058
101304059
101304060
101304061
101304062
101304063
101304064
......@@ -55,6 +63,8 @@
101304070
101304208
101304072
101304073
101304074
101304075
101304076
101304078
\ No newline at end of file
......@@ -23,18 +23,18 @@ function s.initial_effect(c)
e2:SetOperation(s.drop)
c:RegisterEffect(e2)
--summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMING_MAIN_END)
e1:SetCountLimit(1)
e1:SetCondition(s.sumcon)
e1:SetTarget(s.sumtg)
e1:SetOperation(s.sumop)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMING_MAIN_END)
e3:SetCountLimit(1)
e3:SetCondition(s.sumcon)
e3:SetTarget(s.sumtg)
e3:SetOperation(s.sumop)
c:RegisterEffect(e3)
end
function s.otfilter(c,tp)
return c:IsType(TYPE_RITUAL+TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_PENDULUM+TYPE_LINK) and (c:IsControler(tp) or c:IsFaceup())
......@@ -65,8 +65,8 @@ function s.drtg(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,3),1},
{b2,aux.Stringid(id,4),2})
end
e:SetLabel(op,ct)
if op==1 then
......@@ -93,27 +93,28 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,ct,ct,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
for tc in aux.Next(g) do
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
end
......@@ -124,7 +125,7 @@ function s.sumcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp and Duel.IsMainPhase()
end
function s.sumfilter(c)
return c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1)
return c:IsSummonable(true,nil,1)
end
function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND,0,1,nil) end
......@@ -135,12 +136,6 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,s.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
local s1=tc:IsSummonable(true,nil,1)
local s2=tc:IsMSetable(true,nil,1)
if (s1 and s2 and Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) or not s2 then
Duel.Summon(tp,tc,true,nil,1)
else
Duel.MSet(tp,tc,true,nil,1)
end
Duel.Summon(tp,tc,true,nil,1)
end
end
\ No newline at end of file
end
......@@ -16,6 +16,7 @@ function s.initial_effect(c)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
--TODO CATEGORY_MSET
e2:SetCategory(CATEGORY_TODECK+CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_RELEASE)
......@@ -28,7 +29,7 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function s.thfilter(c)
return c:IsSetCard(0x2dc) and not (c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER)) and c:IsAbleToHand()
return c:IsSetCard(0x2dc) and not (c:IsAllTypes(TYPE_RITUAL+TYPE_MONSTER)) and c:IsAbleToHand()
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
......@@ -41,13 +42,19 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
if g:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local dg=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,1,1,nil,REASON_EFFECT)
Duel.ShuffleHand(tp)
if dg:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD)
end
end
end
end
function s.tdfilter(c)
return c:IsFaceupEx() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
return c:IsFaceupEx() and c:IsAllTypes(TYPE_RITUAL+TYPE_MONSTER) and c:IsAbleToDeck()
end
function s.posfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsCanTurnSet()
......@@ -61,10 +68,10 @@ function s.tdtg(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,ct)
e:SetLabel(op)
if op==1 then
if e:IsCostChecked() then
e:SetCategory(CATEGORY_TODECK)
......@@ -82,7 +89,6 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetLabel()==1 then
local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,LOCATION_GRAVE+LOCATION_MZONE,nil)
if aux.NecroValleyNegateCheck(g) then return end
......@@ -96,4 +102,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
end
end
end
\ No newline at end of file
end
......@@ -16,6 +16,7 @@ function s.initial_effect(c)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
--TODO CATEGORY_SSET
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_RELEASE)
......@@ -48,7 +49,7 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
{b1,aux.Stringid(id,1),1},
{b2,aux.Stringid(id,2),2})
end
e:SetLabel(op,ct)
e:SetLabel(op)
if op==1 then
if e:IsCostChecked() then
e:SetCategory(CATEGORY_TODECK)
......@@ -78,4 +79,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.SSet(tp,tc)
end
end
end
\ No newline at end of file
end
......@@ -31,7 +31,7 @@ end
function s.chainlm(e,rp,tp)
return tp==rp
end
function s.sucfilter(c)
function s.sucfilter(c,tp)
return c:IsSummonType(SUMMON_TYPE_ADVANCE) and c:IsControler(tp)
end
function s.sucop(e,tp,eg,ep,ev,re,r,rp)
......@@ -77,7 +77,7 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
{b1,aux.Stringid(id,1),1},
{b2,aux.Stringid(id,2),2})
end
e:SetLabel(op,ct)
e:SetLabel(op)
if op==1 then
if e:IsCostChecked() then
e:SetCategory(CATEGORY_TODECK)
......@@ -109,4 +109,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
end
\ No newline at end of file
end
......@@ -16,6 +16,7 @@ function s.initial_effect(c)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
-- TODO CATEGORY_SSET
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_RELEASE)
......@@ -33,8 +34,7 @@ end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,LOCATION_GRAVE+LOCATION_MZONE,1,nil)
and (not e:IsCostChecked() or Duel.GetFlagEffect(tp,id)==0)
local b2=Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil)
local b2=Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil)
and (not e:IsCostChecked() or Duel.GetFlagEffect(tp,id+o)==0)
if chk==0 then return b1 or b2 end
local op=0
......@@ -43,7 +43,7 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
{b1,aux.Stringid(id,1),1},
{b2,aux.Stringid(id,2),2})
end
e:SetLabel(op,ct)
e:SetLabel(op)
if op==1 then
if e:IsCostChecked() then
e:SetCategory(CATEGORY_TODECK)
......@@ -65,7 +65,6 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp)
if aux.NecroValleyNegateCheck(g) then return end
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
elseif e:GetLabel()==2 then
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
......@@ -73,4 +72,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.SSet(tp,tc)
end
end
end
\ No newline at end of file
end
......@@ -28,6 +28,9 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.SelectReleaseGroupEx(tp,aux.TRUE,1,1,REASON_COST,true,nil,tp)
Duel.Release(g,REASON_COST)
end
function s.thfilter(c)
return s.thfilter1(c) or s.thfilter2(c)
end
function s.thfilter1(c)
return not c:IsCode(id) and c:IsSetCard(0x2dc) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
......@@ -35,23 +38,22 @@ function s.thfilter2(c)
return c:IsCode(101304015) and c:IsAbleToHand()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_DECK,0,1,nil)
and Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil)
return g:CheckSubGroup(aux.gffcheck,2,2,s.thfilter1,nil,s.thfilter2,nil)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(s.thfilter1,tp,LOCATION_DECK,0,nil)
local g2=Duel.GetMatchingGroup(s.thfilter2,tp,LOCATION_DECK,0,nil)
if g1:GetCount()>0 and g2:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg1=g1:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg2=g2:Select(tp,1,1,nil)
sg1:Merge(sg2)
Duel.SendtoHand(sg1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg1)
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil)
if not g:CheckSubGroup(aux.gffcheck,2,2,s.thfilter1,nil,s.thfilter2,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg1=g:SelectSubGroup(tp,aux.gffcheck,false,2,2,s.thfilter1,nil,s.thfilter2,nil)
if tg1:GetCount()==2 then
Duel.SendtoHand(tg1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg1)
end
end
function s.filter(c,e,tp,chk)
return c:IsSetCard(0x2dc) and c:IsType(TYPE_RITUAL) and (not chk or c~=e:GetHandler())
end
\ No newline at end of file
end
......@@ -19,6 +19,7 @@ function s.initial_effect(c)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
-- TODO CATEGORY_SSET
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......@@ -44,19 +45,19 @@ function s.initial_effect(c)
Duel.RegisterEffect(ge2,0)
end
end
function s.spfilter(c,e,tp,cost)
function s.spfilter(c,e,tp)
return c:IsSetCard(0x2dc) and c:IsType(TYPE_MONSTER)
and c:IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP)
and (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp,e:IsCostChecked()) end
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp,false)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
......@@ -84,7 +85,7 @@ function s.clearop(e,tp,eg,ep,ev,re,r,rp)
s[0]=0
end
function s.drcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(s[0],TYPE_RITUAL+TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_PENDULUM+TYPE_LINK)~=0
return bit.band(s[0],TYPE_RITUAL+TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_PENDULUM+TYPE_LINK)>0
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=0
......@@ -110,11 +111,11 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Draw(tp,ct,REASON_EFFECT)~=0 then
local g=Duel.GetMatchingGroup(Card.IsSSetable,tp,LOCATION_HAND,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:Select(tp,1,1,nil)
Duel.ShuffleHand(tp)
Duel.SSet(tp,sg,tp,false)
end
end
end
\ No newline at end of file
end
......@@ -7,6 +7,7 @@ function s.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_END_PHASE)
e1:SetCountLimit(1,id)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
......@@ -85,8 +86,11 @@ function s.aclimit(e,re,tp)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and rc:IsSummonType(SUMMON_TYPE_SPECIAL) and rc:IsLocation(LOCATION_MZONE) and rc:IsSummonLocation(LOCATION_DECK+LOCATION_EXTRA)
end
function s.thfilter(c,rc)
return c:GetEquipTarget()~=rc and c~=rc and c:IsAbleToHand()
end
function s.cfilter(c,tp)
return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,c)
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,chk) and Duel.CheckReleaseGroupEx(tp,s.cfilter,1,REASON_COST,true,nil,tp) end
......@@ -103,7 +107,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() then
if tc:IsRelateToChain() and tc:IsOnField() then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
\ No newline at end of file
end
......@@ -7,6 +7,7 @@ function s.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND)
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)
......@@ -112,8 +113,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetValue(s.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp,2)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
end
function s.aclimit(e,re,tp)
......@@ -121,10 +122,10 @@ function s.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and rc:IsSummonType(SUMMON_TYPE_SPECIAL) and rc:IsLocation(LOCATION_MZONE) and rc:IsSummonLocation(LOCATION_DECK+LOCATION_EXTRA)
end
function s.sumcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
return Duel.IsMainPhase()
end
function s.sumfilter(c)
return c:IsSetCard(0x2dc) and c:IsSummonable(true,nil,1)
return c:IsSetCard(0x2dc)
end
function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil) end
......@@ -137,4 +138,4 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp)
if tc then
Duel.Summon(tp,tc,true,nil,1)
end
end
\ No newline at end of file
end
......@@ -21,7 +21,7 @@ function s.initial_effect(c)
local custom_code=aux.RegisterMergedDelayedEvent_ToSingleCard(c,id,EVENT_SUMMON_SUCCESS)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(custom_code)
e3:SetRange(LOCATION_SZONE)
......@@ -62,7 +62,7 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.cfilter(c,tp,e)
return c:IsControler(tp) and c:IsSummonType(SUMMON_TYPE_ADVANCE)
return c:IsSummonPlayer(tp) and c:IsSummonType(SUMMON_TYPE_ADVANCE)
end
function s.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp)
......@@ -84,8 +84,7 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToChain,nil)
local sg=Duel.GetTargetsRelateToChain():Filter(Card.IsOnField,nil)
Duel.Destroy(sg,REASON_EFFECT)
end
function s.stcon(e,tp,eg,ep,ev,re,r,rp)
......@@ -102,4 +101,4 @@ function s.stop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToChain() and aux.NecroValleyFilter()(c) then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
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