Commit df2a449f authored by wind2009's avatar wind2009

Fix

parent 460e5002
No preview for this file type
...@@ -74,6 +74,9 @@ function s.sprop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -74,6 +74,9 @@ function s.sprop(e,tp,eg,ep,ev,re,r,rp,c)
if g:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) then if g:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) then
Duel.ConfirmCards(1-tp,g:Filter(Card.IsLocation,nil,LOCATION_HAND)) Duel.ConfirmCards(1-tp,g:Filter(Card.IsLocation,nil,LOCATION_HAND))
end end
if g:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) then
Duel.HintSelection(g:Filter(Card.IsLocation,nil,LOCATION_GRAVE))
end
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_SPSUMMON) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_SPSUMMON)
g:DeleteGroup() g:DeleteGroup()
end end
...@@ -96,9 +99,8 @@ function s.tfop(e,tp,eg,ep,ev,re,r,rp) ...@@ -96,9 +99,8 @@ function s.tfop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.pfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.pfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst()
if tc then Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) end if tc then Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) end
end end
function s.cfilter(c) function s.cfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_SPELL) return c:IsAllTypes(TYPE_RITUAL+TYPE_SPELL)
end end
function s.imcon(e) function s.imcon(e)
return Duel.IsExistingMatchingCard(s.cfilter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil) return Duel.IsExistingMatchingCard(s.cfilter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil)
...@@ -112,10 +114,11 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -112,10 +114,11 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,2,0,0)
end end
function s.rmop(e,tp,eg,ep,ev,re,r,rp) function s.rmop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,2,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,2,1,nil) local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,2,2,nil)
if #sg>0 then if #sg>0 then
Duel.HintSelection(sg) Duel.HintSelection(sg)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end end
end end
\ No newline at end of file
--混沌の魔王スカル・デーモン --混沌の魔王スカル・デーモン
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,101305044) aux.AddCodeList(c,101305044)
...@@ -81,9 +81,9 @@ end ...@@ -81,9 +81,9 @@ end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tc) local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,tc)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
\ No newline at end of file
...@@ -32,19 +32,21 @@ function s.cfilter(c) ...@@ -32,19 +32,21 @@ function s.cfilter(c)
return aux.IsCodeListed(c,101305044) return aux.IsCodeListed(c,101305044)
end end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_HAND,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_HAND,0,1,nil)
and not Duel.IsExistingMatchingCard(Card.IsPublic,tp,LOCATION_HAND,0,1,nil) and not Duel.IsExistingMatchingCard(Card.IsPublic,tp,LOCATION_HAND,0,1,nil)
and Duel.IsPlayerCanDraw(tp,3) end and Duel.IsPlayerCanDraw(tp,3) end
end end
function s.drop(e,tp,eg,ep,ev,re,r,rp) function s.drop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(Card.IsPublic,tp,LOCATION_HAND,0,1,nil) then return end if Duel.IsExistingMatchingCard(Card.IsPublic,tp,LOCATION_HAND,0,1,nil) then return end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_HAND,nil) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_HAND,0,nil)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
if g:IsExists(s.cfilter,1,nil) and Duel.Draw(tp,3,REASON_EFFECT)==3 then if g:IsExists(s.cfilter,1,nil) and Duel.Draw(tp,3,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local dg=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,2,2,nil,REASON_EFFECT+REASON_DISCARD)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
Duel.BreakEffect() Duel.BreakEffect()
Duel.DiscardHand(tp,nil,2,2,REASON_EFFECT+REASON_DISCARD) Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD)
end end
end end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -53,7 +55,8 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -53,7 +55,8 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(c,REASON_COST) Duel.Release(c,REASON_COST)
end end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return aux.IsCodeListed(c,101305044) and c:IsAllTypes(TYPE_MONSTER+TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,true) return aux.IsCodeListed(c,101305044) and c:IsAllTypes(TYPE_MONSTER+TYPE_RITUAL)
and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
...@@ -64,6 +67,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,6 +67,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,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,true,false,POS_FACEUP)
end end
end end
\ No newline at end of file
...@@ -5,11 +5,12 @@ function s.initial_effect(c) ...@@ -5,11 +5,12 @@ function s.initial_effect(c)
--effect --effect
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_SSET)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(TIMING_DAMAGE_STEP+TIMING_END_PHASE) e1:SetHintTiming(TIMING_DRAW_PHASE,TIMING_DRAW_PHASE+TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetCost(s.effcost) e1:SetCost(s.effcost)
e1:SetTarget(s.efftg) e1:SetTarget(s.efftg)
...@@ -30,9 +31,6 @@ end ...@@ -30,9 +31,6 @@ end
function s.tgfilter(c) function s.tgfilter(c)
return (c:IsRace(RACE_SPELLCASTER) or c:IsType(TYPE_SPELL)) and c:IsAbleToGrave() return (c:IsRace(RACE_SPELLCASTER) or c:IsType(TYPE_SPELL)) and c:IsAbleToGrave()
end end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x128,0x150) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.setfilter(c) function s.setfilter(c)
return aux.IsCodeListed(c,101305044) and (c:IsType(TYPE_QUICKPLAY) or c:IsType(TYPE_TRAP)) and c:IsSSetable() return aux.IsCodeListed(c,101305044) and (c:IsType(TYPE_QUICKPLAY) or c:IsType(TYPE_TRAP)) and c:IsSSetable()
end end
...@@ -48,9 +46,9 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -48,9 +46,9 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
e:SetLabel(op) e:SetLabel(op)
if op==1 then if op==1 then
e:SetCategory(0)
elseif op==2 then elseif op==2 then
e:SetCategory(CATEGORY_SSET)
end end
end end
function s.effop(e,tp,eg,ep,ev,re,r,rp) function s.effop(e,tp,eg,ep,ev,re,r,rp)
...@@ -77,10 +75,9 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,10 +75,9 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp)
e1:SetDescription(aux.Stringid(id,3)) e1:SetDescription(aux.Stringid(id,3))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
if dc:IsType(TYPE_QUICKPLAY) then if tc:IsType(TYPE_QUICKPLAY) then
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
end elseif tc:IsType(TYPE_TRAP) then
if dc:IsType(TYPE_TRAP) then
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
end end
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
...@@ -106,4 +103,4 @@ function s.rlevel(e,c) ...@@ -106,4 +103,4 @@ function s.rlevel(e,c)
local clv=c:GetLevel() local clv=c:GetLevel()
return (lv<<16)+clv return (lv<<16)+clv
else return lv end else return lv end
end end
\ No newline at end of file
...@@ -27,7 +27,7 @@ function s.initial_effect(c) ...@@ -27,7 +27,7 @@ function s.initial_effect(c)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_REMOVE) e3:SetCode(EFFECT_CANNOT_REMOVE)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,1) e3:SetTargetRange(1,1)
e3:SetTarget(s.rmlimit) e3:SetTarget(s.rmlimit)
......
...@@ -35,16 +35,16 @@ function s.initial_effect(c) ...@@ -35,16 +35,16 @@ function s.initial_effect(c)
e4:SetCategory(CATEGORY_ATKCHANGE) e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BATTLE_DESTROYING) e4:SetCode(EVENT_BATTLE_DESTROYING)
e4:SetCondition(aux.bdogcon) e4:SetCondition(aux.bdocon)
e4:SetOperation(s.atkop) e4:SetOperation(s.atkop)
e4:SetCountLimit(1,id+o) e4:SetCountLimit(1,id+o)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end end
function s.rmop(e,tp,eg,ep,ev,re,r,rp) function s.rmop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,101305044,101305027,101305028) aux.AddCodeList(c,101305044,101305027,101305028)
aux.AddRitualProcEqual2(c,s.rfilter,nil,aux.TURE,nil,true) aux.AddRitualProcGreater2(c,s.rfilter,LOCATION_HAND+LOCATION_GRAVE,s.grfilter,nil,true)
--salvage --salvage
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
...@@ -17,25 +17,28 @@ end ...@@ -17,25 +17,28 @@ end
function s.rfilter(c) function s.rfilter(c)
return c:IsCode(101305027,101305028) return c:IsCode(101305027,101305028)
end end
function s.grfilter(c)
return c:IsAbleToRemove() and c:IsType(TYPE_MONSTER)
end
function s.thfilter(c) function s.thfilter(c)
return aux.IsCodeListed(c,101305044) and c:IsAbleToHand() return aux.IsCodeListed(c,101305044) and c:IsAbleToHand()
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 e:GetHandler():IsAbleToHand() local c=e:GetHandler()
and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return c:IsAbleToHand()
and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,c) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_GRAVE)
end end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToChain() and aux.NecroValleyFilter()(c) then if c:IsRelateToChain() and aux.NecroValleyFilter()(c) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,1,c)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g)
g:AddCard(c) g:AddCard(c)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
end end
\ No newline at end of file
...@@ -28,6 +28,7 @@ function s.cfilter(c,tp) ...@@ -28,6 +28,7 @@ function s.cfilter(c,tp)
return c:IsAbleToHand() and c:IsControler(tp) return c:IsAbleToHand() and c:IsControler(tp)
end end
function s.condition(e,tp,eg,ep,ev,re,r,rp) function s.condition(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandlerPlayer()~=1-tp then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(s.cfilter,1,nil,tp) and not g:IsContains(e:GetHandler()) return g and g:IsExists(s.cfilter,1,nil,tp) and not g:IsContains(e:GetHandler())
...@@ -41,23 +42,25 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -41,23 +42,25 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function s.spfilter(c,e,tp,ec) function s.spfilter(c,e,tp,ec)
return aux.IsCodeListed(c,101305044) return aux.IsCodeListed(c,101305044) and c:IsType(TYPE_MONSTER)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
and not c:IsCode(ec:GetCode()) and not c:IsCode(ec:GetCode())
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToChain,nil):Filter(s.cfilter,nil,tp) local c=aux.ExceptThisCard(e)
local g=Duel.GetTargetsRelateToChain():Filter(s.cfilter,c,tp)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
local tc=sg:GetFirst() local tc=sg:GetFirst()
if tc then if tc then
Duel.HintSelection(sg)
if tc:IsFacedown() then if tc:IsFacedown() then
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
end end
if Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then if Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,aux.ExceptThisCard(e)) local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
if dg:GetCount()>0 then if dg:GetCount()>0 then
Duel.HintSelection(dg) Duel.HintSelection(dg)
if Duel.Destroy(dg,REASON_EFFECT)~=0 then if Duel.Destroy(dg,REASON_EFFECT)~=0 then
...@@ -80,7 +83,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,7 +83,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp)
end end
function s.spfilter2(c,e,tp) function s.spfilter2(c,e,tp)
return aux.IsCodeListed(c,101305044) and c:IsAllTypes(TYPE_MONSTER+TYPE_RITUAL) return aux.IsCodeListed(c,101305044) and c:IsAllTypes(TYPE_MONSTER+TYPE_RITUAL)
and c:IsCanBeSpecialSummoned(e,0,tp,false,true) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp)
...@@ -92,6 +95,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -92,6 +95,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter2,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.spfilter2,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
if #g>0 then if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,true,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end end
end end
\ No newline at end of file
...@@ -15,8 +15,9 @@ function s.initial_effect(c) ...@@ -15,8 +15,9 @@ function s.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function s.condition(e,tp,eg,ep,ev,re,r,rp) function s.condition(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandlerPlayer()~=1-tp then return false end
local rc=re:GetHandler() local rc=re:GetHandler()
return (rc:GetType()==TYPE_TRAP or rc:GetType()==TYPE_SPELL and re:IsHasType(EFFECT_TYPE_ACTIVATE)) or re:IsActiveType(TYPE_MONSTER) return ((rc:GetType()==TYPE_TRAP or rc:GetType()==TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE)) or re:IsActiveType(TYPE_MONSTER)
end end
function s.filter(c) function s.filter(c)
return aux.IsCodeListed(c,101305044) and c:GetSequence()<5 and c:IsCanTurnSet() return aux.IsCodeListed(c,101305044) and c:GetSequence()<5 and c:IsCanTurnSet()
...@@ -39,18 +40,19 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,18 +40,19 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<3 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<3 then return end
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp) local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if g:GetClassCount(Card.GetCode)<3 then return end if not g:CheckSubGroup(aux.dncheck,3,3) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g2=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil) local g2=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g2:GetFirst() local tc=g2:GetFirst()
if not tc or tc:IsImmuneToEffect(e) then return end if not tc or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,3,3) local sg=g:SelectSubGroup(tp,aux.dncheck,false,3,3)
if not sg or sg:GetCount()~=3 then return end
if tc:IsFaceup() then if tc:IsFaceup() then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
tc:ClearEffectRelation() tc:ClearEffectRelation()
end end
local tg=sg:GetFirst() Duel.HintSelection(g2)
for sc in aux.Next(sg) do for sc in aux.Next(sg) do
Duel.SpecialSummonStep(sc,0,tp,tp,true,false,POS_FACEDOWN_DEFENSE) Duel.SpecialSummonStep(sc,0,tp,tp,true,false,POS_FACEDOWN_DEFENSE)
local e1=Effect.CreateEffect(sc) local e1=Effect.CreateEffect(sc)
...@@ -58,7 +60,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,7 +60,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(TYPE_NORMAL+TYPE_MONSTER) e1:SetValue(TYPE_NORMAL+TYPE_MONSTER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
sc:RegisterEffect(e1,true) sc:RegisterEffect(e1,true)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_CHANGE_LEVEL) e2:SetCode(EFFECT_CHANGE_LEVEL)
...@@ -77,16 +79,20 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,16 +79,20 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
e5:SetValue(0) e5:SetValue(0)
sc:RegisterEffect(e5,true) sc:RegisterEffect(e5,true)
local e6=e1:Clone() local e6=e1:Clone()
e6:SetCode(EFFECT_SET_BASE_ATTACK) e6:SetCode(EFFECT_SET_BASE_DEFENSE)
e6:SetValue(0) e6:SetValue(0)
sc:RegisterEffect(e6,true) sc:RegisterEffect(e6,true)
local e7=e1:Clone()
e7:SetCode(EFFECT_CHANGE_CODE)
e7:SetValue(id)
sc:RegisterEffect(e7,true)
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
sg:AddCard(tc) sg:AddCard(tc)
Duel.ShuffleSetCard(sg) Duel.ShuffleSetCard(sg)
local g=Group.CreateGroup() local tg=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g) Duel.ChangeTargetCard(ev,tg)
Duel.ChangeChainOperation(ev,s.repop) Duel.ChangeChainOperation(ev,s.repop)
end end
function s.repop(e,tp,eg,ep,ev,re,r,rp) function s.repop(e,tp,eg,ep,ev,re,r,rp)
...@@ -96,4 +102,4 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) ...@@ -96,4 +102,4 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -13,6 +13,7 @@ function s.initial_effect(c) ...@@ -13,6 +13,7 @@ function s.initial_effect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(TIMING_DRAW_PHASE,TIMING_DRAW_PHASE+TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,id) e2:SetCountLimit(1,id)
e2:SetTarget(s.thtg) e2:SetTarget(s.thtg)
...@@ -25,7 +26,6 @@ function s.initial_effect(c) ...@@ -25,7 +26,6 @@ function s.initial_effect(c)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING) e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,id)
e3:SetCondition(s.spcon) e3:SetCondition(s.spcon)
e3:SetCost(s.spcost) e3:SetCost(s.spcost)
e3:SetTarget(s.sptg) e3:SetTarget(s.sptg)
...@@ -65,14 +65,16 @@ function s.cfilter(c,e,tp) ...@@ -65,14 +65,16 @@ function s.cfilter(c,e,tp)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,c:GetCode()) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,c:GetCode())
end end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil,e,t) end if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,nil,e,t) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SendtoHand(g,nil,REASON_COST) Duel.HintSelection(g)
e:SetLabel(g:GetFirst():GetCode()) e:SetLabel(g:GetFirst():GetCode())
Duel.SendtoHand(g,nil,REASON_COST)
end end
function s.spfilter(c,e,tp,code) function s.spfilter(c,e,tp,code)
return aux.IsCodeListed(c,101305044) and c:IsType(TYPE_MONSTER) return aux.IsCodeListed(c,101305044) and c:IsType(TYPE_MONSTER)
and (not code or c:GetCode()~=code)
and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -88,4 +90,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -88,4 +90,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
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 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