Commit b7928ee0 authored by POLYMER's avatar POLYMER

update 230915

parent 99248f29
No preview for this file type
expansions/pics/11561006.jpg

19.6 KB | W: | H:

expansions/pics/11561006.jpg

179 KB | W: | H:

expansions/pics/11561006.jpg
expansions/pics/11561006.jpg
expansions/pics/11561006.jpg
expansions/pics/11561006.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11561011.jpg

254 KB | W: | H:

expansions/pics/11561011.jpg

248 KB | W: | H:

expansions/pics/11561011.jpg
expansions/pics/11561011.jpg
expansions/pics/11561011.jpg
expansions/pics/11561011.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11561013.jpg

20 KB | W: | H:

expansions/pics/11561013.jpg

433 KB | W: | H:

expansions/pics/11561013.jpg
expansions/pics/11561013.jpg
expansions/pics/11561013.jpg
expansions/pics/11561013.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11561014.jpg

18.6 KB | W: | H:

expansions/pics/11561014.jpg

1 MB | W: | H:

expansions/pics/11561014.jpg
expansions/pics/11561014.jpg
expansions/pics/11561014.jpg
expansions/pics/11561014.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11561015.jpg

15.5 KB | W: | H:

expansions/pics/11561015.jpg

173 KB | W: | H:

expansions/pics/11561015.jpg
expansions/pics/11561015.jpg
expansions/pics/11561015.jpg
expansions/pics/11561015.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11561022.jpg

20.6 KB | W: | H:

expansions/pics/11561022.jpg

267 KB | W: | H:

expansions/pics/11561022.jpg
expansions/pics/11561022.jpg
expansions/pics/11561022.jpg
expansions/pics/11561022.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/67220004.jpg

43.5 KB | W: | H:

expansions/pics/67220004.jpg

45.7 KB | W: | H:

expansions/pics/67220004.jpg
expansions/pics/67220004.jpg
expansions/pics/67220004.jpg
expansions/pics/67220004.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910624.jpg

13.5 KB | W: | H:

expansions/pics/9910624.jpg

55.6 KB | W: | H:

