Commit 40d05b58 authored by Nemo Ma's avatar Nemo Ma

upd 240714

parent 9d137108
No preview for this file type
expansions/pics/11451429.jpg

13.6 KB | W: | H:

expansions/pics/11451429.jpg

54.2 KB | W: | H:

expansions/pics/11451429.jpg
expansions/pics/11451429.jpg
expansions/pics/11451429.jpg
expansions/pics/11451429.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/12844102.jpg

93.8 KB | W: | H:

expansions/pics/12844102.jpg

37.9 KB | W: | H:

expansions/pics/12844102.jpg
expansions/pics/12844102.jpg
expansions/pics/12844102.jpg
expansions/pics/12844102.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/25000010.jpg

19 KB | W: | H:

expansions/pics/25000010.jpg

19.1 KB | W: | H:

expansions/pics/25000010.jpg
expansions/pics/25000010.jpg
expansions/pics/25000010.jpg
expansions/pics/25000010.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/25000018.jpg

20.5 KB | W: | H:

expansions/pics/25000018.jpg

20.5 KB | W: | H:

expansions/pics/25000018.jpg
expansions/pics/25000018.jpg
expansions/pics/25000018.jpg
expansions/pics/25000018.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/25000020.jpg

18.7 KB | W: | H:

expansions/pics/25000020.jpg

18.7 KB | W: | H:

expansions/pics/25000020.jpg
expansions/pics/25000020.jpg
expansions/pics/25000020.jpg
expansions/pics/25000020.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009730.jpg

49.4 KB | W: | H:

expansions/pics/40009730.jpg

17.9 KB | W: | H:

expansions/pics/40009730.jpg
expansions/pics/40009730.jpg
expansions/pics/40009730.jpg
expansions/pics/40009730.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009732.jpg

194 KB | W: | H:

expansions/pics/40009732.jpg

15.1 KB | W: | H:

expansions/pics/40009732.jpg
expansions/pics/40009732.jpg
expansions/pics/40009732.jpg
expansions/pics/40009732.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009734.jpg

213 KB | W: | H:

expansions/pics/40009734.jpg

16.9 KB | W: | H:

expansions/pics/40009734.jpg
expansions/pics/40009734.jpg
expansions/pics/40009734.jpg
expansions/pics/40009734.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009736.jpg

214 KB | W: | H:

expansions/pics/40009736.jpg

17.1 KB | W: | H:

expansions/pics/40009736.jpg
expansions/pics/40009736.jpg
expansions/pics/40009736.jpg
expansions/pics/40009736.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009738.jpg

212 KB | W: | H:

expansions/pics/40009738.jpg

17 KB | W: | H:

expansions/pics/40009738.jpg
expansions/pics/40009738.jpg
expansions/pics/40009738.jpg
expansions/pics/40009738.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009740.jpg

190 KB | W: | H:

expansions/pics/40009740.jpg

15.6 KB | W: | H:

expansions/pics/40009740.jpg
expansions/pics/40009740.jpg
expansions/pics/40009740.jpg
expansions/pics/40009740.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009742.jpg

54.4 KB | W: | H:

expansions/pics/40009742.jpg

19 KB | W: | H:

expansions/pics/40009742.jpg
expansions/pics/40009742.jpg
expansions/pics/40009742.jpg
expansions/pics/40009742.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009744.jpg

204 KB | W: | H:

expansions/pics/40009744.jpg

17.2 KB | W: | H:

expansions/pics/40009744.jpg
expansions/pics/40009744.jpg
expansions/pics/40009744.jpg
expansions/pics/40009744.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009746.jpg

52.2 KB | W: | H:

expansions/pics/40009746.jpg

18.1 KB | W: | H:

expansions/pics/40009746.jpg
expansions/pics/40009746.jpg
expansions/pics/40009746.jpg
expansions/pics/40009746.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009748.jpg

182 KB | W: | H:

expansions/pics/40009748.jpg

15 KB | W: | H:

expansions/pics/40009748.jpg
expansions/pics/40009748.jpg
expansions/pics/40009748.jpg
expansions/pics/40009748.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009750.jpg

201 KB | W: | H:

expansions/pics/40009750.jpg

16 KB | W: | H:

expansions/pics/40009750.jpg
expansions/pics/40009750.jpg
expansions/pics/40009750.jpg
expansions/pics/40009750.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009752.jpg

186 KB | W: | H:

expansions/pics/40009752.jpg

14.9 KB | W: | H:

expansions/pics/40009752.jpg
expansions/pics/40009752.jpg
expansions/pics/40009752.jpg
expansions/pics/40009752.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009754.jpg

212 KB | W: | H:

expansions/pics/40009754.jpg

17.1 KB | W: | H:

expansions/pics/40009754.jpg
expansions/pics/40009754.jpg
expansions/pics/40009754.jpg
expansions/pics/40009754.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/64800242.jpg

78.1 KB | W: | H:

expansions/pics/64800242.jpg

48.3 KB | W: | H:

expansions/pics/64800242.jpg
expansions/pics/64800242.jpg
expansions/pics/64800242.jpg
expansions/pics/64800242.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -314,7 +314,7 @@ function cm.spcop(e,tp,eg,ep,ev,re,r,rp,c)
if not sc then return end
if c:IsFacedown() then Duel.ConfirmCards(1-tp,Group.FromCards(c)) end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(m,2))
Duel.ConfirmCards(1-tp,Group.FromCards(sc))
if not sc:IsOnField() then Duel.ConfirmCards(1-tp,Group.FromCards(sc)) end
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SUMMON_COST)
......
This diff is collapsed.
......@@ -51,7 +51,7 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local sa=c:IsLocation(LOCATION_HAND) and Duel.GetFlagEffect(tp,m+1)==0
local sb=c:IsLocation(LOCATION_REMOVED) and Duel.GetFlagEffect(tp,m+10)==0
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and (sa or sb) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and (sa or sb) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
if c:IsLocation(LOCATION_HAND) then
......@@ -71,7 +71,7 @@ function cm.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)
local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND,0,nil)
if #rg>1 then --rg:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) and rg:IsExists(Card.IsLocation,1,nil,LOCATION_ONFIELD) then
--Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
......
......@@ -52,7 +52,7 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local sa=c:IsLocation(LOCATION_HAND) and Duel.GetFlagEffect(tp,m+1)==0
local sb=c:IsLocation(LOCATION_REMOVED) and Duel.GetFlagEffect(tp,m+10)==0
local rg=Duel.GetMatchingGroup(cm.costfilter,tp,LOCATION_HAND,0,c)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and (sa or sb) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and (sa or sb) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
if c:IsLocation(LOCATION_HAND) then
......@@ -76,10 +76,10 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
if #rg>1 then --rg:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) and rg:IsExists(Card.IsLocation,1,nil,LOCATION_ONFIELD) then
if rg:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) and rg:IsExists(Card.IsLocation,1,nil,LOCATION_ONFIELD) then
--Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=rg:Select(tp,2,2,nil) --SubGroup(tp,cm.fselect,false,2,2)
local tg=rg:SelectSubGroup(tp,cm.fselect,false,2,2)
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
end
......
......@@ -72,8 +72,13 @@ end
function c11533701.srfil(c)
return c:IsAbleToHand() and c:IsSetCard(0xb4)
end
function c11533701.rrfil(c)
return c:IsReleasable() and c:IsType(TYPE_MONSTER)
function c11533701.rrfil(c,tp)
local re=Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)
local val=nil
if re then
val=re:GetValue()
end
return c:IsReleasable() or (c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsLocation(LOCATION_HAND) and (val==nil or val(re,c)~=true))
end
function c11533701.rrttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11533701.srfil,tp,LOCATION_DECK,0,1,nil) end
......@@ -86,16 +91,16 @@ function c11533701.rrtop(e,tp,eg,ep,ev,re,r,rp)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
if Duel.IsExistingMatchingCard(c11533701.rrfil,tp,LOCATION_HAND,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(11533701,0)) then
if Duel.IsExistingMatchingCard(c11533701.rrfil,tp,LOCATION_HAND,0,1,nil,tp) and Duel.SelectYesNo(tp,aux.Stringid(11533701,0)) then
Duel.BreakEffect()
local tc=Duel.SelectMatchingCard(tp,c11533701.rrfil,tp,LOCATION_HAND,0,1,1,nil):GetFirst()
Duel.Release(tc,REASON_EFFECT)
local tc=Duel.SelectMatchingCard(tp,c11533701.rrfil,tp,LOCATION_HAND,0,1,1,nil,tp):GetFirst()
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RELEASE)
end
end
end
end
function c11533701.rmcon(e,tp,eg,ep,ev,re,r,rp)
local mg=e:GetHandler():GetMaterial()
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) and mg and mg:FilterCount(Card.IsSetCard,nil,0xb4)==mg:GetCount()
--local mg=e:GetHandler():GetMaterial()
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) --and mg and mg:FilterCount(Card.IsSetCard,nil,0xb4)==mg:GetCount()
end
function c11533701.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_DECK,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_EXTRA,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_GRAVE,0,1,nil) end
......
......@@ -2,6 +2,12 @@
function c11533703.initial_effect(c)
--spirit return
aux.EnableSpiritReturn(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP)
--ritual level
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_RITUAL_LEVEL)
e0:SetValue(c11533703.rlevel)
c:RegisterEffect(e0)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
......@@ -32,6 +38,11 @@ function c11533703.initial_effect(c)
e3:SetOperation(c11533703.setop)
c:RegisterEffect(e3)
end
function c11533703.rlevel(e,c)
local lv=aux.GetCappedLevel(e:GetHandler())
local clv=c:GetLevel()
return (lv<<16)+clv
end
function c11533703.thfilter(c)
return c:IsSetCard(0xb4) and c:IsAbleToHand()
end
......@@ -46,15 +57,15 @@ function c11533703.thop(e,tp,eg,ep,ev,re,r,rp)
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
if tc:IsType(TYPE_MONSTER) then
--if tc:IsType(TYPE_MONSTER) then
--ritual level
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_RITUAL_LEVEL)
e2:SetValue(c11533703.rlevel)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
end
--local e2=Effect.CreateEffect(c)
--e2:SetType(EFFECT_TYPE_SINGLE)
--e2:SetCode(EFFECT_RITUAL_LEVEL)
--e2:SetValue(c11533703.rlevel)
--e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
--c:RegisterEffect(e2)
--end
end
end
function c11533703.rlevel(e,c)
......
......@@ -14,30 +14,70 @@ function cm.initial_effect(c)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11561061,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,11560061)
e3:SetTarget(c11561061.sptg)
e3:SetOperation(c11561061.spop)
c:RegisterEffect(e3)
end
function c11561061.thop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCountLimit(1)
e1:SetCondition(c11561061.thcon2)
e1:SetOperation(c11561061.thop2)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_BATTLE_START)
Duel.RegisterEffect(e1,tp)
end
function c11561061.filter1(c,e,tp)
return c:IsSetCard(0xd70a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
function c11561061.thfilter1(c)
return c:IsSetCard(0x133) and c:IsLevelAbove(7) and c:IsAbleToHand()
end
function c11561061.thcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c11561061.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp)
function c11561061.tgcfilter(c)
return c:IsSetCard(0x133) and c:IsLevelBelow(4) and c:IsFaceup()
end
function c11561061.thop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c11561061.filter1),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local tgc=Duel.GetMatchingGroupCount(c11561061.tgcfilter,tp,LOCATION_MZONE,0,nil)
if Duel.GetMatchingGroupCount(c11561061.thfilter1,tp,LOCATION_DECK,0,nil)>=tgc then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c11561061.thfilter1,tp,LOCATION_DECK,0,tgc,tgc,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local ug=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_HAND,0,tgc-1,tgc-1,nil)
if #ug>0 then
Duel.BreakEffect()
Duel.SendtoGrave(ug,REASON_EFFECT)
end
end
end
end
function c11561061.spfilter(c,e,tp)
return c:IsSetCard(0x133) and c:IsLevelAbove(7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c11561061.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand()
and Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingMatchingCard(c11561061.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c11561061.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0
and c:IsLocation(LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c11561061.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--半龙女仆·余晖龙女
local m=11561062
local cm=_G["c"..m]
function cm.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,11561062)
e1:SetCost(c11561062.sprhcost)
e1:SetOperation(c11561062.sprhop)
c:RegisterEffect(e1)
--indestructable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c11561062.indcon)
e2:SetValue(1)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,11560062)
e3:SetTarget(c11561062.sptg)
e3:SetOperation(c11561062.spop)
c:RegisterEffect(e3)
end
function c11561062.sprhcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c11561062.sprhop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCountLimit(1)
e1:SetOperation(c11561062.sprhop2)
e1:SetReset(RESET_PHASE+PHASE_BATTLE_START)
Duel.RegisterEffect(e1,tp)
end
function c11561062.sppfilter(c,e,tp)
return c:IsSetCard(0x133) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c11561062.sprhop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 and not Duel.IsExistingMatchingCard(c11561062.sppfilter,tp,LOCATION_DECK,0,1,nil,e,tp) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c11561062.sppfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BATTLED)
e1:SetCondition(c11561062.conrh)
e1:SetOperation(c11561062.oprh)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c11561062.conrh(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if (a:IsSetCard(0x133) and a:IsLevelAbove(7) and a:IsControler(tp)) or (d and d:IsSetCard(0x133) and d:IsLevelAbove(7) and a:IsControler(tp)) then
return true
else return false end
end
function c11561062.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c11561062.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x133) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c11561062.oprh(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c11561062.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c11561062.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c11561062.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
if Duel.GetFlagEffect(tp,11561062)<1 and Duel.SelectYesNo(tp,aux.Stringid(11561062,1)) then
Duel.RegisterFlagEffect(tp,11561062,RESET_PHASE+PHASE_END,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
end
function c11561062.indfilter(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION)
end
function c11561062.indcon(e)
return Duel.IsExistingMatchingCard(c11561062.indfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c11561062.spfilter(c,e,tp)
return c:IsSetCard(0x133) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c11561062.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand()
and Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingMatchingCard(c11561062.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c11561062.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0
and c:IsLocation(LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c11561062.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--XNo.39 银河眼光波龙皇
local m=11561063
local cm=_G["c"..m]
function cm.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT),8,3,c11561063.ovfilter,aux.Stringid(11561063,1),3,c11561063.xyzop)
--adjust
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ADJUST)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c11561063.adjustop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c11561063.sptg)
e2:SetOperation(c11561063.spop)
c:RegisterEffect(e2)
if not c11561063.global_check then
c11561063.global_check=true
c11561063.codetable={}
_IsCode=Card.IsCode
Card.IsSetCard=function (c,...)
if _IsCode(c,...) then return true end
if #c11561063.codetable>0 and c:IsCode(11561063) then
for i,v in ipairs(c11561063.codetable) do
if _IsCode(v,...) then return true end
end
end
return false
end
_IsCode=Card.IsLinkCode
Card.IsSetCard=function (c,...)
if _IsCode(c,...) then return true end
if #c11561063.codetable>0 and c:IsCode(11561063) then
for i,v in ipairs(c11561063.codetable) do
if _IsCode(v,...) then return true end
end
end
return false
end
_IsCode=Card.IsFusionCode
Card.IsSetCard=function (c,...)
if _IsCode(c,...) then return true end
if #c11561063.codetable>0 and c:IsCode(11561063) then
for i,v in ipairs(c11561063.codetable) do
if _IsCode(v,...) then return true end
end
end
return false
end
_IsSetCard=Card.IsSetCard
Card.IsSetCard=function (c,...)
if _IsSetCard(c,...) then return true end
if #c11561063.codetable>0 and c:IsCode(11561063) then
for i,v in ipairs(c11561063.codetable) do
if _IsSetCard(v,...) then return true end
end
end
return false
end
_IsLinkSetCard=Card.IsLinkSetCard
Card.IsLinkSetCard=function (c,...)
if _IsLinkSetCard(c,...) then return true end
if #c11561063.codetable>0 and c:IsCode(11561063) then
for i,v in ipairs(c11561063.codetable) do
if _IsLinkSetCard(v,...) then return true end
end
end
return false
end
_IsFusionSetCard=Card.IsFusionSetCard
Card.IsFusionSetCard=function (c,...)
if _IsFusionSetCard(c,...) then return true end
if #c11561063.codetable>0 and c:IsCode(11561063) then
for i,v in ipairs(c11561063.codetable) do
if _IsFusionSetCard(v,...) then return true end
end
end
return false
end
_IsPreviousSetCard=Card.IsPreviousSetCard
Card.IsPreviousSetCard=function (c,...)
if _IsPreviousSetCard(c,...) then return true end
if #c11561063.codetable>0 and c:IsCode(11561063) then
for i,v in ipairs(c11561063.codetable) do
if _IsPreviousSetCard(v,...) then return true end
end
end
return false
end
end
end
aux.xyz_number[11561063]=39
local KOISHI_CHECK=false
if Card.SetCardData then KOISHI_CHECK=true end
function c11561063.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_MONSTER)
end
function c11561063.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetOverlayGroup():IsExists(c11561063.spfilter,1,nil,e,tp) and Duel.GetMZoneCount(1-tp)~=0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_OVERLAY)
end
function c11561063.gcheck(g)
return g:GetClassCount(Card.GetOverlayTarget)==#g
end
function c11561063.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
local g=Duel.GetOverlayGroup(tp,1,0):Filter(c11561063.spfilter,nil,e,tp)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,c11561063.gcheck,false,1,ft)
if sg:GetCount()>0 and Duel.SpecialSummon(sg,0,tp,1-tp,false,false,POS_FACEUP)~=0 then
end
end
--
function c11561063.ovfilter(c)
return c:IsFaceup() and c:IsCode(18963306)
end
function c11561063.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,11561063)==0 end
Duel.RegisterFlagEffect(tp,11561063,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c11561063.adjustop(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase()
local c=e:GetHandler()
if c:IsFacedown() then return end
if (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL then return end
c11561063.codetable={}
local ex=Effect.CreateEffect(c)
ex:SetType(EFFECT_TYPE_SINGLE)
local g=c:GetOverlayGroup()
local tc=g:GetFirst()
while tc do
table.insert(c11561063.codetable,tc)
tc=g:GetNext()
end
end
......@@ -26,6 +26,14 @@ function cm.filter2(c)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(cm.filter1))
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(1)
Duel.RegisterEffect(e1,tp)
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
......
......@@ -8,24 +8,26 @@ function cm.initial_effect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.con1)
e1:SetOperation(cm.activate1)
c:RegisterEffect(e1)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(cm.con2)
e1:SetOperation(cm.activate2)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.con2)
e2:SetOperation(cm.activate2)
c:RegisterEffect(e2)
end
function cm.ninjafilter(c)
return c:IsFaceup() and c:IsCode(11638001) and c:IsAttackPos()
end
function cm.con1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetHandler():GetControler()~=c:GetControler() and Duel.IsExistingMatchingCard(cm.ninjafilter,tp,LOCATION_MZONE,0,1,nil)
return re and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetHandler():GetControler()~=c:GetControler() and Duel.IsExistingMatchingCard(cm.ninjafilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.activate1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -12,24 +12,53 @@ function cm.initial_effect(c)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--ninja all
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_ADD_SETCODE)
e4:SetRange(LOCATION_FZONE)
e4:SetTargetRange(0,LOCATION_MZONE+LOCATION_GRAVE)
e4:SetTarget(aux.TargetBoolFunction(Card.IsFaceup))
e4:SetValue(0x2b)
c:RegisterEffect(e4)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_ADD_SETCODE)
e3:SetRange(LOCATION_FZONE)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetTargetRange(0,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_EXTRA)
e3:SetTarget(cm.njfilter)
e3:SetValue(0x2b)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
--e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetRange(LOCATION_FZONE)
e4:SetCode(EVENT_ATTACK_ANNOUNCE)
e4:SetCode(EVENT_CUSTOM+11638011)
e4:SetCondition(cm.atkcon)
e4:SetTarget(cm.atktg)
--e4:SetTarget(cm.atktg)
e4:SetOperation(cm.atkop)
c:RegisterEffect(e4)
if not cm.global_check then
cm.global_check=true
cm[0]=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
ge1:SetCondition(cm.regcon)
ge1:SetOperation(cm.regop)
Duel.RegisterEffect(ge1,0)
_NinJaCalculateDamage=Duel.CalculateDamage
function Duel.CalculateDamage(c1,c2,bool)
if not bool then bool=false end
_NinJaCalculateDamage(c1,c2,bool)
Duel.RaiseEvent(Group.FromCards(c1,c2),EVENT_CUSTOM+11638011,nil,0,0,0,0)
end
end
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
local a,b=Duel.GetBattleMonster(tp)
return ((a and a:IsCode(11638001)) or (b and b:IsCode(11638001)))
--return cm[0]==1
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local a,b=Duel.GetBattleMonster(tp)
Duel.RaiseEvent(Group.FromCards(a,b),EVENT_CUSTOM+11638011,e,0,0,0,0)
end
function cm.njfilter(e,c)
return c:IsFaceup() or c:IsLocation(LOCATION_EXTRA)
end
function cm.thfilter(c)
return aux.IsCodeListed(c,11638001) and c:IsAbleToHand()
......@@ -61,7 +90,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsCode(11638001)
return eg:IsExists(Card.IsCode,1,nil,11638001)
end
function cm.th2filter(c)
return aux.IsCodeListed(c,11638001) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
......@@ -72,14 +101,24 @@ function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local a=Duel.GetAttacker()
if not a:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(300)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
a:RegisterEffect(e1)
Duel.Hint(HINT_CARD,1-tp,11638011)
local a,b=Duel.GetBattleMonster(tp)
if a and a:IsCode(11638001) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(300)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
a:RegisterEffect(e1)
end
if b and b:IsCode(11638001) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(300)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
b:RegisterEffect(e1)
end
if Duel.GetFlagEffect(tp,11638011)<2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.th2filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
......
......@@ -71,18 +71,32 @@ function cm.ninja0filter(c)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local val=Duel.GetMatchingGroupCount(cm.ninja0filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)*300
local val=Duel.GetMatchingGroupCount(cm.ninja0filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)*400
local x=Duel.Recover(p,val,REASON_EFFECT)
if x<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local a=Duel.SelectMatchingCard(tp,cm.ninjafilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
if not a then return end
local atk1=a:GetAttack()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(x)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
a:RegisterEffect(e1)
local atk2=a:GetAttack()
if atk2>atk1 then
local val2=math.floor((atk2-atk1)/1000)
local count=Duel.GetDrawCount(tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN)
e1:SetValue(count+val2)
Duel.RegisterEffect(e1,tp)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local de,dp=Duel.GetChainInfo(ev,CHAININFO_DISABLE_REASON,CHAININFO_DISABLE_PLAYER)
......
--业狱火 障目侍
local s,id,o=GetID()
function s.initial_effect(c)
c:SetSPSummonOnce(id)
aux.AddCodeList(c,12844101)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_FIRE),4,3,s.ovfilter,aux.Stringid(id,0),3,s.xyzop)
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_FIRE),4,3,s.ovfilter,aux.Stringid(id,0),3)
c:EnableReviveLimit()
--hand link
local e1=Effect.CreateEffect(c)
......@@ -21,7 +23,7 @@ function s.initial_effect(c)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,id+100)
e5:SetCondition(s.thcon)
--e5:SetCondition(s.thcon)
e5:SetCost(s.thcost)
e5:SetTarget(s.thtg)
e5:SetOperation(s.thop)
......@@ -45,7 +47,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.ovfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsType(TYPE_LINK)
return c:IsFaceup() and c:IsSetCard(0xa77) and c:IsType(TYPE_LINK)
end
function s.xyzop(e,tp,chk)
if chk==0 then
......
--业狱火 龙樱
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,12844101)
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(s.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(s.sprcon)
e2:SetTarget(s.sprtg)
e2:SetOperation(s.sprop)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(1109)
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,id)
e3:SetTarget(s.thtg)
e3:SetOperation(s.thop)
c:RegisterEffect(e3)
--SearchCard
local e4=Effect.CreateEffect(c)
e4:SetDescription(2)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,id)
e4:SetCost(aux.bfgcost)
e4:SetTarget(s.sptg)
e4:SetOperation(s.spop)
c:RegisterEffect(e4)
end
function s.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function s.sprfilter(c)
return c:IsFaceup() and c:IsSetCard(0xa77) and c:IsAbleToDeckOrExtraAsCost()
end
function s.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(s.sprfilter,tp,LOCATION_REMOVED,0,nil)
return #g>3 and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function s.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(s.sprfilter,tp,LOCATION_REMOVED,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:Select(tp,4,4,nil)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function s.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_SPSUMMON)
g:DeleteGroup()
end
function s.thfilter(c)
return aux.IsCodeListed(c,12844101) and c:IsType(TYPE_TRAP+TYPE_SPELL) 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
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.spfilter(c,e,tp)
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsLocation(LOCATION_DECK)
local b2=Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsLocation(LOCATION_EXTRA)
return c:IsSetCard(0xa77) and (b1 or b2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and 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)
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+LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit2)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit2(e,c)
return not c:IsSetCard(0xa77)
end
--来自地狱的业火
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,12844101)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetCountLimit(1,id)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--SearchCard
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
end
function s.rmfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and c:IsSetCard(0xa77)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.NegateAnyFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsCanBeDisabledByEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
function s.thfilter(c)
return c:IsCode(12844101) 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
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--业狱火 龙樱
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,12844101)
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(s.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(s.sprcon)
e2:SetTarget(s.sprtg)
e2:SetOperation(s.sprop)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(1109)
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,id)
e3:SetTarget(s.thtg)
e3:SetOperation(s.thop)
c:RegisterEffect(e3)
--SearchCard
local e4=Effect.CreateEffect(c)
e4:SetDescription(2)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,id)
e4:SetCost(aux.bfgcost)
e4:SetTarget(s.sptg)
e4:SetOperation(s.spop)
c:RegisterEffect(e4)
end
function s.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function s.sprfilter(c)
return c:IsFaceup() and c:IsSetCard(0xa77) and c:IsAbleToDeckOrExtraAsCost()
end
function s.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(s.sprfilter,tp,LOCATION_REMOVED,0,nil)
return #g>3 and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function s.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(s.sprfilter,tp,LOCATION_REMOVED,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:Select(tp,4,4,nil)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function s.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_SPSUMMON)
g:DeleteGroup()
end
function s.thfilter(c)
return aux.IsCodeListed(c,12844101) and c:IsType(TYPE_TRAP+TYPE_SPELL) 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
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.spfilter(c,e,tp)
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsLocation(LOCATION_DECK)
local b2=Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsLocation(LOCATION_EXTRA)
return c:IsSetCard(0xa77) and (b1 or b2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and 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)
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+LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit2)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit2(e,c)
return not c:IsSetCard(0xa77)
end
--业火神社
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,12844101)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
--e2:SetCondition(s.econdition)
e2:SetTarget(s.etarget)
e2:SetValue(s.efilter)
c:RegisterEffect(e2)
--material
local e3=Effect.CreateEffect(c)
e3:SetDescription(1117)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,id+100)
e3:SetCondition(s.matcon)
e3:SetTarget(s.mattg)
e3:SetOperation(s.matop)
c:RegisterEffect(e3)
--search
local e5=Effect.CreateEffect(c)
e5:SetDescription(1109)
e5:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_FZONE)
e5:SetCountLimit(1,id)
e5:SetTarget(s.thtg)
e5:SetOperation(s.thop)
c:RegisterEffect(e5)
end
function s.econdition(e)
local p=e:GetHandlerPlayer()
local ct=Duel.GetFieldGroupCount(p,LOCATION_MZONE,0)
return ct>0 and ct==Duel.GetMatchingGroupCount(s.cfilter,p,LOCATION_MZONE,0,nil)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xa77)
end
function s.etarget(e,c)
local p=e:GetHandlerPlayer()
local ct=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
return c:IsSetCard(0xa77) and ct>0 and ct==Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_MZONE,0,nil)
end
function s.efilter(e,re)
return re:GetOwnerPlayer()~=e:GetHandlerPlayer() and re:IsActivated()
and re:IsActiveType(TYPE_MONSTER)
end
function s.matcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY)
end
function s.dfilter(c)
return c:IsFaceup() and c:IsSetCard(0xa77) and c:IsType(TYPE_LINK)
and not c:IsHasEffect(EFFECT_DIRECT_ATTACK)
end
function s.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.dfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.dfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.dfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function s.matop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
function s.thfilter(c)
return c:IsCode(12844101) and (c:IsAbleToHand() or c:IsAbleToGrave())
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)
and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
local tohand=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0
if tc then
if tc:IsAbleToHand() and (not tc:IsAbleToGrave() or Duel.SelectOption(tp,1191,1190)==1) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SendtoGrave(tc,REASON_EFFECT)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local dg=Duel.GetFieldGroup(tp,LOCATION_HAND,0):Select(tp,1,1,nil)
if dg then
Duel.BreakEffect()
Duel.SendtoDeck(dg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
end
\ No newline at end of file
--封璇击·魔姬
local s,id,o=GetID()
function s.initial_effect(c)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(2)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
--e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,id)
e2:SetCondition(s.spcon)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetDescription(1131)
e3:SetCategory(CATEGORY_DISABLE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+100)
e3:SetCondition(s.discon)
e3:SetTarget(s.distg)
e3:SetOperation(s.disop)
c:RegisterEffect(e3)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return ep==1-tp and loc==LOCATION_HAND and re:IsActiveType(TYPE_MONSTER)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
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,2)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c)
return not c:IsSetCard(0x3a7a)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return rp==tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rc~=e:GetHandler()
and re:IsActiveType(TYPE_MONSTER) and rc:IsSetCard(0x3a7a)
end
function s.disfilter(c,e)
return aux.NegateAnyFilter(c) and e:GetHandler():GetColumnGroup():IsContains(c)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.disfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,e)
g:AddCard(c)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.disfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,e)
g:AddCard(c)
if #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local tc=g:Select(tp,1,1,nil):GetFirst()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsCanBeDisabledByEffect(e,false) then
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)
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)
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)
tc:RegisterEffect(e3)
end
if Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0
and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s,2)
Duel.MoveSequence(c,nseq)
end
end
end
\ No newline at end of file
--封璇击·影姬
local s,id,o=GetID()
function s.initial_effect(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(2)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--lvchange
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,id+100)
e2:SetProperty(EFFECT_FLAG_DELAY)
--e2:SetLabelObject(e3)
e2:SetCondition(s.lvcon)
e2:SetTarget(s.lvtg)
e2:SetOperation(s.lvop)
c:RegisterEffect(e2)
--adjust
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e5:SetCode(EVENT_MOVE)
e5:SetRange(LOCATION_MZONE)
e5:SetOperation(s.adjustop)
c:RegisterEffect(e5)
end
function s.filter(c,tp)
return c:IsAbleToHand() and Duel.GetMZoneCount(tp,c,tp)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x3a7a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc,tp) end
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil,tp)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0
and tc:IsLocation(LOCATION_EXTRA+LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,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(c)
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,2)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c)
return not c:IsSetCard(0x3a7a)
end
function s.ccfilter(c,tp)
return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetFlagEffect(id)>0
end
function s.lvcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.ccfilter,1,nil,1-tp)
end
function s.disfilter(c,e)
return e:GetHandler():GetColumnGroup():IsContains(c)
end
function s.adjustop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
for tc in aux.Next(g) do
if e:GetHandler():GetColumnGroup():IsContains(tc) and tc:GetFlagEffect(id)==0 then
tc:RegisterFlagEffect(id,RESET_EVENT+RESET_TOFIELD,0,1,0)
elseif not e:GetHandler():GetColumnGroup():IsContains(tc) and tc:GetFlagEffect(id)~=0 then
tc:ResetFlagEffect(id)
end
end
end
function s.scfilter(c)
return c:IsSetCard(0x3a7a) and c:IsFaceup()
end
function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil)
and Duel.IsExistingMatchingCard(s.scfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function s.lvop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(s.scfilter,tp,LOCATION_HAND,0,1,nil) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function s.eftg(e,c)
return e:GetHandler():GetColumnGroup():IsContains(c)
end
\ No newline at end of file
--封璇击的情书
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--act qp in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e2:SetRange(LOCATION_HAND)
e2:SetTargetRange(LOCATION_HAND,0)
e2:SetTarget(s.acttg)
c:RegisterEffect(e2)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function s.filter(c)
return c:IsAbleToHand() and c:IsSetCard(0x3a7a) and c:IsType(TYPE_MONSTER)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
e:SetLabel(1)
local ct=Duel.GetCurrentChain()
if ct<2 then return end
local te,tep=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tep==1-tp then
e:SetLabel(2)
end
end
function s.fselect(g)
return g:GetClassCount(Card.GetCode)==#g
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil)
--local ct=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:SelectSubGroup(tp,s.fselect,false,1,e:GetLabel())
if sg:GetCount()>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function s.cfilter(c)
return c:IsFaceup() and c:IsCode(12855501)
end
function s.acttg(e,c)
local p=e:GetHandlerPlayer()
return c==e:GetHandler() and Duel.IsExistingMatchingCard(s.cfilter,p,LOCATION_ONFIELD,0,1,nil)
end
\ No newline at end of file
--封璇击·璇姬
local s,id,o=GetID()
function s.initial_effect(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(2)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetCountLimit(1,id+1)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetTarget(s.thtg)
e3:SetOperation(s.thop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
end
function s.filter(c,e,tp,mc)
local zone=c:GetColumnZone(LOCATION_MZONE,tp)
return mc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and s.filter(chkc,e,tp,c) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,e,tp,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,e,tp,c)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) then return end
if not tc:IsRelateToEffect(e) then return end
local zone=tc:GetColumnZone(LOCATION_MZONE,tp)
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP,zone)~=0 then
c:SetCardTarget(tc)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetReset(RESET_EVENT+RESET_TOFIELD)
--e2:SetLabelObject(tc)
e2:SetOperation(s.desop)
c:RegisterEffect(e2)
end
local e1=Effect.CreateEffect(c)
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,2)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c)
return not c:IsSetCard(0x3a7a)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetFirstCardTarget()
if tc and tc:IsLocation(LOCATION_ONFIELD) then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
e:Reset()
end
function s.thfilter(c)
return c:IsSetCard(0x3a7a) and c:IsType(TYPE_SPELL+TYPE_TRAP) 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
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
......@@ -17,10 +17,12 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetTarget(s.disilter)
e3:SetCode(EFFECT_DISABLE)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsLinkState))
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......@@ -40,7 +42,7 @@ function s.mfilter2(c,g)
return g:IsExists(Card.IsLinkRace,1,c,c:GetLinkRace())
end
function s.linkfilter(c)
return c:GetMutualLinkedGroupCount()~=0
return c:IsLinkState()
end
function s.effectfilter(e,ct)
local p=e:GetHandler():GetControler()
......
......@@ -30,7 +30,7 @@ function s.xyzcheck(g)
return g:GetClassCount(Card.GetLevel)==1
end
function s.sdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
if Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)==0 then return false end
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)
ct=e:GetHandler():RemoveOverlayCard(tp,1,ct,REASON_COST)
......@@ -40,10 +40,21 @@ function s.sdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 end
end
function s.sdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local at=e:GetLabel()
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)
if at<=ct then
Duel.SortDecktop(tp,tp,at)
Duel.ConfirmDecktop(1-tp,at)
local g=Duel.GetDecktopGroup(1-tp,at)
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
Duel.PreserveSelectDeckSequence(true)
local sg=g:FilterSelect(tp,s.ovfilter,1,1,nil,tp)
Duel.PreserveSelectDeckSequence(false)
if #sg>0 then
Duel.DisableShuffleCheck(true)
Duel.Overlay(c,sg)
end
end
end
function s.mttg(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -67,9 +78,8 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp)
Duel.Overlay(c,g)
if xc:IsCode(ac) and Duel.IsExistingMatchingCard(s.ovfilter,tp,0,LOCATION_ONFIELD,1,nil,e:GetHandler()) and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
local sg=Duel.GetMatchingGroup(s.ovfilter,tp,0,LOCATION_ONFIELD,c)
local os=c:GetOverlayCount()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local tg=sg:Select(tp,1,os,nil)
local tg=sg:Select(tp,1,1,nil)
Duel.HintSelection(tg)
local tc=tg:GetFirst()
if not tc:IsImmuneToEffect(e) then
......
--占星术-星瀚神谕
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
--tofield
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id)
e2:SetHintTiming(TIMING_END_PHASE)
e2:SetCondition(s.scon)
e2:SetTarget(s.stg)
e2:SetOperation(s.sop)
c:RegisterEffect(e2)
end
function s.filter1(c)
return c:IsFaceup() and c:GetOriginalType()&TYPE_MONSTER~=0
end
------------------------------type check------------------------------------------
function s.lf(c)
return c:GetOriginalAttribute()&ATTRIBUTE_LIGHT~=0
end
function s.wdf(c)
return c:GetOriginalAttribute()&ATTRIBUTE_WIND~=0
end
function s.gf(c)
return c:GetOriginalAttribute()&ATTRIBUTE_EARTH~=0
end
function s.wf(c)
return c:GetOriginalAttribute()&ATTRIBUTE_WATER~=0
end
function s.ff(c)
return c:GetOriginalAttribute()&ATTRIBUTE_FIRE~=0
end
------------------------------type effect----------------------------------------
function s.thfilter(c)
return c.VHisc_Astrologist and c:IsAbleToHand()
end
function s.spfilter(c,e,tp)
return c.VHisc_Astrologist and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sfilter(c)
return c.VHisc_Astrologist and c:IsFaceup()
end
---------------------------------end----------------------------------------
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local og=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_SZONE,0,nil)
local rec=og:GetCount()*300
if chk==0 then return rec>0 end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(rec)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec)
if og:IsExists(s.lf,1,nil) then
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
if og:IsExists(s.wdf,1,nil) then
e:SetCategory(CATEGORY_TOHAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_ONFIELD)
end
if og:IsExists(s.gf,1,nil) then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
if og:IsExists(s.wf,1,nil) then
e:SetCategory(CATEGORY_DISABLE)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,tp,LOCATION_ONFIELD)
end
if og:IsExists(s.ff,1,nil) then
e:SetCategory(CATEGORY_DESTROY)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_ONFIELD)
end
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local og=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_SZONE,0,nil)
local rec=og:GetCount()*300
local c=e:GetHandler()
Duel.Recover(tp,rec,REASON_EFFECT)
Duel.BreakEffect()
---light
if og:IsExists(s.lf,1,nil) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectEffectYesNo(tp,c,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local thg=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if thg:GetCount()>0 and Duel.SendtoHand(thg,nil,REASON_EFFECT)~=0 and thg:GetFirst():IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,thg)
Duel.ShuffleHand(tp)
Duel.ShuffleDeck(tp)
end
end
---wind
if og:IsExists(s.wdf,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) and Duel.SelectEffectYesNo(tp,c,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local rtg=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
Duel.HintSelection(rtg)
if rtg:GetCount()>0 then Duel.SendtoHand(rtg,nil,REASON_EFFECT) end
end
---earth
if og:IsExists(s.gf,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.SelectEffectYesNo(tp,c,aux.Stringid(id,3)) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local spg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local spc=spg:GetFirst()
if spc then Duel.SpecialSummon(spc,0,tp,tp,false,false,POS_FACEUP) end
end
---water
if og:IsExists(s.wf,1,nil) and Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) and Duel.SelectEffectYesNo(tp,c,aux.Stringid(id,4)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local ng=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
Duel.HintSelection(ng)
local nc=ng:GetFirst()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
nc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
nc:RegisterEffect(e3)
end
---fire
if og:IsExists(s.ff,1,nil) and Duel.IsExistingMatchingCard(aux.TURE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) and Duel.SelectEffectYesNo(tp,c,aux.Stringid(id,5)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
if dg:GetCount()>0 then
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
end
end
end
--e2
function s.scon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_END
end
function s.stg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_ONFIELD,0,1,nil) and e:GetHandler():IsSSetable() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function s.sop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.SSet(tp,c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT-RESET_TURN_SET)
e1:SetValue(LOCATION_DECKBOT)
c:RegisterEffect(e1,true)
end
end
\ No newline at end of file
--星相术使-斯各特
local s,id,o=GetID()
function s.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--move
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_LEAVE_GRAVE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e4:SetCountLimit(1,id+10000)
e4:SetTarget(s.mvtg)
e4:SetOperation(s.mvop)
c:RegisterEffect(e4)
end
s.VHisc_Astrologist=true
--e1 e2
function s.thfilter(c)
return c:IsCode(33201500) and c:IsAbleToHand()
end
function s.filter(c,tp)
return c.VHisc_Astrologist and c:IsType(TYPE_MONSTER) and Duel.GetLocationCount(c:GetOwner(),LOCATION_SZONE,tp)>0
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)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD,nil)
Duel.ShuffleDeck(tp)
Duel.BreakEffect()
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,nil,tp)
if #g==0 or not Duel.SelectEffectYesNo(tp,c,aux.Stringid(id,0)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=g:Select(tp,1,1,nil):GetFirst()
if Duel.MoveToField(tc,tp,tc:GetOwner(),LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
end
end
--e3
function s.mvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and not e:GetHandler():IsForbidden() end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function s.mvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and not c:IsImmuneToEffect(e)
and Duel.MoveToField(c,tp,c:GetOwner(),LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--星相术使-莉里
local s,id,o=GetID()
function s.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,id+10000)
e3:SetTarget(s.sptg2)
e3:SetOperation(s.spop2)
c:RegisterEffect(e3)
end
s.VHisc_Astrologist=true
--e1 e2
function s.dthfilter(c)
return c:IsCode(33201500) and c:IsAbleToHand()
end
function s.filter(c,tp)
return c.VHisc_Astrologist and c:IsType(TYPE_MONSTER) and Duel.GetLocationCount(c:GetOwner(),LOCATION_SZONE,tp)>0
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil,tp)
if #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=g:Select(tp,1,1,nil):GetFirst()
if Duel.MoveToField(tc,tp,tc:GetOwner(),LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
if Duel.IsExistingMatchingCard(s.dthfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectEffectYesNo(tp,c,aux.Stringid(id,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local thg=Duel.SelectMatchingCard(tp,s.dthfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if thg:GetCount()>0 and Duel.SendtoHand(thg,nil,REASON_EFFECT)~=0 and thg:GetFirst():IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,thg)
Duel.ShuffleHand(tp)
end
end
end
end
function s.thfilter(c)
return c:IsFaceup() and c.VHisc_Astrologist and c:IsAbleToHand()
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and s.spfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.thfilter,tp,LOCATION_SZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_SZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g:GetFirst(),1,tp,LOCATION_SZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,tc)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--星相术使-赛拉西洛斯
local s,id,o=GetID()
function s.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--to field
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetOperation(s.regop)
c:RegisterEffect(e4)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,id+10000)
e3:SetCondition(s.edcon)
e3:SetTarget(s.edtg)
e3:SetOperation(s.edop)
c:RegisterEffect(e3)
end
s.VHisc_Astrologist=true
--e1 e2
function s.thfilter(c)
return c:IsCode(33201500) and c:IsAbleToHand()
end
function s.spfilter(c,e,tp)
return c.VHisc_Astrologist and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
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)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD,nil)
Duel.ShuffleDeck(tp)
Duel.BreakEffect()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.SelectEffectYesNo(tp,c,aux.Stringid(id,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local spg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local spc=spg:GetFirst()
if spc then Duel.SpecialSummon(spc,0,tp,tp,false,false,POS_FACEUP) end
end
end
end
--e3
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function s.edcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(id)>0
end
function s.edtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and not e:GetHandler():IsForbidden() and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.edop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
if c:IsRelateToEffect(e) and not c:IsImmuneToEffect(e)
and Duel.MoveToField(c,tp,c:GetOwner(),LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
end
end
--星相术使-开普勒
local s,id,o=GetID()
function s.initial_effect(c)
--spsummon rule
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,0))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e0:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e0:SetCondition(s.sprcon)
e0:SetTarget(s.sprtg)
e0:SetOperation(s.sprop)
c:RegisterEffect(e0)
--spsm
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id+10000)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(s.settg)
e1:SetOperation(s.setop)
c:RegisterEffect(e1)
--dis
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_DISABLE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetTarget(s.dstg)
e4:SetOperation(s.dsop)
c:RegisterEffect(e4)
end
s.VHisc_Astrologist=true
--e0
function s.cfilter(c,tp,f)
return c.VHisc_Astrologist and c:GetOriginalType()&TYPE_MONSTER~=0 and f(c) and Duel.GetMZoneCount(tp,c)>0
end
function s.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,c,tp,Card.IsAbleToGraveAsCost)
end
function s.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_ONFIELD,0,c,tp,Card.IsAbleToGraveAsCost)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function s.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_SPSUMMON)
end
--e1
function s.smfilter(c,e,tp)
return c.VHisc_Astrologist and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(s.smfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and e:GetHandler():IsRelateToEffect(e) and Duel.IsExistingMatchingCard(s.smfilter,tp,LOCATION_DECK,0,1,nil,e,tp) then
local c=e:GetHandler()
if Duel.MoveToField(c,tp,c:GetOwner(),LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
end
if e:GetHandler():IsLocation(LOCATION_SZONE) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.smfilter,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
end
end
--e4
function s.dstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) and aux.NegateMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateMonsterFilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
Duel.SelectTarget(tp,aux.NegateMonsterFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
end
function s.dsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsCanBeDisabledByEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
\ No newline at end of file
--星相术使-第谷
local s,id,o=GetID()
function s.initial_effect(c)
--spsummon rule
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,0))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e0:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e0:SetCondition(s.sprcon)
e0:SetTarget(s.sprtg)
e0:SetOperation(s.sprop)
c:RegisterEffect(e0)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_HANDES)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,id+10000)
e2:SetTarget(s.destg)
e2:SetOperation(s.desop)
c:RegisterEffect(e2)
end
s.VHisc_Astrologist=true
--e0
function s.cfilter(c,tp,f)
return c.VHisc_Astrologist and c:GetOriginalType()&TYPE_MONSTER~=0 and f(c) and Duel.GetMZoneCount(tp,c)>0
end
function s.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,c,tp,Card.IsAbleToGraveAsCost)
end
function s.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_ONFIELD,0,c,tp,Card.IsAbleToGraveAsCost)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function s.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_SPSUMMON)
end
--e2
function s.sfilter(c)
return c:IsCode(33201500)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,0,1,c)
and Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,1,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,g1:GetCount(),0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
local c=e:GetHandler()
if tg:GetCount()>0 then
local dec=Duel.Destroy(tg,REASON_EFFECT)
if dec>0 and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,REASON_EFFECT) and Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.SelectEffectYesNo(tp,c,aux.Stringid(id,0)) then
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,s.sfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
end
end
\ No newline at end of file
--沉默的毒骑士 影潜者 莫达利昂
function c40011510.initial_effect(c)
--set
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MONSTER_SSET)
e1:SetValue(TYPE_TRAP)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_MAIN_END)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,40011510)
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 end)
e2:SetCost(c40011510.setcost)
e2:SetTarget(c40011510.settg)
e2:SetOperation(c40011510.setop)
c:RegisterEffect(e2)
--trap effect
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,40011510+1)
e3:SetCondition(c40011510.discon)
e3:SetTarget(c40011510.distg)
e3:SetOperation(c40011510.disop)
c:RegisterEffect(e3)
end
function c40011510.dfilter(c)
return c:IsSetCard(0xaf1b) and c:IsDiscardable()
end
function c40011510.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable()
and Duel.IsExistingMatchingCard(c40011510.dfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c40011510.dfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function c40011510.setfilter(c)
return c:IsSetCard(0xaf1b) and not c:IsCode(40011510) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c40011510.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40011510.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c40011510.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local tc=Duel.SelectMatchingCard(tp,c40011510.setfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEDOWN,true)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
e1:SetValue(TYPE_TRAP)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
Duel.ConfirmCards(1-tp,tc)
end
end
function c40011510.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not (c:IsFacedown()) then return false end
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev)
and (e:GetHandler():GetTurnID()~=Duel.GetTurnCount() or e:GetHandler():IsHasEffect(EFFECT_TRAP_ACT_IN_SET_TURN))
end
function c40011510.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c40011510.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateActivation(ev) and c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
c:CancelToGrave()
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.IsEnvironment(40011525,tp) then
Duel.BreakEffect()
Duel.Damage(1-tp,1200,REASON_EFFECT)
end
end
end
--监视鸟遣使 影潜者 奥恩法
function c40011513.initial_effect(c)
--set
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MONSTER_SSET)
e1:SetValue(TYPE_TRAP)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,40011513)
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 end)
e2:SetCost(c40011513.thcost)
e2:SetTarget(c40011513.thtg)
e2:SetOperation(c40011513.thop)
c:RegisterEffect(e2)
--trap effect
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,40011513+1)
e3:SetCondition(c40011513.discon)
e3:SetTarget(c40011513.distg)
e3:SetOperation(c40011513.disop)
c:RegisterEffect(e3)
end
function c40011513.dfilter(c)
return c:IsSetCard(0xaf1b) and c:IsDiscardable()
end
function c40011513.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable()
and Duel.IsExistingMatchingCard(c40011513.dfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c40011513.dfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function c40011513.thfilter(c)
return c:IsSetCard(0xaf1b) and not c:IsCode(40011513,40011525) and not c:IsForbidden()
end
function c40011513.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40011513.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c40011513.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.SelectMatchingCard(tp,c40011513.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc then
Duel.SendtoHand(tc,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
function c40011513.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not (c:IsFacedown()) then return false end
return rp==1-tp and re:IsActiveType(TYPE_TRAP) and Duel.IsChainDisablable(ev)
and (e:GetHandler():GetTurnID()~=Duel.GetTurnCount() or e:GetHandler():IsHasEffect(EFFECT_TRAP_ACT_IN_SET_TURN))
end
function c40011513.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c40011513.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateActivation(ev) and c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
c:CancelToGrave()
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.IsEnvironment(40011525,tp) and Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(40011513,0)) then
Duel.BreakEffect()
local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.Destroy(dg,REASON_EFFECT)
end
end
end
--齐驱之刃 影潜者 奥纽克斯
function c40011516.initial_effect(c)
--set
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MONSTER_SSET)
e1:SetValue(TYPE_TRAP)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,40011516)
e2:SetTarget(c40011516.settg)
e2:SetOperation(c40011516.setop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--trap effect
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,40011516+1)
e3:SetCondition(c40011516.discon)
e3:SetTarget(c40011516.distg)
e3:SetOperation(c40011516.disop)
c:RegisterEffect(e3)
end
function c40011516.setfilter(c)
return c:IsSetCard(0xaf1b) and not c:IsCode(40011516) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c40011516.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40011516.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c40011516.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local tc=Duel.SelectMatchingCard(tp,c40011516.setfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEDOWN,true)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
e1:SetValue(TYPE_TRAP)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
Duel.ConfirmCards(1-tp,tc)
end
end
function c40011516.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not (c:IsFacedown()) then return false end
return rp==1-tp and re:IsActiveType(TYPE_SPELL) and Duel.IsChainDisablable(ev)
and (e:GetHandler():GetTurnID()~=Duel.GetTurnCount() or e:GetHandler():IsHasEffect(EFFECT_TRAP_ACT_IN_SET_TURN))
end
function c40011516.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c40011516.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateActivation(ev) and c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
c:CancelToGrave()
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.IsEnvironment(40011525,tp) and Duel.IsExistingMatchingCard(function(c) return c:IsSetCard(0xaf1b) and c:IsAbleToGrave() end,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(40011516,0)) then
Duel.BreakEffect()
local sg=Duel.SelectMatchingCard(tp,function(c) return c:IsSetCard(0xaf1b) and c:IsAbleToGrave() end,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
end
--秘藏一闪 影潜者 赛伦迪斯
function c40011519.initial_effect(c)
--set
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MONSTER_SSET)
e1:SetValue(TYPE_TRAP)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,40011519)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c40011519.actg)
e2:SetOperation(c40011519.acop)
c:RegisterEffect(e2)
--trap effect
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_SUMMON)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,40011519+1)
e3:SetCondition(c40011519.discon)
e3:SetTarget(c40011519.distg)
e3:SetOperation(c40011519.disop)
c:RegisterEffect(e3)
end
function c40011519.acfilter(c,tp)
return c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true,true)
end
function c40011519.actg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40011519.acfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,tp) end
if not Duel.CheckPhaseActivity() then e:SetLabel(1) else e:SetLabel(0) end
end
function c40011519.acop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
if e:GetLabel()==1 then Duel.RegisterFlagEffect(tp,15248873,RESET_CHAIN,0,1) end
local tc=Duel.SelectMatchingCard(tp,c40011519.acfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst()
Duel.ResetFlagEffect(tp,15248873)
if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect()
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
if tc:IsCode(40011525) and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(40011519,0)) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
function c40011519.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not (c:IsFacedown()) then return false end
return ep==1-tp and Duel.GetCurrentChain()==0
and (e:GetHandler():GetTurnID()~=Duel.GetTurnCount() or e:GetHandler():IsHasEffect(EFFECT_TRAP_ACT_IN_SET_TURN))
end
function c40011519.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c40011519.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.NegateSummon(eg)
if Duel.Destroy(eg,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
c:CancelToGrave()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--昔日之黑暗骑士 影潜者 奥布斯克迪特
function c40011522.initial_effect(c)
--set
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MONSTER_SSET)
e1:SetValue(TYPE_TRAP)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,40011522)
e2:SetTarget(c40011522.thxtg)
e2:SetOperation(c40011522.thxop)
c:RegisterEffect(e2)
--trap effect
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_SPSUMMON)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,40011522+1)
e3:SetCondition(c40011522.discon)
e3:SetTarget(c40011522.distg)
e3:SetOperation(c40011522.disop)
c:RegisterEffect(e3)
end
function c40011522.thxfilter(c)
return c:IsSetCard(0xaf1b) and not c:IsCode(40011522) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c40011522.thxtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c40011522.thxfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c40011522.thxfilter,tp,LOCATION_GRAVE,0,1,nil) end
local g=Duel.SelectTarget(tp,c40011522.thxfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function c40011522.thxop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) then
--extra attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
end
function c40011522.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not (c:IsFacedown()) then return false end
return ep==1-tp and Duel.GetCurrentChain()==0
and (e:GetHandler():GetTurnID()~=Duel.GetTurnCount() or e:GetHandler():IsHasEffect(EFFECT_TRAP_ACT_IN_SET_TURN))
end
function c40011522.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c40011522.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.NegateSummon(eg)
if Duel.Destroy(eg,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
c:CancelToGrave()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--受监视的密会
function c40011525.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,40011525)
e2:SetTarget(c40011525.srtg)
e2:SetOperation(c40011525.srop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e3:SetRange(LOCATION_FZONE)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xaf1b))
e3:SetTargetRange(LOCATION_SZONE,0)
c:RegisterEffect(e3)
--atk
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetRange(LOCATION_FZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xaf1b))
e4:SetValue(300)
c:RegisterEffect(e4)
--cannot be target
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e5:SetRange(LOCATION_FZONE)
e5:SetTargetRange(LOCATION_SZONE,0)
e5:SetTarget(function(e,c)
return c:IsFacedown() end)
e5:SetValue(aux.tgoval)
c:RegisterEffect(e5)
--cannot be attacked
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_PUBLIC)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(LOCATION_FZONE)
e6:SetCondition(c40011525.atcon)
e6:SetTargetRange(0,LOCATION_HAND)
c:RegisterEffect(e6)
end
function c40011525.srfilter(c)
return c:IsSetCard(0xaf1b) and c:IsAbleToHand()
end
function c40011525.srtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40011525.srfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c40011525.srop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c40011525.srfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c40011525.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xaf1b) and c:IsSummonLocation(LOCATION_SZONE)
end
function c40011525.atcon(e)
return Duel.IsExistingMatchingCard(c40011525.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,id+500)
e2:SetLabel(1)
e2:SetCost(s.cost)
e2:SetTarget(s.rmtg)
e2:SetOperation(s.rmop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,0x11e0)
e3:SetCountLimit(1,id+500)
e3:SetCost(s.tdcost)
e3:SetTarget(s.tdtg)
e3:SetOperation(s.tdop)
c:RegisterEffect(e3)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
if eg:GetCount()~=1 then return false end
local tc=eg:GetFirst()
e:SetLabel(tc:GetRace())
return tc:IsSummonPlayer(tp) and tc:IsSummonLocation(LOCATION_HAND) and Duel.GetTurnPlayer()~=tp
end
function s.spfilter(c,e,tp,race)
return c:IsSetCard(0x195) and not c:IsRace(race|RACE_FAIRY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local sg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp,e:GetLabel())
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and #sg>0 and Duel.IsPlayerCanSendtoHand(tp) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,Group.__add(sg,e:GetHandler()),2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_ONFIELD)
end
function s.spop(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 sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,e:GetLabel()):GetFirst()
if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then
sc:SetStatus(STATUS_EFFECT_ENABLED,true)
sc:SetStatus(STATUS_SPSUMMON_STEP,false)
local hg=Group.__add(sc,Duel.GetTargetsRelateToChain())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg=hg:FilterSelect(tp,Card.IsAbleToHand,1,1,nil)
local c=e:GetHandler()
if #sg>0 and Duel.SendtoHand(sg,nil,REASON_EFFECT) and sg:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) then Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) end
sc:SetStatus(STATUS_EFFECT_ENABLED,false)
sc:SetStatus(STATUS_SPSUMMON_STEP,true)
end
Duel.SpecialSummonComplete()
end
function s.cfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and not c:IsPublic()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetLabel()
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,ct,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,ct,ct,nil)
Duel.ConfirmCards(1-tp,g)
Duel.RaiseEvent(g,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0)
Duel.ShuffleHand(tp)
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil,1-tp) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_HAND)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil,1-tp)
if g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
local tc=g:Select(1-tp,1,1,nil):GetFirst()
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
local c=e:GetHandler()
local fid=c:GetFieldID()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetCondition(s.retcon)
e1:SetOperation(s.retop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
end
function s.retcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(id)==e:GetLabel() then
return true
else
e:Reset()
return false
end
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
function s.tdcfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE+ATTRIBUTE_DARK) and not c:IsPublic()
end
function s.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(s.tdcfilter,tp,LOCATION_HAND,0,nil)
if chk==0 then return g:CheckSubGroup(aux.gfcheck,2,2,Card.IsAttribute,ATTRIBUTE_FIRE,ATTRIBUTE_DARK) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsAttribute,ATTRIBUTE_FIRE,ATTRIBUTE_DARK)
Duel.ConfirmCards(1-tp,sg)
Duel.RaiseEvent(sg,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0)
Duel.ShuffleHand(tp)
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0x30,0x30,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,0x30)
end
function s.gcheck(g)
return g:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)<=2 and g:FilterCount(Card.IsLocation,nil,LOCATION_REMOVED)<=2
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsAbleToDeck),tp,0x30,0x30,nil)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:SelectSubGroup(tp,s.gcheck,false,1,4)
if sg:GetCount()>0 then
Duel.HintSelection(sg)
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
end
end
end
--“敬畏”
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE+CATEGORY_DICE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
s.toss_dice=true
function s.condition(e,tp,eg,ep,ev,re,r,rp)
local ap=Duel.GetTurnPlayer()
if ap==tp then
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
elseif ap==1-tp then
return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE
end
return false
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,2)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local dc1,dc2=Duel.TossDice(tp,2)
s.revere_op(dc1,Duel.GetTurnPlayer(),dc2)
Duel.BreakEffect()
s.revere_op(dc2,Duel.GetTurnPlayer(),dc1)
end
function s.revere_op(dc1,tp,dc2)
if dc1==1 then
Duel.Hint(24,0,aux.Stringid(id,1))
local dc=dc1+dc2
Duel.Damage(tp,dc*1500,REASON_EFFECT)
if dc==2 then
Duel.Hint(24,0,aux.Stringid(id,7))
Duel.Damage(tp,8000,REASON_EFFECT)
end
elseif dc1==2 then
Duel.Hint(24,0,aux.Stringid(id,2))
local dc=dc1+dc2
local tg=Duel.GetDecktopGroup(tp,dc)
if #tg==0 then return end
Duel.DisableShuffleCheck()
Duel.Remove(tg,POS_FACEDOWN,REASON_EFFECT)
elseif dc1==3 then
Duel.Hint(24,0,aux.Stringid(id,3))
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0):RandomSelect(tp,1)
if #g>0 then
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
elseif dc1==4 then
Duel.Hint(24,0,aux.Stringid(id,4))
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD):RandomSelect(tp,1)
if #g>0 then
Duel.Destroy(g,REASON_EFFECT)
end
elseif dc1==5 then
Duel.Hint(24,0,aux.Stringid(id,5))
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil):Select(tp,1,1,nil)
if #g>0 then
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
elseif dc1==6 then
Duel.Hint(24,0,aux.Stringid(id,6))
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp,POS_FACEDOWN):Select(tp,2,2,nil)
if #g>0 and Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)~=0 and dc1+dc2==12 then
Duel.Hint(24,0,aux.Stringid(id,8))
local mg=Duel.GetFieldGroup(tp,LOCATION_ONFIELD+LOCATION_HAND,LOCATION_ONFIELD+LOCATION_HAND)
Duel.Remove(mg,POS_FACEDOWN,REASON_EFFECT)
end
end
end
\ No newline at end of file
......@@ -33,24 +33,32 @@ function s.chcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and re:GetActivateLocation()~=LOCATION_ONFIELD
end
function s.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsCanBeSpecialSummoned(re,0,rp,false,false) and re:GetHandler():IsRelateToEffect(re) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
if chk==0 then return re:GetHandler():IsAbleToDeck() and re:GetHandler():IsRelateToEffect(re) end
end
function s.chop(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,s.repop)
end
function s.lvcheck(c)
return c:IsFaceup() and c:IsLevelAbove(1) and not c:IsLevel(10)
end
function s.repop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 then
if Duel.SpecialSummon(c,0,tp,1-tp,false,false,POS_FACEUP) and c:IsLevelAbove(1) and not c:IsLevel(10) and Duel.SelectYesNo(1-tp,aux.Stringid(id,3)) then
if c:IsRelateToEffect(re) then
if Duel.SendtoDeck(c,nil,2,REASON_EFFECT) and Duel.IsExistingMatchingCard(s.lvcheck,tp,0,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(1-tp,aux.Stringid(id,3)) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(10)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,4))
local tg=Duel.SelectMatchingCard(tp,s.lvcheck,tp,0,LOCATION_MZONE,1,1,nil)
local tc=tg:GetFirst()
if tc then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(10)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
end
end
......
......@@ -5,13 +5,11 @@ function s.initial_effect(c)
--change
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_CONTROL+CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_NO_TURN_RESET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetCost(s.crcost)
e1:SetCondition(s.crcon)
e1:SetTarget(s.crtg)
e1:SetOperation(s.crop)
......@@ -36,43 +34,32 @@ end
function s.filter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsDisabled()
end
function s.costfilter(c,tp)
return Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_CONTROL)>0
end
function s.crcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,s.costfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,s.costfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function s.crtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsControlerCanBeChanged(true) and Duel.GetLocationCount(tp,LOCATION_MZONE)>=0 end
e:SetCategory(CATEGORY_DISABLE+CATEGORY_CONTROL)
if chk==0 then return re:GetHandler():IsAbleToGrave() and re:GetHandler():IsRelateToEffect(re) end
end
function s.crop(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,s.repop)
end
function s.lvcheck(c)
return c:IsFaceup() and c:IsLevelAbove(1) and not c:IsLevel(10)
end
function s.repop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=re:GetHandler()
if tc:IsFaceup() and tc:IsLocation(LOCATION_MZONE) and tc:IsType(TYPE_MONSTER) and not tc:IsDisabled() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
if tc:IsControler(1-tp) and tc:IsControlerCanBeChanged() then
if Duel.GetControl(tc,tp,PHASE_END,1) and tc:IsLevelAbove(1) and not tc:IsLevel(10) and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.BreakEffect()
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CHANGE_LEVEL)
e3:SetValue(10)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
if c:IsRelateToEffect(re) then
if Duel.SendtoGrave(c,REASON_EFFECT) and Duel.IsExistingMatchingCard(s.lvcheck,tp,0,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(1-tp,aux.Stringid(id,3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,4))
local tg=Duel.SelectMatchingCard(tp,s.lvcheck,tp,0,LOCATION_MZONE,1,1,nil)
local tc=tg:GetFirst()
if tc then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(10)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
end
......
--尼罗修正者 苍鹭
function c67200962.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--apply
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(67200962,0))
e0:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e0:SetCode(EVENT_PHASE+PHASE_END)
e0:SetRange(LOCATION_PZONE)
--e0:SetCondition(c67200962.opcon)
e0:SetTarget(c67200962.optg)
e0:SetOperation(c67200962.opop)
c:RegisterEffect(e0)
--negate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,67200962)
e1:SetCondition(c67200962.condition)
e1:SetTarget(c67200962.target)
e1:SetOperation(c67200962.operation)
c:RegisterEffect(e1)
--Negate summon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_TOGRAVE)
e4:SetDescription(aux.Stringid(67200962,3))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_SPSUMMON)
e4:SetCountLimit(1,67200963)
e4:SetCondition(c67200962.discon)
e4:SetCost(c67200962.chcost)
e4:SetTarget(c67200962.distg)
e4:SetOperation(c67200962.disop)
c:RegisterEffect(e4)
end
function c67200962.filter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() and c:IsSetCard(0x967a)
end
function c67200962.optg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c67200962.filter,tp,LOCATION_EXTRA,0,1,nil) and c:IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA)
end
function c67200962.opop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,2,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c67200962.filter,tp,LOCATION_EXTRA,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
--
function c67200962.condition(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsChainNegatable(ev) then return false end
if not re:IsActiveType(TYPE_MONSTER) and not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end
return re:IsHasCategory(CATEGORY_SPECIAL_SUMMON)
end
function c67200962.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c67200962.operation(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end
if Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) then
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
end
--
function c67200962.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()==0 and rp==1-tp
end
function c67200962.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x67a) and c:IsType(TYPE_PENDULUM) and c:IsAbleToDeckAsCost()
end
function c67200962.chcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200962.cfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c67200962.cfilter,tp,LOCATION_EXTRA,0,1,1,nil)
Duel.SendtoDeck(g,nil,1,REASON_COST)
end
function c67200962.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function c67200962.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
\ No newline at end of file
--尼罗修正者 狂狮
function c67200964.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,67200964)
e1:SetTarget(c67200964.sptg)
e1:SetOperation(c67200964.spop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200964,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,67200965)
e2:SetCost(c67200964.damcost)
e2:SetTarget(c67200964.damtg)
e2:SetOperation(c67200964.damop)
c:RegisterEffect(e2)
end
function c67200964.spfilter2(c,e,tp)
return c:IsSetCard(0x967a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c67200964.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_PZONE) and chkc~=c and c67200964.spfilter2(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c67200964.spfilter2,tp,LOCATION_PZONE,0,1,c,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c67200964.spfilter2,tp,LOCATION_PZONE,0,1,1,c,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function c67200964.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
if tc:IsLocation(LOCATION_MZONE) then
Duel.BreakEffect()
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
end
end
--
function c67200964.costfilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x67a)
end
function c67200964.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b2=Duel.IsExistingMatchingCard(c67200964.costfilter,tp,LOCATION_HAND,0,1,c)
if chk==0 then return c:IsDiscardable() and b2 end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(67200964,4))
local g=Duel.SelectMatchingCard(tp,c67200964.costfilter,tp,LOCATION_HAND,0,1,1,c)
g:AddCard(c)
Duel.SendtoExtraP(g,nil,REASON_COST)
end
function c67200964.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200964.thfilter,tp,LOCATION_DECK,0,1,nil) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) end
--Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_DECK)
end
function c67200964.spfilter(c,e,tp)
if not (c:IsSetCard(0x67a) and c:IsFaceup() and c:IsType(TYPE_PENDULUM)) then return false end
return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) or (Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end
function c67200964.spfilter1(c,e,tp)
if not (c:IsSetCard(0x67a) and c:IsFaceup() and c:IsType(TYPE_PENDULUM)) then return false end
return (Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end
function c67200964.thfilter(c)
return c:IsSetCard(0x67a) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_PENDULUM)
end
function c67200964.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c67200964.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true) and g:GetFirst():IsLocation(LOCATION_PZONE) then
--Duel.ConfirmCards(1-tp,g)
local sg=Duel.GetMatchingGroup(c67200964.spfilter,tp,LOCATION_EXTRA,0,g:GetFirst():GetCode(),e,tp)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(67200964,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local sc=sg:Select(tp,1,1,g:GetFirst())
Duel.BreakEffect()
local b1=Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)
local b2=sc:IsExists(c67200964.spfilter1,1,nil,e,tp)
local op=aux.SelectFromOptions(tp,{b1,aux.Stringid(67200964,3)},{b2,1152})
if op==1 then
Duel.MoveToField(sc:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
if op==2 then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
\ No newline at end of file
......@@ -1285,6 +1285,7 @@
!setname 0x9f1b 超新星格斗技场
!setname 0xaf1b 影潜者
!setname 0xcf1b 王冠圣域
!setname 0x3a7b 璇姬
#TYGOC Submissions
......
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