expansions/pics/9910624.jpg
expansions/pics/9910624.jpg
expansions/pics/9910624.jpg
expansions/pics/9910624.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -28,8 +28,8 @@ function c11560712.initial_effect(c)
end
c11560712.SetCard_SR_Saier=true
function c11560712.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(aux.NegateEffectMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.SelectTarget(tp,aux.NegateEffectMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end
function c11560712.disop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -74,34 +74,58 @@ end
function c11561006.xdestg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local x=c:GetLinkedGroupCount()
if chk==0 then return c:GetFlagEffect(11561006)<x end
local b1=c:GetFlagEffect(21561006)==0
local b2=c:GetFlagEffect(31561006)==0 and Duel.IsExistingMatchingCard(function(c,atk) return c:GetAttack()<atk and c:IsFaceup() end,tp,0,LOCATION_MZONE,1,nil,c:GetAttack())
local b3=c:GetFlagEffect(41561006)==0
if chk==0 then return c:GetFlagEffect(11561006)<x and (b1 or b2 or b3) end
c:RegisterFlagEffect(11561006,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function c11561006.xdesop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(2000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e4)
if Duel.IsExistingMatchingCard(function(c,atk) return c:GetAttack()<atk and c:IsFaceup() end,tp,0,LOCATION_MZONE,1,nil,c:GetAttack()) and Duel.SelectYesNo(tp,aux.Stringid(11561006,0)) then
local dg=Duel.SelectMatchingCard(tp,function(c,atk) return c:GetAttack()<atk and c:IsFaceup() end,tp,0,LOCATION_MZONE,1,1,nil,c:GetAttack())
Duel.Destroy(dg,REASON_EFFECT)
end
end
local c=e:GetHandler()
local b1=c:GetFlagEffect(21561006)==0
local b2=c:GetFlagEffect(31561006)==0 and Duel.IsExistingMatchingCard(function(c,atk) return c:GetAttack()<atk and c:IsFaceup() end,tp,0,LOCATION_MZONE,1,nil,c:GetAttack())
local b3=c:GetFlagEffect(41561006)==0
if (b1 or b2 or b3) then
local op=0
if b1 and b2 and b3 then
op=Duel.SelectOption(tp,aux.Stringid(11561006,1),aux.Stringid(11561006,2),aux.Stringid(11561006,3))
elseif b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(11561006,1),aux.Stringid(11561006,2))
elseif b2 and b3 then
op=Duel.SelectOption(tp,aux.Stringid(11561006,2),aux.Stringid(11561006,3))+1
elseif b1 and b3 then
op=Duel.SelectOption(tp,aux.Stringid(11561006,1),aux.Stringid(11561006,3))
if op==1 then op=op+1 end
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(11561006,1))
elseif b2 then
op=Duel.SelectOption(tp,aux.Stringid(11561006,2))+1
elseif b3 then
op=Duel.SelectOption(tp,aux.Stringid(11561006,3))+2
end
if op==0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(2000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
c:RegisterFlagEffect(21561006,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
elseif op==1 then
local dg=Duel.SelectMatchingCard(tp,function(c,atk) return c:GetAttack()<atk and c:IsFaceup() end,tp,0,LOCATION_MZONE,1,1,nil,c:GetAttack())
Duel.Destroy(dg,REASON_EFFECT)
c:RegisterFlagEffect(31561006,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
elseif op==2 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(function(e,te)
return e:GetOwner()~=te:GetOwner() end)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN)
c:RegisterEffect(e1)
c:RegisterFlagEffect(41561006,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
end
end
......@@ -17,7 +17,8 @@ function c11561008.initial_effect(c)
e2:SetCategory(CATEGORY_ANNOUNCE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,21561008)
e2:SetCountLimit(1,21561008)
e2:SetCost(c11561008.cancost)
e2:SetTarget(c11561008.cgtg)
e2:SetOperation(c11561008.cgop)
c:RegisterEffect(e2)
......@@ -42,61 +43,89 @@ function c11561008.pbfil(c)
return c:IsRace(RACE_SPELLCASTER) and not c:IsPublic()
end
function c11561008.pbgck(g)
return g:GetClassCount(Card.GetLevel)==1 and g:GetClassCount(Card.GetAttribute)==g:GetCount()
return true
end
function c11561008.cantg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c11561008.pbfil,tp,LOCATION_HAND,0,nil)
if chk==0 then return g:CheckSubGroup(c11561008.pbgck,2,7) end
if chk==0 then return g:CheckSubGroup(c11561008.pbgck,3,3) end
end
function c11561008.spfil(c,e,tp,sg)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsRace(RACE_SPELLCASTER) and sg:IsExists(Card.IsAttribute,1,nil,c:GetAttribute())
--local tc=sg:GetFirst()
--while tc do
--if not c:IsAttribute(tc:GetAttribute()) then return false end
--tc=sg:GetNext()
--end
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsRace(RACE_SPELLCASTER) and sg:IsExists(Card.IsAttribute,1,nil,c:GetAttribute())
end
function c11561008.thfil(c,e,tp,sg)
return c:IsAbleToHand() and c:IsRace(RACE_SPELLCASTER) and sg:IsExists(Card.IsLevel,1,nil,c:GetLevel())
local tc=sg:GetFirst()
while tc do
if not c:IsLevel(tc:GetLevel()) then return false end
tc=sg:GetNext()
end
return c:IsAbleToHand() and c:IsRace(RACE_SPELLCASTER)
end
function c11561008.canop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c11561008.pbfil,tp,LOCATION_HAND,0,nil)
local pg=g:SelectSubGroup(tp,c11561008.pbgck,false,2,7)
if not g:CheckSubGroup(c11561008.pbgck,2,7) then return end
local pg=g:SelectSubGroup(tp,c11561008.pbgck,false,3,3)
if not g:CheckSubGroup(c11561008.pbgck,3,3) then return end
Duel.ConfirmCards(1-tp,pg)
Duel.ShuffleHand(tp)
local x=pg:GetCount()
local b1=pg and pg:GetClassCount(Card.GetAttribute)==pg:GetCount()
local b2=pg and pg:GetClassCount(Card.GetLevel)==1
if pg and x>0 then
if x>=2 and c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
if x>=3 and Duel.IsExistingMatchingCard(c11561008.spfil,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,pg) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if b1 and Duel.IsExistingMatchingCard(c11561008.spfil,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,pg) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local sg=Duel.SelectMatchingCard(tp,c11561008.spfil,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp,pg)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
if x>=4 and Duel.IsExistingMatchingCard(c11561008.thfil,tp,LOCATION_DECK,0,1,nil,e,tp,pg) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local sg=Duel.SelectMatchingCard(tp,c11561008.thfil,tp,LOCATION_DECK,0,1,1,nil,e,tp,pg)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
if b2 and c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
if b1 and b2 and Duel.IsExistingMatchingCard(c11561008.thfil,tp,LOCATION_DECK,0,1,nil,e,tp,pg) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
local tc=Duel.SelectMatchingCard(tp,c11561008.thfil,tp,LOCATION_DECK,0,1,1,nil,e,tp,pg):GetFirst()
local type=0
local op=Duel.SelectOption(tp,aux.Stringid(11561008,3),aux.Stringid(11561008,4))
if op==0 then type=TYPE_SPELL end
if op==1 then type=TYPE_TRAP end
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(type+TYPE_CONTINUOUS)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
tc:RegisterEffect(e1)
end
end
end
function c11561008.cgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
Duel.ConfirmCards(1-tp,e:GetHandler())
Duel.ShuffleHand()
end
function c11561008.cgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
e:SetLabel(Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL))
end
function c11561008.cgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11561008.pbfil,tp,LOCATION_HAND,0,1,nil) end
local tc=Duel.SelectMatchingCard(tp,c11561008.pbfil,tp,LOCATION_HAND,0,1,1,nil):GetFirst()
Duel.ConfirmCards(1-tp,tc)
e:SetLabelObject(tc)
Duel.ShuffleHand(tp)
e:SetLabel(Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL),Duel.AnnounceLevel(tp))
end
function c11561008.cgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE+LOCATION_DECK+LOCATION_GRAVE,0)
e1:SetTarget(function(e,c)
return c:IsCode(11561008) end)
e1:SetValue(e:GetLabel())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local tc=e:GetLabelObject()
local att,lv=e:GetLabel()
if tc:IsLocation(LOCATION_HAND) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetValue(att)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1,tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1,tp)
end
end
......
......@@ -27,8 +27,8 @@ function c11561009.initial_effect(c)
c:RegisterEffect(e2)
end
function c11561009.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,2) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
end
function c11561009.filter0(c)
return c:IsOnField() and c:IsAbleToRemove()
......@@ -45,7 +45,7 @@ function c11561009.filter3(c)
end
function c11561009.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.IsPlayerCanDiscardDeck(tp,2) and Duel.DiscardDeck(tp,2,REASON_EFFECT)~=0 then
if Duel.IsPlayerCanDiscardDeck(tp,3) and Duel.DiscardDeck(tp,3,REASON_EFFECT)~=0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c11561009.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(c11561009.filter3,tp,LOCATION_GRAVE,0,nil)
......@@ -85,19 +85,19 @@ function c11561009.thfil(c)
return c:IsAbleToHand() and c:IsLevel(4) and c:IsRace(RACE_SPELLCASTER)
end
function c11561009.xxtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,2) and Duel.IsExistingMatchingCard(c11561009.thfil,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) and Duel.IsExistingMatchingCard(c11561009.thfil,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c11561009.xxop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.IsPlayerCanDiscardDeck(tp,2) and Duel.DiscardDeck(tp,2,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(c11561009.thfil,tp,LOCATION_DECK,0,1,nil) then
if Duel.IsPlayerCanDiscardDeck(tp,3) and Duel.DiscardDeck(tp,3,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(c11561009.thfil,tp,LOCATION_DECK,0,1,nil) then
local g=Duel.SelectMatchingCard(tp,c11561009.thfil,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.ConfirmCards(1-tp,g)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=20 then
Duel.Damage(1-tp,3200,REASON_EFFECT)
Duel.Recover(tp,3200,REASON_EFFECT)
Duel.Damage(1-tp,2400,REASON_EFFECT)
Duel.Recover(tp,2400,REASON_EFFECT)
end
end
end
......
......@@ -40,7 +40,7 @@ function c11561010.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetRange(LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED)
e3:SetOperation(c11561010.xdesop)
c:RegisterEffect(e3)
end
......@@ -61,7 +61,7 @@ function c11561010.desop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(c11561010.desfil,tp,0,LOCATION_MZONE,1,nil,e:GetHandler():GetAttack()) then
Duel.Hint(HINT_CARD,0,11561010)
local dg=Duel.SelectMatchingCard(tp,c11561010.desfil,tp,0,LOCATION_MZONE,1,1,nil,e:GetHandler():GetAttack())
if Duel.Destroy(dg,REASON_EFFECT)~=0 then
if Duel.Destroy(dg,REASON_EFFECT)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
......@@ -74,6 +74,6 @@ end
function c11561010.xdesop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_CARD,0,11561010)
Duel.Destroy(c,REASON_EFFECT)
Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
end
......@@ -28,16 +28,37 @@ function c11561011.initial_effect(c)
e2:SetOperation(c11561011.xxop)
c:RegisterEffect(e2)
--atk
--local e3=Effect.CreateEffect(c)
--e3:SetDescription(aux.Stringid(11561011,3))
--e3:SetType(EFFECT_TYPE_QUICK_O)
--e3:SetCode(EVENT_CHAINING)
--e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
--e3:SetRange(LOCATION_MZONE)
--e3:SetCondition(c11561011.atkcon)
--e3:SetTarget(c11561011.atktg)
--e3:SetOperation(c11561011.atkop)
--c:RegisterEffect(e3)
--pendulum
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11561011,3))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c11561011.atkcon)
e3:SetTarget(c11561011.atktg)
e3:SetOperation(c11561011.atkop)
c:RegisterEffect(e3)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCondition(c11561011.pencon)
e3:SetTarget(c11561011.pentg)
e3:SetOperation(c11561011.penop)
c:RegisterEffect(e3)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_PZONE)
e1:SetTarget(c11561011.patktg)
e1:SetOperation(c11561011.patkop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function c11561011.mfilter(c,xyzc)
return c:IsXyzLevel(xyzc,8)
......@@ -46,12 +67,12 @@ function c11561011.xyzcheck(g)
return g:GetClassCount(Card.GetRace)==g:GetCount()
end
function c11561011.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,2) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
end
function c11561011.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.IsPlayerCanDiscardDeck(tp,2) and Duel.DiscardDeck(tp,2,REASON_EFFECT)~=0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=20 and c:IsRelateToEffect(e) then
if Duel.IsPlayerCanDiscardDeck(tp,3) and Duel.DiscardDeck(tp,3,REASON_EFFECT)~=0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=20 and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
......@@ -74,7 +95,7 @@ function c11561011.xxtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c11561011.xxop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.IsPlayerCanDiscardDeck(tp,2) and Duel.DiscardDeck(tp,2,REASON_EFFECT)~=0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=20 then
if Duel.IsPlayerCanDiscardDeck(tp,3) and Duel.DiscardDeck(tp,3,REASON_EFFECT)~=0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=20 then
for i=1,9 do
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
......@@ -131,4 +152,55 @@ function c11561011.atkop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1)
end
end
function c11561011.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE)
end
function c11561011.pentg(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
end
function c11561011.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
function c11561011.cfilter(c,tp)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER+RACE_DRAGON) and c:IsSummonPlayer(tp)
end
function c11561011.patktg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(c11561011.cfilter,nil,tp)
if chk==0 then return g:GetCount()>0 end
Duel.SetTargetCard(g)
end
function c11561011.patkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
local tc=g:GetFirst()
while tc do
if tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(800)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(800)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
tc=g:GetNext()
end
end
end
......@@ -101,14 +101,14 @@ function c11561025.drmop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
local e0=Effect.CreateEffect(e:GetHandler())
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetTargetRange(0,1)
e0:SetValue(1)
e0:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e0,tp)
--local e0=Effect.CreateEffect(e:GetHandler())
--e0:SetType(EFFECT_TYPE_FIELD)
--e0:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
--e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
--e0:SetTargetRange(0,1)
--e0:SetValue(1)
--e0:SetReset(RESET_PHASE+PHASE_END)
--Duel.RegisterEffect(e0,tp)
end
......
......@@ -16,64 +16,19 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
if not cm.DreamCheck then
cm.DreamCheck=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAIN_SOLVING)
ge1:SetCondition(cm.chcon)
ge1:SetOperation(cm.chop)
Duel.RegisterEffect(ge1,0)
_DreamIsRelateToEffect=Card.IsRelateToEffect
function Card.IsRelateToEffect(c,e)
local b1=Duel.IsExistingMatchingCard(cm.cfilter,0,LOCATION_SZONE,LOCATION_SZONE,1,nil)
local b1=Duel.IsExistingMatchingCard(cm.cfilter,0,LOCATION_SZONE,LOCATION_SZONE,1,nil,e)
local b2=(e:GetHandler()==c and e:IsActivated())
if b1 and b2 then return false end
return _DreamIsRelateToEffect(c,e)
end
end
end
function cm.cfilter(c)
return c:GetEffectCount(15000189)~=0 and c:IsFaceup() and c:IsStatus(STATUS_EFFECT_ENABLED) and not c:IsDisabled()
end
function cm.chcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return (rc:IsType(TYPE_CONTINUOUS) or rc:IsType(TYPE_FIELD) or rc:IsType(TYPE_PENDULUM) or rc:IsType(TYPE_EQUIP)) and re:GetOperation() and re:IsActivated()
end
function cm.chop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetOwner()
local rc=re:GetHandler()
local op=re:GetOperation()
if not (rc:IsLocation(LOCATION_FZONE) or rc:IsLocation(LOCATION_SZONE) or rc:IsLocation(LOCATION_PZONE)) then return end
if op then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(15000189)
e1:SetTargetRange(1,0)
e1:SetOperation(op)
e1:SetLabelObject(re)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,0)
re:SetOperation(cm.chaop)
end
end
function cm.chaop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local se=Duel.IsPlayerAffectedByEffect(0,15000189)
if not se then se=Duel.IsPlayerAffectedByEffect(1,15000189) end
local op=nil
if se then
local x=1
for _,i in ipairs{Duel.IsPlayerAffectedByEffect(0,15000189)} do
if i:GetLabelObject()==e and x~=0 then
op=i:GetOperation()
i:Reset()
x=0
end
end
end
local ag=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_SZONE,LOCATION_SZONE,nil)
if ag:GetCount()==0 then op(e,tp,eg,ep,ev,re,r,rp) return end
if ag:GetCount()~=0 and c:IsRelateToEffect(e) then
op(e,tp,eg,ep,ev,re,r,rp)
function cm.cfilter(c,se)
local ce=nil
if c:GetEffectCount(15000189)~=0 then
ce=c:IsHasEffect(15000189)
end
return c:GetEffectCount(15000189)~=0 and c:IsFaceup() and c:IsStatus(STATUS_EFFECT_ENABLED) and not c:IsDisabled() and not se:GetHandler():IsImmuneToEffect(ce)
end
\ No newline at end of file
local m=189132
local cm=_G["c"..m]
cm.name="漆黑噤默-罗兰"
function cm.initial_effect(c)
aux.AddCodeList(c,189131)
--sp summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--SearchCard
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if e:GetHandler():IsRelateToEffect(e) and Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)>0 and g:GetCount()>0 then
Duel.BreakEffect()
Duel.ConfirmCards(tp,g)
Duel.ShuffleHand(1-tp)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActivated() and aux.IsCodeListed(re:GetHandler(),189131)
end
function cm.thfilter(c)
return aux.IsCodeListed(c,189131) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.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 m=189133
local cm=_G["c"..m]
cm.name="墨工坊"
function cm.initial_effect(c)
aux.AddCodeList(c,189131)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon)
e2:SetCost(aux.bfgcost)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
if not cm.global_check then
cm.global_check=true
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_TO_HAND)
e3:SetCondition(cm.th2con)
e3:SetOperation(cm.th2op)
Duel.RegisterEffect(e3,0)
end
end
function cm.hfilter(c)
return not c:IsPublic()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(cm.hfilter,tp,0,LOCATION_HAND,nil)>0
end
function cm.qpfilter(e,c)
return aux.IsCodeListed(c,189131)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.hfilter,tp,0,LOCATION_HAND,nil)
if g:GetCount()~=0 then
local ct=1
if Duel.IsPlayerAffectedByEffect(tp,189137) and Duel.GetFlagEffect(tp,189137)==0 and g:GetCount()>=2 and Duel.SelectYesNo(tp,aux.Stringid(189137,2)) then
ct=2
Duel.RaiseEvent(e:GetHandler(),EVENT_CUSTOM+189138,e,REASON_EFFECT,tp,1-tp,ev)
Duel.RegisterFlagEffect(tp,189137,RESET_PHASE+PHASE_END,0,1)
end
local ag=g:RandomSelect(tp,ct)
local ac=ag:GetFirst()
while ac do
ac:RegisterFlagEffect(189133,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,66)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
ac:RegisterEffect(e1)
ac=ag:GetNext()
end
Duel.ConfirmCards(tp,ag)
Duel.BreakEffect()
--act qp in hand
Duel.RegisterFlagEffect(tp,189133,RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e2:SetTargetRange(LOCATION_HAND,0)
e2:SetTarget(cm.qpfilter)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
function cm.phfilter(c)
return c:IsPublic() and c:IsType(TYPE_SPELL)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActivated() and aux.IsCodeListed(re:GetHandler(),189131) and Duel.GetMatchingGroupCount(cm.phfilter,tp,0,LOCATION_HAND,nil)>0
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local ac=re:GetHandler()
if ac:IsRelateToEffect(re) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(LOCATION_HAND)
ac:RegisterEffect(e1)
ac:RegisterFlagEffect(189134,RESET_EVENT+RESETS_STANDARD,0,1)
end
end
function cm.th2filter(c)
return c:GetFlagEffect(189134)~=0
end
function cm.th2con(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.th2filter,1,nil)
end
function cm.th2op(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(cm.th2filter,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
\ No newline at end of file
local m=189134
local cm=_G["c"..m]
cm.name="轮盘重工"
function cm.initial_effect(c)
aux.AddCodeList(c,189131)
--act in hand
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(189133,4))
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e0:SetCondition(cm.handcon)
c:RegisterEffect(e0)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(1150)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.cost)
c:RegisterEffect(e1)
--stats up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(cm.deffilter))
e2:SetValue(500)
c:RegisterEffect(e2)
--banish
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DISABLE+CATEGORY_REMOVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetTarget(cm.dbtg)
e3:SetOperation(cm.dbop)
c:RegisterEffect(e3)
end
function cm.handcon(e)
return Duel.GetFlagEffect(e:GetHandler():GetControler(),189133)~=0
end
function cm.hfilter(c)
return not c:IsPublic()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(cm.hfilter,tp,0,LOCATION_HAND,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local ct=1
if Duel.IsPlayerAffectedByEffect(tp,189137) and Duel.GetFlagEffect(tp,189137)==0 and g:GetCount()>=2 and Duel.SelectYesNo(tp,aux.Stringid(189137,2)) then
ct=2
Duel.RaiseEvent(e:GetHandler(),EVENT_CUSTOM+189138,e,REASON_EFFECT,tp,1-tp,ev)
Duel.RegisterFlagEffect(tp,189137,RESET_PHASE+PHASE_END,0,1)
end
local ag=g:RandomSelect(tp,ct)
local ac=ag:GetFirst()
while ac do
ac:RegisterFlagEffect(189133,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,66)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
ac:RegisterEffect(e1)
ac=ag:GetNext()
end
Duel.ConfirmCards(tp,ag)
end
end
function cm.deffilter(c)
return aux.IsCodeListed(c,189131)
end
function cm.dhfilter(c,rtype)
return c:IsPublic() and c:IsType(rtype)
end
function cm.dbfilter(c,tp)
local rtype=bit.band(c:GetType(),0x7)
return Duel.IsExistingMatchingCard(cm.dhfilter,tp,0,LOCATION_HAND,1,nil,rtype) and c:IsFaceup()
end
function cm.dbtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and chkc:IsControler(1-tp) and cm.dbfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.dbfilter,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,cm.dbfilter,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function cm.dbop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(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)
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)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
local m=189135
local cm=_G["c"..m]
cm.name="阿拉斯工作室"
function cm.initial_effect(c)
aux.AddCodeList(c,189131)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
end
function cm.hfilter(c)
return not c:IsPublic()
end
function cm.tgfilter(c)
return aux.IsCodeListed(c,189131) and c:IsAbleToGrave()
end
function cm.spfilter(c,e,tp)
return ((c:IsLocation(LOCATION_HAND) and (c:IsPublic() or c:GetFlagEffect(189133)~=0)) or (c:IsLocation(LOCATION_GRAVE))) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMatchingGroupCount(cm.hfilter,tp,0,LOCATION_HAND,nil)>0 and Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
e:SetLabel(Duel.AnnounceType(tp))
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.hfilter,tp,0,LOCATION_HAND,nil)
local rtype=0
if g:GetCount()~=0 then
local ct=1
if Duel.IsPlayerAffectedByEffect(tp,189137) and Duel.GetFlagEffect(tp,189137)==0 and g:GetCount()>=2 and Duel.SelectYesNo(tp,aux.Stringid(189137,2)) then
ct=2
Duel.RaiseEvent(e:GetHandler(),EVENT_CUSTOM+189138,e,REASON_EFFECT,tp,1-tp,ev)
Duel.RegisterFlagEffect(tp,189137,RESET_PHASE+PHASE_END,0,1)
end
local ag=g:RandomSelect(tp,ct)
local ac=ag:GetFirst()
while ac do
if bit.band(rtype,bit.band(ac:GetType(),0x7))==0 then
rtype=rtype+bit.band(ac:GetType(),0x7)
end
ac:RegisterFlagEffect(189133,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,66)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
ac:RegisterEffect(e1)
ac=ag:GetNext()
end
Duel.ConfirmCards(tp,ag)
local opt=e:GetLabel()
if (opt==0 and bit.band(rtype,TYPE_MONSTER)~=0) or (opt==1 and bit.band(rtype,TYPE_SPELL)~=0) or (opt==2 and bit.band(rtype,TYPE_TRAP)~=0) then
if Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.spfilter),tp,0,LOCATION_HAND+LOCATION_GRAVE,1,nil,e,tp) and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,0,LOCATION_HAND+LOCATION_GRAVE,1,1,nil,e,tp)
local tc=g1:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,1-tp,false,false,POS_FACEUP) then
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)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SET_ATTACK)
e3:SetValue(0)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_SET_DEFENSE)
tc:RegisterEffect(e4)
Duel.SpecialSummonComplete()
end
end
elseif Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil) then
local fg=Duel.GetMatchingGroup(cm.tgfilter,tp,LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=fg:Select(tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
end
\ No newline at end of file
local m=189136
local cm=_G["c"..m]
cm.name="卡莉斯塔工作室"
function cm.initial_effect(c)
aux.AddCodeList(c,189131)
--act in hand
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(189133,4))
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e0:SetCondition(cm.handcon)
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(1150)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--look
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1)
e2:SetCondition(cm.hcon)
e2:SetOperation(cm.hop)
c:RegisterEffect(e2)
end
function cm.handcon(e)
return Duel.GetFlagEffect(e:GetHandler():GetControler(),189133)~=0
end
--tp:自 己
--p:破 坏 的 怪 兽 存 在 过 的 玩 家
--seq:破 坏 的 怪 兽 存 在 过 的 序 号
--arrow:准 备 检 查 的 方 向
function cm.seqfilter(c,seq,tp,p,arrow,loc)
--local loc=LOCATION_MZONE
if seq>=8 then
loc=LOCATION_SZONE
seq=seq-8
end
if seq>=5 and loc==LOCATION_SZONE then return false end
if seq==7 and loc==LOCATION_MZONE then return false end
local cseq=c:GetSequence()
local cloc=c:GetLocation()
local cp=c:GetControler()
if cloc==LOCATION_SZONE and cseq>=5 then return false end
if cloc==LOCATION_MZONE and cseq>=5 and seq<5 and loc==LOCATION_MZONE then
if arrow=="up" and cp==p and cp==tp and ((seq==1 and cseq==5) or (seq==3 and cseq==6)) then return true end
if arrow=="up" and cp~=p and cp~=tp and ((seq==1 and cseq==6) or (seq==3 and cseq==5)) then return true end
if arrow=="down" and cp==p and cp~=tp and ((seq==1 and cseq==5) or (seq==3 and cseq==6) or seq==cseq) then return true end
if arrow=="down" and cp~=p and cp==tp and ((seq==1 and cseq==6) or (seq==3 and cseq==5) or seq==cseq) then return true end
if arrow=="left" or arrow=="right" then return false end
end
if cloc==LOCATION_MZONE and seq>=5 and cseq<5 and loc==LOCATION_MZONE then
if arrow=="up" and cp==p and cp~=tp and ((seq==5 and cseq==1) or (seq==6 and cseq==3)) then return true end
if arrow=="up" and cp~=p and cp~=tp and ((seq==5 and cseq==3) or (seq==6 and cseq==1)) then return true end
if arrow=="down" and cp==p and cp==tp and ((seq==5 and cseq==1) or (seq==6 and cseq==3)) then return true end
if arrow=="down" and cp~=p and cp==tp and ((seq==5 and cseq==3) or (seq==6 and cseq==1)) then return true end
if arrow=="left" or arrow=="right" then return false end
end
if arrow=="left" and cp==p and cp==tp then return loc==cloc and cseq==seq-1 end
if arrow=="right" and cp==p and cp==tp then return loc==cloc and cseq==seq+1 end
if arrow=="left" and cp==p and cp~=tp then return loc==cloc and cseq==seq+1 end
if arrow=="right" and cp==p and cp~=tp then return loc==cloc and cseq==seq-1 end
if cloc==LOCATION_MZONE and seq<5 and cseq<5 and loc==LOCATION_SZONE then
if arrow=="up" and cp==p and cp==tp and cseq==seq then return true end
if arrow=="down" and cp==p and cp~=tp and cseq==seq then return true end
if arrow=="left" or arrow=="right" then return false end
end
if cloc==LOCATION_SZONE and seq<5 and cseq<5 and loc==LOCATION_MZONE then
if arrow=="up" and cp==p and cp~=tp and cseq==seq then return true end
if arrow=="down" and cp==p and cp==tp and cseq==seq then return true end
if arrow=="left" or arrow=="right" then return false end
end
return false
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,aux.ExceptThisCard(e))
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
local list={}
table.insert(list,aux.Stringid(m,1))
table.insert(list,aux.Stringid(m,2))
table.insert(list,aux.Stringid(m,3))
table.insert(list,aux.Stringid(m,4))
local ct=4
while #list~=0 and list~={0,0,0,0} and tc and ct>0 do
local loc=tc:GetLocation()
local slist={}
table.insert(slist,aux.Stringid(m,1)) --up
table.insert(slist,aux.Stringid(m,2)) --down
table.insert(slist,aux.Stringid(m,3)) --left
table.insert(slist,aux.Stringid(m,4)) --right
local p=tc:GetControler()
local seq=tc:GetSequence()
if table.concat(list,nil,4,4)+1==1 or not Duel.IsExistingMatchingCard(cm.seqfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,seq,tp,p,"right",loc) then
table.remove(slist,4)
end
if table.concat(list,nil,3,3)+1==1 or not Duel.IsExistingMatchingCard(cm.seqfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,seq,tp,p,"left",loc) then
table.remove(slist,3)
end
if table.concat(list,nil,2,2)+1==1 or not Duel.IsExistingMatchingCard(cm.seqfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,seq,tp,p,"down",loc) then
table.remove(slist,2)
end
if table.concat(list,nil,1,1)+1==1 or not Duel.IsExistingMatchingCard(cm.seqfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,seq,tp,p,"up",loc) then
table.remove(slist,1)
end
--if #slist==0 then Duel.Destroy(tc,REASON_EFFECT) break end
if Duel.Destroy(tc,REASON_EFFECT)~=0 and #slist~=0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,0))
local opt=Duel.SelectOption(tp,table.unpack(slist))
local arrow="0"
if table.concat(slist,nil,opt+1,opt+1)+1==aux.Stringid(m,4)+1 then
arrow="right"
table.insert(list,4,0)
table.remove(list,5)
end
if table.concat(slist,nil,opt+1,opt+1)+1==aux.Stringid(m,3)+1 then
arrow="left"
table.insert(list,3,0)
table.remove(list,4)
end
if table.concat(slist,nil,opt+1,opt+1)+1==aux.Stringid(m,2)+1 then
arrow="down"
table.insert(list,2,0)
table.remove(list,3)
end
if table.concat(slist,nil,opt+1,opt+1)+1==aux.Stringid(m,1)+1 then
arrow="up"
table.insert(list,1,0)
table.remove(list,2)
end
ct=ct-1
local tg=Duel.GetMatchingGroup(cm.seqfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,seq,tp,p,arrow,loc)
Duel.HintSelection(tg)
tc=tg:GetFirst()
else break
end
end
end
end
function cm.hfilter(c)
return not c:IsPublic()
end
function cm.bfilter(c)
return aux.IsCodeListed(c,189131) and c:IsFaceup()
end
function cm.hcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.hfilter,tp,0,LOCATION_HAND,1,nil) and Duel.IsExistingMatchingCard(cm.bfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler())
end
function cm.hop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.hfilter,tp,0,LOCATION_HAND,nil)
if g:GetCount()~=0 then
local ct=1
if Duel.IsPlayerAffectedByEffect(tp,189137) and Duel.GetFlagEffect(tp,189137)==0 and g:GetCount()>=2 and Duel.SelectYesNo(tp,aux.Stringid(189137,2)) then
ct=2
Duel.RaiseEvent(e:GetHandler(),EVENT_CUSTOM+189138,e,REASON_EFFECT,tp,1-tp,ev)
Duel.RegisterFlagEffect(tp,189137,RESET_PHASE+PHASE_END,0,1)
end
local ag=g:RandomSelect(tp,ct)
local ac=ag:GetFirst()
while ac do
ac:RegisterFlagEffect(189133,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,66)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
ac:RegisterEffect(e1)
ac=ag:GetNext()
end
Duel.ConfirmCards(tp,ag)
end
end
\ No newline at end of file
local m=189137
local cm=_G["c"..m]
cm.name="Furioso"
function cm.initial_effect(c)
aux.AddCodeList(c,189131)
--act in hand
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(189133,4))
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e0:SetCondition(cm.handcon)
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(1150)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--add public count
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(189137)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(1,0)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CUSTOM+189138)
e3:SetRange(LOCATION_SZONE)
e3:SetOperation(cm.setop)
c:RegisterEffect(e3)
--Activate
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,4))
e4:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_HAND)
e4:SetCondition(cm.hancon)
e4:SetTarget(cm.hantg)
e4:SetOperation(cm.activate)
c:RegisterEffect(e4)
if not cm.FuriosoCheck then
cm.FuriosoCheck=true
_FuriosoIsHasType=Effect.IsHasType
function Effect.IsHasType(e,typ)
if typ==EFFECT_TYPE_ACTIVATE and e:GetDescription() and e:GetDescription()+1==aux.Stringid(m,4)+1 then return true end
return _FuriosoIsHasType(e,typ)
end
end
end
function cm.hancon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActivated() and aux.IsCodeListed(re:GetHandler(),189131)
end
function cm.handcon(e)
return Duel.GetFlagEffect(e:GetHandler():GetControler(),189133)~=0
end
function cm.hantg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local b1=c:GetActivateEffect():IsActivatable(tp,true)
e:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_ACTIVATE)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCountLimit(1)
e1:SetLabelObject(e)
e1:SetCondition(cm.regcon)
e1:SetOperation(cm.regop)
e1:SetReset(RESET_CHAIN)
e1:SetLabel(tp)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_CHAINING)
Duel.RegisterEffect(e2,tp)
return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and b1
end
Duel.RegisterFlagEffect(tp,189132,RESET_CHAIN,0,1,e:GetFieldID())
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
local se=e:GetLabelObject()
local tp=e:GetLabel()
local x=0
if Duel.GetFlagEffect(tp,189132)~=0 then
for _,i in ipairs{Duel.GetFlagEffectLabel(tp,189132)} do
if i==se:GetFieldID() then x=1 end
end
end
return se and ((not re) or (re~=se and (e:GetCode()==EVENT_CHAINING and (Duel.GetFlagEffect(tp,189132)==0 or x==0))))
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local se=e:GetLabelObject()
if se and se:IsHasType(EFFECT_TYPE_ACTIVATE) then
se:SetType(EFFECT_TYPE_QUICK_O)
end
end
function cm.tgfilter(c)
return aux.IsCodeListed(c,189131) and c:IsAbleToGrave()
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.tgfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
if e:GetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_ACTIVATE) then
e:SetType(EFFECT_TYPE_QUICK_O)
end
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,1-tp,189137)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCountLimit(1)
e1:SetCondition(cm.setcon2)
e1:SetOperation(cm.setop2)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.setfilter(c)
return aux.IsCodeListed(c,189131) and ((c:IsType(TYPE_SPELL+TYPE_TRAP) and (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) and c:IsSSetable()) or (c:IsType(TYPE_MONSTER) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)))
end
function cm.setcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function cm.setop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,1,1,nil):GetFirst()
if tc then
if tc:IsType(TYPE_MONSTER) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,tc)
elseif (tc:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0)
and tc:IsSSetable() then
Duel.SSet(tp,tc)
end
end
end
\ No newline at end of file
local m=189138
local cm=_G["c"..m]
cm.name="杜兰达尔"
function cm.initial_effect(c)
aux.AddCodeList(c,189131)
--act in hand
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(189133,4))
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e0:SetCondition(cm.handcon)
c:RegisterEffect(e0)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(1150)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.cost)
c:RegisterEffect(e1)
--to hand 1
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.th1tg)
e2:SetOperation(cm.th1op)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--disable spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EVENT_SUMMON)
e4:SetCountLimit(1,m)
e4:SetCondition(cm.th2con)
e4:SetTarget(cm.th2tg)
e4:SetOperation(cm.th2op)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_SPSUMMON)
c:RegisterEffect(e5)
end
function cm.handcon(e)
return Duel.GetFlagEffect(e:GetHandler():GetControler(),189133)~=0
end
function cm.hfilter(c)
return not c:IsPublic()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(cm.hfilter,tp,0,LOCATION_HAND,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local ct=1
if Duel.IsPlayerAffectedByEffect(tp,189137) and Duel.GetFlagEffect(tp,189137)==0 and g:GetCount()>=2 and Duel.SelectYesNo(tp,aux.Stringid(189137,2)) then
ct=2
Duel.RaiseEvent(e:GetHandler(),EVENT_CUSTOM+189138,e,REASON_EFFECT,tp,1-tp,ev)
Duel.RegisterFlagEffect(tp,189137,RESET_PHASE+PHASE_END,0,1)
end
local ag=g:RandomSelect(tp,ct)
local ac=ag:GetFirst()
while ac do
ac:RegisterFlagEffect(189133,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,66)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
ac:RegisterEffect(e1)
ac=ag:GetNext()
end
Duel.ConfirmCards(tp,ag)
end
end
function cm.cfilter(c)
return c:IsFaceup() and aux.IsCodeListed(c,189131)
end
function cm.th1tg(e,tp,eg,ep,ev,re,r,rp,chk)
local tp=e:GetHandler():GetControler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) and eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,eg,#eg,0,0)
end
function cm.th1op(e,tp,eg,ep,ev,re,r,rp)
if Duel.SendtoHand(eg,nil,REASON_EFFECT)~=0 then
local ag=eg:Filter(Card.IsLocation,nil,LOCATION_HAND)
if #ag~=0 then
local ac=ag:GetFirst()
while ac do
ac:RegisterFlagEffect(189133,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,66)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
ac:RegisterEffect(e1)
ac=ag:GetNext()
end
Duel.ConfirmCards(tp,ag)
end
end
end
function cm.hcfilter(c)
return c:IsPublic() and c:IsType(TYPE_MONSTER)
end
function cm.th2con(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and Duel.GetCurrentChain()==0
end
function cm.th2tg(e,tp,eg,ep,ev,re,r,rp,chk)
local tp=e:GetHandler():GetControler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(cm.hcfilter,tp,0,LOCATION_HAND,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,#eg,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,eg,#eg,0,0)
end
function cm.th2op(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
if Duel.SendtoHand(eg,nil,REASON_EFFECT)~=0 then
local ag=eg:Filter(Card.IsLocation,nil,LOCATION_HAND)
if #ag~=0 then
local ac=ag:GetFirst()
while ac do
ac:RegisterFlagEffect(189133,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,66)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
ac:RegisterEffect(e1)
ac=ag:GetNext()
end
Duel.ConfirmCards(tp,ag)
end
end
end
\ No newline at end of file
local m=189139
local cm=_G["c"..m]
cm.name="琅琊工坊"
function cm.initial_effect(c)
aux.AddCodeList(c,189131)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--SSet
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.settg)
e2:SetOperation(cm.setop)
c:RegisterEffect(e2)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function cm.filter(c,e,tp)
return aux.IsCodeListed(c,189131) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,2000)
end
function cm.activate(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,aux.NecroValleyFilter(cm.filter),tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 then
Duel.BreakEffect()
local ag=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
Duel.ConfirmCards(tp,ag)
if ag:IsExists(Card.IsType,1,nil,TYPE_TRAP) then
Duel.Damage(1-tp,2000,REASON_EFFECT)
end
Duel.ShuffleHand(1-tp)
end
end
function cm.htfilter(c)
return c:IsType(TYPE_TRAP) and c:IsSSetable() and c:IsPublic()
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.htfilter,tp,0,LOCATION_HAND,1,nil) end
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
local g=Duel.SelectMatchingCard(tp,cm.htfilter,tp,0,LOCATION_HAND,1,1,nil)
local code=g:GetFirst():GetCode()
if Duel.SSet(tp,g,1-tp)~=0 then
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetTargetRange(1,1)
e2:SetLabel(code)
e2:SetValue(cm.aclimit)
e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp)
end
end
function cm.aclimit(e,re,tp)
local c=re:GetHandler()
local code=e:GetLabel()
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and c:IsCode(code)
end
\ No newline at end of file
local m=189140
local cm=_G["c"..m]
cm.name="桦树工坊"
function cm.initial_effect(c)
aux.AddCodeList(c,189131)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.drtg)
e2:SetOperation(cm.drop)
c:RegisterEffect(e2)
end
function cm.hfilter(c)
return not c:IsPublic()
end
function cm.tgfilter(c)
return c:IsType(TYPE_MONSTER)
end
function cm.hcfilter(c)
return c:IsLocation(LOCATION_HAND) and (c:IsPublic() or c:GetFlagEffect(189133)~=0)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMatchingGroupCount(cm.hfilter,tp,0,LOCATION_HAND,nil)>0 and Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
e:SetLabel(Duel.AnnounceType(tp))
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_MZONE)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.hfilter,tp,0,LOCATION_HAND,nil)
local rtype=0
if g:GetCount()~=0 then
local ct=1
if Duel.IsPlayerAffectedByEffect(tp,189137) and Duel.GetFlagEffect(tp,189137)==0 and g:GetCount()>=2 and Duel.SelectYesNo(tp,aux.Stringid(189137,2)) then
ct=2
Duel.RaiseEvent(e:GetHandler(),EVENT_CUSTOM+189138,e,REASON_EFFECT,tp,1-tp,ev)
Duel.RegisterFlagEffect(tp,189137,RESET_PHASE+PHASE_END,0,1)
end
local ag=g:RandomSelect(tp,ct)
local ac=ag:GetFirst()
while ac do
if bit.band(rtype,bit.band(ac:GetType(),0x7))==0 then
rtype=rtype+bit.band(ac:GetType(),0x7)
end
ac:RegisterFlagEffect(189133,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,66)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
ac:RegisterEffect(e1)
ac=ag:GetNext()
end
Duel.ConfirmCards(tp,ag)
local dg=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if #dg~=0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=dg:Select(tp,1,1,nil)
Duel.HintSelection(sg)
local opt=e:GetLabel()
if Duel.Destroy(sg,REASON_EFFECT)~=0 and ((opt==0 and bit.band(rtype,TYPE_MONSTER)~=0) or (opt==1 and bit.band(rtype,TYPE_SPELL)~=0) or (opt==2 and bit.band(rtype,TYPE_TRAP)~=0)) then
local fg=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
if #fg~=0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local hg=fg:Select(tp,1,1,nil)
if hg:GetCount()>0 then
local tc=hg:GetFirst()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EFFECT_DISABLE_EFFECT)
e4:SetValue(RESET_TURN_SET)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e4)
end
end
end
end
end
end
function cm.drfilter(c)
return c:IsFaceup() and aux.IsCodeListed(c,189131) and c:IsAbleToDeck()
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED+LOCATION_GRAVE) and chkc:IsControler(tp) and cm.drfilter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(cm.drfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,5,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.drfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,5,5,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,5,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)<=0 then return end
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct>0 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
local m=189141
local cm=_G["c"..m]
cm.name="逻辑工作室"
function cm.initial_effect(c)
aux.AddCodeList(c,189131)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--extra attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,m)
e2:SetCondition(aux.bpcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.atktg)
e2:SetOperation(cm.atkop)
c:RegisterEffect(e2)
end
function cm.hfilter(c)
return c:IsPublic()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.hfilter,tp,0,LOCATION_HAND,1,nil) and Duel.IsPlayerCanDraw(1-tp,1) end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=1
local x=0
while ct<=3 do
if Duel.IsExistingMatchingCard(cm.hfilter,tp,0,LOCATION_HAND,1,nil) and Duel.IsPlayerCanDraw(1-tp,1) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,cm.hfilter,tp,0,LOCATION_HAND,1,1,nil)
if Duel.Destroy(g,REASON_EFFECT)==0 then return end
if g:GetFirst():IsType(TYPE_SPELL+TYPE_TRAP) then x=1 end
Duel.BreakEffect()
local ag=Duel.GetDecktopGroup(1-tp,1)
if Duel.Draw(1-tp,1,REASON_EFFECT)~=0 then
Duel.ConfirmCards(tp,ag)
Duel.ShuffleHand(1-tp)
end
end
ct=ct+1
if ct<=3 and ((not Duel.IsExistingMatchingCard(cm.hfilter,tp,0,LOCATION_HAND,1,nil)) or (not Duel.IsPlayerCanDraw(1-tp,1))) then
break
end
if ct<=3 and not Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
break
end
end
if x==1 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,aux.ExceptThisCard(e),tp,POS_FACEUP,REASON_EFFECT) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,aux.ExceptThisCard(e),tp,POS_FACEUP,REASON_EFFECT)
if #rg~=0 then
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end
end
end
function cm.atkfilter(c)
return c:IsFaceup() and aux.IsCodeListed(c,189131) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK)
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(cm.ftarget)
e2:SetLabel(tc:GetFieldID())
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
function cm.ftarget(e,c)
return e:GetLabel()~=c:GetFieldID()
end
\ No newline at end of file
local m=189142
local cm=_G["c"..m]
cm.name="老男孩工坊"
function cm.initial_effect(c)
aux.AddCodeList(c,189131)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
end
function cm.hfilter(c)
return not c:IsPublic()
end
function cm.thfilter(c,typ)
local rtype=bit.band(c:GetType(),0x7)
return aux.IsCodeListed(c,189131) and c:IsAbleToHand() and ((not typ) or (bit.band(rtype,typ)~=0))
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMatchingGroupCount(cm.hfilter,tp,0,LOCATION_HAND,nil)>0 and Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,nil) end
local list={}
local m=0
local s=0
local t=0
if Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,TYPE_MONSTER) then
table.insert(list,70)
m=1
end
if Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,TYPE_SPELL) then
table.insert(list,71)
s=1
end
if Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,TYPE_TRAP) then
table.insert(list,72)
t=1
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
local op=Duel.SelectOption(tp,table.unpack(list))
local opt=0
if op==0 then
if m==1 then opt=0 end
if m==0 and s==1 then opt=1 end
if m==0 and s==0 and t==1 then opt=2 end
end
if op==1 then
if m==1 and s==1 then opt=1 end
if m==1 and s==0 and t==1 then opt=2 end
if m==0 and s==1 and t==1 then opt=2 end
end
if op==2 then
opt=2
end
e:SetLabel(opt)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.hfilter,tp,0,LOCATION_HAND,nil)
local rtype=0
if g:GetCount()~=0 then
local ct=1
if Duel.IsPlayerAffectedByEffect(tp,189137) and Duel.GetFlagEffect(tp,189137)==0 and g:GetCount()>=2 and Duel.SelectYesNo(tp,aux.Stringid(189137,2)) then
ct=2
Duel.RaiseEvent(e:GetHandler(),EVENT_CUSTOM+189138,e,REASON_EFFECT,tp,1-tp,ev)
Duel.RegisterFlagEffect(tp,189137,RESET_PHASE+PHASE_END,0,1)
end
local ag=g:RandomSelect(tp,ct)
local ac=ag:GetFirst()
while ac do
if bit.band(rtype,bit.band(ac:GetType(),0x7))==0 then
rtype=rtype+bit.band(ac:GetType(),0x7)
end
ac:RegisterFlagEffect(189133,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,66)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
ac:RegisterEffect(e1)
ac=ag:GetNext()
end
Duel.ConfirmCards(tp,ag)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,rtype)
if g:GetCount()>0 then
if Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g)
local opt=e:GetLabel()
if ((opt==0 and bit.band(rtype,TYPE_MONSTER)~=0) or (opt==1 and bit.band(rtype,TYPE_SPELL)~=0) or (opt==2 and bit.band(rtype,TYPE_TRAP)~=0)) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
end
end
\ No newline at end of file
--二角獣の使い魔
function c49811210.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(49811210,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE+LOCATION_HAND)
e1:SetCountLimit(1,49811210)
e1:SetCost(c49811210.thcost)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(c49811210.thtg)
e1:SetOperation(c49811210.thop)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(49811210,1))
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,49811211)
e2:SetCost(aux.bfgcost)
e2:SetCondition(c49811210.tgcon)
e2:SetTarget(c49811210.tgtg)
e2:SetOperation(c49811210.tgop)
c:RegisterEffect(e2)
end
function c49811210.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c49811210.thfilter(c)
return c:IsLevelBelow(5) and c:IsRace(RACE_BEAST) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsType(TYPE_TUNER)
end
function c49811210.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c49811210.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c49811210.thop(e,tp,eg,ep,ev,re,r,rp)
c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c49811210.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
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:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(c49811210.splimit)
Duel.RegisterEffect(e1,tp)
end
function c49811210.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA) and not c:IsAttribute(ATTRIBUTE_LIGHT)
end
function c49811210.tgfilter(c,tp)
return c:IsPreviousLocation(LOCATION_DECK) and c:IsPreviousControler(tp)
end
function c49811210.tgcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c49811210.tgfilter,1,nil,1-tp)
end
function c49811210.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL)
end
function c49811210.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(c49811210.cfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil)
if chk==0 then return ct>0 and Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0)>=ct and Duel.IsPlayerCanDiscardDeck(1-tp,ct) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,1-tp,ct)
end
function c49811210.tgop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c49811210.cfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil)
if ct>0 then
Duel.DiscardDeck(1-tp,ct,REASON_EFFECT)
end
end
\ No newline at end of file
--三角獣の使い魔
function c49811212.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(49811212,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,49811212)
e1:SetTarget(c49811212.sptg)
e1:SetOperation(c49811212.spop)
c:RegisterEffect(e1)
--banish
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(49811212,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,49811213)
e2:SetCost(aux.bfgcost)
e2:SetCondition(c49811212.rmcon)
e2:SetTarget(c49811212.rmtg)
e2:SetOperation(c49811212.rmop)
c:RegisterEffect(e2)
end
function c49811212.spfilter(c,e,tp)
return c:IsRace(RACE_BEAST) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c49811212.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c49811212.spfilter(chkc,e,tp) end
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(c49811212.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c49811212.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
g:AddCard(c)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,0,0)
end
function c49811212.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 then
local g=Group.FromCards(c,tc)
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:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(c49811212.splimit)
Duel.RegisterEffect(e1,tp)
end
function c49811212.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_SYNCHRO)
end
function c49811212.rmfilter(c,tp)
return c:IsPreviousLocation(LOCATION_DECK) and c:IsPreviousControler(tp)
end
function c49811212.rmcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c49811212.rmfilter,1,nil,1-tp)
end
function c49811212.cfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToRemove()
end
function c49811212.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c49811212.cfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function c49811212.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c49811212.cfilter,tp,LOCATION_DECK,0,1,1,nil)
local tg=g:GetFirst()
if tg==nil then return end
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
\ No newline at end of file
--三角獣
function c49811214.initial_effect(c)
--splimit
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(c49811214.splimit)
c:RegisterEffect(e1)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,49811214)
e1:SetCondition(c49811214.spcon)
e1:SetTarget(c49811214.sptg)
e1:SetOperation(c49811214.spop)
c:RegisterEffect(e1)
--gain effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e2:SetCondition(c49811214.efcon)
e2:SetOperation(c49811214.efop)
c:RegisterEffect(e2)
end
function c49811214.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function c49811214.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL)
end
function c49811214.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c49811214.cfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil)
end
function c49811214.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c49811214.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
if c:IsSummonLocation(LOCATION_GRAVE) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
c:RegisterEffect(e1,true)
end
local g=Duel.GetMatchingGroup(c49811214.cfilter,tp,LOCATION_REMOVED,0,nil)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(49811214,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tag=g:Select(tp,1,1,nil)
Duel.SendtoHand(tag,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tag)
end
end
end
function c49811214.efcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_SYNCHRO and e:GetHandler():GetReasonCard():IsRace(RACE_BEAST)
end
function c49811214.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
e1:SetDescription(aux.Stringid(49811214,1))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(2,49811214)
e1:SetCondition(c49811214.chcon)
e1:SetTarget(c49811214.chtg)
e1:SetOperation(c49811214.chop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(49811214,2))
end
function c49811214.chcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:GetActivateLocation()==LOCATION_GRAVE
end
function c49811214.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,rp,0,LOCATION_EXTRA,1,nil,e) end
end
function c49811214.chop(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,c49811214.repop)
end
function c49811214.repop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsDestructable,1-tp,LOCATION_EXTRA,0,nil)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DESTROY)
local sg=g:Select(1-tp,1,1,nil)
if sg:GetCount()>0 then
Duel.Destroy(sg,REASON_EFFECT)
end
end
\ No newline at end of file
--角獣の門
function c49811216.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,49811216)
e1:SetTarget(c49811216.target)
e1:SetOperation(c49811216.activate)
c:RegisterEffect(e1)
--add or special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(49811216,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1,49811217)
e2:SetCondition(c49811216.spcon)
e2:SetTarget(c49811216.sptg)
e2:SetOperation(c49811216.spop)
c:RegisterEffect(e2)
end
function c49811216.filter(c)
return (c:IsCode(63595262) or c:IsCode(64047146)) and c:IsAbleToHand()
end
function c49811216.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c49811216.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
end
function c49811216.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c49811216.filter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e1:SetTarget(c49811216.rmtarget)
e1:SetTargetRange(0xff,0xff)
e1:SetValue(LOCATION_REMOVED)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
function c49811216.rmtarget(e,c)
return c:IsType(TYPE_SPELL)
end
function c49811216.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsRace(RACE_BEAST) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
end
function c49811216.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c49811216.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c49811216.dfilter(c,e,tp,ft)
return c:IsRace(RACE_BEAST) and c:IsType(TYPE_TUNER) and (c:IsAttack(1000) or c:IsDefense(1000)) and (c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
end
function c49811216.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c49811216.dfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp,ft) end
end
function c49811216.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c49811216.dfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp,ft)
local tc=g:GetFirst()
if tc then
if ft>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,1152)==1) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
end
\ No newline at end of file
--角獣の予言
function c49811218.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,49811218)
e1:SetTarget(c49811218.target)
e1:SetOperation(c49811218.activate)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(49811218,0))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1,49811219)
e2:SetCondition(c49811218.rmcon)
e2:SetTarget(c49811218.rmtg)
e2:SetOperation(c49811218.rmop)
c:RegisterEffect(e2)
end
function c49811218.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1)
and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil) end
end
function c49811218.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerCanDiscardDeck(tp,1) then
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if tc:IsType(TYPE_SPELL) and tc:IsAbleToHand() then
Duel.DisableShuffleCheck()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ShuffleHand(tp)
else
Duel.DisableShuffleCheck()
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_REVEAL)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e1:SetTarget(c49811218.rmtarget)
e1:SetTargetRange(0xff,0xff)
e1:SetValue(LOCATION_REMOVED)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
function c49811218.rmtarget(e,c)
return c:IsType(TYPE_SPELL)
end
function c49811218.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsRace(RACE_BEAST) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
end
function c49811218.rmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c49811218.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c49811218.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c49811218.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--スタティック・フュプノコーン
function c49811220.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--atkdown
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(c49811220.atkval)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCondition(c49811220.condition)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c49811220.efilter)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_MATERIAL_CHECK)
e3:SetValue(c49811220.valcheck)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
end
function c49811220.afilter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL)
end
function c49811220.atkval(e,c)
return Duel.GetMatchingGroupCount(c49811220.afilter,e:GetHandlerPlayer(),LOCATION_REMOVED,LOCATION_REMOVED,nil)*-200
end
function c49811220.valcheck(e,c)
local g=c:GetMaterial()
if g:FilterCount(Card.IsRace,nil,RACE_BEAST)==#g then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function c49811220.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetLabel()==1
end
function c49811220.efilter(e,te)
return te:IsActiveType(TYPE_SPELL) and te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
\ No newline at end of file
......@@ -17,7 +17,7 @@ function cm.filter(c)
return c:IsCode(60002134) and c:IsAbleToHand()
end
function cm.tgfilter(c)
return c:IsType(TYPE_MONSTER) and aux.IsCodeListed(c,60002134) and c:IsAbleToHand()
return c:IsType(TYPE_MONSTER) and aux.IsCodeListed(c,60002134) and c:IsAbleToHand() and (c:IsLocation(LOCATION_GRAVE) or (c:IsLocation(LOCATION_ONFIELD) and c:IsFaceup()))
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return (chkc:IsLocation(LOCATION_GRAVE) or chkc:IsLocation(LOCATION_MZONE)) and chkc:IsControler(tp) and cm.tgfilter(chkc) end
......
......@@ -18,6 +18,7 @@ function cm.initial_effect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
......@@ -30,6 +31,20 @@ end
function cm.filter(c,e,tp)
return c:IsCode(60002134) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local b1=false
local b2=false
local b3=false
if Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_EXTRA,0,1,nil,m+1) and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,60002134) then b1=true end
if Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_EXTRA,0,1,nil,m+2) and Duel.IsPlayerCanDraw(tp,2) then b2=true end
if Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_EXTRA,0,1,nil,m+3) then b3=true end
if chk==0 then return b1 or b2 or b3 end
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(m,1)},
{b2,aux.Stringid(m,2)},
{b3,aux.Stringid(m,3)})
e:SetLabel(op)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Card.GetFlagEffect(c,60002134)~=0 and Duel.GetFlagEffect(tp,60002135)<4 then
......@@ -52,14 +67,11 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
end
if Card.GetFlagEffect(c,60002134)~=0 and Duel.GetFlagEffect(tp,60002135)>=4 then
Debug.Message("天之昭示,龙剑在此!")
local c=e:GetHandler()
Duel.Release(c,REASON_EFFECT)
local op=0
op=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2),aux.Stringid(m,3))
local op=e:GetLabel()
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
......
--星遗物-『星锥』
local cm,m,o=GetID()
function cm.initial_effect(c)
aux.AddLinkProcedure(c,cm.matfilter,1,1)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e0:SetValue(1)
c:RegisterEffect(e0)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetRange(LOCATION_EXTRA)
e0:SetTarget(cm.mattg)
e0:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e0:SetTargetRange(LOCATION_HAND,0)
e0:SetValue(cm.matval)
c:RegisterEffect(e0)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.thcon1)
e1:SetTarget(cm.thtg1)
e1:SetOperation(cm.thop1)
c:RegisterEffect(e1)
--actlimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
e2:SetValue(1)
e2:SetCondition(cm.actcon)
c:RegisterEffect(e2)
end
function cm.matfilter(c)
return c:IsLinkSetCard(0xfe) and not c:IsCode(m)
end
function cm.matval(e,lc,mg,c,tp)
if e:GetHandler()~=lc then return false,nil end
return true,true
end
function cm.mattg(e,c)
return c:IsSetCard(0xfe) and c:IsType(TYPE_MONSTER) and c:IsLevelAbove(5)
end
function cm.thcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.thfilter1(c)
return c:IsSetCard(0xfe) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(m)
end
function cm.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.actcon(e)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
end
\ No newline at end of file
--星遗物-『星剑』
local cm,m,o=GetID()
function cm.initial_effect(c)
--summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetCategory(CATEGORY_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_HAND)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e4:SetCountLimit(1,m)
e4:SetCondition(cm.sumcon)
e4:SetCost(cm.sumcost)
e4:SetTarget(cm.sumtg)
e4:SetOperation(cm.sumop)
c:RegisterEffect(e4)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(27918365,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_RELEASE)
e3:SetCountLimit(1,m+10000000)
e3:SetCondition(cm.thcon)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
--attack all
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ATTACK_ALL)
e3:SetValue(1)
c:RegisterEffect(e3)
end
function cm.sumcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()~=tp
end
function cm.cfilter(c)
return c:IsSetCard(0xfe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemoveAsCost()
end
function cm.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,c,1,0,0)
end
function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local pos=0
if c:IsSummonable(true,nil,1) then pos=pos+POS_FACEUP_ATTACK end
if c:IsMSetable(true,nil,1) then pos=pos+POS_FACEDOWN_DEFENSE end
if pos==0 then return end
if Duel.SelectPosition(tp,c,pos)==POS_FACEUP_ATTACK then
Duel.Summon(tp,c,true,nil,1)
else
Duel.MSet(tp,c,true,nil,1)
end
end
function cm.thfilter(c)
return c:IsSetCard(0xfe) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_NORMAL)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.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 cm,m,o=GetID()
function cm.initial_effect(c)
--summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetCategory(CATEGORY_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_HAND)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e4:SetCountLimit(1,m)
e4:SetCondition(cm.sumcon)
e4:SetCost(cm.sumcost)
e4:SetTarget(cm.sumtg)
e4:SetOperation(cm.sumop)
c:RegisterEffect(e4)
--normal summon/set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m+10000000)
e1:SetCondition(cm.sumcon2)
e1:SetTarget(cm.sumtg2)
e1:SetOperation(cm.sumop2)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.spcon)
e2:SetOperation(cm.kop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_CANNOT_ACTIVATE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(0,1)
e4:SetValue(cm.aclimit)
c:RegisterEffect(e4)
end
function cm.sumcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()~=tp
end
function cm.cfilter(c)
return c:IsSetCard(0xfe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemoveAsCost()
end
function cm.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,c,1,0,0)
end
function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local pos=0
if c:IsSummonable(true,nil,1) then pos=pos+POS_FACEUP_ATTACK end
if c:IsMSetable(true,nil,1) then pos=pos+POS_FACEDOWN_DEFENSE end
if pos==0 then return end
if Duel.SelectPosition(tp,c,pos)==POS_FACEUP_ATTACK then
Duel.Summon(tp,c,true,nil,1)
else
Duel.MSet(tp,c,true,nil,1)
end
end
function cm.sumcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
end
function cm.sumtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local ct=0
local ce={Duel.IsPlayerAffectedByEffect(tp,EFFECT_SET_SUMMON_COUNT_LIMIT)}
for _,te in ipairs(ce) do
ct=math.max(ct,te:GetValue())
end
return ct<7
end
end
function cm.sumop2(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SET_SUMMON_COUNT_LIMIT)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(7)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp
end
function cm.kter(c)
return c:IsFaceup()
end
function cm.kop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:Filter(cm.kter,nil):GetFirst()
while tc do
tc:RegisterFlagEffect(m,RESET_CHAIN,0,1)
tc=eg:GetNext()
end
end
function cm.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():GetFlagEffect(m)>0
end
\ No newline at end of file
--时溯之咏叹调
Duel.LoadScript("c60002355.lua")
local cm,m,o=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(Aria.ytdcost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--back
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m)
e2:SetCost(Aria.ytdcost)
e2:SetCondition(Aria.bkcon)
e2:SetTarget(Aria.bktg)
e2:SetOperation(Aria.bkop)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsSetCard(0x627) and c:IsAbleToHand() and not c:IsCode(m)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.GetCurrentChain()~=1 or Duel.GetFlagEffect(tp,60002355)<2 then
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
elseif Duel.GetCurrentChain()==1 and Duel.GetFlagEffect(tp,60002355) then
if chk==0 then return true end
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentChain()~=1 or Duel.GetFlagEffect(tp,60002355)<2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
elseif Duel.GetCurrentChain()==1 and Duel.GetFlagEffect(tp,60002355)>=2 then
Aria.StartAria(c)
end
if Duel.GetCurrentChain()>=4 then
Duel.RegisterFlagEffect(tp,70002355,RESET_PHASE+PHASE_END,0,1)
end
end
\ No newline at end of file
--达摩克里斯之咏叹调
Duel.LoadScript("c60002355.lua")
local cm,m,o=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(Aria.ytdcost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--back
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m)
e2:SetCondition(Aria.bkcon)
e2:SetCost(Aria.ytdcost)
e2:SetTarget(Aria.bktg)
e2:SetOperation(Aria.bkop)
c:RegisterEffect(e2)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.GetCurrentChain()~=1 or Duel.GetFlagEffect(tp,60002355)<2 then
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>2 end
elseif Duel.GetCurrentChain()==1 and Duel.GetFlagEffect(tp,60002355) then
if chk==0 then return true end
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentChain()~=1 or Duel.GetFlagEffect(tp,60002355)<2 then
Duel.SortDecktop(tp,1-tp,3)
elseif Duel.GetCurrentChain()==1 and Duel.GetFlagEffect(tp,60002355)>=2 then
Aria.StartAria(c)
end
if Duel.GetCurrentChain()>=4 then
Duel.RegisterFlagEffect(tp,70002355,RESET_PHASE+PHASE_END,0,1)
end
end
\ No newline at end of file
--桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀桀
Aria=Aria or {}
function Aria.ytdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.RegisterFlagEffect(tp,e:GetHandler():GetCode(),RESET_CHAIN,0,1)
Duel.RegisterFlagEffect(tp,60002355,RESET_CHAIN,0,1)
end
function Aria.bkcon(e,tp,eg,ep,ev,re,r,rp)
if c==nil then return true end
return Duel.GetFlagEffect(tp,70002355)~=0
end
function Aria.bktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,70002355)~=0 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function Aria.bkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
function Aria.StartAria(c)
local tp=c:GetControler()
if Duel.GetFlagEffect(tp,60002353)~=0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 and not Duel.IsExistingMatchingCard(Aria.fil1,tp,LOCATION_GRAVE,0,1,nil,e,tp) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,Aria.fil1,tp,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
if Duel.GetFlagEffect(tp,60002354)~=0 then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetOperation(Aria.op1)
Duel.RegisterEffect(e2,tp)
end
if Duel.GetFlagEffect(tp,60002356)~=0 then
--can't spsummon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,1)
e3:SetTarget(Aria.limit1)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
if Duel.GetFlagEffect(tp,60002357)~=0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
if Duel.GetFlagEffect(tp,60002358)~=0 then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
if Duel.GetFlagEffect(tp,60002359)~=0 then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CHANGE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetValue(Aria.val1)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e4:SetTargetRange(1,0)
e4:SetValue(Aria.val1)
e4:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e4,tp)
end
if Duel.GetFlagEffect(tp,60002360)~=0 then
if Duel.IsExistingMatchingCard(Aria.fil2,tp,LOCATION_DECK,0,1,nil,e,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,Aria.fil2,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
end
if Duel.GetFlagEffect(tp,60002361)~=0 then
if Duel.IsExistingMatchingCard(Aria.fil2,tp,LOCATION_DECK,0,1,nil,e,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,Aria.fil2,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
end
if Duel.GetFlagEffect(tp,60002362)~=0 then
if Duel.IsExistingMatchingCard(Aria.fil2,tp,LOCATION_DECK,0,1,nil,e,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,Aria.fil2,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
end
end
function Aria.fil1(c,e,tp)
return c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function Aria.fil2(c)
return c:IsSetCard(0x627) and c:IsType(TYPE_TRAP) and c:IsAbleToHand()
end
function Aria.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(60002355,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
Duel.Destroy(g:GetFirst(),REASON_EFFECT)
end
end
function Aria.limit1(e,c,sump,sumtype,sumpos,targetp)
return c:IsType(TYPE_GEMINI) or c:IsType(TYPE_DUAL)
end
function Aria.val1(e,re,val,r,rp,rc)
if bit.band(r,REASON_EFFECT)~=0 then return 0 end
return val
end
function Aria.scon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()==0
end
function Aria.stg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function Aria.sop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.MoveToField(c,tp,tp,LOCATION_MZONE,POS_FACEUP_ATTACK,true)
local e1=Effect.CreateEffect(e:GetHandler())
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_MONSTER+TYPE_LINK)
c:RegisterEffect(e1)
local b1=false
local b2=false
local b3=false
local b4=false
local b5=false
local b6=false
local b7=false
local b8=false
if not c:IsLinkMarker(0x001) then b1=true end
if not c:IsLinkMarker(0x002) then b2=true end
if not c:IsLinkMarker(0x004) then b3=true end
if not c:IsLinkMarker(0x008) then b4=true end
if not c:IsLinkMarker(0x020) then b5=true end
if not c:IsLinkMarker(0x040) then b6=true end
if not c:IsLinkMarker(0x080) then b7=true end
if not c:IsLinkMarker(0x100) then b8=true end
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(60002355,1)},
{b2,aux.Stringid(60002355,2)},
{b3,aux.Stringid(60002355,3)},
{b4,aux.Stringid(60002355,4)},
{b5,aux.Stringid(60002355,5)},
{b6,aux.Stringid(60002355,6)},
{b7,aux.Stringid(60002355,7)},
{b8,aux.Stringid(60002355,8)})
if op==1 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetRange(LOCATION_ONFIELD)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_ADD_LINK_MARKER_KOISHI)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(0x001)
c:RegisterEffect(e1)
elseif op==2 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetRange(LOCATION_ONFIELD)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_ADD_LINK_MARKER_KOISHI)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(0x002)
c:RegisterEffect(e1)
elseif op==3 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetRange(LOCATION_ONFIELD)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_ADD_LINK_MARKER_KOISHI)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(0x004)
c:RegisterEffect(e1)
elseif op==4 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetRange(LOCATION_ONFIELD)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_ADD_LINK_MARKER_KOISHI)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(0x008)
c:RegisterEffect(e1)
elseif op==5 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetRange(LOCATION_ONFIELD)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_ADD_LINK_MARKER_KOISHI)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(0x020)
c:RegisterEffect(e1)
elseif op==6 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetRange(LOCATION_ONFIELD)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_ADD_LINK_MARKER_KOISHI)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(0x040)
c:RegisterEffect(e1)
elseif op==7 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetRange(LOCATION_ONFIELD)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_ADD_LINK_MARKER_KOISHI)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(0x080)
c:RegisterEffect(e1)
elseif op==8 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetRange(LOCATION_ONFIELD)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_ADD_LINK_MARKER_KOISHI)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(0x100)
c:RegisterEffect(e1)
end
if Duel.GetFlagEffect(tp,60002355)>=2 then
Aria.StartAria(c)
end
end
function Aria.scon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()>=1
end
function Aria.BackAria(c)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler())
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_TRAP+TYPE_LINK+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
end
--虚无之咏叹调
Duel.LoadScript("c60002355.lua")
local cm,m,o=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(Aria.ytdcost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--back
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m)
e2:SetCondition(Aria.bkcon)
e2:SetCost(Aria.ytdcost)
e2:SetTarget(Aria.bktg)
e2:SetOperation(Aria.bkop)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsSetCard(0x627) and c:IsAbleToHand() and not c:IsCode(m)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetCurrentChain()~=1 or Duel.GetFlagEffect(tp,60002355)<2 then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,1)
e3:SetTarget(cm.limit)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
elseif Duel.GetCurrentChain()==1 and Duel.GetFlagEffect(tp,60002355)>=2 then
Aria.StartAria(c)
end
if Duel.GetCurrentChain()>=4 then
Duel.RegisterFlagEffect(tp,70002355,RESET_PHASE+PHASE_END,0,1)
end
end
function cm.limit(e,c,sump,sumtype,sumpos,targetp)
return c:IsType(TYPE_UNION) or c:IsType(TYPE_FLIP)
end
\ No newline at end of file
--元创之咏叹调
Duel.LoadScript("c60002355.lua")
local cm,m,o=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(Aria.ytdcost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--back
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m)
e2:SetCondition(Aria.bkcon)
e2:SetCost(Aria.ytdcost)
e2:SetTarget(Aria.bktg)
e2:SetOperation(Aria.bkop)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsSetCard(0x627) and c:IsAbleToHand() and not c:IsCode(m)
end
function cm.spcheck(g)
return g:GetClassCount(Card.GetCode)==1
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.GetCurrentChain()~=1 or Duel.GetFlagEffect(tp,60002355)<2 then
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
elseif Duel.GetCurrentChain()==1 and Duel.GetFlagEffect(tp,60002355)>=2 then
if chk==0 then return true end
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentChain()~=1 or Duel.GetFlagEffect(tp,60002355)<2 then
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 then
local ft=math.min(2,#g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local hg=g:SelectSubGroup(tp,cm.spcheck,false,1,ft)
if #hg>0 then
Duel.SendtoGrave(hg,REASON_EFFECT)
Duel.ConfirmCards(1-tp,hg)
end
end
elseif Duel.GetCurrentChain()==1 and Duel.GetFlagEffect(tp,60002355)>=2 then
Aria.StartAria(c)
end
if Duel.GetCurrentChain()>=4 then
Duel.RegisterFlagEffect(tp,70002355,RESET_PHASE+PHASE_END,0,1)
end
end
\ No newline at end of file
--赫尔维蒂之咏叹调
Duel.LoadScript("c60002355.lua")
local cm,m,o=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(Aria.ytdcost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--back
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m)
e2:SetCondition(Aria.bkcon)
e2:SetCost(Aria.ytdcost)
e2:SetTarget(Aria.bktg)
e2:SetOperation(Aria.bkop)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.GetCurrentChain()~=1 or Duel.GetFlagEffect(tp,60002355)<2 then
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
elseif Duel.GetCurrentChain()==1 and Duel.GetFlagEffect(tp,60002355)>=2 then
if chk==0 then return true end
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentChain()~=1 or Duel.GetFlagEffect(tp,60002355)<2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,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
elseif Duel.GetCurrentChain()==1 and Duel.GetFlagEffect(tp,60002355)>=2 then
Aria.StartAria(c)
end
if Duel.GetCurrentChain()>=4 then
Duel.RegisterFlagEffect(tp,70002355,RESET_PHASE+PHASE_END,0,1)
end
end
--娜卡莎之咏叹调
Duel.LoadScript("c60002355.lua")
local cm,m,o=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(Aria.ytdcost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--back
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m)
e2:SetCondition(Aria.bkcon)
e2:SetCost(Aria.ytdcost)
e2:SetTarget(Aria.bktg)
e2:SetOperation(Aria.bkop)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsSetCard(0x627) and c:IsAbleToHand() and not c:IsCode(m)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.GetCurrentChain()~=1 or Duel.GetFlagEffect(tp,60002355)<2 then
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2146)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,2146)
elseif Duel.GetCurrentChain()==1 and Duel.GetFlagEffect(tp,60002355)>=2 then
if chk==0 then return true end
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentChain()~=1 or Duel.GetFlagEffect(tp,60002355)<2 then
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
elseif Duel.GetCurrentChain()==1 and Duel.GetFlagEffect(tp,60002355)>=2 then
Aria.StartAria(c)
end
if Duel.GetCurrentChain()>=4 then
Duel.RegisterFlagEffect(tp,70002355,RESET_PHASE+PHASE_END,0,1)
end
end
\ No newline at end of file
--大梦之咏叹调
Duel.LoadScript("c60002355.lua")
local cm,m,o=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(Aria.ytdcost)
c:RegisterEffect(e1)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,m)
e3:SetCondition(Aria.scon)
e3:SetCost(Aria.ytdcost)
e3:SetTarget(Aria.stg)
e3:SetOperation(Aria.sop)
c:RegisterEffect(e3)
--bk
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m+10000000)
e3:SetCondition(Aria.scon2)
e3:SetCost(Aria.ytdcost)
e3:SetTarget(cm.stg)
e3:SetOperation(cm.sop)
c:RegisterEffect(e3)
end
function cm.stg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,60002363,0,TYPES_TOKEN_MONSTER,2000,2000,5,RACE_WYRM,ATTRIBUTE_LIGHT,POS_FACEUP) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function cm.sop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,60002363,0,TYPES_TOKEN_MONSTER,2000,2000,5,RACE_WYRM,ATTRIBUTE_LIGHT,POS_FACEUP) then return end
local token=Duel.CreateToken(tp,60002363)
if Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.GetFlagEffect(tp,60002355)>=2 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Aria.BackAria(c)
end
Duel.SpecialSummonComplete()
if Duel.GetCurrentChain()>=4 then
Duel.RegisterFlagEffect(tp,70002355,RESET_PHASE+PHASE_END,0,1)
end
end
\ No newline at end of file
--大宙之咏叹调
Duel.LoadScript("c60002355.lua")
local cm,m,o=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(Aria.ytdcost)
c:RegisterEffect(e1)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,m)
e3:SetCondition(Aria.scon)
e3:SetCost(Aria.ytdcost)
e3:SetTarget(Aria.stg)
e3:SetOperation(Aria.sop)
c:RegisterEffect(e3)
--bk
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m+10000000)
e3:SetCondition(Aria.scon2)
e3:SetCost(Aria.ytdcost)
e3:SetTarget(cm.stg)
e3:SetOperation(cm.sop)
c:RegisterEffect(e3)
end
function cm.stg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_HAND,0,1,c) and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.sop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,c)
Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.GetFlagEffect(tp,60002355)>=2 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Aria.BackAria(c)
end
Duel.SpecialSummonComplete()
if Duel.GetCurrentChain()>=4 then
Duel.RegisterFlagEffect(tp,70002355,RESET_PHASE+PHASE_END,0,1)
end
end
--大景之咏叹调
Duel.LoadScript("c60002355.lua")
local cm,m,o=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(Aria.ytdcost)
c:RegisterEffect(e1)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,m)
e3:SetCondition(Aria.scon)
e3:SetCost(Aria.ytdcost)
e3:SetTarget(Aria.stg)
e3:SetOperation(Aria.sop)
c:RegisterEffect(e3)
--bk
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m+10000000)
e3:SetCondition(Aria.scon2)
e3:SetCost(Aria.ytdcost)
e3:SetTarget(cm.stg)
e3:SetOperation(cm.sop)
c:RegisterEffect(e3)
end
function cm.stg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function cm.sop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x627))
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x627))
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.GetFlagEffect(tp,60002355)>=2 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Aria.BackAria(c)
end
Duel.SpecialSummonComplete()
if Duel.GetCurrentChain()>=4 then
Duel.RegisterFlagEffect(tp,70002355,RESET_PHASE+PHASE_END,0,1)
end
end
--古神在上
local cm,m,o=GetID()
function cm.initial_effect(c)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(cm.handcon)
c:RegisterEffect(e2)
--negate
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCondition(cm.discon)
e2:SetTarget(cm.distg)
e2:SetOperation(cm.disop)
c:RegisterEffect(e2)
end
function cm.handcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_ONFIELD,0)==0
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0)
end
end
function cm.afil(c,rc)
return (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:CheckActivateEffect(false,false,false)~=nil and not c:IsCode(rc)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local ec=re:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
ec:CancelToGrave()
if Duel.SendtoDeck(ec,nil,2,REASON_EFFECT) then
local rc=re:GetCode()
if Duel.IsExistingMatchingCard(cm.afil,tp,0,LOCATION_DECK,1,nil,rc) then
local g=Duel.GetMatchingGroup(cm.afil,tp,0,LOCATION_DECK,nil,rc):RandomSelect(tp,1,1,nil):GetFirst()
cm.ActivateCard(g,1-tp,e)
else
Duel.Draw(1-tp,1,REASON_EFFECT)
end
end
end
end
function cm.ActivateCard(c,tp,oe)
local e=c:GetActivateEffect()
local cos,tg,op=e:GetCost(),e:GetTarget(),e:GetOperation()
if e and (not cos or cos(e,tp,eg,ep,ev,re,r,rp,0)) and (not tg or tg(e,tp,eg,ep,ev,re,r,rp,0)) then
oe:SetProperty(e:GetProperty())
local code=c:GetOriginalCode()
Duel.Hint(HINT_CARD,tp,code)
Duel.Hint(HINT_CARD,1-tp,code)
e:UseCountLimit(tp,1,true)
c:CreateEffectRelation(e)
if cos then cos(e,p,eg,ep,ev,re,r,rp,1) end
if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if g and #g~=0 then
local tg=g:GetFirst()
while tg do
tg:CreateEffectRelation(e)
tg=g:GetNext()
end
end
if op then op(e,tp,eg,ep,ev,re,r,rp) end
c:ReleaseEffectRelation(e)
if g then
tg=g:GetFirst()
while tg do
tg:ReleaseEffectRelation(e)
tg=g:GetNext()
end
end
end
end
......@@ -15,7 +15,7 @@ function s.initial_effect(c)
--change
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCode(EVENT_LEAVE_FIELD_P)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetOperation(s.chop)
c:RegisterEffect(e3)
......@@ -90,32 +90,52 @@ function s.addcodeop(e,tp,eg,ep,ev,re,r,rp)
table.insert(s.codetable,re:GetHandler())
end
function s.delcodeop(e,tp,eg,ep,ev,re,r,rp)
for i,v in ipairs(s.codetable) do
table.remove(s.codetable,i)
end
s.codetable={}
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local codetable=#s.codetable
if codetable==1 then Debug.Message("素敵な劇に、素敵な観客") end
if codetable==2 then Debug.Message("空席にはしないわ") end
if codetable==3 then Debug.Message("見続ける。それが使命") end
if codetable==4 then Debug.Message("喜び、悲しみ、全部!") end
if codetable==5 then Debug.Message("視線を未来に預けるわ") end
if codetable>=6 then Debug.Message("煌めく舞台を、ずっと!") end
Duel.Recover(tp,500,REASON_EFFECT)
if codetable>=1 and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
if Duel.Draw(tp,1,REASON_EFFECT)==1 and codetable>=3 and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
if KOISHI_CHECK then
Duel.Hint(HINT_CARD,0,id+1)
c:SetEntityCode(id+1)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if dg:GetCount()>0 then
Duel.Destroy(dg,REASON_EFFECT)
end
local codenum=#s.codetable
if codenum==0 then Debug.Message("素敵な劇に、素敵な観客") end
if codenum==1 then Debug.Message("空席にはしないわ") end
if codenum==2 then Debug.Message("見続ける。それが使命") end
if codenum==3 then Debug.Message("喜び、悲しみ、全部!") end
if codenum==4 then Debug.Message("視線を未来に預けるわ") end
if codenum>=5 then Debug.Message("煌めく舞台を、ずっと!") end
if Duel.GetFlagEffect(tp,id)==0 then Duel.RegisterFlagEffect(tp,id,0,0,1) end
if Duel.IsPlayerAffectedByEffect(tp,EFFECT_CHANGE_DAMAGE)==nil then
--damage
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetLabel(tp)
e1:SetReset(0)
e1:SetValue(s.damval)
Duel.RegisterEffect(e1,tp)
end
if codenum>=1 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.Recover(tp,500,REASON_EFFECT) end
if codenum>=2 and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.Draw(tp,1,REASON_EFFECT) end
if codenum>=3 and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
if KOISHI_CHECK then
Duel.Hint(HINT_CARD,0,id+1)
c:SetEntityCode(id+1)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if dg:GetCount()>0 then
Duel.Destroy(dg,REASON_EFFECT)
end
end
end
function s.damval(e,re,val,r,rp)
local tp=e:GetLabel()
if Duel.GetFlagEffect(tp,id)==0 then return val
else
Duel.Hint(HINT_CARD,0,id)
Duel.ResetFlagEffect(tp,id)
return 0
end
end
function s.chop(e,tp,eg,ep,ev,re,r,rp)
......
--端午节的萤草
function c87090001.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,87090001)
e1:SetCost(c87090001.cost)
e1:SetTarget(c87090001.target)
e1:SetOperation(c87090001.operation)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(87090001,ACTIVITY_SPSUMMON,c87090001.counterfilter)
end
function c87090001.counterfilter(c)
return c:IsSetCard(0xafa)
end
function c87090001.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(87090001,tp,ACTIVITY_SPSUMMON)==0 and e:GetHandler():IsDiscardable() and Duel.CheckLPCost(tp,1000) end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c87090001.splimit)
Duel.RegisterEffect(e1,tp)
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
Duel.PayLPCost(tp,1000)
end
function c87090001.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xafa)
end
function c87090001.filter(c)
return c:IsSetCard(0xafa) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c87090001.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c87090001.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function c87090001.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c87090001.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler())
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
--端午节的数珠
function c87090002.initial_effect(c)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(87090002,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCountLimit(1,87090002)
e1:SetCost(c87090002.thcost)
e1:SetTarget(c87090002.thtg)
e1:SetOperation(c87090002.thop)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(87090002,ACTIVITY_SPSUMMON,c87090002.counterfilter)
end
function c87090002.counterfilter(c)
return c:IsSetCard(0xafa)
end
function c87090002.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(87090002,tp,ACTIVITY_SPSUMMON)==0 and e:GetHandler():IsDiscardable() and Duel.CheckLPCost(tp,1000) end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c87090002.splimit)
Duel.RegisterEffect(e1,tp)
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
Duel.PayLPCost(tp,1000)
end
function c87090002.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xafa)
end
function c87090002.thfilter(c)
return c:IsSetCard(0xafa) and c:IsAbleToHand() and not c:IsCode(87090002)
end
function c87090002.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c87090002.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c87090002.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c87090002.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 c87090003.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(87090003,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,87090003)
e1:SetCost(c87090003.thcost)
e1:SetTarget(c87090003.target)
e1:SetOperation(c87090003.activate)
c:RegisterEffect(e1)
--reflect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE)
e2:SetTarget(c87090003.reftg)
e2:SetValue(1)
c:RegisterEffect(e2)
end
function c87090003.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() and Duel.CheckLPCost(tp,1000) end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
Duel.PayLPCost(tp,1000)
end
function c87090003.filter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0xafa) and c:GetSequence()<5 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c87090003.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_SZONE) and c87090003.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c87090003.filter,tp,LOCATION_SZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c87090003.filter,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c87090003.activate(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)
end
end
function c87090003.reftg(e,c)
return c:IsSetCard(0xafa)
end
--端午节的虫师
function c87090004.initial_effect(c)
--todeck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(87090004,0))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,87090004)
e1:SetCondition(c87090004.descon)
e1:SetCost(c87090004.cost)
e1:SetTarget(c87090004.destg)
e1:SetOperation(c87090004.desop)
c:RegisterEffect(e1)
--atk
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xafa))
e4:SetValue(c87090004.value)
c:RegisterEffect(e4)
local e3=e4:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
end
function c87090004.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousSequence()<5
end
function c87090004.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c87090004.desfilter(c)
return (c:IsFacedown() or not c:IsSetCard(0xafa)) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c87090004.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c87090004.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c87090004.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c87090004.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c87090004.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
function c87090004.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0xafa)
end
function c87090004.value(e,c)
return Duel.GetMatchingGroupCount(c87090004.atkfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)*100
end
--端午节的小袖之手
function c87090005.initial_effect(c)
--DES
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(87090005,0))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,87090005)
e1:SetCondition(c87090005.descon)
e1:SetCost(c87090005.cost)
e1:SetTarget(c87090005.destg)
e1:SetOperation(c87090005.desop)
c:RegisterEffect(e1)
--atk
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(0,LOCATION_MZONE)
e4:SetValue(c87090005.value)
c:RegisterEffect(e4)
local e3=e4:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
end
function c87090005.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousSequence()<5
end
function c87090005.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c87090005.desfilter(c)
return (c:IsFacedown() or not c:IsSetCard(0xafa)) and c:IsType(TYPE_MONSTER)
end
function c87090005.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c87090005.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c87090005.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c87090005.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c87090005.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
function c87090005.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0xafa)
end
function c87090005.value(e,c)
return Duel.GetMatchingGroupCount(c87090005.atkfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)*-100
end
--端午节的三尾狐
function c87090006.initial_effect(c)
--set
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,87090006)
e2:SetCost(c87090006.cost)
e2:SetTarget(c87090006.target)
e2:SetOperation(c87090006.operation)
c:RegisterEffect(e2)
end
function c87090006.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c87090006.filter(c)
return c:IsSetCard(0xafa) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c87090006.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c87090006.filter,tp,LOCATION_GRAVE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function c87090006.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c87090006.filter),tp,LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler())
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
--端午节的龙舟湖
function c87090007.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--SearchCard
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(87090007,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,87090007)
e2:SetCondition(c87090007.spcon)
e2:SetTarget(c87090007.sptg)
e2:SetOperation(c87090007.spop)
c:RegisterEffect(e2)
--indes
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetRange(LOCATION_FZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xafa))
e4:SetValue(aux.indoval)
c:RegisterEffect(e4)
--cannot be target
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e5:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e5:SetRange(LOCATION_FZONE)
e5:SetTargetRange(LOCATION_MZONE,0)
e5:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xafa))
e5:SetValue(aux.tgoval)
c:RegisterEffect(e5)
--Cost Change
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD)
e8:SetCode(EFFECT_LPCOST_CHANGE)
e8:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e8:SetRange(LOCATION_FZONE)
e8:SetTargetRange(1,0)
e8:SetValue(c87090007.costchange)
c:RegisterEffect(e8)
end
function c87090007.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c87090007.thfilter(c)
return c:IsSetCard(0xafa) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c87090007.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c87090007.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c87090007.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c87090007.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 c87090007.costchange(e,re,rp,val)
if re and re:IsHasType(0xafa) and re:GetHandler():IsType(TYPE_MONSTER) then
return 0
else
return val
end
end
--端午节的觉醒兔丸
function c87090008.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,3,2,c87090008.ovfilter,aux.Stringid(87090008,0),2,c87090008.xyzop)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(87090008,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,87090008)
e1:SetCost(c87090008.spcost1)
e1:SetTarget(c87090008.sptg1)
e1:SetOperation(c87090008.spop1)
c:RegisterEffect(e1)
--Activate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(87090008,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,88090009)
e3:SetCost(c87090008.thcost)
e3:SetTarget(c87090008.target)
e3:SetOperation(c87090008.activate)
c:RegisterEffect(e3)
end
function c87090008.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.CheckLPCost(tp,1000) end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
Duel.PayLPCost(tp,1000)
end
function c87090008.filter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0xafa) and c:GetSequence()<5 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c87090008.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_SZONE) and c87090008.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c87090008.filter,tp,LOCATION_SZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c87090008.filter,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c87090008.activate(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)
end
end
function c87090008.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xafa) and not c:IsCode(87090008)
end
function c87090008.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,87090008)==0 end
Duel.RegisterFlagEffect(tp,87090008,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c87090008.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) and Duel.CheckLPCost(tp,1000) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
Duel.PayLPCost(tp,1000)
end
function c87090008.spfilter1(c,e,tp)
return c:IsSetCard(0xafa) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c87090008.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c87090008.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c87090008.spop1(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,c87090008.spfilter1,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
--端午节的觉醒萤草
function c87090009.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,3,2,c87090009.ovfilter,aux.Stringid(87090009,0),2,c87090009.xyzop)
c:EnableReviveLimit()
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(87090009,1))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,87090009)
e1:SetCost(c87090009.spcost1)
e1:SetTarget(c87090009.drtg)
e1:SetOperation(c87090009.drop)
c:RegisterEffect(e1)
--Activate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(87090009,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,88090009)
e3:SetCost(c87090009.thcost)
e3:SetTarget(c87090009.target)
e3:SetOperation(c87090009.activate)
c:RegisterEffect(e3)
end
function c87090009.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.CheckLPCost(tp,1000) end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
Duel.PayLPCost(tp,1000)
end
function c87090009.filter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0xafa) and c:GetSequence()<5 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c87090009.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_SZONE) and c87090009.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c87090009.filter,tp,LOCATION_SZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c87090009.filter,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c87090009.activate(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)
end
end
function c87090009.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xafa) and not c:IsCode(87090009)
end
function c87090009.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,87090009)==0 end
Duel.RegisterFlagEffect(tp,87090009,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c87090009.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) and Duel.CheckLPCost(tp,1000) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
Duel.PayLPCost(tp,1000)
end
function c87090009.tdfilter(c)
return c:IsSetCard(0xafa) and c:IsAbleToDeck()
end
function c87090009.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c87090009.tdfilter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(c87090009.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,3,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c87090009.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,3,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c87090009.drop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()<=0 then return end
Duel.SendtoDeck(tg,nil,0,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct>0 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--端午节的觉醒数珠
function c87090010.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,3,2,c87090010.ovfilter,aux.Stringid(87090010,0),2,c87090010.xyzop)
c:EnableReviveLimit()
--search limit
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(87090010,1))
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CUSTOM+87090010)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,87090010)
e1:SetCondition(c87090010.condition)
e1:SetCost(c87090010.cost)
e1:SetOperation(c87090010.operation)
c:RegisterEffect(e1)
if not c87090010.global_check then
c87090010.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_TO_HAND)
ge1:SetCondition(c87090010.regcon)
ge1:SetOperation(c87090010.regop)
Duel.RegisterEffect(ge1,0)
end
--Activate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(870900010,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,88090010)
e3:SetCost(c87090010.thcost)
e3:SetTarget(c87090010.target)
e3:SetOperation(c87090010.activate)
c:RegisterEffect(e3)
end
function c87090010.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.CheckLPCost(tp,1000) end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
Duel.PayLPCost(tp,1000)
end
function c87090010.filter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0xafa) and c:GetSequence()<5 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c87090010.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_SZONE) and c87090010.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c87090010.filter,tp,LOCATION_SZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c87090010.filter,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c87090010.activate(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)
end
end
function c87090010.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xafa) and not c:IsCode(87090010)
end
function c87090010.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,87090010)==0 end
Duel.RegisterFlagEffect(tp,87090010,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c87090010.cfilter(c,tp)
return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK)
end
function c87090010.regcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentPhase()==PHASE_DRAW then return false end
local v=0
if eg:IsExists(c87090010.cfilter,1,nil,0) then v=v+1 end
if eg:IsExists(c87090010.cfilter,1,nil,1) then v=v+2 end
if v==0 then return false end
e:SetLabel(({0,1,PLAYER_ALL})[v])
return true
end
function c87090010.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(eg,EVENT_CUSTOM+87090010,re,r,rp,ep,e:GetLabel())
end
function c87090010.condition(e,tp,eg,ep,ev,re,r,rp)
return ev==1-tp or ev==PLAYER_ALL
end
function c87090010.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) and Duel.CheckLPCost(tp,1000) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
Duel.PayLPCost(tp,1000)
end
function c87090010.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_TO_HAND)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetTarget(aux.TargetBoolFunction(Card.IsLocation,LOCATION_DECK))
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_DRAW)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(1,1)
Duel.RegisterEffect(e2,tp)
end
--端午节的觉醒虫师
function c87090011.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2,c87090011.ovfilter,aux.Stringid(87090011,0),2,c87090011.xyzop)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(87090011,1))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,87090011)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c87090011.discon)
e1:SetCost(c87090011.discost)
e1:SetTarget(c87090011.distg)
e1:SetOperation(c87090011.disop)
c:RegisterEffect(e1)
--Activate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(87090011,0))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,88090011)
e3:SetCost(c87090011.thcost)
e3:SetTarget(c87090011.target)
e3:SetOperation(c87090011.activate)
c:RegisterEffect(e3)
end
function c87090011.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.CheckLPCost(tp,1000) end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
Duel.PayLPCost(tp,1000)
end
function c87090011.filter(c)
return c:IsSetCard(0xafa) and c:IsType(TYPE_MONSTER) and not c:IsForbidden() and not c:IsCode(87090011)
end
function c87090011.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c87090011.filter,tp,LOCATION_GRAVE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function c87090011.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c87090011.filter),tp,LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler())
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
function c87090011.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xafa) and c:IsType(TYPE_XYZ) and not c:IsCode(87090011)
end
function c87090011.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,87090011)==0 end
Duel.RegisterFlagEffect(tp,87090011,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c87090011.discon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
return rp==1-tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev)
end
function c87090011.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) and Duel.CheckLPCost(tp,1000) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
Duel.PayLPCost(tp,1000)
end
function c87090011.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true 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 c87090011.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
--端午节的觉醒小袖之手
function c87090012.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,3,c87090012.ovfilter,aux.Stringid(87090012,0),3,c87090012.xyzop)
c:EnableReviveLimit()
--disable spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(87090012,1))
e3:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_SUMMON)
e3:SetCountLimit(1,87090012)
e3:SetCondition(c87090012.dscon)
e3:SetCost(c87090012.cost)
e3:SetTarget(c87090012.dstg)
e3:SetOperation(c87090012.dsop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON)
c:RegisterEffect(e4)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(87090012,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,88090012)
e1:SetCost(c87090012.thcost)
e1:SetTarget(c87090012.target)
e1:SetOperation(c87090012.activate)
c:RegisterEffect(e1)
end
function c87090012.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.CheckLPCost(tp,1000) end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
Duel.PayLPCost(tp,1000)
end
function c87090012.filter(c)
return c:IsSetCard(0xafa) and c:IsType(TYPE_MONSTER) and not c:IsForbidden() and not c:IsCode(87090012)
end
function c87090012.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c87090012.filter,tp,LOCATION_GRAVE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function c87090012.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c87090012.filter),tp,LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler())
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
function c87090012.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xafa) and c:IsType(TYPE_XYZ) and not c:IsCode(87090012)
end
function c87090012.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,87090012)==0 end
Duel.RegisterFlagEffect(tp,87090012,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c87090012.dscon(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0
end
function c87090012.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) and Duel.CheckLPCost(tp,1000) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
Duel.PayLPCost(tp,1000)
end
function c87090012.dstg(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 c87090012.dsop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
--端午节的觉醒三尾狐
function c87090013.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,c87090013.mfilter,c87090013.xyzcheck,2,2)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c87090013.atkval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(c87090013.defval)
c:RegisterEffect(e2)
--Activate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(87090013,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,87090013)
e3:SetCost(c87090013.thcost)
e3:SetTarget(c87090013.target)
e3:SetOperation(c87090013.activate)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(87090013,1))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,88090013)
e4:SetCondition(c87090013.spcon)
e4:SetCost(c87090013.thcost1)
e4:SetTarget(c87090013.atktg)
e4:SetOperation(c87090013.atkop)
c:RegisterEffect(e4)
end
function c87090013.mfilter(c,xyzc)
return c:IsXyzType(TYPE_XYZ)
end
function c87090013.xyzcheck(g)
return g:GetClassCount(Card.GetRank)==1
end
function c87090013.atkfilter(c)
return c:IsSetCard(0xafa) and c:GetAttack()>=0
end
function c87090013.atkval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(c87090013.atkfilter,nil)
return g:GetSum(Card.GetAttack)
end
function c87090013.deffilter(c)
return c:IsSetCard(0xafa) and c:GetDefense()>=0
end
function c87090013.defval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(c87090013.deffilter,nil)
return g:GetSum(Card.GetDefense)
end
function c87090013.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c87090013.filter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0xafa) and c:GetSequence()<5 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c87090013.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_SZONE) and c87090013.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c87090013.filter,tp,LOCATION_SZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c87090013.filter,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c87090013.activate(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)
end
end
function c87090013.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(aux.FilterEqualFunction(Card.GetSummonLocation,LOCATION_EXTRA),tp,0,LOCATION_MZONE,1,nil)
end
function c87090013.thcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) and Duel.CheckLPCost(tp,1000) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
Duel.PayLPCost(tp,1000)
end
function c87090013.filter22(c)
return c:IsSetCard(0xafa) and c:IsAbleToHand()
end
function c87090013.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c87090013.filter22(chkc) end
if chk==0 then return Duel.IsExistingTarget(c87090013.filter22,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c87090013.filter22,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c87090013.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--午夜节日恶鬼
function c87090014.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),4,4,c87090014.lcheck)
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(aux.linklimit)
c:RegisterEffect(e1)
--Destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetCondition(c87090014.desrepcon)
e2:SetTarget(c87090014.tg)
c:RegisterEffect(e2)
--atkup
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_SET_ATTACK_FINAL)
e3:SetCondition(c87090014.atkcon)
e3:SetValue(c87090014.atkval)
c:RegisterEffect(e3)
--immune
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_IMMUNE_EFFECT)
e5:SetValue(c87090014.efilter)
e5:SetCondition(c87090014.effcon)
e5:SetLabel(3)
c:RegisterEffect(e5)
--disable spsummon
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EFFECT_CANNOT_SUMMON)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetTargetRange(0,1)
e6:SetCondition(c87090014.effcon1)
e6:SetTarget(c87090014.sumlimit)
e6:SetLabel(4)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
c:RegisterEffect(e7)
end
function c87090014.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0xafa)
end
function c87090014.filter1(c)
return c:IsFaceup() and c:IsSetCard(0xafa)
end
function c87090014.desrepcon(e)
return Duel.IsExistingMatchingCard(c87090014.filter1,e:GetHandler():GetControler(),LOCATION_SZONE,0,2,nil)
end
function c87090014.tg(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c)
end
function c87090014.atkcon(e)
return Duel.IsExistingMatchingCard(c87090014.filter1,e:GetHandler():GetControler(),LOCATION_SZONE,0,3,nil)
end
function c87090014.atkval(e,c)
return c:GetBaseAttack()*2
end
function c87090014.effcon(e)
return Duel.IsExistingMatchingCard(c87090014.filter1,e:GetHandler():GetControler(),LOCATION_SZONE,0,4,nil)
end
function c87090014.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function c87090014.effcon1(e)
return Duel.IsExistingMatchingCard(c87090014.filter1,e:GetHandler():GetControler(),LOCATION_SZONE,0,5,nil)
end
function c87090014.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsAttackBelow(1000)
end
--端午节拯救“屈原”行动
function c87090015.initial_effect(c)
--set
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_LEAVE_GRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,87090015+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c87090015.spcost)
e1:SetTarget(c87090015.sptg)
e1:SetOperation(c87090015.spop)
c:RegisterEffect(e1)
end
function c87090015.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCurrentPhase()~=PHASE_MAIN2 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BP)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function c87090015.plfilter(c)
return c:IsSetCard(0xafa) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c87090015.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c87090015.plfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE)
end
function c87090015.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c87090015.plfilter,tp,LOCATION_GRAVE,0,1,ft,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
while tc do
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler())
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)
tc=g:GetNext()
end
end
end
--幻想蓝莓
function c88100101.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c88100101.ffilter,2,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToGraveAsCost,LOCATION_MZONE,0,Duel.SendtoGrave,REASON_COST)
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(c88100101.splimit)
c:RegisterEffect(e1)
end
function c88100101.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c88100101.ffilter(c,fc,sub,mg,sg)
return c:IsLevelAbove(1) and (not sg or sg:FilterCount(aux.TRUE,c)==0 or sg:IsExists(Card.IsLevel,1,c,c:GetLevel()))
end
\ No newline at end of file
--奇迹蓝莓
function c88100102.initial_effect(c)
aux.AddSynchroMixProcedure(c,aux.Tuner(nil),nil,nil,aux.NonTuner(nil),1,99,c88100102.syncheck)
c:EnableReviveLimit()
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(c88100102.splimit)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(88100102,1))
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(c88100102.sprcon)
e2:SetOperation(c88100102.sprop)
c:RegisterEffect(e2)
end
function c88100102.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO
end
function c88100102.syncheck(g)
return g:GetClassCount(Card.GetLevel)==1
end
function c88100102.sprfilter(c)
return c:IsFaceup() and c:IsAbleToGraveAsCost()
end
function c88100102.sprfilter1(c,tp,g,sc)
local lv=c:GetLevel()
return g:IsExists(c88100102.sprfilter2,1,c,tp,c,sc,lv)
end
function c88100102.sprfilter2(c,tp,mc,sc,lv)
local sg=Group.FromCards(c,mc)
return c:IsLevel(lv)
and Duel.GetLocationCountFromEx(tp,tp,sg,sc)>0
end
function c88100102.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c88100102.sprfilter,tp,LOCATION_MZONE,0,nil)
return g:IsExists(c88100102.sprfilter1,1,nil,tp,g,c)
end
function c88100102.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c88100102.sprfilter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=g:FilterSelect(tp,c88100102.sprfilter1,1,1,nil,tp,g,c)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=g:FilterSelect(tp,c88100102.sprfilter2,1,1,mc,tp,mc,c,mc:GetLevel())
g1:Merge(g2)
Duel.SendtoGrave(g1,REASON_COST)
end
\ No newline at end of file
--黑天蓝莓
function c88100103.initial_effect(c)
aux.AddXyzProcedureLevelFree(c,c88100103.mfilter,c88100103.xyzcheck,2,2)
c:EnableReviveLimit()
end
function c88100103.mfilter(c,xyzc)
return c:IsLevelAbove(1)
end
function c88100103.xyzcheck(g)
return g:GetClassCount(Card.GetLevel)==1
end
\ No newline at end of file
--逻辑蓝莓
function c88100104.initial_effect(c)
aux.AddLinkProcedure(c,c88100104.mfilter,2,2,c88100104.lcheck)
c:EnableReviveLimit()
end
function c88100104.mfilter(c)
return c:IsLevelAbove(1)
end
function c88100104.lcheck(g,lc)
return g:GetClassCount(Card.GetLevel)==1
end
\ No newline at end of file
--螺旋变升 蓝莓
function c88100105.initial_effect(c)
aux.AddXyzProcedureLevelFree(c,c88100105.mfilter,nil,3,3)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MATERIAL_CHECK)
e1:SetValue(c88100105.valcheck)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(88100105,0))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,88100105)
e2:SetCondition(c88100105.drcon)
e2:SetTarget(c88100105.drtg)
e2:SetOperation(c88100105.drop)
c:RegisterEffect(e2)
e1:SetLabelObject(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(88100105,1))
e3:SetCategory(CATEGORY_DRAW)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMING_STANDBY_PHASE+TIMING_END_PHASE+TIMING_TOGRAVE)
e3:SetCountLimit(1,88200105)
e3:SetTarget(c88100105.target)
e3:SetOperation(c88100105.operation)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(88100105,2))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetHintTiming(0,TIMING_END_PHASE)
e4:SetCountLimit(1,88300105)
e4:SetCondition(c88100105.spcon)
e4:SetTarget(c88100105.sptg)
e4:SetOperation(c88100105.spop)
c:RegisterEffect(e4)
end
function c88100105.mfilter(c,xyzc)
return c:IsRank(3)
end
function c88100105.valcheck(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local flag=0
if c:GetMaterial():FilterCount(Card.IsAttribute,nil,ATTRIBUTE_DARK)>0 then flag=flag+1 end
if c:GetMaterial():FilterCount(Card.IsAttribute,nil,ATTRIBUTE_DEVINE)>0 then flag=flag+1 end
if c:GetMaterial():FilterCount(Card.IsAttribute,nil,ATTRIBUTE_EARTH)>0 then flag=flag+1 end
if c:GetMaterial():FilterCount(Card.IsAttribute,nil,ATTRIBUTE_FIRE)>0 then flag=flag+1 end
if c:GetMaterial():FilterCount(Card.IsAttribute,nil,ATTRIBUTE_LIGHT)>0 then flag=flag+1 end
if c:GetMaterial():FilterCount(Card.IsAttribute,nil,ATTRIBUTE_WATER)>0 then flag=flag+1 end
if c:GetMaterial():FilterCount(Card.IsAttribute,nil,ATTRIBUTE_WIND)>0 then flag=flag+1 end
e:GetLabelObject():SetLabel(flag)
end
function c88100105.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c88100105.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local dr=e:GetLabel()
if chk==0 then return Duel.IsPlayerCanDraw(tp,dr) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(dr)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,dr)
end
function c88100105.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
local turnp=Duel.GetTurnPlayer()
Duel.SkipPhase(turnp,PHASE_DRAW,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(turnp,PHASE_STANDBY,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(turnp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(turnp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1,1)
Duel.SkipPhase(turnp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BP)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,turnp)
end
function c88100105.filter(c)
return c:IsCanOverlay()
end
function c88100105.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and c88100105.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c88100105.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectTarget(tp,c88100105.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
if Duel.GetCurrentPhase()==PHASE_STANDBY or Duel.GetCurrentPhase()==PHASE_END then
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
end
function c88100105.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Overlay(c,Group.FromCards(tc))
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e1:SetTarget(c88100105.distg)
e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(c88100105.discon)
e2:SetOperation(c88100105.disop)
e2:SetLabelObject(tc)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
if (Duel.GetCurrentPhase()==PHASE_STANDBY or Duel.GetCurrentPhase()==PHASE_END) and Duel.SelectYesNo(tp,aux.Stringid(88100105,3)) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
function c88100105.distg(e,c)
local tc=e:GetLabelObject()
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function c88100105.discon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return re:GetHandler():IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function c88100105.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c88100105.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayCount()>4
end
function c88100105.spfilter(c,e,tp)
return c:IsRace(RACE_PLANT) and c:IsRankAbove(10) and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCode(88100107) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c88100105.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88100105.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c88100105.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c88100105.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
local sp=0
if tc and tc:GetCode()==88100107 then
if Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)~=0 then
sp=1
end
elseif tc then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
sp=1
end
end
if sp==1 and c:IsRelateToEffect(e) then
local mg=c:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(tc,mg)
end
Duel.Overlay(tc,Group.FromCards(c))
end
end
\ No newline at end of file
--我的名字,是蓝莓!
function c88100106.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,88100106+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c88100106.cost)
e1:SetTarget(c88100106.target)
e1:SetOperation(c88100106.activate)
c:RegisterEffect(e1)
end
function c88100106.lfilter(c)
return c:IsCode(88100105)
end
function c88100106.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88100106.lfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local fc=Duel.SelectMatchingCard(tp,c88100106.lfilter,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst()
Duel.ConfirmCards(1-tp,fc)
end
function c88100106.filter(c,e,tp)
return c:IsRace(RACE_PLANT) and c:IsRank(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c88100106.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c88100106.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c88100106.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c88100106.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
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)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e3:SetValue(c88100106.fuslimit)
e3:SetRange(LOCATION_MZONE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e3:SetValue(1)
tc:RegisterEffect(e1)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
tc:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
tc:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetCode(EFFECT_CANNOT_ACTIVATE)
e6:SetTargetRange(1,0)
e3:SetValue(c88100106.aclimit)
e3:SetLabel(tc:GetCode())
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
Duel.SpecialSummonComplete()
end
function c88100106.fuslimit(e,c,st)
return st==SUMMON_TYPE_FUSION
end
function c88100106.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel())
end
\ No newline at end of file
--螺旋变升 奇迹☆蓝莓
function c88100107.initial_effect(c)
aux.AddXyzProcedureLevelFree(c,c88100107.mfilter,nil,6,6)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c88100107.imcon)
e1:SetValue(c88100107.efilter)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(88100107,0))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c88100107.discon)
e2:SetCost(c88100107.discost)
e2:SetTarget(c88100107.distg)
e2:SetOperation(c88100107.disop)
c:RegisterEffect(e2)
end
function c88100107.mfilter(c,xyzc)
return not c:IsLevel(12) and c:IsLevelAbove(1)
end
function c88100107.imcon(e)
return e:GetHandler():GetOverlayCount()>=6
end
function c88100107.efilter(e,te)
return not te:GetOwner():IsRank(12)
end
function c88100107.discon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and re:GetHandler():IsRelateToEffect(re) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c88100107.discost(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 c88100107.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c88100107.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
if c:IsRelateToEffect(e) and rc:IsRelateToEffect(re) and rc:IsCanOverlay() and c:IsType(TYPE_XYZ) then
rc:CancelToGrave()
local og=rc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(c,Group.FromCards(rc))
if c:GetOverlayGroup():Filter(Card.IsFusionType,nil,TYPE_XYZ):GetClassCount(Card.GetCode)>3 and Duel.SelectYesNo(tp,aux.Stringid(88100107,1)) then
Duel.NegateEffect(ev)
end
end
end
\ No newline at end of file
......@@ -3,127 +3,95 @@ function c9910624.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),4)
c:EnableReviveLimit()
--negate
--to graveyard
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetDescription(aux.Stringid(9910624,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c9910624.negcon)
e1:SetOperation(c9910624.negop)
e1:SetCountLimit(1,9910620)
e1:SetCondition(c9910624.tgcon)
e1:SetTarget(c9910624.tgtg)
e1:SetOperation(c9910624.tgop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c9910624.descon)
e2:SetTarget(c9910624.destg)
e2:SetOperation(c9910624.desop)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c9910624.discon)
e3:SetOperation(c9910624.disop)
c:RegisterEffect(e3)
end
function c9910624.negcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and rp==1-tp and Duel.IsChainDisablable(ev)
and e:GetHandler():GetFlagEffect(9910624)<=0
function c9910624.tgcon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler())
end
function c9910624.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c9910624.negop(e,tp,eg,ep,ev,re,r,rp)
function c9910624.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
if Duel.GetChainInfo(ev,CHAININFO_DISABLE_REASON) then return end
if not Duel.SelectYesNo(tp,aux.Stringid(9910624,0)) then return end
Duel.Hint(HINT_CARD,0,9910624)
if Duel.NegateEffect(ev) then
local g1=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
local g2=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
local sg=Group.CreateGroup()
if #g1+#g2>0 and Duel.SelectYesNo(tp,aux.Stringid(9910624,1)) then
Duel.BreakEffect()
if #g1>0 and (#g2==0 or Duel.SelectYesNo(tp,aux.Stringid(9910624,2))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg1=g1:Select(tp,1,1,nil)
Duel.HintSelection(sg1)
sg:Merge(sg1)
end
if #g2>0 and (#sg==0 or Duel.SelectYesNo(tp,aux.Stringid(9910624,3))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg2=g2:RandomSelect(tp,1)
sg:Merge(sg2)
end
Duel.Destroy(sg,REASON_EFFECT)
end
c:RegisterFlagEffect(9910625,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
tc:RegisterFlagEffect(9910624,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(9910624,1))
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9910624,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabelObject(c)
e1:SetCondition(c9910624.tgcon)
e1:SetOperation(c9910624.tgop)
e1:SetLabel(9910624)
e1:SetLabelObject(tc)
e1:SetCondition(c9910624.descon)
e1:SetOperation(c9910624.desop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
c:RegisterFlagEffect(9910624,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetValue(c9910624.imfilter)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e4)
c:RegisterFlagEffect(9910619,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(9910624,2))
end
function c9910624.imfilter(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
function c9910624.tgcon(e,tp,eg,ep,ev,re,r,rp)
function c9910624.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(9910625)~=0 then
if tc:GetFlagEffect(e:GetLabel())~=0 then
return true
else
e:Reset()
return false
end
end
function c9910624.tgop(e,tp,eg,ep,ev,re,r,rp)
function c9910624.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.SendtoGrave(tc,REASON_EFFECT)
end
function c9910624.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c9910624.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,0,1,2,nil)
local g2=Group.CreateGroup()
for tc in aux.Next(g1) do
g2:Merge(tc:GetColumnGroup())
end
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,g1:GetCount(),0,0)
function c9910624.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and Duel.IsChainDisablable(ev) and c:GetFlagEffect(9910619)>0 and c:GetFlagEffect(9910620)==0
end
function c9910624.desop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local g2=Group.CreateGroup()
for tc in aux.Next(g1) do
g2:Merge(tc:GetColumnGroup())
end
g1:Merge(g2)
if g1:GetCount()>0 then
Duel.Destroy(g1,REASON_EFFECT)
function c9910624.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.SelectEffectYesNo(tp,c,aux.Stringid(9910624,3)) then
Duel.Hint(HINT_CARD,0,9910624)
local rc=re:GetHandler()
if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then
Duel.Destroy(rc,REASON_EFFECT)
end
c:RegisterFlagEffect(9910620,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(9910624,4))
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9910624,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(9910620)
e1:SetLabelObject(c)
e1:SetCondition(c9910624.descon)
e1:SetOperation(c9910624.desop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
QutryYx = {}
function QutryYx.ExtraEffectSelect(e,tp,res)
local c=e:GetHandler()
if not c:IsOriginalSetCard(0x5954) or not (e:IsActiveType(TYPE_MONSTER) or e:IsHasType(EFFECT_TYPE_ACTIVATE)) then return end
local tep=nil
local ct=Duel.GetCurrentChain()
if ct>1 then tep=Duel.GetChainInfo(Duel.GetCurrentChain()-1,CHAININFO_TRIGGERING_PLAYER) end
local te1=Duel.IsPlayerAffectedByEffect(tp,9910951)
local b1=te1 and Duel.IsExistingMatchingCard(QutryYx.Filter1,tp,LOCATION_DECK,0,1,nil) and not c:IsCode(9910951)
local te2=Duel.IsPlayerAffectedByEffect(tp,9910953)
local b2=te2 and Duel.IsExistingMatchingCard(QutryYx.Filter2,tp,LOCATION_DECK,0,1,nil) and not c:IsCode(9910953)
local te3=Duel.IsPlayerAffectedByEffect(tp,9910955)
local b3=te3 and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) and not c:IsCode(9910955)
local te4=Duel.IsPlayerAffectedByEffect(tp,9910957)
local b4=te4 and Duel.IsExistingMatchingCard(Card.IsType,tp,0,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP)
and not c:IsCode(9910957)
local te5=Duel.IsPlayerAffectedByEffect(tp,9910963)
local b5=te5 and Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) and tep and tep==1-tp
local te6=Duel.IsPlayerAffectedByEffect(tp,9910964)
local b6=te6 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil,tp,POS_FACEDOWN)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil,tp,POS_FACEDOWN) and tep and tep==1-tp
local te7=Duel.IsPlayerAffectedByEffect(tp,9910965)
local b7=te7 and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_EXTRA,0,2,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_EXTRA,2,nil) and tep and tep==1-tp
if not (b1 or b2 or b3 or b4 or b5 or b6 or b7) or not Duel.IsExistingMatchingCard(QutryYx.Filter0,tp,LOCATION_REMOVED,0,2,nil)
or not Duel.SelectYesNo(tp,aux.Stringid(9910950,0)) then return end
local op=0
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(9910950,1)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(9910950,2)
opval[off-1]=2
off=off+1
end
if b3 then
ops[off]=aux.Stringid(9910950,3)
opval[off-1]=3
off=off+1
end
if b4 then
ops[off]=aux.Stringid(9910950,4)
opval[off-1]=4
off=off+1
end
if off>3 and (b5 or b6 or b7) then
ops[off]=aux.Stringid(9910950,8)
op=Duel.SelectOption(tp,table.unpack(ops))
if op==off-1 then
op=0
off=1
ops={}
opval={}
end
end
if b5 then
ops[off]=aux.Stringid(9910950,5)
opval[off-1]=5
off=off+1
end
if b6 then
ops[off]=aux.Stringid(9910950,6)
opval[off-1]=6
off=off+1
end
if b7 then
ops[off]=aux.Stringid(9910950,7)
opval[off-1]=7
off=off+1
end
if op==0 then op=Duel.SelectOption(tp,table.unpack(ops)) end
if res then Duel.BreakEffect() end
if opval[op]==1 then
Duel.Hint(HINT_CARD,0,9910951)
if QutryYx.ToDeck(tp,2) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,QutryYx.Filter1,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
te1:UseCountLimit(tp)
elseif opval[op]==2 then
Duel.Hint(HINT_CARD,0,9910953)
if QutryYx.ToDeck(tp,2) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,QutryYx.Filter2,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
te2:UseCountLimit(tp)
elseif opval[op]==3 then
Duel.Hint(HINT_CARD,0,9910955)
if QutryYx.ToDeck(tp,2) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
te3:UseCountLimit(tp)
elseif opval[op]==4 then
Duel.Hint(HINT_CARD,0,9910957)
if QutryYx.ToDeck(tp,2) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,0,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
te4:UseCountLimit(tp)
elseif opval[op]==5 then
Duel.Hint(HINT_CARD,0,9910963)
if QutryYx.ToDeck(tp,2) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
local tc=g:GetFirst()
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)
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)
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)
tc:RegisterEffect(e3)
end
Duel.AdjustInstantly()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
Duel.Destroy(tc,REASON_EFFECT)
end
end
te5:UseCountLimit(tp)
elseif opval[op]==6 then
Duel.Hint(HINT_CARD,0,9910964)
if QutryYx.ToDeck(tp,2) then
local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil,tp,POS_FACEDOWN)
local g2=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,nil,tp,POS_FACEDOWN)
if g1:GetCount()>0 and g2:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg1=g1:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg2=g2:Select(tp,1,1,nil)
sg1:Merge(sg2)
Duel.HintSelection(sg1)
Duel.Remove(sg1,POS_FACEDOWN,REASON_EFFECT)
end
end
te6:UseCountLimit(tp)
elseif opval[op]==7 then
Duel.Hint(HINT_CARD,0,9910965)
if QutryYx.ToDeck(tp,2) then
local turnp=Duel.GetTurnPlayer()
local g1=Duel.GetMatchingGroup(Card.IsAbleToGrave,turnp,LOCATION_EXTRA,0,nil)
local g2=Duel.GetMatchingGroup(Card.IsAbleToGrave,turnp,0,LOCATION_EXTRA,nil)
Duel.Hint(HINT_SELECTMSG,turnp,HINTMSG_TOGRAVE)
local sg1=g1:Select(turnp,2,2,nil)
Duel.Hint(HINT_SELECTMSG,1-turnp,HINTMSG_TOGRAVE)
local sg2=g2:Select(1-turnp,2,2,nil)
sg1:Merge(sg2)
if sg1:GetCount()>0 then
Duel.SendtoGrave(sg1,REASON_EFFECT)
end
end
te7:UseCountLimit(tp)
end
end
function QutryYx.Filter0(c)
return c:IsFacedown() and c:IsSetCard(0x5954) and c:IsAbleToDeck()
end
function QutryYx.Filter1(c)
return c:IsSetCard(0x5954) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function QutryYx.Filter2(c)
return c:IsSetCard(0x5954) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function QutryYx.ToDeck(tp,ct)
local oct=0
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,QutryYx.Filter0,tp,LOCATION_REMOVED,0,ct,ct,nil)
if #g==ct then
oct=Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
return oct==ct
end
......@@ -242,8 +242,10 @@
!setname 0x564 天基兵器
!setname 0x565 砾岩
!setname 0x566 虚景
!setname 0x3567 堇霆
!setname 0x5567 苍星
!setname 0x6567 澄炎
!setname 0x3568 受赐福者
#沃亚森斯奥克斯 2201771890 300 0x920
!setname 0x920 邪魂
......@@ -411,6 +413,7 @@
!setname 0x290 科兹莫
!setname 0x291 精灵王
!setname 0x3294 时钟试炼官
!setname 0x5294 炽金战兽
!setname 0x295 神迹
!setname 0x297 亡灵舰队
!setname 0x3298 堕世魔镜
......@@ -427,6 +430,7 @@
!setname 0x29d 植占
!setname 0x129d 植占师
!setname 0x29e 辉神兵装
!counter 0x290 黑暗决斗场指示物
#Real_Scl 101 0x330-0x33f
!setname 0x3330 炼金生命体
......@@ -527,6 +531,7 @@
!setname 0x3f40 Fina-Emerge Caller(终诞唤核士)
!setname 0x5f40 Fina-Emerge Ascendant(终诞核神)
!setname 0x5f41 Norvrayss(净羽渊)
!setname 0xaf41 Eijaku(瞬影)
#地狱犬 SEINE 314&907
!victory 0x60 「时计塔」效果胜利
......@@ -554,7 +559,7 @@
!counter 0x5ac0 苍炎指示物
!counter 0x131f 指示物(掠影之龙战士)
#某失智の刀客塔 3529764274 1 0xca0-0xcaf
#某失智の刀客塔 蓝毒兽 3529764274 1 0xca0-0xcaf
!setname 0xa007 ULTRAMAN
!setname 0xca1 里械仪者
!setname 0xca2 星魅
......@@ -612,6 +617,7 @@
!setname 0x97e 诡雷战
!setname 0x97f 绘舞华
!victory 0x69 「珂拉琪的拼图箱庭」特殊胜利
!counter 0x970 梦影指示物
!counter 0x1970 记忆指示物
#traveler_saga 幻旅传说
!victory 0x6a 「居合万钧切」特殊胜利
......@@ -640,22 +646,25 @@
!setname 0x823 混沌病毒
#Mio 345
!setname 0xac7 茶会
!setname 0xac9 青空下
!setname 0x345 黑金暴龙
!setname 0x345 黑金暴龙
#其空葵 其空あおい 290 0x7a0-0x7af
!setname 0x7a1 心罪
!setname 0x17a1 虚妄之心罪
!setname 0x27a1 束缚之心罪
!setname 0x37a1 正义之心罪
!setname 0x87ab 机影
!setname 0x87ac 钢铁方舟
!setname 0x87ad 战械人形
!setname 0x7ad 战械
!setname 0x17ae 源流使者
!setname 0x7ae 源流
!setname 0x17af 猩红剧团
!setname 0x87af 方舟骑士
!setname 0x77af 深海猎人
!counter 0x10ae 战术指示物
!setname 0x7a1 心罪
!setname 0x17a1 虚妄之心罪
!setname 0x27a1 束缚之心罪
!setname 0x37a1 正义之心罪
#空想上の人格保持者
!setname 0xfec1 幼龙
......@@ -727,6 +736,7 @@
!setname 0x1624 灵刀姬
!setname 0x625 迷石宫
!setname 0x1625 风海帆
!setname 0x627 咏叹调
!setname 0x628 哈伊瓦纳斯 Haiiwanas
!setname 0x629 时光酒桌
!setname 0x62a 黄昏骑士 DusKnights
......@@ -743,6 +753,8 @@
!setname 0x6a0 机凯种
!setname 0x6a5 天灯
!setname 0x6a6 财宝
!setname 0x6a8 水晶国度
!setname 0x6a9 创造物
#MEKK
!setname 0x730 圣印
......@@ -851,6 +863,9 @@
!setname 0x889 铭恶魔
!setname 0x890 铭魔王
#Lin
!setname 0x20ab 黑月铁骑
#老凤凰 2637275923 672 0x670-0x67f
!setname 0x671 结天缘
!setname 0x3671 结天缘骑
......@@ -925,6 +940,7 @@
#AD钙 537 0x530-0x53f
!setname 0x3530 惧轮
!setname 0xa530 暮辞
!setname 0xc530 枷狱
!setname 0x3531 大祭环
!setname 0x5531 迫真空手
!setname 0x6531 异赤
......@@ -1004,8 +1020,9 @@
!setname 0x707 植实兽
!setname 0x708 祭铜
!setname 0x709 深底
!setname 0x70a3 猩红庭院
!setname 0x70a5 亵渎之血肉
!setname 0x370a 猩红庭院
!setname 0x570a 亵渎之血肉
!setname 0x670a 魔骸
#银明 116
!counter 0x63 花瓣指示物
......@@ -1050,8 +1067,14 @@
!setname 0x9d1 真神兽
!setname 0x9d2 武装战姬
#神威子 750 0xe70~0xe7f
#神威子/tt 750 0xe70~0xe7f 0x750~0x75f
!setname 0xe75 火焰纹章
!setname 0x750 选择
!setname 0x751 纹章士
!setname 0x752 觉醒
!setname 0x753 苍炎之轨迹
!setname 0x754 晓之女神
!setname 0x75f 纹章呼唤
!setname 0x758 宇宙之光
!setname 0x759 赛尔计划
......@@ -1076,22 +1099,3 @@
!setname 0xcc97 虚空制裁大能(Voidictator Energy
#???
!setname 0x750 选择
!setname 0x751 纹章士
!setname 0x752 觉醒
!setname 0x753 苍炎之轨迹
!setname 0x754 晓之女神
!setname 0x75f 纹章呼唤
!setname 0x17ae 源流使者
!setname 0x7ae 源流
!counter 0x290 黑暗决斗场指示物
!setname 0xac7 茶会
!counter 0x63 花瓣指示物
!counter 0x640 镜影指示物
!setname 0x6a8 水晶国度
!setname 0x6a9 创造物
!setname 0x3568 受赐福者
!setname 0xaf41 瞬影 Eijaku
!setname 0x5294 炽金战兽
!counter 0x970 梦影指示物
!setname 0xc530 枷狱
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