Commit f79d6c4a authored by REIKAI's avatar REIKAI 💬

update 11.15

parent 926f3813
...@@ -4,8 +4,8 @@ stages: ...@@ -4,8 +4,8 @@ stages:
variables: variables:
GIT_DEPTH: "1" GIT_DEPTH: "1"
LAST_UPDATE_DATE: "2022.10.17" LAST_UPDATE_DATE: "2022.10.30"
CURRENT_UPDATE_DATE: "2022.10.30" CURRENT_UPDATE_DATE: "2022.11.15"
redtext: redtext:
stage: prepare stage: prepare
......
No preview for this file type
expansions/pics/12400006.jpg

82.2 KB | W: | H:

expansions/pics/12400006.jpg

38.2 KB | W: | H:

expansions/pics/12400006.jpg
expansions/pics/12400006.jpg
expansions/pics/12400006.jpg
expansions/pics/12400006.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/66914010.jpg

67.5 KB | W: | H:

expansions/pics/66914010.jpg

67.5 KB | W: | H:

expansions/pics/66914010.jpg
expansions/pics/66914010.jpg
expansions/pics/66914010.jpg
expansions/pics/66914010.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/66914011.jpg

52.9 KB | W: | H:

expansions/pics/66914011.jpg

52.4 KB | W: | H:

expansions/pics/66914011.jpg
expansions/pics/66914011.jpg
expansions/pics/66914011.jpg
expansions/pics/66914011.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/66914012.jpg

55.5 KB | W: | H:

expansions/pics/66914012.jpg

57.4 KB | W: | H:

expansions/pics/66914012.jpg
expansions/pics/66914012.jpg
expansions/pics/66914012.jpg
expansions/pics/66914012.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/67200351.jpg

13.3 KB | W: | H:

expansions/pics/67200351.jpg

54.9 KB | W: | H:

expansions/pics/67200351.jpg
expansions/pics/67200351.jpg
expansions/pics/67200351.jpg
expansions/pics/67200351.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/71400002.jpg

17.1 KB | W: | H:

expansions/pics/71400002.jpg

44.4 KB | W: | H:

expansions/pics/71400002.jpg
expansions/pics/71400002.jpg
expansions/pics/71400002.jpg
expansions/pics/71400002.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/71400024.jpg

50.7 KB | W: | H:

expansions/pics/71400024.jpg

46.5 KB | W: | H:

expansions/pics/71400024.jpg
expansions/pics/71400024.jpg
expansions/pics/71400024.jpg
expansions/pics/71400024.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/71400032.jpg

80.9 KB | W: | H:

expansions/pics/71400032.jpg

47.3 KB | W: | H:

expansions/pics/71400032.jpg
expansions/pics/71400032.jpg
expansions/pics/71400032.jpg
expansions/pics/71400032.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/71400034.jpg

48.1 KB | W: | H:

expansions/pics/71400034.jpg

45.2 KB | W: | H:

expansions/pics/71400034.jpg
expansions/pics/71400034.jpg
expansions/pics/71400034.jpg
expansions/pics/71400034.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/71400068.jpg

47.2 KB | W: | H:

expansions/pics/71400068.jpg

43.2 KB | W: | H:

expansions/pics/71400068.jpg
expansions/pics/71400068.jpg
expansions/pics/71400068.jpg
expansions/pics/71400068.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/71402001.jpg

44 KB | W: | H:

expansions/pics/71402001.jpg

44 KB | W: | H:

expansions/pics/71402001.jpg
expansions/pics/71402001.jpg
expansions/pics/71402001.jpg
expansions/pics/71402001.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910052.jpg

16.4 KB | W: | H:

expansions/pics/9910052.jpg

51.5 KB | W: | H:

expansions/pics/9910052.jpg
expansions/pics/9910052.jpg
expansions/pics/9910052.jpg
expansions/pics/9910052.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910056.jpg

16.4 KB | W: | H:

expansions/pics/9910056.jpg

12.3 KB | W: | H:

expansions/pics/9910056.jpg
expansions/pics/9910056.jpg
expansions/pics/9910056.jpg
expansions/pics/9910056.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910059.jpg

16.2 KB | W: | H:

expansions/pics/9910059.jpg

12.2 KB | W: | H:

expansions/pics/9910059.jpg
expansions/pics/9910059.jpg
expansions/pics/9910059.jpg
expansions/pics/9910059.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910080.jpg

14.5 KB | W: | H:

expansions/pics/9910080.jpg

10.5 KB | W: | H:

expansions/pics/9910080.jpg
expansions/pics/9910080.jpg
expansions/pics/9910080.jpg
expansions/pics/9910080.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910085.jpg

13.3 KB | W: | H:

expansions/pics/9910085.jpg

9.79 KB | W: | H:

expansions/pics/9910085.jpg
expansions/pics/9910085.jpg
expansions/pics/9910085.jpg
expansions/pics/9910085.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910088.jpg

16.1 KB | W: | H:

expansions/pics/9910088.jpg

50.8 KB | W: | H:

expansions/pics/9910088.jpg
expansions/pics/9910088.jpg
expansions/pics/9910088.jpg
expansions/pics/9910088.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910212.jpg

13.5 KB | W: | H:

expansions/pics/9910212.jpg

44.5 KB | W: | H:

expansions/pics/9910212.jpg
expansions/pics/9910212.jpg
expansions/pics/9910212.jpg
expansions/pics/9910212.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910213.jpg

16.1 KB | W: | H:

expansions/pics/9910213.jpg

11.6 KB | W: | H:

expansions/pics/9910213.jpg
expansions/pics/9910213.jpg
expansions/pics/9910213.jpg
expansions/pics/9910213.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910237.jpg

14.7 KB | W: | H:

expansions/pics/9910237.jpg

48.3 KB | W: | H:

expansions/pics/9910237.jpg
expansions/pics/9910237.jpg
expansions/pics/9910237.jpg
expansions/pics/9910237.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910285.jpg

15.9 KB | W: | H:

expansions/pics/9910285.jpg

11.6 KB | W: | H:

expansions/pics/9910285.jpg
expansions/pics/9910285.jpg
expansions/pics/9910285.jpg
expansions/pics/9910285.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910290.jpg

11.8 KB | W: | H:

expansions/pics/9910290.jpg

9.71 KB | W: | H:

expansions/pics/9910290.jpg
expansions/pics/9910290.jpg
expansions/pics/9910290.jpg
expansions/pics/9910290.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910291.jpg

13.2 KB | W: | H:

expansions/pics/9910291.jpg

10.3 KB | W: | H:

expansions/pics/9910291.jpg
expansions/pics/9910291.jpg
expansions/pics/9910291.jpg
expansions/pics/9910291.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910294.jpg

16.6 KB | W: | H:

expansions/pics/9910294.jpg

9.75 KB | W: | H:

expansions/pics/9910294.jpg
expansions/pics/9910294.jpg
expansions/pics/9910294.jpg
expansions/pics/9910294.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910300.jpg

18 KB | W: | H:

expansions/pics/9910300.jpg

13.4 KB | W: | H:

expansions/pics/9910300.jpg
expansions/pics/9910300.jpg
expansions/pics/9910300.jpg
expansions/pics/9910300.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910301.jpg

18.1 KB | W: | H:

expansions/pics/9910301.jpg

12.1 KB | W: | H:

expansions/pics/9910301.jpg
expansions/pics/9910301.jpg
expansions/pics/9910301.jpg
expansions/pics/9910301.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910302.jpg

16.8 KB | W: | H:

expansions/pics/9910302.jpg

12.1 KB | W: | H:

expansions/pics/9910302.jpg
expansions/pics/9910302.jpg
expansions/pics/9910302.jpg
expansions/pics/9910302.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910305.jpg

15.5 KB | W: | H:

expansions/pics/9910305.jpg

12.5 KB | W: | H:

expansions/pics/9910305.jpg
expansions/pics/9910305.jpg
expansions/pics/9910305.jpg
expansions/pics/9910305.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910315.jpg

19.6 KB | W: | H:

expansions/pics/9910315.jpg

14.3 KB | W: | H:

expansions/pics/9910315.jpg
expansions/pics/9910315.jpg
expansions/pics/9910315.jpg
expansions/pics/9910315.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910318.jpg

16.9 KB | W: | H:

expansions/pics/9910318.jpg

12.3 KB | W: | H:

expansions/pics/9910318.jpg
expansions/pics/9910318.jpg
expansions/pics/9910318.jpg
expansions/pics/9910318.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910320.jpg

17.3 KB | W: | H:

expansions/pics/9910320.jpg

12.4 KB | W: | H:

expansions/pics/9910320.jpg
expansions/pics/9910320.jpg
expansions/pics/9910320.jpg
expansions/pics/9910320.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910328.jpg

13.4 KB | W: | H:

expansions/pics/9910328.jpg

9.43 KB | W: | H:

expansions/pics/9910328.jpg
expansions/pics/9910328.jpg
expansions/pics/9910328.jpg
expansions/pics/9910328.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910807.jpg

15.9 KB | W: | H:

expansions/pics/9910807.jpg

51.8 KB | W: | H:

expansions/pics/9910807.jpg
expansions/pics/9910807.jpg
expansions/pics/9910807.jpg
expansions/pics/9910807.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910816.jpg

17.5 KB | W: | H:

expansions/pics/9910816.jpg

54.9 KB | W: | H:

expansions/pics/9910816.jpg
expansions/pics/9910816.jpg
expansions/pics/9910816.jpg
expansions/pics/9910816.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/field/9910059.jpg

35.9 KB | W: | H:

expansions/pics/field/9910059.jpg

80.1 KB | W: | H:

expansions/pics/field/9910059.jpg
expansions/pics/field/9910059.jpg
expansions/pics/field/9910059.jpg
expansions/pics/field/9910059.jpg
  • 2-up
  • Swipe
  • Onion skin
--多彩的从者蔷薇
local s,id,o=GetID()
function s.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(s.condition)
c:RegisterEffect(e1)
--indestructable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e2:SetTarget(s.infilter)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
c:RegisterEffect(e3)
--search
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1)
e4:SetCost(s.cost)
e4:SetTarget(s.sptg)
e4:SetOperation(s.spop)
c:RegisterEffect(e4)
end
s.has_text_rosetoken=true
function s.condition(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0):Filter(Card.IsFaceup,nil)
return g:IsExists(Card.IsCode,1,nil,11500000) and g:IsExists(Card.IsCode,1,nil,11500001) and g:IsExists(Card.IsCode,1,nil,11500002)
end
function s.infilter(e,c)
return c:IsType(TYPE_TOKEN) and c:IsSetCard(0x3d1)
end
function s.refilter(c)
return c:IsType(TYPE_TOKEN) and c:IsSetCard(0x3d1)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,s.refilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,s.refilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x3d1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function s.setfilter(c)
return c:IsSetCard(0x3d0) and (c:IsType(TYPE_TRAP) or c:IsType(TYPE_SPELL)) and c:IsSSetable()
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local sel=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) then sel=sel+1 end
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) then sel=sel+2 end
e:SetLabel(sel)
return sel~=0
end
local sel=e:GetLabel()
if sel==3 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,0))
sel=Duel.SelectOption(tp,aux.Stringid(id,0),aux.Stringid(id,1))+1
elseif sel==1 then
Duel.SelectOption(tp,aux.Stringid(id,0))
else
Duel.SelectOption(tp,aux.Stringid(id,1))
end
e:SetLabel(sel)
if sel==1 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sel=e:GetLabel()
if sel==1 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
else
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SSet(tp,tc)
Duel.ConfirmCards(1-tp,tc)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
tc:RegisterEffect(e2)
end
end
end
--从者蔷薇的秘密温室
local s,id,o=GetID()
function s.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
--remove and spsm
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33200401,0))
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCost(s.cost)
e2:SetTarget(s.rdtg)
e2:SetOperation(s.rdop)
c:RegisterEffect(e2)
end
s.has_text_rosetoken=true
--e2
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return true end
end
function s.rmfilter(c)
return c:IsRace(RACE_PLANT) and c:IsAbleToRemove()
end
function s.rdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) and ft>0
end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,3,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
e:SetLabel(g:GetCount())
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,nil,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,nil,0,0)
end
function s.rdop(e,tp,eg,ep,ev,re,r,rp)
local rc=e:GetLabel()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
if ft>3 then ft=3 end
if rc>ft then rc=ft end
if ft>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,11500000,0x3d1,TYPES_TOKEN_MONSTER,0,0,4,RACE_PLANT,ATTRIBUTE_DARK,POS_FACEUP) then
for i=1,rc do
if not Duel.SelectYesNo(tp,aux.Stringid(id,3)) then return end
op=Duel.SelectOption(tp,aux.Stringid(id,0),aux.Stringid(id,1),aux.Stringid(id,2))
local token=Duel.CreateToken(tp,11500000+op)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
end
Duel.SpecialSummonComplete()
end
end
\ No newline at end of file
--优雅从者蔷薇·紫
local s,id,o=GetID()
function s.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCost(s.thcost)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,id+10000)
e3:SetCost(s.spcost)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
--inactivatable
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_DISEFFECT+EFFECT_FLAG_CANNOT_DISABLE)
e5:SetRange(LOCATION_PZONE)
e5:SetValue(s.effectfilter)
c:RegisterEffect(e5)
end
function s.effectfilter(e,ct)
local te=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT)
local tc=te:GetHandler()
return tc:IsSetCard(0x3d1) and (tc:IsLocation(LOCATION_GRAVE) or tc:IsLocation(LOCATION_REMOVED))
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function s.thfilter(c)
return c:IsSetCard(0x3d1) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.rmfilter(c)
return c:IsRace(RACE_PLANT) and c:IsAbleToRemove()
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local sg=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_GRAVE,0,e:GetHandler())
if chk==0 then return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) and sg:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
g=sg:Select(tp,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function s.sptg(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 s.spop(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
--优雅从者蔷薇·粉
local s,id,o=GetID()
function s.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x3d1),2,true)
--spsummon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(s.sprcon)
e0:SetOperation(s.sprop)
c:RegisterEffect(e0)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(s.splimit)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,id)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
--set
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_REMOVE)
e3:SetCountLimit(1,id+10000)
e3:SetTarget(s.pentg)
e3:SetOperation(s.penop)
c:RegisterEffect(e3)
--cannot neg
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_DISEFFECT)
e4:SetRange(LOCATION_PZONE)
e4:SetValue(s.efilter)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_DISABLE)
e5:SetRange(LOCATION_PZONE)
e5:SetTargetRange(LOCATION_MZONE,0)
e5:SetTarget(s.setg)
e5:SetValue(1)
c:RegisterEffect(e5)
--spsummon
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(id,0))
e6:SetCategory(CATEGORY_SPECIAL_SUMMON)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_PZONE)
e6:SetCountLimit(1,id+20000)
e6:SetCost(s.spcost)
e6:SetTarget(s.sptg)
e6:SetOperation(s.spop)
c:RegisterEffect(e6)
end
s.has_text_rosetoken=true
function s.splimit(e,se,sp,st)
return se:GetHandler()==e:GetHandler() or bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
--special summon rule
function s.rlfilter(c)
return c:IsSetCard(0x3d1) and c:IsType(TYPE_TOKEN) and c:IsFaceup() and c:IsReleasable()
end
function s.fselect(g,tp,sc)
return g:GetClassCount(Card.GetCode)==g:GetCount() and Duel.GetLocationCountFromEx(tp,tp,g,sc)>0
end
function s.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(s.rlfilter,tp,LOCATION_MZONE,0,nil)
return g:CheckSubGroup(s.fselect,3,3,tp,c)
end
function s.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(s.rlfilter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tg=g:SelectSubGroup(tp,s.fselect,false,1,99,tp,c)
Duel.Release(tg,REASON_COST)
end
function s.efilter(e,ct)
local te=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT)
return te:GetHandler():IsSetCard(0x3d1) and te:GetHandler():IsType(TYPE_MONSTER)
end
function s.setg(e,c)
return c:IsSetCard(0x3d1) and c:IsType(TYPE_MONSTER)
end
function s.thfilter(c)
return c.has_text_rosetoken and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.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 s.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 s.relefilter(c)
return c:IsSetCard(0x3d1) and c:IsType(TYPE_MONSTER) and c:IsReleasable()
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.relefilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,s.relefilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Release(g,REASON_COST)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
\ No newline at end of file
--收获的血肉
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--spsm
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_REMOVE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,id)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(s.rmtg)
e1:SetOperation(s.rmop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+10000)
e2:SetCondition(s.con)
e2:SetTarget(s.tg)
e2:SetOperation(s.op)
c:RegisterEffect(e2)
local e7=e2:Clone()
e7:SetCode(EVENT_REMOVE)
c:RegisterEffect(e7)
--battle indestructable
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
c:RegisterEffect(e3)
--cannot release
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_UNRELEASABLE_SUM)
e4:SetValue(1)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e5)
--cannot be target
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(LOCATION_MZONE)
e6:SetValue(1)
c:RegisterEffect(e6)
end
function s.rmfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_PLANT) and c:IsAbleToRemove()
end
function s.thfilter(c)
return (c:IsSetCard(0x3d0) or c:IsSetCard(0x3d1)) and c:IsAbleToHand()
end
function s.fselect(g,tp)
return g:IsExists(Card.IsControler,1,nil,tp) and g:IsExists(Card.IsControler,1,nil,1-tp) and g:IsExists(s.rmfilter,1,nil)
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
local g2=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
if chk==0 then return g1:GetCount()>0 and g2:GetCount()>0 and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_REMOVED,0,1,nil) and (g1:IsExists(s.rmfilter,1,nil) or g2:IsExists(s.rmfilter,1,nil)) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,2,nil,LOCATION_ONFIELD+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
local g2=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
if g1:GetCount()>0 and g2:GetCount()>0 and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_REMOVED,0,1,nil) and (g1:IsExists(s.rmfilter,1,nil) or g2:IsExists(s.rmfilter,1,nil)) then
g1:Merge(g2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rmg=g1:SelectSubGroup(tp,s.fselect,false,2,2,tp)
if Duel.Remove(rmg,POS_FACEUP,REASON_EFFECT) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
if tg:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
end
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function s.tdfilter(c)
return c:IsRace(RACE_PLANT) and c:IsAbleToDeck()
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(s.tdfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,e:GetHandler())
if chk==0 then return ct>0 end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,nil,LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,e:GetHandler())
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local rmg=g:Select(tp,1,1,e:GetHandler())
local tc=rmg:GetFirst()
if Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) and tc:IsLocation(LOCATION_DECK) and e:GetHandler():IsAbleToHand() and e:GetHandler():IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
end
end
\ No newline at end of file
--单从者蔷薇花体
local s,id,o=GetID()
function s.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,s.matfilter,1,1)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCountLimit(1,id+10000)
e2:SetCondition(s.spcon2)
e2:SetTarget(s.sptg2)
e2:SetOperation(s.spop2)
c:RegisterEffect(e2)
end
function s.matfilter(c)
return c:IsLinkSetCard(0x3d1) and not c:IsLinkType(TYPE_LINK)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function s.spfilter(c,e,tp,zone)
return c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local zone=bit.band(e:GetHandler():GetLinkedZone(tp),0x1f)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,zone) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local zone=bit.band(e:GetHandler():GetLinkedZone(tp),0x1f)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp,zone)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP,zone) 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)
end
Duel.SpecialSummonComplete()
end
function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_GRAVE) and r==REASON_LINK and c:GetReasonCard():IsSetCard(0x3d1)
end
function s.sptg2(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 Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE)
end
function s.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,1,c)
if g:GetCount()>0 then
if Duel.Remove(g,POS_FACEUP,REASON_EFFECT) and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--囫囵贪食角花
local s,id,o=GetID()
function s.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_PLANT),2,99,s.lcheck)
c:EnableReviveLimit()
--ritual summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetCost(s.cost)
e1:SetTarget(s.eqtg)
e1:SetOperation(s.eqop)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(s.val)
c:RegisterEffect(e2)
end
function s.lcheck(g,lc)
return g:IsExists(s.lcfilter,1,nil,TYPE_LINK)
end
function s.lcfilter(c)
return c:IsLinkType(TYPE_LINK) and c:IsSetCard(0x3d1)
end
function s.val(e,c)
return c:GetEquipCount()*1000
end
function s.costfilter(c)
return c:IsRace(RACE_PLANT) and c:IsAbleToRemoveAsCost()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function s.eqfilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_MONSTER)
and (c:IsControler(tp) or c:IsAbleToChangeControler())
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.eqfilter(chkc,tp) and chkc~=e:GetHandler() end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,1,e:GetHandler(),tp) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,1,1,e:GetHandler(),tp)
local tc=g:GetFirst()
if Duel.Equip(tp,tc,c) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetValue(s.eqlimit)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
function s.eqlimit(e,c)
return e:GetOwner()==c
end
\ No newline at end of file
--从者蔷薇的一支
local s,id,o=GetID()
function s.initial_effect(c)
--copy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetCountLimit(1,id)
e2:SetCondition(s.con)
e2:SetCost(s.cpcost)
e2:SetTarget(s.cptg)
e2:SetOperation(s.cpop)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,id)
e3:SetCost(aux.bfgcost)
e3:SetTarget(s.thtg)
e3:SetOperation(s.thop)
c:RegisterEffect(e3)
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function s.cpfilter(c)
return c:IsType(TYPE_SPELL) and c:IsSetCard(0x3d1) and c:IsAbleToGrave()
and c:CheckActivateEffect(true,true,false)~=nil
end
function s.cpcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function s.cptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cpfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function s.cpop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.cpfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=g:Select(tp,1,1,nil):GetFirst()
Duel.SendtoGrave(tc,REASON_EFFECT)
local te,ceg,cep,cev,cre,cr,crp=tc:CheckActivateEffect(false,true,true)
if te then
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
end
end
function s.thfilter(c)
return c:IsSetCard(0x3d0) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--从者蔷薇的一朵
local s,id,o=GetID()
function s.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCost(s.thcost)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,id)
e3:SetCost(aux.bfgcost)
e3:SetTarget(s.thtg2)
e3:SetOperation(s.thop2)
c:RegisterEffect(e3)
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function s.thfilter(c)
return c:IsSetCard(0x3d1) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.thfilter2(c)
return c:IsSetCard(0x3d0) and c:IsAbleToHand()
end
function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--从者蔷薇田园计划
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--cannot be target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_ONFIELD,0)
e2:SetTarget(s.target)
e2:SetValue(1)
c:RegisterEffect(e2)
end
function s.target(e,c)
return (c:IsSetCard(0x3d0) or c:IsSetCard(0x3d1))
end
\ No newline at end of file
--枯萎从者蔷薇 失败抵价
local cm,m,o=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
if not cm.global_check then
cm.global_check=true
cm[0]=Duel.MoveToField
Duel.MoveToField=function(tc,...)
if Duel.IsPlayerAffectedByEffect(tc:GetControler(),m) then
return false
else
return cm[0](tc,...)
end
end
cm[1]=Duel.ReturnToField
Duel.ReturnToField=function(tc,...)
if Duel.IsPlayerAffectedByEffect(tc:GetControler(),m) then
return false
else
return cm[1](tc,...)
end
end
end
end
local loc_sp=LOCATION_DECK+LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND
function cm.filter(c)
return c:IsFaceup() and c:IsSetCard(0x3d1)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,0,loc_sp)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE)
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local rg=Duel.GetMatchingGroup(aux.TRUE,tp,loc_sp,0,tc)
local ct=Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
if ct>0 then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(ct*500)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PIERCE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_MUST_USE_MZONE)
e3:SetTargetRange(1,1)
e3:SetValue(0)
e3:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN)
Duel.RegisterEffect(e3,tp)
local e4=e3:Clone()
e4:SetCode(EFFECT_MAX_SZONE)
Duel.RegisterEffect(e4,tp)
local e5=e3:Clone()
e5:SetCode(EFFECT_CANNOT_ACTIVATE)
e5:SetValue(cm.aclimit)
Duel.RegisterEffect(e5,tp)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_CANNOT_SSET)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetTargetRange(1,1)
e6:SetTarget(aux.TRUE)
e6:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN)
Duel.RegisterEffect(e6,tp)
local e7=e6:Clone()
e7:SetCode(m)
Duel.RegisterEffect(e7,tp)
end
end
function cm.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
--半堕的从者蔷薇
local cm,m,o=GetID()
function cm.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,m+EFFECT_COUNT_CODE_OATH)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,nil,RACE_PLANT) end
local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,nil,RACE_PLANT)
Duel.Release(g,REASON_COST)
end
function cm.filter(c)
return c:IsSetCard(0x3d1) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
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)
end
function cm.atkf(c)
return c:IsFaceup() and c:IsAttackAbove(1)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g)
local tc=g:GetFirst()
local ag=Duel.GetMatchingGroup(cm.atkf,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if tc:GetAttack()>0 and #ag>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local sg=ag:Select(tp,1,1,nil)
local ac=sg:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(tc:GetAttack()*-1)
ac:RegisterEffect(e1)
end
end
end
--血肉之神的至高灌溉
local cm,m,o=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function cm.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function cm.filter2(c,e,tp,m,f,chkf)
return c:IsRace(RACE_PLANT) and c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function cm.fexfilter(c,e,tp)
local mg1=Duel.GetFusionMaterial(tp,LOCATION_MZONE)
mg1:AddCard(c)
return Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,tp) and c:IsType(TYPE_MONSTER) and c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetMZoneCount(tp)>0
end
function cm.frcheck(tp,sg,fc)
return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1
end
function cm.gcheck(sg)
return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if not Duel.IsPlayerCanSpecialSummonCount(tp,2) then return false end
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp,LOCATION_MZONE)
local mg2=Duel.GetMatchingGroup(cm.fexfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
if mg2:GetCount()>0 then
mg1:Merge(mg2)
aux.FCheckAdditional=cm.frcheck
aux.GCheckAdditional=cm.gcheck
else
return false
end
local res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
aux.FCheckAdditional=nil
aux.GCheckAdditional=nil
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanSpecialSummonCount(tp,2) then return end
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp,LOCATION_MZONE):Filter(cm.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(cm.fexfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
local fexc_f=false
if mg2:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local fexc=mg2:Select(tp,1,1,nil):GetFirst()
if Duel.SpecialSummonStep(fexc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
fexc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
fexc:RegisterEffect(e2)
mg1:AddCard(fexc)
Duel.SpecialSummonComplete()
fexc_f=true
end
end
Duel.BreakEffect()
if not fexc_f then return end
local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.value)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
end
end
function cm.value(e,c)
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_REMOVED,LOCATION_REMOVED)*200
end
--从者蔷薇饮血
local cm,m,o=GetID()
function cm.initial_effect(c)
--Activate(effect)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e4:SetType(EFFECT_TYPE_ACTIVATE)
e4:SetCode(EVENT_CHAINING)
e4:SetCondition(cm.condition2)
e4:SetCost(cm.cost)
e4:SetTarget(cm.target2)
e4:SetOperation(cm.activate2)
c:RegisterEffect(e4)
end
function cm.conf(c)
return c:IsFaceup() and c:IsSetCard(0x3d1)
end
function cm.condition(e,tp)
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0):Filter(Card.IsFaceup,nil)
return #g==g:FilterCount(cm.conf,nil)
end
function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
return re and rp~=tp and Duel.IsChainNegatable(ev) and cm.condition(e,tp)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_GRAVE,LOCATION_GRAVE,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsAbleToRemove() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function cm.activate2(e,tp,eg,ep,ev,re,r,rp)
if not cm.condition(e,tp) then return end
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)~=0 then
Duel.BreakEffect()
local flag=true
local flag_s=false
local gg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
if #gg>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=gg:Select(tp,2,2,nil)
flag=(Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)~=0)
flag_s=Duel.GetOperatedGroup():IsExists(Card.IsRace,1,nil,RACE_PLANT)
end
local rg=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil)
if flag and #rg>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=rg:Select(tp,2,2,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
flag_s=flag_s or Duel.GetOperatedGroup():IsExists(Card.IsRace,1,nil,RACE_PLANT)
end
local spg=Duel.GetMatchingGroup(cm.spf,tp,LOCATION_DECK,LOCATION_DECK,nil,e,tp)
if flag_s and #spg>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=spg:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function cm.spf(c,e,tp)
return c:IsSetCard(0x3d1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
\ No newline at end of file
--血肉祭礼
local cm,m,o=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function cm.filter(c,e,tp)
return c:IsRace(RACE_PLANT) and 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 chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
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,cm.filter,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 cm.thfilter(c)
return c:IsSetCard(0x3d1) and c:IsType(TYPE_SPELL) 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 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g)
Duel.SetLP(tp,math.floor(Duel.GetLP(tp)/2))
end
end
--黑从者蔷薇·痛苦代价
local cm,m,o=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+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.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.sptarget)
e2:SetOperation(cm.spoperation)
c:RegisterEffect(e2)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_GRAVE+LOCATION_HAND,0,nil)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function cm.spf(c,e,tp)
return c:IsSetCard(0x3d1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetMZoneCount(tp)>0
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_GRAVE+LOCATION_HAND,0,nil)
if g:GetCount()>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 and Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,LOCATION_REMOVED)>1 then
local sg=Duel.GetMatchingGroup(cm.spf,tp,LOCATION_DECK,0,nil,e,tp)
if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local ct=2
if (sg:GetClassCount(Card.GetCode)>1 and Duel.IsPlayerAffectedByEffect(tp,59822133)) or Duel.GetMZoneCount(tp)<2 then
ct=1
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local spg=sg:SelectSubGroup(tp,aux.dncheck,false,1,ct)
for tc in aux.Next(spg) do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
tc=g:GetNext()
end
Duel.SpecialSummonComplete()
end
end
end
function cm.costfilter(c)
return c:IsRace(RACE_PLANT) and c:IsAbleToRemoveAsCost()
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local g1=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_MZONE,0,1,1,nil)
g:Merge(g1)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.filter(c,e,tp)
return c:IsSetCard(0x3d1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptarget(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_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.spoperation(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,cm.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--红从者蔷薇·诱惑角
local cm,m,o=GetID()
function cm.initial_effect(c)
--toga
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES+CATEGORY_REMOVE)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_HAND)
e5:SetCountLimit(1,m)
e5:SetCost(cm.tgcost)
e5:SetTarget(cm.tgtg)
e5:SetOperation(cm.tgop)
c:RegisterEffect(e5)
--lv
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_GRAVE_ACTION+CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.rmtg)
e2:SetOperation(cm.rmop)
c:RegisterEffect(e2)
end
function cm.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,2) and Duel.IsPlayerCanDiscardDeck(1-tp,2) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,PLAYER_ALL,2)
end
function cm.mf(c)
return c:IsType(TYPE_MONSTER) and c:IsLocation(LOCATION_GRAVE) and c:IsAbleToRemove()
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetDecktopGroup(tp,2)
local g2=Duel.GetDecktopGroup(1-tp,2)
g1:Merge(g2)
Duel.DisableShuffleCheck()
Duel.SendtoGrave(g1,REASON_EFFECT)
local og=Duel.GetOperatedGroup()
local sg=og:Filter(cm.mf,nil)
if #sg>0 then Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) end
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetMatchingGroup(cm.mf,tp,LOCATION_GRAVE,LOCATION_GRAVE,e:GetHandler())
return #g>0
end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE)
end
function cm.spf(c,e,tp)
return c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.mf,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
if #sg>0 and Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)~=0 then
local spg=Duel.GetMatchingGroup(cm.spf,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil,e,tp)
if #spg>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=spg:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--蓝从者蔷薇·培养师
local cm,m,o=GetID()
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCost(cm.rmcost)
e2:SetTarget(cm.rmtg)
e2:SetOperation(cm.rmop)
c:RegisterEffect(e2)
end
function cm.spcostfilter(c)
return c:IsAbleToRemoveAsCost() and c:IsSetCard(0x3d1,0x3d0)
end
function cm.spcheck(sg,tp)
return Duel.GetMZoneCount(tp)>0 and aux.gfcheck(sg,Card.IsSetCard,0x3d1,0x3d0)
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(cm.spcostfilter,tp,LOCATION_GRAVE,0,c)
return g:CheckSubGroup(cm.spcheck,2,2,tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(cm.spcostfilter,tp,LOCATION_GRAVE,0,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:SelectSubGroup(tp,cm.spcheck,true,2,2,tp)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_COST)
g:DeleteGroup()
end
function cm.rmcost(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 cm.mf(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetMatchingGroup(cm.mf,tp,LOCATION_GRAVE,0,nil)
return #g>0
end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE)
end
function cm.spf(c,e,tp)
return c:IsSetCard(0x3d1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.mf,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,2,nil)
if #sg>0 and Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)~=0 then
local spg=Duel.GetMatchingGroup(cm.spf,tp,LOCATION_REMOVED,0,nil,e,tp)
if #spg>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=spg:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--暗从者蔷薇·供奉
local cm,m,o=GetID()
function cm.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,m+o)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
end
function cm.filter(c)
return c:IsLevel(4) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_PLANT) and c:IsAbleToHand()
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
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)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,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 cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.filter1(c)
return c:IsSetCard(0x3d0) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,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.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
\ No newline at end of file
--血从者蔷薇·秋
local cm,m,o=GetID()
function cm.initial_effect(c)
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_TOGRAVE+CATEGORY_DECKDES+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(cm.thcost)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--return
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetTarget(cm.retg)
e2:SetOperation(cm.reop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
--Immune
--cannot release
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_UNRELEASABLE_SUM)
e4:SetValue(1)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(LOCATION_MZONE)
e6:SetValue(aux.tgoval)
c:RegisterEffect(e6)
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil)
if chk==0 then return g:CheckSubGroup(cm.thcheck,2,2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=g:SelectSubGroup(tp,cm.thcheck,false,2,2)
Duel.SetTargetCard(sg)
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsAbleToGrave() and c:IsSetCard(0x3d1,0x3d0)
end
function cm.thcheck(sg)
return aux.gfcheck(sg,Card.IsSetCard,0x3d1,0x3d0)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil)
if chk==0 then return g:CheckSubGroup(cm.thcheck,2,2) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()==2 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SET)
local tg=sg:RandomSelect(1-tp,1)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.SendtoGrave(sg-tg,REASON_EFFECT)
end
end
function cm.filter1(c)
return c:IsAbleToDeck()
end
function cm.retg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,c) and c:IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_REMOVED)
end
function cm.reop(e,tp,eg,ep,ev,re,r,rp)
local tc=nil
local c=e:GetHandler()
if c:IsRelateToEffect(e) then tc=c end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.filter1,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,tc)
if g:GetCount()>0 and Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0 and tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--血蔷薇从者·月华
local cm,m,o=GetID()
function cm.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFunRep(c,11500026,cm.fusion_spell,2,2,true,true)
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.fuslimit)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(cm.rmcost)
e1:SetTarget(cm.rmtg)
e1:SetOperation(cm.rmop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(cm.hspcon)
e2:SetOperation(cm.hspop)
c:RegisterEffect(e2)
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(cm.efilter)
c:RegisterEffect(e3)
--Search
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,0))
e4:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_HANDES)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCost(cm.thcost)
e4:SetTarget(cm.thtg)
e4:SetOperation(cm.thop)
c:RegisterEffect(e4)
end
function cm.fusion_spell(c)
return c:IsOnField() and c:IsSetCard(0x3d1) and c:IsType(TYPE_MONSTER)
end
function cm.rmcostfilter(c)
return c:IsRace(RACE_PLANT) and c:IsAbleToRemoveAsCost()
end
function cm.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rmcostfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.rmcostfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,2,0,0)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g1==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil)
g1:Merge(g2)
Duel.HintSelection(g1)
Duel.Remove(g1,POS_FACEUP,REASON_EFFECT)
end
function cm.cfpfilter_code(c)
return c:IsCode(11500026) and c:IsAbleToRemoveAsCost()
end
function cm.cfpfilter_race(c)
return (c:IsRace(RACE_PLANT) or c:IsRace(RACE_FIEND)) and c:IsAbleToRemoveAsCost()
end
function cm.spcheck(sg)
return aux.gfcheck(sg,Card.IsRace,RACE_PLANT,RACE_FIEND)
end
function cm.hspcon(e,c)
if c==nil then return true end
local g=Duel.GetMatchingGroup(cm.cfpfilter_race,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
return Duel.IsExistingMatchingCard(cm.cfpfilter_code,tp,LOCATION_MZONE,0,1,nil) and g:CheckSubGroup(cm.spcheck,2,2)
end
function cm.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g1=Duel.SelectMatchingCard(tp,cm.cfpfilter_code,tp,LOCATION_MZONE,0,1,1,nil)
local g=Duel.GetMatchingGroup(cm.cfpfilter_race,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=g:SelectSubGroup(tp,cm.spcheck,false,2,2,tp)
g1:Merge(g2)
c:SetMaterial(g1)
Duel.Remove(g1,POS_FACEUP,REASON_COST)
end
function cm.thcheck(sg)
return sg:IsExists(Card.IsRace,1,nil,RACE_PLANT) and sg:GetClassCount(Card.GetControler)>1
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
if chk==0 then return g:CheckSubGroup(cm.thcheck,2,2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=g:SelectSubGroup(tp,cm.thcheck,false,2,2)
Duel.Remove(rg,POS_FACEUP,REASON_COST)
end
function cm.thfilter(c)
return c:IsSetCard(0x3d0,0x3d1) 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)
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
--从者蔷薇·血肉寄生者
local cm,m,o=GetID()
function cm.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--Equip
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.eqtg)
e2:SetOperation(cm.eqop)
c:RegisterEffect(e2)
--Remove
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE+CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m+o)
e3:SetCost(cm.rmcost)
e3:SetTarget(cm.rmtg)
e3:SetOperation(cm.rmop)
c:RegisterEffect(e3)
end
function cm.spcfilter(c)
return c:IsSetCard(0x3d1) and c:IsFaceup() and c:IsAttackAbove(1)
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spcfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,cm.spcfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
end
end
function cm.desf(c,e)
local tp=e:GetOwnerPlayer()
return c:IsFaceup() and c:IsSetCard(0x3d1) and c:IsDestructable(e) and Duel.IsExistingMatchingCard(cm.eqfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil,c:GetOriginalRace(),tp)
end
function cm.eqfilter(c,race,tp)
return c:IsType(TYPE_MONSTER) and c:GetOriginalRace()==race and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.desf,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler(),e) end
local g=Duel.GetMatchingGroup(cm.desf,tp,LOCATION_MZONE,LOCATION_MZONE,sc,e)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,1,g,0,LOCATION_MZONE)
end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
local sc=nil
local c=e:GetHandler()
if c:IsRelateToEffect(e) then sc=c end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,cm.desf,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,sc,e)
if g:GetCount()>0 then
if Duel.Destroy(g,REASON_EFFECT)~=0 and sc and sc:IsFaceup() then
local tc=g:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,cm.eqfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,tc:GetOriginalRace(),tp)
local ec=g:GetFirst()
if not ec then return end
if not Duel.Equip(tp,ec,sc) then return end
--Add Equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(cm.eqlimit)
ec:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(ec)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(2000)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
ec:RegisterEffect(e2)
end
end
end
function cm.eqlimit(e,c)
return e:GetOwner()==c
end
function cm.rfilter(c,tp)
return c:IsReleasable() and bit.band(c:GetOriginalType(),TYPE_MONSTER)~=0 and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c:GetRace()) and c:IsAttackAbove(1) and (c:IsRace(RACE_PLANT) or c:IsLocation(LOCATION_SZONE))
end
function cm.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
local fg=Duel.GetMatchingGroup(cm.rfilter,tp,LOCATION_MZONE,0,nil,tp)
local eqg=e:GetHandler():GetEquipGroup():Filter(cm.rfilter,nil,tp)
fg:Merge(eqg)
if chk==0 then return #fg>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=fg:Select(tp,1,1,nil)
Duel.Release(g,REASON_COST)
Duel.SetTargetCard(g)
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local rec=Duel.GetFirstTarget()
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec)
local g=Duel.GetMatchingGroup(Card.IsRace,tp,LOCATION_MZONE,LOCATION_MZONE,nil,rec:GetRace())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc then
Duel.Recover(tp,tc:GetAttack(),REASON_EFFECT)
local g=Duel.GetMatchingGroup(Card.IsRace,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tc:GetRace())
if #g>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
end
...@@ -32,8 +32,7 @@ function cm.initial_effect(c) ...@@ -32,8 +32,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_EXTRA) e1:SetRange(LOCATION_GRAVE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
e1:SetCost(cm.dcost) e1:SetCost(cm.dcost)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
...@@ -43,7 +42,7 @@ function cm.initial_effect(c) ...@@ -43,7 +42,7 @@ function cm.initial_effect(c)
--to hand --to hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1)) e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_REMOVE) e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
...@@ -76,7 +75,7 @@ end ...@@ -76,7 +75,7 @@ end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then if chk==0 then
return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,true) return c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end end
...@@ -139,7 +138,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -139,7 +138,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg) Duel.HintSelection(sg)
Duel.Remove(sg,POS_FACEUP,REASON_RULE) Duel.SendtoGrave(sg,POS_FACEUP,REASON_RULE)
end end
end end
end end
......
...@@ -50,8 +50,7 @@ function cm.initial_effect(c) ...@@ -50,8 +50,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_EXTRA) e1:SetRange(LOCATION_GRAVE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
e1:SetCost(cm.dcost) e1:SetCost(cm.dcost)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
...@@ -142,7 +141,7 @@ end ...@@ -142,7 +141,7 @@ end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then if chk==0 then
return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,true) return c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end end
......
...@@ -30,8 +30,7 @@ function cm.initial_effect(c) ...@@ -30,8 +30,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_EXTRA) e1:SetRange(LOCATION_GRAVE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
e1:SetCost(cm.dcost) e1:SetCost(cm.dcost)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
...@@ -83,7 +82,7 @@ end ...@@ -83,7 +82,7 @@ end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then if chk==0 then
return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,true) return c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end end
......
...@@ -16,16 +16,19 @@ function cm.initial_effect(c) ...@@ -16,16 +16,19 @@ function cm.initial_effect(c)
e1:SetTarget(cm.thtg) e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop) e1:SetOperation(cm.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--revive --
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1)) e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE) e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,m+10000+EFFECT_COUNT_CODE_DUEL) e3:SetHintTiming(TIMING_DAMAGE_STEP+TIMING_END_PHASE)
e3:SetCondition(cm.spcon) e3:SetCountLimit(1,m+10000)
e3:SetTarget(cm.sptg) e3:SetCondition(aux.dscon)
e3:SetOperation(cm.spop) e3:SetTarget(cm.atktg)
e3:SetOperation(cm.atkop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.matfilter(c) function cm.matfilter(c)
...@@ -52,20 +55,23 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,20 +55,23 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.cfilter(c) function cm.atkfilter(c)
return c:IsFaceup() and c:IsRace(RACE_THUNDER) return c:IsFaceup() and c:IsSetCard(0x32a0)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and cm.atkfilter(chkc) end
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end if chk==0 then return Duel.IsExistingTarget(cm.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end end
end end
\ No newline at end of file
--闪辉龙 凯旋龙
local m=30005200
local cm=_G["c"..m]
function cm.initial_effect(c)
--fusion summon
c:EnableReviveLimit()
aux.AddFusionProcMix(c,false,false,cm.fs1,cm.fs2,cm.fs3)
--material limit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_MATERIAL_LIMIT)
e0:SetValue(cm.matlimit)
c:RegisterEffect(e0)
--spsummon condition
local e01=Effect.CreateEffect(c)
e01:SetType(EFFECT_TYPE_SINGLE)
e01:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e01:SetCode(EFFECT_SPSUMMON_CONDITION)
e01:SetValue(aux.fuslimit)
c:RegisterEffect(e01)
--Effect 1
local e02=Effect.CreateEffect(c)
e02:SetDescription(aux.Stringid(m,0))
e02:SetCategory(CATEGORY_NEGATE)
e02:SetType(EFFECT_TYPE_QUICK_O)
e02:SetCode(EVENT_CHAINING)
e02:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e02:SetRange(LOCATION_MZONE)
e02:SetCountLimit(1)
e02:SetCondition(cm.discon)
e02:SetTarget(cm.distg)
e02:SetOperation(cm.disop)
c:RegisterEffect(e02)
--Effect 2
local e12=Effect.CreateEffect(c)
e12:SetDescription(aux.Stringid(m,1))
e12:SetCategory(CATEGORY_DESTROY)
e12:SetType(EFFECT_TYPE_QUICK_O)
e12:SetCode(EVENT_CHAINING)
e12:SetRange(LOCATION_MZONE)
e12:SetCountLimit(1)
e12:SetCondition(cm.descon)
e12:SetTarget(cm.destg)
e12:SetOperation(cm.desop)
c:RegisterEffect(e12)
--Effect 3
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOEXTRA)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_REMOVED)
e2:SetCountLimit(1)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
--fusion summon
function cm.fs1(c)
return c:IsFusionAttribute(ATTRIBUTE_LIGHT)
end
function cm.fs2(c)
return c:IsFusionAttribute(ATTRIBUTE_LIGHT) or c:IsFusionType(TYPE_FUSION)
end
function cm.fs3(c)
return c:IsFusionType(TYPE_FUSION)
end
function cm.matlimit(e,c,fc,st)
if st~=SUMMON_TYPE_FUSION then return true end
return c:IsControler(fc:GetControler()) and c:IsLocation(LOCATION_ONFIELD+LOCATION_HAND)
end
--Effect 1
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) 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)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
--Effect 2
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
return re:IsActiveType(TYPE_FUSION)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
--Effect 3
function cm.tdfilter(c)
local b1=c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)
return c:IsType(TYPE_FUSION) and b1 and c:IsAbleToExtra()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and cm.tdfilter(chkc) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(cm.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,c) and c:IsAbleToExtra() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,c,1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) then
local g=Group.FromCards(c,tc)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
--薛定谔的猫
local m=30900600
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,30900604)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,0))
e4:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_HAND)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1)
e4:SetCondition(cm.ddcon)
e4:SetTarget(cm.ddtg)
e4:SetOperation(cm.ddop)
c:RegisterEffect(e4)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_HAND)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetCondition(cm.ddcon1)
e3:SetTarget(cm.ddtg1)
e3:SetOperation(cm.ddop1)
c:RegisterEffect(e3)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,2))
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetCondition(cm.thcon2)
e5:SetTarget(cm.thtg2)
e5:SetOperation(cm.thop2)
c:RegisterEffect(e5)
end
function cm.ddcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DRAW
end
function cm.ddfilter(c,tp)
return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK)
end
function cm.ddtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(cm.ddfilter,nil,tp)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function cm.ddop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(cm.ddfilter,nil,tp)
if g:GetCount()>0 then
Duel.ConfirmCards(1-tp,g)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.ShuffleDeck(tp)
Duel.BreakEffect()
Duel.Draw(tp,g:GetCount(),REASON_EFFECT)
end
end
function cm.ddcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DRAW
end
function cm.ddfilter1(c,tp)
return c:IsControler(1-tp) and c:IsPreviousLocation(LOCATION_DECK)
end
function cm.ddtg1(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(cm.ddfilter1,nil,tp)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function cm.ddop1(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(cm.ddfilter1,nil,tp)
if g:GetCount()>0 then
Duel.ConfirmCards(tp,g)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.ShuffleDeck(1-tp)
Duel.BreakEffect()
Duel.Draw(1-tp,g:GetCount(),REASON_EFFECT)
end
end
function cm.thcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT)) and c:IsPreviousPosition(POS_FACEUP)
end
function cm.thfilter2(c)
return c:IsCode(30900604) and c:IsAbleToHand()
end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter2,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=30900601
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,30900604)
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,0))
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetTarget(cm.target)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e1:SetRange(LOCATION_SZONE)
e1:SetCost(cm.cost)
e1:SetCondition(cm.condition)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCondition(aux.damcon1)
e2:SetCost(cm.effcost)
e2:SetOperation(cm.operation1)
c:RegisterEffect(e2)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,1))
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetCondition(cm.thcon2)
e5:SetTarget(cm.thtg2)
e5:SetOperation(cm.thop2)
c:RegisterEffect(e5)
end
function cm.effcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetLabel(cid)
e1:SetValue(cm.damcon)
e1:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e1,tp)
end
function cm.damcon(e,re,val,r,rp,rc)
local cc=Duel.GetCurrentChain()
if cc==0 or bit.band(r,REASON_EFFECT)==0 then return end
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
if cid==e:GetLabel() then return 0 end
return val
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(cm.descon)
e1:SetOperation(cm.desop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN,1)
c:SetTurnCounter(0)
c:RegisterEffect(e1)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
ct=ct+1
c:SetTurnCounter(ct)
if ct==1 then
Duel.Destroy(c,REASON_RULE)
end
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetBattleDamage(tp)>0
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e1,tp)
end
function cm.thcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT)) and c:IsPreviousPosition(POS_FACEUP)
end
function cm.thfilter2(c)
return c:IsCode(30900604) and c:IsAbleToHand()
end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter2,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
--麦克斯韦小妖
local m=30900602
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,30900604)
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:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e3=e1:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCondition(cm.drcon)
e2:SetTarget(cm.drtg)
e2:SetOperation(cm.drop)
c:RegisterEffect(e2)
end
function cm.thfilter(c)
return aux.IsCodeListed(c,30900604) and c:IsType(TYPE_SPELL+TYPE_TRAP) 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
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.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)
end
\ No newline at end of file
--拉普拉斯妖
local m=30900603
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,30900604)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>2 end
end
function cm.filter(c)
return (aux.IsCodeListed(c,30900604) and c:IsType(TYPE_SPELL+TYPE_TRAP) or c:IsCode(30900604)) and c:IsAbleToHand()
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return end
local g=Duel.GetDecktopGroup(tp,3)
Duel.ConfirmCards(tp,g)
if g:IsExists(cm.filter,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:FilterSelect(tp,cm.filter,1,1,nil)
Duel.DisableShuffleCheck()
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
Duel.SortDecktop(tp,tp,2)
else Duel.SortDecktop(tp,tp,3) end
end
function cm.desfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function cm.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 cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
end
end
--物理统一理论
local m=30900605
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,30900604)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,m)
e2:SetCost(cm.cost)
e2:SetTarget(cm.target)
e2:SetOperation(cm.activate)
c:RegisterEffect(e2)
end
function cm.thfilter(c)
return (aux.IsCodeListed(c,30900604) and c:IsType(TYPE_MONSTER) or c:IsCode(30900604)) 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
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST)
end
function cm.setfilter(c)
return aux.IsCodeListed(c,30900604) and c:IsSSetable()
and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsType(TYPE_CONTINUOUS)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft<=0 then return end
if ft>=2 then ft=2 end
local g=Duel.GetMatchingGroup(cm.setfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,ft)
if sg:GetCount()>0 then
Duel.SSet(tp,sg)
end
end
end
\ No newline at end of file
--不平等交易
local m=30900606
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.spfilter2(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and cm.spfilter2(chkc,e,tp) end
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsExistingTarget(cm.spfilter2,tp,0,LOCATION_GRAVE,2,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.spfilter2,tp,0,LOCATION_GRAVE,2,2,e:GetHandler(),e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if ft<2 or g:GetCount()~=2 or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
local tc=g:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,1-tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
if Duel.SpecialSummonComplete() then
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsCanBeSpecialSummoned),tp,LOCATION_GRAVE,0,nil,e,0,tp,false,false,POS_FACEUP,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=sg:Select(tp,1,1,nil):GetFirst()
if Duel.SpecialSummonStep(sc,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)
sc: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)
sc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
end
end
\ No newline at end of file
--奇迹的天使
local m=30900607
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2)
--fusion
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+m)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.filter0(c)
return c:IsOnField() and c:IsAbleToRemove()
end
function cm.filter1(c,e)
return c:IsOnField() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function cm.filter2(c,e,tp,m,f,chkf)
if not (c:IsType(TYPE_FUSION) and aux.IsMaterialListType(c,TYPE_SYNCHRO) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)) then return false end
aux.FCheckAdditional=c.synchro_fusion_check or cm.fcheck
local res=c:CheckFusionMaterial(m,nil,chkf)
aux.FCheckAdditional=nil
return res
end
function cm.filter4(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function cm.fcheck(tp,sg,fc)
return sg:IsExists(Card.IsFusionType,1,nil,TYPE_SYNCHRO)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(cm.filter0,nil)
local mg2=Duel.GetMatchingGroup(cm.filter4,tp,LOCATION_GRAVE,0,nil)
mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_ONFIELD+LOCATION_GRAVE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(cm.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(cm.filter4,tp,LOCATION_GRAVE,0,nil)
mg1:Merge(mg2)
local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
aux.FCheckAdditional=tc.synchro_fusion_check or cm.fcheck
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
aux.FCheckAdditional=nil
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(1,0)
e2:SetTarget(cm.splimit2)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function cm.splimit2(e,c)
return not c:IsType(TYPE_FUSION) and c:IsLocation(LOCATION_EXTRA)
end
function cm.cfilter(c,g)
return c:IsFaceup() and c:IsType(TYPE_FUSION) and c:IsSummonType(SUMMON_TYPE_FUSION) and g:IsContains(c)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetHandler():GetLinkedGroup()
return lg and eg:IsExists(cm.cfilter,1,nil,lg) and not eg:IsContains(e:GetHandler())
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.spop(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)
end
--失忆
local m=30900608
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if Duel.Remove(g,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local c=e:GetHandler()
local og=Duel.GetOperatedGroup()
local fid=c:GetFieldID()
local tc=og:GetFirst()
while tc do
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,1,fid)
tc=og:GetNext()
end
c:SetTurnCounter(0)
og:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(og)
e1:SetCondition(cm.retcon)
e1:SetOperation(cm.retop)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1)
Duel.RegisterEffect(e1,tp)
end
end
function cm.retfilter(c,fid)
return c:GetFlagEffectLabel(m)==fid
end
function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()==tp then return false end
local g=e:GetLabelObject()
if not g:IsExists(cm.retfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
ct=ct+1
c:SetTurnCounter(ct)
if ct==1 then
local g=e:GetLabelObject()
local sg=g:Filter(cm.retfilter,nil,e:GetLabel())
g:DeleteGroup()
local tc=sg:GetFirst()
while tc do
Duel.ReturnToField(tc)
tc=sg:GetNext()
end
end
end
\ No newline at end of file
--云王
local m=30900609
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableCounterPermit(0xc8f)
--Effect 1
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SUMMON_PROC)
e2:SetCondition(cm.ntcon)
c:RegisterEffect(e2)
--Effect 2
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetCondition(cm.adcon)
e3:SetTarget(cm.adtg1)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_DISABLE_EFFECT)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_SET_ATTACK_FINAL)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e5:SetCondition(cm.adcon)
e5:SetTarget(cm.adtg2)
e5:SetValue(10)
c:RegisterEffect(e5)
--Effect 3
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e12:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e12:SetRange(LOCATION_MZONE)
e12:SetCode(EFFECT_DESTROY_REPLACE)
e12:SetTarget(cm.desreptg)
c:RegisterEffect(e12)
--Effect 4
local e31=Effect.CreateEffect(c)
e31:SetType(EFFECT_TYPE_SINGLE)
e31:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e31:SetCode(EFFECT_UPDATE_ATTACK)
e31:SetRange(LOCATION_MZONE)
e31:SetValue(cm.atkval)
c:RegisterEffect(e31)
--Effect 5
local e15=Effect.CreateEffect(c)
e15:SetDescription(aux.Stringid(m,1))
e15:SetCategory(CATEGORY_DAMAGE)
e15:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e15:SetCode(EVENT_PHASE+PHASE_STANDBY)
e15:SetRange(LOCATION_MZONE)
e15:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e15:SetCountLimit(1)
e15:SetCondition(cm.damcon)
e15:SetCost(cm.damcost)
e15:SetTarget(cm.damtg)
e15:SetOperation(cm.damop)
c:RegisterEffect(e15)
end
--Effect 1
function cm.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and c:IsLevelAbove(5)
and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
--Effect 2
function cm.adcon(e)
local c=e:GetHandler()
return Duel.GetAttacker()==c and c:GetBattleTarget()
and (Duel.GetCurrentPhase()==PHASE_DAMAGE or Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL)
end
function cm.adtg1(e,c)
return c==e:GetHandler():GetBattleTarget()
end
function cm.adtg2(e,c)
return c==e:GetHandler():GetBattleTarget() or c==e:GetHandler()
end
--Effect 3
function cm.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsReason(REASON_REPLACE) and c:IsFaceup()
and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0
and (c:IsReason(REASON_BATTLE) or rp==1-tp) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
local dis=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0xe000e0)
Duel.Hint(HINT_ZONE,tp,dis)
local zone=dis
if tp==1 then
zone=((zone&0xffff)<<16)|((zone>>16)&0xffff)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE_FIELD)
e1:SetValue(zone)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
Duel.BreakEffect()
c:AddCounter(0xc8f,1)
return true
else return false end
end
--Effect 4
function cm.atkval(e,c)
local ct=e:GetHandler():GetCounter(0xc8f)
return ct*1000
end
--Effect 5
function cm.damcon(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetHandler():GetCounter(0xc8f)
return Duel.GetTurnPlayer()==e:GetHandlerPlayer() and ct>=4
end
function cm.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
local ec=e:GetHandler()
if chk==0 then return ec:IsReleasable() end
Duel.Release(ec,REASON_COST)
end
function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(4000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,4000)
end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
--花房的少女 萨莲娜
function c30901000.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,30901000+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c30901000.spcon)
e1:SetValue(c30901000.spval)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(30901000,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,30901001)
e2:SetTarget(c30901000.sptg1)
e2:SetOperation(c30901000.spop1)
c:RegisterEffect(e2)
end
function c30901000.linkedfilter(c)
return c:IsFaceup() and c:IsRace(RACE_PLANT) and c:IsType(TYPE_LINK)
end
function c30901000.checkzone(tp)
local zone=0
local g=Duel.GetMatchingGroup(c30901000.linkedfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
for tc in aux.Next(g) do
zone=bit.bor(zone,tc:GetLinkedZone(tp))
end
return bit.band(zone,0x1f)
end
function c30901000.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local zone=c30901000.checkzone(tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
end
function c30901000.spval(e,c)
local tp=c:GetControler()
local zone=c30901000.checkzone(tp)
return 0,zone
end
function c30901000.tgfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xc81) and c:IsLevelAbove(2) and c:IsLinkState()
and Duel.IsExistingMatchingCard(c30901000.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode())
end
function c30901000.spfilter(c,e,tp,code)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c30901000.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c30901000.tgfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c30901000.tgfilter,tp,LOCATION_MZONE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c30901000.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c30901000.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
local code=tc:GetCode()
local g=Duel.GetMatchingGroup(c30901000.spfilter,tp,LOCATION_DECK,0,nil,e,tp,code)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=g:Select(tp,1,1,nil):GetFirst()
if Duel.SpecialSummonStep(sc,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)
sc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c30901000.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c30901000.splimit(e,c)
return not c:IsRace(RACE_PLANT)
end
--花房的少女 萨莲娜
local m=30901001
local cm=_G["c"..m]
function cm.initial_effect(c)
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)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(cm.target)
e2:SetValue(500)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(m,ACTIVITY_SUMMON,cm.lkfilter)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.lkfilter1)
end
function cm.lkfilter(c)
return not ( c:IsCode(m) and c:IsSummonType(SUMMON_TYPE_NORMAL))
end
function cm.lkfilter1(c)
return not ( c:IsCode(m) and c:IsSummonType(SUMMON_TYPE_SPECIAL))
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SUMMON)>0 or Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)>0
end
function cm.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 cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.cfilter(c,code)
return c:IsFaceup() and c:IsCode(code) and c:IsSetCard(0xc81)
end
function cm.target(e,c)
return Duel.IsExistingMatchingCard(cm.cfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,c,c:GetCode())
end
--日照的花少女 保拉
local m=30901002
local cm=_G["c"..m]
function cm.initial_effect(c)
--Special Summon self
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)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg1)
e1:SetOperation(cm.spop1)
c:RegisterEffect(e1)
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_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+m)
e2:SetCondition(cm.spcon2)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsFaceup() and c:IsSetCard(0xc81)
end
function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc) end
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local code=tc:GetOriginalCode()
if not (c:IsRelateToEffect(e) and tc:IsRelateToEffect(e)) then return end
if Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(code)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
end
function cm.cfilter2(c,tp)
return c:IsFaceup() and c:IsCode(m) and c:IsControler(tp)
end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(cm.cfilter2,1,nil,tp)
end
function cm.thfilter(c)
return c:IsSetCard(0xc81) and c:IsType(TYPE_SPELL+TYPE_TRAP) 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
--信赖的花少女 奥黛特
local m=30901003
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.tgcost)
e1:SetOperation(cm.tgop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m+m)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.tgfilter(c)
return c:IsSetCard(0xc81) and c:IsLevelBelow(4) and not c:IsCode(m) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function cm.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
e:SetLabel(g:GetFirst():GetCode())
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(e:GetLabel())
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetLabelObject(e1)
e1:SetOperation(cm.rstop)
c:RegisterEffect(e1)
end
function cm.cfilter1(c,tp)
return c:IsFaceup() and c:IsSetCard(0xc81) and Duel.IsExistingMatchingCard(cm.cfilter2,tp,LOCATION_MZONE,0,1,c,c:GetCode())
end
function cm.cfilter2(c,code)
return c:IsFaceup() and c:IsCode(code)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter1,tp,LOCATION_MZONE,0,1,nil,tp)
end
function cm.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 cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
end
end
--佳花的花少女 阿奈尔玛
function c30901004.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(30901004,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c30901004.spcon)
e1:SetTarget(c30901004.sptg)
e1:SetOperation(c30901004.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(30901004,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,30901004)
e2:SetCondition(c30901004.spcon2)
e2:SetTarget(c30901004.sptg2)
e2:SetOperation(c30901004.spop2)
c:RegisterEffect(e2)
end
function c30901004.spcfilter(c)
return c:IsCode(30901004) and c:IsFaceup()
end
function c30901004.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c30901004.spcfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c30901004.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 c30901004.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c30901004.cfilter2(c,tp)
return c:IsFaceup() and c:IsCode(30901004) and c:IsControler(tp)
end
function c30901004.spcon2(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c30901004.cfilter2,1,nil,tp)
end
function c30901004.spfilter(c,e,tp)
return c:IsCode(30901004) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c30901004.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c30901004.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c30901004.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c30901004.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--向日葵的陆莲花少女 劳妮
local m=30901005
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.EnableChangeCode(c,30901006,LOCATION_MZONE+LOCATION_GRAVE)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetType(EFFECT_TYPE_XMATERIAL)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(cm.val)
e3:SetCondition(cm.gfcon)
c:RegisterEffect(e3)
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)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
end
function cm.gfcon(e)
return e:GetHandler():IsSetCard(0xc81)
end
function cm.val(e,c)
return Duel.GetMatchingGroupCount(Card.IsCode,c:GetControler(),LOCATION_GRAVE,0,nil,30901006)*1000
end
function cm.cfilter1(c,tp)
return c:IsFaceup() and c:IsSetCard(0xc81) and Duel.IsExistingMatchingCard(cm.cfilter2,tp,LOCATION_MZONE,0,1,c,c:GetCode())
end
function cm.cfilter2(c,code)
return c:IsFaceup() and c:IsCode(code)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter1,tp,LOCATION_MZONE,0,1,nil,tp)
end
function cm.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 cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--盛暑的陆莲花少女 玛琉卡
local m=30901006
local cm=_G["c"..m]
function cm.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.spcfilter(c)
return c:IsCode(m) and c:IsFaceup()
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.spcfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.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 cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.tgfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0xc81)
end
function cm.matfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xc81) and c:IsCanOverlay()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and cm.tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.tgfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(cm.matfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,cm.matfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.Overlay(tc,g)
end
end
end
--陆莲花的花少女 艾莎
local m=30901007
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_PLANT),3,3,cm.lcheck)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(cm.target)
e1:SetValue(cm.atkval)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.sptg2)
e2:SetOperation(cm.spop2)
c:RegisterEffect(e2)
end
function cm.cfilter(c,code)
return c:IsFaceup() and c:IsCode(code) and c:IsSetCard(0xc81)
end
function cm.target(e,c)
return Duel.IsExistingMatchingCard(cm.cfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,c,c:GetCode())
end
function cm.atkfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsCode(30901007)
end
function cm.atkval(e,c)
return Duel.GetMatchingGroupCount(cm.atkfilter,c:GetControler(),LOCATION_MZONE,0,nil)*500
end
function cm.lcheck(g,lc)
return g:GetClassCount(Card.GetLinkCode)==1
end
function cm.filter(c,e,tp)
return c:IsSetCard(0xc81) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local zone=bit.band(c:GetLinkedZone(tp),0x1f)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.gfilter(c,e,tp,code)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local zone=bit.band(c:GetLinkedZone(tp),0x1f)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)
if zone==0 or ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local tg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.gfilter),tp,LOCATION_GRAVE,0,nil,e,tp,tc:GetCode(),zone)
local g=nil
if tg:GetCount()>ft then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g=tg:Select(tp,ft,ft,nil)
else
g=tg
end
if g:GetCount()>0 then
local tc=g:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP,zone)
tc=g:GetNext()
end
Duel.SpecialSummonComplete()
end
end
\ No newline at end of file
--早开的花少女 琵娅
function c30901008.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c30901008.mfilter,1,1)
c:EnableReviveLimit()
--splimit
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c30901008.regcon)
e1:SetOperation(c30901008.regop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(30901008,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCondition(c30901008.thcon)
e2:SetTarget(c30901008.thtg)
e2:SetOperation(c30901008.thop)
c:RegisterEffect(e2)
end
function c30901008.mfilter(c)
return c:IsLevelBelow(4) and c:IsLinkSetCard(0xc81)
end
function c30901008.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c30901008.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
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(c30901008.splimit)
Duel.RegisterEffect(e1,tp)
end
function c30901008.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsCode(30901008) and bit.band(sumtype,SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK
end
function c30901008.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c30901008.thfilter(c)
return c:IsSetCard(0xc81) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c30901008.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c30901008.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c30901008.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c30901008.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c30901008.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and
Duel.SendtoHand(tc,nil,REASON_EFFECT)
then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(tc:GetCode())
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(1,0)
e2:SetTarget(c30901008.splimit2)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
function c30901008.splimit2(e,c)
return not c:IsRace(RACE_PLANT)
end
--幻苍的陆莲花 艾莎
local m=30901009
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,cm.mfilter,cm.xyzcheck,2,2)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_BECOME_TARGET)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_NEGATE+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m+m)
e3:SetCondition(cm.discon)
e3:SetCost(cm.cost)
e3:SetTarget(cm.distg)
e3:SetOperation(cm.disop)
c:RegisterEffect(e3)
end
function cm.mfilter(c,xyzc)
return (c:IsXyzLevel(xyzc,4) or c:IsRank(4)) and c:IsRace(RACE_PLANT)
end
function cm.xyzcheck(g)
return g:GetClassCount(Card.GetCode)==1
end
function cm.spfilter(c,e,tp)
return c:IsCode(30901009) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Recover(tp,ev,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
and e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,m)
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():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function cm.spfilter1(c,e,tp)
return c:IsCode(30901007) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.spfilter1),tp,LOCATION_GRAVE,0,nil,e,tp)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--陆莲花的开花
local m=30901010
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.condition)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetCondition(cm.condition1)
e3:SetTarget(cm.nametg)
e3:SetOperation(cm.nameop)
c:RegisterEffect(e3)
end
function cm.cfilter(c,tp)
return c:IsFaceup() and not c:IsType(TYPE_TOKEN) and c:IsRace(RACE_PLANT) and Duel.IsExistingMatchingCard(cm.cfilter2,tp,LOCATION_MZONE,0,1,c,c:GetCode())
end
function cm.cfilter2(c,code)
return c:IsFaceup() and c:IsCode(code)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil,tp)
end
function cm.filter(c)
return c:IsSetCard(0xc81) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,0))
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.filter),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)
Duel.ShuffleDeck(tp)
end
end
function cm.condition1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function cm.namefilter(c,code)
return c:IsFaceup() and not c:IsCode(code) and c:IsRace(RACE_PLANT)
end
function cm.cfilter1(c)
return c:IsFaceup() and c:IsSetCard(0xc81)
and Duel.IsExistingMatchingCard(cm.namefilter,0,LOCATION_MZONE,LOCATION_MZONE,1,c,c:GetCode())
end
function cm.nametg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.cfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.cfilter1,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
Duel.SelectTarget(tp,cm.cfilter1,tp,LOCATION_MZONE,0,1,1,nil)
end
function cm.nameop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local code=tc:GetCode()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2))
local g=Duel.SelectMatchingCard(tp,cm.namefilter,tp,LOCATION_MZONE,0,1,1,tc,code)
local sc=g:GetFirst()
if sc then
Duel.HintSelection(g)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(tc:GetCode())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
sc:RegisterEffect(e1)
end
end
end
\ No newline at end of file
--陆莲花的绽放
local m=30901011
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(cm.reptg)
e2:SetValue(cm.repval)
e2:SetOperation(cm.repop)
c:RegisterEffect(e2)
end
function cm.counterfilter(c)
return c:IsSetCard(0xc81)
end
function cm.filter1(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0xc81)
and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp,c:GetCode())
end
function cm.filter2(c,e,tp,code)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsCode(e:GetLabel()) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
e:SetLabel(g:GetFirst():GetCode())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK+LOCATION_HAND)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local code=tc:GetCode()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp,code)
if g:GetCount()>0 and
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(1,0)
e2:SetTarget(cm.splimit2)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
end
function cm.splimit2(e,c)
return not c:IsRace(RACE_PLANT)
end
function cm.repfilter(c,tp)
return c:IsFaceup() and c:IsRace(RACE_FAIRY) and c:IsLocation(LOCATION_MZONE)
and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(cm.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function cm.repval(e,c)
return cm.repfilter(c,e:GetHandlerPlayer())
end
function cm.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
\ No newline at end of file
--陆莲花的发芽
local m=30901012
local cm=_G["c"..m]
function cm.initial_effect(c)
--activate
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.filter(c,e,tp)
return c:IsLevelBelow(4) and c:IsSetCard(0xc81) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.thfilter(c,code)
return c:IsOriginalCodeRule(code) and c:IsAbleToHand()
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil,tc:GetOriginalCodeRule())
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
--陆莲花的反击
local m=30901013
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,m)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.settg)
e2:SetOperation(cm.setop)
c:RegisterEffect(e2)
end
function cm.cfilter1(c,tp)
return c:IsFaceup() and c:IsSetCard(0xc81) and Duel.IsExistingMatchingCard(cm.cfilter2,tp,LOCATION_MZONE,0,1,c,c:GetCode())
end
function cm.cfilter2(c,code)
return c:IsFaceup() and c:IsCode(code)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter1,tp,LOCATION_MZONE,0,1,nil,tp)
end
function cm.target(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)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function cm.spcfilter1(c,tp,ec)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and c:IsRace(RACE_PLANT)
and Duel.IsExistingMatchingCard(cm.spcfilter2,tp,LOCATION_GRAVE,0,2,Group.FromCards(ec,c),c:GetCode())
end
function cm.spcfilter2(c,code)
return c:IsCode(code) and c:IsAbleToRemoveAsCost()
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.spcfilter1,tp,LOCATION_GRAVE,0,1,c,tp,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.spcfilter1,tp,LOCATION_GRAVE,0,1,1,c,tp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,cm.spcfilter2,tp,LOCATION_GRAVE,0,2,2,Group.FromCards(c,g:GetFirst()),g:GetFirst():GetCode())
g:Merge(g2)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSSetable() end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SSet(tp,c)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1)
end
end
--陆莲花的羁绊
local m=30901014
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCost(cm.thcost)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,41830888)
e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.sptg2)
e2:SetOperation(cm.spop2)
c:RegisterEffect(e2)
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter1,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.thfilter1,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,nil,REASON_COST)
local code=g:GetFirst():GetCode()
e:SetLabel(code)
end
function cm.thfilter1(c,tp)
return c:IsSetCard(0xc81) and Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end
function cm.thfilter2(c,cd)
return c:IsCode(cd) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local code=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter2,tp,LOCATION_DECK,0,1,2,nil,code)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.spfilter1(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0xc81)
and Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,e:GetHandler(),e,tp,c:GetCode())
end
function cm.spfilter2(c,e,tp,code)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.spfilter1(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.spfilter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.spfilter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,tc:GetCode())
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--陆莲花的信赖
local m=30901015
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(cm.condition)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xc81))
e2:SetValue(cm.indesval)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DECKDES)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,m)
e4:SetTarget(cm.target)
e4:SetOperation(cm.activate)
c:RegisterEffect(e4)
end
function cm.cfilter1(c,tp)
return c:IsFaceup() and c:IsSetCard(0xc81) and Duel.IsExistingMatchingCard(cm.cfilter2,tp,LOCATION_MZONE,0,1,c,c:GetCode())
end
function cm.cfilter2(c,code)
return c:IsFaceup() and c:IsCode(code)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter1,tp,LOCATION_MZONE,0,1,nil,tp)
end
function cm.indesval(e,re,rp)
return rp~=e:GetHandlerPlayer()
end
function cm.tgfilter(c)
return c:IsFaceup() and c:IsSetCard(0xc81) and Duel.IsExistingMatchingCard(cm.cfilter,c:GetControler(),LOCATION_DECK,0,1,nil,c)
end
function cm.cfilter(c,tc)
return c:IsSetCard(0xc81) and not c:IsCode(tc:GetCode()) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.tgfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_DECK,0,1,1,nil,tc)
if g:GetCount()>0 then
local gc=g:GetFirst()
if Duel.SendtoGrave(gc,REASON_EFFECT)~=0 and gc:IsLocation(LOCATION_GRAVE) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(gc:GetCode())
tc:RegisterEffect(e1)
end
end
end
\ No newline at end of file
--花园的陆莲花少女 麦丽丝
function c30901016.initial_effect(c)
aux.AddLinkProcedure(c,c30901016.mfilter,1,1)
c:EnableReviveLimit()
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(30901016,2))
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetCountLimit(1)
e5:SetTarget(c30901016.nmtg)
e5:SetOperation(c30901016.nmop)
c:RegisterEffect(e5)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(30901016,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(c30901016.atkcon)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c30901016.atktg)
e1:SetOperation(c30901016.atkop)
c:RegisterEffect(e1)
end
function c30901016.mfilter(c)
return c:IsLevelBelow(4) and c:IsLinkRace(RACE_PLANT)
end
function c30901016.nmfilter(c,cd)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsType(TYPE_EFFECT)
and c:IsSetCard(0xc81) and not c:IsCode(cd)
end
function c30901016.nmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local cd=e:GetHandler():GetCode()
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(tp) and c30901016.nmfilter(chkc,cd) end
if chk==0 then return Duel.IsExistingTarget(c30901016.nmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,cd) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c30901016.nmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,cd)
end
function c30901016.nmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and (tc:IsLocation(LOCATION_GRAVE) or tc:IsFaceup()) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(tc:GetOriginalCode())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function c30901016.cfilter1(c,tp)
return c:IsFaceup() and c:IsSetCard(0xc81) and Duel.IsExistingMatchingCard(c30901016.cfilter2,tp,LOCATION_MZONE,0,1,c,c:GetCode())
end
function c30901016.cfilter2(c,code)
return c:IsFaceup() and c:IsCode(code)
end
function c30901016.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c30901016.cfilter1,tp,LOCATION_MZONE,0,1,nil,tp)
end
function c30901016.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c30901016.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
--寂海的住民 唤雨人鱼
local s,id,o=GetID()
Duel.LoadScript("c33201150.lua")
function s.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(s.settg)
e1:SetOperation(s.setop)
c:RegisterEffect(e1)
--effect gain
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:SetLabelObject(e1)
e2:SetLabel(id)
e2:SetCondition(Mermaid_VHisc.effcon)
e2:SetOperation(Mermaid_VHisc.effop)
c:RegisterEffect(e2)
end
s.VHisc_Mermaid=true
--e1
function s.smfilter(c,e,tp)
return c.VHisc_Mermaid and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Mermaid_VHisc.fgck(e:GetHandler(),id) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(s.smfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Mermaid_VHisc.flagc(e:GetHandler(),id)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and e:GetHandler():IsRelateToEffect(e) and Duel.IsExistingMatchingCard(s.smfilter,tp,LOCATION_HAND,0,1,nil,e,tp) then
Mermaid_VHisc.sp(e:GetHandler(),tp)
if e:GetHandler():IsLocation(LOCATION_SZONE) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.smfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
--寂海的公主 席拉
local s,id,o=GetID()
Duel.LoadScript("c33201150.lua")
function s.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(s.settg)
e1:SetOperation(s.setop)
c:RegisterEffect(e1)
--effect gain
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:SetLabelObject(e1)
e2:SetCondition(Mermaid_VHisc.effcon)
e2:SetOperation(Mermaid_VHisc.effop)
c:RegisterEffect(e2)
end
s.VHisc_Mermaid=true
--set
function s.thfilter(c)
return c:IsFaceup() and c:IsAbleToHand()
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Mermaid_VHisc.fgck(e:GetHandler(),id) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Mermaid_VHisc.flagc(e:GetHandler(),id)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_ONFIELD)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and e:GetHandler():IsRelateToEffect(e) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) then
Mermaid_VHisc.sp(e:GetHandler(),tp)
if e:GetHandler():IsLocation(LOCATION_SZONE) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
end
end
--寂海的守护神 波塞冬
local s,id,o=GetID()
Duel.LoadScript("c33201150.lua")
function s.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,33201150,s.ffilter,1,true,true)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e1:SetRange(LOCATION_SZONE+LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCondition(Mermaid_VHisc.ftdcon)
e1:SetTarget(s.tdtg)
e1:SetOperation(s.tdop)
c:RegisterEffect(e1)
end
s.VHisc_Mermaid=true
--fusion
function s.ffilter(c)
return c.VHisc_Mermaid and c:IsRace(RACE_AQUA)
end
--toextra
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) and e:GetHandler():IsAbleToExtra() and Duel.IsPlayerCanDraw(tp,1) end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
if Duel.Destroy(g,REASON_EFFECT) then
Duel.BreakEffect()
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0
and c:IsLocation(LOCATION_EXTRA) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
end
\ No newline at end of file
--弗拉·毛罗的海图
local s,id,o=GetID()
Duel.LoadScript("c33201150.lua")
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.settg)
e1:SetOperation(s.setop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_DECK)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id)
e2:SetCondition(s.scon)
e2:SetTarget(s.stg)
e2:SetOperation(s.sop)
c:RegisterEffect(e2)
end
--set
function s.thfilter(c)
return c.VHisc_Mermaid and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>1 and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Mermaid_VHisc.sp(g:GetFirst(),tp)
end
end
end
--e2
function s.cfilter(c,tp)
return c.VHisc_Mermaid and c:IsType(TYPE_FUSION) and c:GetPreviousControler()==tp and c:IsLocation(LOCATION_EXTRA)
end
function s.scon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp)
end
function s.stg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function s.sop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,tp,REASON_EFFECT)
end
end
\ No newline at end of file
--寂海龙之力 萝莱莉
local s,id,o=GetID()
Duel.LoadScript("c33201150.lua")
function s.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,33201150,s.ffilter,2,true,true)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,id)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCondition(Mermaid_VHisc.ftdcon)
e1:SetTarget(s.smtg)
e1:SetOperation(s.smop)
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:SetRange(LOCATION_SZONE)
e2:SetValue(s.efilter)
c:RegisterEffect(e2)
end
s.VHisc_Mermaid=true
--fusion
function s.ffilter(c,fc,sub,mg,sg)
return c.VHisc_Mermaid and c:IsRace(RACE_AQUA) and (not sg or not sg:IsExists(Card.IsFusionCode,1,c,c:GetFusionCode()))
end
--spsm
function s.smfilter(c,e,tp)
return c.VHisc_Mermaid and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function s.smtg(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,POS_FACEUP) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.smop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) and c:IsLocation(LOCATION_SZONE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.smfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.smfilter,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
end
--immune
function s.efilter(e,re)
return re:IsActiveType(TYPE_MONSTER) and e:GetHandlerPlayer()~=re:GetOwnerPlayer()
end
\ No newline at end of file
--寂海的银枪 安托瑞特
local s,id,o=GetID()
Duel.LoadScript("c33201150.lua")
function s.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,33201150,s.ffilter,1,true,true)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e1:SetRange(LOCATION_SZONE+LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCondition(Mermaid_VHisc.ftdcon)
e1:SetTarget(s.tdtg)
e1:SetOperation(s.tdop)
c:RegisterEffect(e1)
end
s.VHisc_Mermaid=true
--fusion
function s.ffilter(c)
return c.VHisc_Mermaid and c:IsRace(RACE_AQUA)
end
--toextra
function s.thfilter(c)
return c.VHisc_Mermaid and c:IsAbleToHand()
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtra() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,1)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
--atk up
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(function(e,ac) return ac.VHisc_Mermaid end)
e1:SetValue(800)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
Duel.BreakEffect()
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_EXTRA) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
--财宝号的船长 布彻
local s,id,o=GetID()
Duel.LoadScript("c33201150.lua")
function s.initial_effect(c)
Mermaid_VHisc.setef(c,id)
--atk up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_SZONE+LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTarget(s.atktg)
e1:SetValue(800)
c:RegisterEffect(e1)
end
s.VHisc_Mermaid=true
--atk up
function s.atktg(e,c)
return c.VHisc_Mermaid and e:GetHandler()~=c
end
--财宝号的水手 拉杰特
local s,id,o=GetID()
Duel.LoadScript("c33201150.lua")
function s.initial_effect(c)
Mermaid_VHisc.setef(c,id)
--cannot be target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetRange(LOCATION_SZONE+LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(s.target)
e1:SetValue(aux.tgoval)
c:RegisterEffect(e1)
end
s.VHisc_Mermaid=true
--e1
function s.target(e,c)
return c.VHisc_Mermaid
end
--寂海的冒险家 戴维斯
local s,id,o=GetID()
Duel.LoadScript("c33201150.lua")
function s.initial_effect(c)
Mermaid_VHisc.setef(c,id+10000)
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id)
e1:SetTarget(s.tdtg)
e1:SetOperation(s.tdop)
c:RegisterEffect(e1)
end
s.VHisc_Mermaid=true
--e2
function s.tdfilter(c)
return c:IsFaceup() and c.VHisc_Mermaid and c:IsAbleToDeck()
end
function s.thfilter(c)
return c.VHisc_Mermaid and c:IsAbleToHand() and c:IsRace(RACE_AQUA)
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and s.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_SZONE,0,1,e:GetHandler()) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_SZONE,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
local tdg=Group.CreateGroup()
tdg:AddCard(tc)
tdg:AddCard(e:GetHandler())
if Duel.SendtoDeck(tdg,nil,2,REASON_EFFECT) and tdg:Filter(Card.IsLocation,nil,LOCATION_EXTRA+LOCATION_DECK):GetCount()==2 then
if Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g2:GetCount()>0 then
Duel.SendtoHand(g2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g2)
end
end
end
end
\ No newline at end of file
--破浪航船 财宝号
local s,id,o=GetID()
Duel.LoadScript("c33201150.lua")
function s.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,1))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(s.spcon)
e0:SetOperation(s.spop)
e0:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e0)
--overlay
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(s.settg)
e1:SetOperation(s.setop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+10000)
e2:SetCondition(s.thcon)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
end
--xyz
function s.ovfilter(c)
return c:IsFaceup() and c.VHisc_Mermaid and c:IsLevel(4) and c:IsRace(RACE_WARRIOR) and c:IsCanOverlay()
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(s.ovfilter,tp,LOCATION_MZONE+LOCATION_SZONE,0,2,nil)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,0))
local g=Duel.SelectMatchingCard(tp,s.ovfilter,tp,LOCATION_MZONE+LOCATION_SZONE,0,2,2,nil)
for mc in aux.Next(g) do
local mg=mc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(c,mg)
end
end
c:SetMaterial(g)
Duel.Overlay(c,g)
end
--e1
function s.setfilter(c)
return c.VHisc_Mermaid and not c:IsForbidden()
end
function s.matfilter(c)
return c:IsCanOverlay()
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
local og=e:GetHandler():GetOverlayGroup()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and og:FilterCount(s.setfilter,nil)>0 end
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local og=e:GetHandler():GetOverlayGroup():Filter(s.setfilter,nil)
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and og:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local sc=og:Select(tp,1,1,nil):GetFirst()
Mermaid_VHisc.sp(sc,tp)
Duel.BreakEffect()
if Duel.IsExistingMatchingCard(s.matfilter,tp,0,LOCATION_ONFIELD,1,e:GetHandler()) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,s.matfilter,tp,0,LOCATION_ONFIELD,1,1,e:GetHandler())
if g:GetCount()>0 then
Duel.Overlay(e:GetHandler(),g)
end
end
end
end
--e2
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function s.thfilter(c)
return c:IsCode(33201154) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--寂海的乐章 歌舞人鱼
local s,id,o=GetID()
Duel.LoadScript("c33201150.lua")
function s.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(s.settg)
e1:SetOperation(s.setop)
c:RegisterEffect(e1)
--effect gain
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:SetLabelObject(e1)
e2:SetLabel(id)
e2:SetCondition(Mermaid_VHisc.effcon)
e2:SetOperation(Mermaid_VHisc.effop)
c:RegisterEffect(e2)
end
s.VHisc_Mermaid=true
--e1
function s.setfilter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Mermaid_VHisc.fgck(e:GetHandler(),id) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(s.setfilter,tp,0,LOCATION_MZONE,1,nil) end
Mermaid_VHisc.flagc(e:GetHandler(),id)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and e:GetHandler():IsRelateToEffect(e) and Duel.IsExistingMatchingCard(s.setfilter,tp,0,LOCATION_MZONE,1,nil) then
Mermaid_VHisc.sp(e:GetHandler(),tp)
if e:GetHandler():IsLocation(LOCATION_SZONE) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
end
end
--寂海的祝巫 露米娅
local s,id,o=GetID()
Duel.LoadScript("c33201150.lua")
function s.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(s.settg)
e1:SetOperation(s.setop)
c:RegisterEffect(e1)
--effect gain
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:SetLabelObject(e1)
e2:SetLabel(id)
e2:SetCondition(Mermaid_VHisc.effcon)
e2:SetOperation(Mermaid_VHisc.effop)
c:RegisterEffect(e2)
end
s.VHisc_Mermaid=true
--e1
function s.smfilter(c,e,tp)
return c.VHisc_Mermaid and c:IsType(TYPE_CONTINUOUS+TYPE_SPELL) and c:GetOriginalType()&TYPE_MONSTER~=0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and s.smfilter(chkc,e,tp) end
if chk==0 then return Mermaid_VHisc.fgck(e:GetHandler(),id) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(s.smfilter,tp,LOCATION_SZONE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.smfilter,tp,LOCATION_SZONE,0,1,1,e:GetHandler(),e,tp)
Mermaid_VHisc.flagc(e:GetHandler(),id)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,LOCATION_SZONE)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and e:GetHandler():IsRelateToEffect(e) then
Mermaid_VHisc.sp(e:GetHandler(),tp)
if e:GetHandler():IsLocation(LOCATION_SZONE) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,tc) and tc:IsAbleToRemove() and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rc=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,1,tc):GetFirst()
local g=Group.FromCards(rc,tc)
if Duel.Remove(g,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local c=e:GetHandler()
local fid=c:GetFieldID()
local rct=1
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then rct=2 end
local og=Duel.GetOperatedGroup()
local oc=og:GetFirst()
while oc do
oc:RegisterFlagEffect(id+20000,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,rct,fid)
oc=og:GetNext()
end
og:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(og)
e1:SetCondition(s.retcon)
e1:SetOperation(s.retop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
end
function s.retfilter(c,fid)
return c:GetFlagEffectLabel(id+20000)==fid
end
function s.retcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(s.retfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local sg=g:Filter(s.retfilter,nil,e:GetLabel())
g:DeleteGroup()
local tc=sg:GetFirst()
while tc do
Duel.ReturnToField(tc)
tc=sg:GetNext()
end
end
--寂海之祸 塞壬人鱼
local s,id,o=GetID()
Duel.LoadScript("c33201150.lua")
function s.initial_effect(c)
--disable
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_CHAIN_SOLVING)
e0:SetRange(LOCATION_MZONE+LOCATION_SZONE)
e0:SetCondition(s.discon)
e0:SetOperation(s.disop)
c:RegisterEffect(e0)
--recover
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id)
e1:SetTarget(s.rectg)
e1:SetOperation(s.recop)
c:RegisterEffect(e1)
--effect gain
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:SetLabelObject(e0)
e2:SetLabel(id)
e2:SetCondition(Mermaid_VHisc.effcon)
e2:SetOperation(Mermaid_VHisc.effop)
c:RegisterEffect(e2)
end
s.VHisc_Mermaid=true
--e0
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and (re:IsActiveType(TYPE_TRAP) or re:IsActiveType(TYPE_SPELL)) and re:GetHandler():GetColumnGroup():IsContains(e:GetHandler())
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
Duel.NegateEffect(ev)
end
--e1
function s.setfilter(c)
return c.VHisc_Mermaid
end
function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.setfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.setfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,s.setfilter,tp,LOCATION_MZONE,0,1,1,nil)
g:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function s.recop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and tc:IsRelateToEffect(e) then
Mermaid_VHisc.sp(tc,tp)
if tc:IsLocation(LOCATION_SZONE) then
Duel.Recover(tp,500,REASON_EFFECT)
end
end
end
--寂海的浪潮
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--Special Summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CUSTOM+33201150)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,id)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
end
s.VHisc_Mermaid=true
--set
function s.thfilter(c)
return c.VHisc_Mermaid and c:IsFaceup() and c:IsAbleToHand()
end
function s.smfilter(c,e,tp)
return c.VHisc_Mermaid and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_ONFIELD)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
if Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(s.smfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.smfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
...@@ -106,11 +106,11 @@ function c66914011.indcon1(e) ...@@ -106,11 +106,11 @@ function c66914011.indcon1(e)
end end
function c66914011.eqlimit(e,c) function c66914011.eqlimit(e,c)
return c:GetControler()==e:GetHandler():GetControler() return c:GetControler()==e:GetHandler():GetControler()
and (c:IsCode(66914000) or c:IsCode(66914012)) and (c:IsCode(66914000) or c:IsCode(66914013))
end end
function c66914011.filter(c,tp) function c66914011.filter(c,tp)
return c:IsControler(tp) and c:IsFaceup() return c:IsControler(tp) and c:IsFaceup()
and (c:IsCode(66914000) or c:IsCode(66914012)) and (c:IsCode(66914000) or c:IsCode(66914013))
end end
function c66914011.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c66914011.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c66914011.filter(chkc,tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c66914011.filter(chkc,tp) end
......
--妖舞之刃·厄科 --神心一刀流·樱华盛舞
function c66914012.initial_effect(c) function c66914012.initial_effect(c)
--xyz summon --Activate
aux.AddXyzProcedure(c,aux.FALSE,1,1,c66914012.ovfilter,nil,1,c66914012.xyzop) local e12=Effect.CreateEffect(c)
c:EnableReviveLimit() e12:SetType(EFFECT_TYPE_ACTIVATE)
--activate from hand e12:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e12)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(EVENT_CHAINING)
e2:SetOperation(c66914012.adop)
c:RegisterEffect(e2)
--salvage
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetCategory(CATEGORY_TOHAND)
e1:SetCode(EFFECT_QP_ACT_IN_NTPHAND) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,66914013)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x373)) e1:SetRange(LOCATION_FZONE)
e1:SetTargetRange(LOCATION_HAND,0) e1:SetCost(c66914012.thcost)
e1:SetTarget(c66914012.thtg)
e1:SetOperation(c66914012.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e2)
--equip
local e13=Effect.CreateEffect(c)
e13:SetCategory(CATEGORY_EQUIP)
e13:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e13:SetCode(EVENT_SPSUMMON_SUCCESS)
e13:SetProperty(EFFECT_FLAG_DELAY)
e13:SetTarget(c66914012.eqtg)
e13:SetOperation(c66914012.eqop)
c:RegisterEffect(e13)
local e17=Effect.CreateEffect(c)
e17:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e17:SetCode(EVENT_CHAINING)
e17:SetRange(LOCATION_MZONE)
e17:SetCondition(c66914012.ovcon)
e17:SetOperation(c66914012.ovop)
c:RegisterEffect(e17)
--apply
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(66914012,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCost(c66914012.disrmcost)
e3:SetTarget(c66914012.optg)
e3:SetOperation(c66914012.opop)
c:RegisterEffect(e3)
end end
function c66914012.ovop(e,tp,eg,ep,ev,re,r,rp) function c66914012.adop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
local c=e:GetHandler() local c=e:GetHandler()
if c:IsType(TYPE_XYZ) and Duel.SelectYesNo(tp,aux.Stringid(66914012,0)) then local ct=Duel.GetCurrentChain()
rc:CancelToGrave() if ct<2 then return end
Duel.Overlay(c,Group.FromCards(rc)) local te,p=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if te and p==tp then
if rp==tp then
Duel.RegisterFlagEffect(tp,66914013,RESET_CHAIN,0,1)
end end
end if rp==1-tp then
function c66914012.ovcon(e,tp,eg,ep,ev,re,r,rp) Duel.RegisterFlagEffect(tp,66914014,RESET_CHAIN,0,1)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsSetCard(0x373)
end
function c66914012.ovfilter(c)
local tc=c:GetEquipGroup():GetFirst()
local counter=0
while tc do
if tc:IsCode(66914011) then
local count=0
if tc:GetCounter(0x1371)>0 then
count=count+1
end end
if tc:GetCounter(0x1372)>0 then
count=count+1
end end
if tc:GetCounter(0x1373)>0 then if Duel.GetFlagEffect(tp,66914013)>=4 and Duel.GetFlagEffect(tp,66914011)==0 and Duel.IsExistingMatchingCard(c66914012.filter,tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(66914012,0)) then
count=count+1 Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c66914012.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 end
if count==3 then Duel.RegisterFlagEffect(tp,66914011,0,0,1)
counter=1
end end
if Duel.GetFlagEffect(tp,66914014)>=2 and Duel.GetFlagEffect(tp,66914012)==0 and Duel.SelectYesNo(tp,aux.Stringid(66914012,1)) then
local tg=Duel.GetMatchingGroup(c66914012.rmfilter,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil,tp)
if tg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=tg:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT)
end end
tc=c:GetEquipGroup():GetNext() Duel.RegisterFlagEffect(tp,66914012,0,0,1)
end end
return c:IsFaceup() and c:IsCode(66914000) and counter==1
end
function c66914012.xyzop(e,tp,chk)
if chk==0 then return true end
end
function c66914012.eqfilter(c,ec,tp)
return c:IsType(TYPE_EQUIP) and c:CheckEquipTarget(ec) and c:CheckUniqueOnField(tp,LOCATION_SZONE) and not c:IsForbidden() and c:IsCode(66914011)
end
function c66914012.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end end
function c66914012.eqop(e,tp,eg,ep,ev,re,r,rp) function c66914012.rmfilter(c,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) return c:IsAbleToRemove(tp,POS_FACEDOWN)
local c=e:GetHandler()
if ft<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c66914012.eqfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,c,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local sg=g:SelectSubGroup(tp,aux.TRUE,false,1,1)
if not sg then return end
local tc=sg:GetFirst()
while tc do
Duel.Equip(tp,tc,c,true,true)
tc=sg:GetNext()
end
Duel.EquipComplete()
end end
function c66914012.disrmcost(e,tp,eg,ep,ev,re,r,rp,chk) function c66914012.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
if chk==0 then return c:GetFlagEffect(66914013)==0 and c:CheckRemoveOverlayCard(tp,1,REASON_COST) end Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
c:RemoveOverlayCard(tp,1,1,REASON_COST)
c:RegisterFlagEffect(66914013,RESET_CHAIN,0,1)
end end
function c66914012.filter(c)
function c66914012.matfilter(c) return c:IsSetCard(0x373) and c:IsAbleToHand()
return c:IsAbleToHand() and c:IsSetCard(0x373)
end end
function c66914012.optg(e,tp,eg,ep,ev,re,r,rp,chk) function c66914012.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() if chk==0 then return Duel.IsExistingMatchingCard(c66914012.filter,tp,LOCATION_GRAVE,0,1,nil) end
local g=c:GetOverlayGroup() Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
local g1=c:GetEquipGroup()
local b1=g:IsExists(c66914012.matfilter,1,nil)
and c:GetOverlayCount()>1 and Duel.GetFlagEffect(tp,66914012)==0
local b2=g1:IsExists(Card.IsCode,1,nil,66914011)
and Duel.GetFlagEffect(tp,66914011)==0
if chk==0 then return b1 or b2 end
end end
function c66914012.opop(e,tp,eg,ep,ev,re,r,rp) function c66914012.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=c:GetOverlayGroup()
local g1=c:GetEquipGroup()
local b1=g:IsExists(c66914012.matfilter,1,nil)
and Duel.GetFlagEffect(tp,66914012)==0
local b2=g1:IsExists(Card.IsCode,1,nil,66914011)
and Duel.GetFlagEffect(tp,66914011)==0
local op=0
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(66914012,2),aux.Stringid(66914012,3))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(66914012,2))
elseif b2 then op=Duel.SelectOption(tp,aux.Stringid(66914012,3))+1
else return end
if op==0 then
if c:IsRelateToEffect(e) then
local g=c:GetOverlayGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=g:FilterSelect(tp,c66914012.matfilter,1,1,nil) local g=Duel.SelectMatchingCard(tp,c66914012.filter,tp,LOCATION_GRAVE,0,1,1,nil)
if tg:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
end Duel.ConfirmCards(1-tp,g)
end
Duel.RegisterFlagEffect(tp,66914012,RESET_PHASE+PHASE_END,0,1)
else
local tc=g1:Filter(Card.IsCode,nil,66914011):GetFirst()
local opt=Duel.SelectOption(tp,aux.Stringid(66914012,4),aux.Stringid(66914012,5),aux.Stringid(66914012,6))+1
if opt==1 then
tc:AddCounter(0x1371,1)
elseif opt==2 then
tc:AddCounter(0x1372,1)
else
tc:AddCounter(0x1373,1)
end
Duel.RegisterFlagEffect(tp,66914011,RESET_PHASE+PHASE_END,0,1)
end end
end end
\ No newline at end of file
--神心樱舞·厄科
function c66914013.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,4,c66914013.ovfilter,aux.Stringid(66914013,0),4,c66914013.xyzop)
c:EnableReviveLimit()
--activate from hand
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x373))
e1:SetTargetRange(LOCATION_HAND,0)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e2)
--Overlay&Tohand
local e12=Effect.CreateEffect(c)
e12:SetCategory(CATEGORY_TOHAND)
e12:SetType(EFFECT_TYPE_QUICK_O)
e12:SetCode(EVENT_FREE_CHAIN)
e12:SetRange(LOCATION_MZONE)
e12:SetCost(c66914013.disrmcost)
e12:SetTarget(c66914013.disrmtg)
e12:SetOperation(c66914013.disrmop)
c:RegisterEffect(e12)
--
Duel.AddCustomActivityCounter(66914013,ACTIVITY_CHAIN,c66914013.chainfilter)
end
function c66914013.chainfilter(re,tp,cid)
return not (Duel.GetCurrentChain()>4)
end
function c66914013.ovfilter(c)
return c:IsFaceup() and c:IsCode(66914000)
end
function c66914013.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,66914010)==0
and (Duel.GetCustomActivityCount(66914013,tp,ACTIVITY_CHAIN)>0
or Duel.GetCustomActivityCount(66914013,1-tp,ACTIVITY_CHAIN)>0) end
Duel.RegisterFlagEffect(tp,66914010,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c66914013.disrmcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(66914009)==0 end
c:RegisterFlagEffect(66914009,RESET_CHAIN,0,1)
end
function c66914013.disrmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=e:GetHandler():GetOverlayGroup()
local b1=e:GetHandler():IsType(TYPE_XYZ) and Duel.IsExistingMatchingCard(c66914013.ofilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,0,1,e:GetHandler()) and Duel.GetFlagEffect(tp,6691408)==0
local b2=g:IsExists(Card.IsAbleToHand,1,nil) and Duel.GetFlagEffect(tp,6691405)==0
if chk==0 then return b1 or b2 end
end
function c66914013.ofilter(c,e)
return c:IsCanOverlay() and (not e or not c:IsImmuneToEffect(e)) and c:IsSetCard(0x373)
end
function c66914013.disrmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=e:GetHandler():GetOverlayGroup()
local b1=e:GetHandler():IsType(TYPE_XYZ) and Duel.IsExistingMatchingCard(c66914013.ofilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,0,1,e:GetHandler()) and Duel.GetFlagEffect(tp,6691408)==0
local b2=g:IsExists(Card.IsAbleToHand,1,nil) and Duel.GetFlagEffect(tp,6691405)==0
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(66914013,1),aux.Stringid(66914013,2))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(66914013,1))
elseif b2 then op=Duel.SelectOption(tp,aux.Stringid(66914013,2))+1
else return end
if op==0 then
if c:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,c66914013.ofilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,e:GetHandler(),e)
local tc=g:GetFirst()
if tc then
Duel.Overlay(c,tc)
end
Duel.ShuffleDeck(tp)
end
Duel.RegisterFlagEffect(tp,6691408,RESET_PHASE+PHASE_END,0,1)
else
if c:IsRelateToEffect(e) then
local g=c:GetOverlayGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=g:FilterSelect(tp,Card.IsAbleToHand,1,1,nil)
if tg:GetCount()>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
end
Duel.RegisterFlagEffect(tp,6691405,RESET_PHASE+PHASE_END,0,1)
end
end
\ No newline at end of file
--神杀之唤名
function c67200048.initial_effect(c)
aux.AddCodeList(c,67200161)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c67200048.thcost)
e1:SetTarget(c67200048.thtg)
e1:SetOperation(c67200048.thop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200048,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,67200048+EFFECT_COUNT_CODE_DUEL)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c67200048.target)
e2:SetOperation(c67200048.activate)
c:RegisterEffect(e2)
end
--
function c67200048.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsReleasable,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end
local sg=Duel.SelectMatchingCard(tp,Card.IsReleasable,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
Duel.Release(sg,REASON_COST)
end
function c67200048.psfilter(c)
return aux.IsCodeListed(c,67200161) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c67200048.thtg(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))
and Duel.IsExistingMatchingCard(c67200048.psfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c67200048.thop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c67200048.psfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--
function c67200048.tgfilte1r(c)
return c:IsFaceup() and c:IsCode(67200161)
end
function c67200048.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c67200048.tgfilte1r(chkc) end
if chk==0 then return Duel.IsExistingTarget(c67200048.tgfilte1r,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c67200048.tgfilte1r,tp,LOCATION_MZONE,0,1,1,nil)
end
function c67200048.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(67200160)
tc:RegisterEffect(e1)
end
end
--睡魔少女 莉莉艾姆
function c67200236.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
aux.AddCodeList(c,67200161)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200236,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,67200236)
e2:SetCondition(c67200236.pcon)
e2:SetTarget(c67200236.ptg)
e2:SetOperation(c67200236.pop)
c:RegisterEffect(e2)
--pendulum set
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200236,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_RELEASE)
e3:SetTarget(c67200236.pstg)
e3:SetOperation(c67200236.psop)
c:RegisterEffect(e3)
end
--
function c67200236.pcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_PZONE,0,1,e:GetHandler(),67200161)
end
function c67200236.ptg(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) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c67200236.pop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--
function c67200236.psfilter(c)
return aux.IsCodeListed(c,67200161) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() and c:IsFaceup() and not c:IsCode(67200236)
end
function c67200236.pstg(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))
and Duel.IsExistingMatchingCard(c67200236.psfilter,tp,LOCATION_EXTRA,0,1,nil) end
end
function c67200236.psop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c67200236.psfilter,tp,LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
\ No newline at end of file
--白地龙骑士团的援护
function c67200237.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,67200237)
e1:SetTarget(c67200237.target)
e1:SetOperation(c67200237.activate)
c:RegisterEffect(e1)
end
function c67200237.filter(c)
return c:IsLevelBelow(4) and c:IsRace(RACE_WARRIOR) and c:IsAbleToHand() and c:IsType(TYPE_PENDULUM)
end
function c67200237.filter1(c)
return c:IsSetCard(0x678) and not c:IsForbidden() and c:IsType(TYPE_PENDULUM)
end
function c67200237.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200237.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c67200237.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c67200237.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local tc1=g:GetFirst()
if g:GetFirst():IsSetCard(0x678) and not tc1:IsForbidden() and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>1 and Duel.IsExistingMatchingCard(c67200237.filter1,tp,LOCATION_DECK,0,1,nil) and Duel.CheckLocation(tp,LOCATION_PZONE,0) and Duel.CheckLocation(tp,LOCATION_PZONE,1) and Duel.SelectYesNo(tp,aux.Stringid(67200237,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local gg=Duel.SelectMatchingCard(tp,c67200237.filter1,tp,LOCATION_DECK,0,1,1,nil)
local tc2=gg:GetFirst()
if Duel.MoveToField(tc1,tp,tp,LOCATION_PZONE,POS_FACEUP,false) then
if Duel.MoveToField(tc2,tp,tp,LOCATION_PZONE,POS_FACEUP,false) then
Duel.Damage(tp,1000,REASON_EFFECT)
tc2:SetStatus(STATUS_EFFECT_ENABLED,true)
end
tc1:SetStatus(STATUS_EFFECT_ENABLED,true)
end
Duel.BreakEffect()
--
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.GetFieldGroup(tp,LOCATION_HAND,0):Select(tp,1,1,nil)
Duel.SendtoDeck(g1,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
end
--水之巫女 雷维尼亚
function c67200239.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
aux.AddCodeList(c,67200161)
--destroy & summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200239,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetCondition(c67200239.pcon)
e1:SetTarget(c67200239.ptg)
e1:SetOperation(c67200239.pop)
c:RegisterEffect(e1)
--Release monster
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200239,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,67200239)
e2:SetCost(c67200239.ctcost)
e2:SetTarget(c67200239.cttg)
e2:SetOperation(c67200239.ctop)
c:RegisterEffect(e2)
end
--
function c67200239.pcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(nil,tp,LOCATION_PZONE,0,1,e:GetHandler())
end
function c67200239.psfilter(c)
return aux.IsCodeListed(c,67200161) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() and c:IsFaceup()
end
function c67200239.ptg(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))
and Duel.IsExistingMatchingCard(c67200239.psfilter,tp,LOCATION_EXTRA,0,1,nil) end
end
function c67200239.pop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c67200239.psfilter,tp,LOCATION_EXTRA,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LSCALE)
e1:SetValue(tc:GetLeftScale())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CHANGE_RSCALE)
e2:SetValue(tc:GetRightScale())
c:RegisterEffect(e2)
end
end
--
function c67200239.ctcost(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 c67200239.spfilter(c,e,tp)
return c:IsCode(67200161) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c67200239.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_PZONE) and c67200239.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingTarget(c67200239.spfilter,tp,LOCATION_PZONE,0,1,c,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c67200239.spfilter,tp,LOCATION_PZONE,0,1,1,c,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c67200239.ctop(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 c67200241.initial_effect(c)
aux.AddCodeList(c,67200161)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,67200241+EFFECT_COUNT_CODE_OATH)
--e1:SetTarget(c67200241.target)
e1:SetOperation(c67200241.activate)
c:RegisterEffect(e1)
--move to spell & trap zone
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200241,3))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c67200241.tfcon)
e3:SetTarget(c67200241.tftg)
e3:SetOperation(c67200241.tfop)
c:RegisterEffect(e3)
end
function c67200241.filter(c)
return aux.IsCodeListed(c,67200161) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function c67200241.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c67200241.activate(e,tp,eg,ep,ev,re,r,rp)
--lcoal c=e:GetHandler()
local g=Duel.GetMatchingGroup(c67200241.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(67200241,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:Select(tp,1,1,nil)
local tc=sg:GetFirst()
if tc then
Duel.SSet(tp,tc)
end
end
end
function c67200241.tfcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_FZONE) and c:IsPreviousControler(tp)
end
function c67200241.tftg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function c67200241.tfop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(67200241,1))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
c:RegisterEffect(e1)
end
end
--古风精 米尔沫
function c67200242.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
aux.AddCodeList(c,67200161)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200242,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,67200242)
e1:SetTarget(c67200242.eqtg)
e1:SetOperation(c67200242.eqop)
c:RegisterEffect(e1)
--synchro custom
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetTarget(c67200242.syntg)
e2:SetValue(1)
e2:SetOperation(c67200242.synop)
c:RegisterEffect(e2)
end
--
function c67200242.filter(c)
return c:IsFaceup() and c:IsCode(67200161)
end
function c67200242.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c67200242.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(c67200242.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c67200242.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c67200242.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
if tc then
Duel.Exile(c,REASON_EFFECT)
Duel.BreakEffect()
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c67200242.eqlimit)
e1:SetLabelObject(tc)
c:RegisterEffect(e1)
end
end
function c67200242.eqlimit(e,c)
return c==e:GetLabelObject()
end
--
function c67200242.synfilter(c,syncard,tuner,f)
return (c:IsFaceup() or (c:IsLocation(LOCATION_PZONE) and c:IsType(TYPE_MONSTER))) and c:IsCanBeSynchroMaterial(syncard,tuner) and (f==nil or f(c,syncard))
end
function c67200242.syncheck(c,g,mg,tp,lv,syncard,minc,maxc)
g:AddCard(c)
local ct=g:GetCount()
local res=c67200242.syngoal(g,tp,lv,syncard,minc,ct)
or (ct<maxc and mg:IsExists(c67200242.syncheck,1,g,g,mg,tp,lv,syncard,minc,maxc))
g:RemoveCard(c)
return res
end
function c67200242.syngoal(g,tp,lv,syncard,minc,ct)
return ct>=minc
and g:CheckWithSumEqual(Card.GetSynchroLevel,lv,ct,ct,syncard)
and Duel.GetLocationCountFromEx(tp,tp,g,syncard)>0
and g:FilterCount(Card.IsLocation,nil,LOCATION_PZONE)<=1
end
function c67200242.syntg(e,syncard,f,min,max)
local minc=min+1
local maxc=max+1
local c=e:GetHandler()
local tp=syncard:GetControler()
local lv=syncard:GetLevel()
if lv<=c:GetLevel() then return false end
local g=Group.FromCards(c)
local mg=Duel.GetMatchingGroup(c67200242.synfilter,tp,LOCATION_MZONE+LOCATION_PZONE,LOCATION_MZONE,c,syncard,c,f)
if not syncard:IsCode(67200161) then return false end
return mg:IsExists(c67200242.syncheck,1,g,g,mg,tp,lv,syncard,minc,maxc)
end
function c67200242.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,min,max)
local minc=min+1
local maxc=max+1
local c=e:GetHandler()
local lv=syncard:GetLevel()
local g=Group.FromCards(c)
local mg=Duel.GetMatchingGroup(c67200242.synfilter,tp,LOCATION_MZONE+LOCATION_PZONE,LOCATION_MZONE,c,syncard,c,f)
if not syncard:IsCode(67200161) then return false end
for i=1,maxc do
local cg=mg:Filter(c67200242.syncheck,g,g,mg,tp,lv,syncard,minc,maxc)
if cg:GetCount()==0 then break end
local minct=1
if c67200242.syngoal(g,tp,lv,syncard,minc,i) then
minct=0
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local sg=cg:Select(tp,minct,1,nil)
if sg:GetCount()==0 then break end
g:Merge(sg)
end
if g:IsExists(Card.IsLocation,1,nil,LOCATION_PZONE) then
for tc in aux.Next(g) do
end
end
Duel.SetSynchroMaterial(g)
end
--
...@@ -2,7 +2,18 @@ ...@@ -2,7 +2,18 @@
function c67200351.initial_effect(c) function c67200351.initial_effect(c)
--Pendulum Summon --Pendulum Summon
aux.EnablePendulumAttribute(c) aux.EnablePendulumAttribute(c)
aux.AddCodeList(c,67200161)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200351,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,67200348)
e1:SetCondition(c67200351.pcon)
e1:SetTarget(c67200351.ptg)
e1:SetOperation(c67200351.pop)
c:RegisterEffect(e1)
--Activate --Activate
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200351,3)) e2:SetDescription(aux.Stringid(67200351,3))
...@@ -18,20 +29,38 @@ function c67200351.initial_effect(c) ...@@ -18,20 +29,38 @@ function c67200351.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
-- --
function c67200351.pcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_PZONE,0,1,e:GetHandler(),67200161)
end
function c67200351.ptg(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) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c67200351.pop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--
function c67200351.cfilter(c) function c67200351.cfilter(c)
return c:IsType(TYPE_MONSTER) return c:IsType(TYPE_PENDULUM)
end end
function c67200351.spcon(e,tp,eg,ep,ev,re,r,rp) function c67200351.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c67200351.cfilter,1,nil) and aux.exccon(e) local c=e:GetHandler()
return eg:IsExists(c67200351.cfilter,1,nil) and c:IsPreviousLocation(LOCATION_GRAVE)
end end
function c67200351.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c67200351.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end end
function c67200351.thfilter1(c,tp) function c67200351.thfilter1(c,tp)
return c:IsType(TYPE_MONSTER) return c:IsType(TYPE_PENDULUM)
and Duel.IsExistingMatchingCard(c67200351.thfilter2,tp,LOCATION_DECK,0,1,nil,c:GetCode()) and Duel.IsExistingMatchingCard(c67200351.thfilter2,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end end
function c67200351.thfilter2(c,code) function c67200351.thfilter2(c,code)
......
...@@ -14,11 +14,16 @@ function c71400002.initial_effect(c) ...@@ -14,11 +14,16 @@ function c71400002.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_GRAVE+LOCATION_MZONE,0) e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) e2:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x714))
e2:SetValue(ATTRIBUTE_WATER) e2:SetValue(ATTRIBUTE_WATER)
e2:SetCondition(yume.YumeCon) e2:SetCondition(yume.YumeCon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e2g=e2:Clone()
e2g:SetTargetRange(LOCATION_GRAVE,0)
e2g:SetCondition(c71400002.gravecon)
c:RegisterEffect(e2g)
--to deck --to deck
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(71400002,0)) e3:SetDescription(aux.Stringid(71400002,0))
...@@ -46,6 +51,10 @@ function c71400002.condition1(e,c) ...@@ -46,6 +51,10 @@ function c71400002.condition1(e,c)
and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)>0 and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)>0
and Duel.IsExistingMatchingCard(c71400002.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(c71400002.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end end
function c71400002.gravecon(e)
local tp=e:GetHandlerPlayer()
return yume.IsYumeFieldOnField(tp) and not Duel.IsPlayerAffectedByEffect(tp,EFFECT_NECRO_VALLEY)
end
function c71400002.target3(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c71400002.target3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and c71400002.filter3(chkc) and chkc~=c end if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and c71400002.filter3(chkc) and chkc~=c end
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400024.initial_effect(c) function c71400024.initial_effect(c)
--link summon --link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,2,c71400024.lcheck(c)) aux.AddLinkProcedure(c,c71400024.mfilter,2,2,yume.YumeCheck(c))
--summon limit --summon limit
yume.AddYumeSummonLimit(c,1) yume.AddYumeSummonLimit(c,1)
--banish --banish
...@@ -21,7 +21,7 @@ function c71400024.initial_effect(c) ...@@ -21,7 +21,7 @@ function c71400024.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400024,1)) e2:SetDescription(aux.Stringid(71400024,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_LEAVE_FIELD) e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCountLimit(1,71500024) e2:SetCountLimit(1,71500024)
...@@ -30,10 +30,7 @@ function c71400024.initial_effect(c) ...@@ -30,10 +30,7 @@ function c71400024.initial_effect(c)
e2:SetOperation(c71400024.op2) e2:SetOperation(c71400024.op2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c71400024.lcheck(c) function c71400024.mfilter(c)
return function(g) return yume.IsYumeFieldOnField(c:GetControler()) and g:IsExists(c71400024.lcfilter,1,nil) end
end
function c71400024.lcfilter(c)
return c:GetBaseAttack()>2500 and c:GetOriginalAttribute()==ATTRIBUTE_DARK and c:IsLinkSetCard(0x714) return c:GetBaseAttack()>2500 and c:GetOriginalAttribute()==ATTRIBUTE_DARK and c:IsLinkSetCard(0x714)
end end
function c71400024.tg1(e,tp,eg,ep,ev,re,r,rp,chk) function c71400024.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -50,15 +47,14 @@ function c71400024.op1(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,15 +47,14 @@ function c71400024.op1(e,tp,eg,ep,ev,re,r,rp)
end end
function c71400024.con2(e,tp,eg,ep,ev,re,r,rp) function c71400024.con2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_LINK) and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT)) and c:IsPreviousLocation(LOCATION_MZONE) return (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT)) and c:IsPreviousLocation(LOCATION_MZONE)
end end
function c71400024.filter2(c,e,tp) function c71400024.filter2(c,e,tp)
return c:GetBaseAttack()>2500 and c:GetOriginalAttribute()==ATTRIBUTE_DARK and c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(71400024) return c:GetBaseAttack()>2500 and c:GetOriginalAttribute()==ATTRIBUTE_DARK and c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(71400024)
end end
function c71400024.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c71400024.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c71400024.filter2(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c71400024.filter2(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return true end
and Duel.IsExistingTarget(c71400024.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
local ct=Duel.GetLocationCount(1-tp,LOCATION_MZONE) local ct=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
if ct>2 then ct=2 end if ct>2 then ct=2 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
......
...@@ -50,7 +50,7 @@ function c71400028.filter2(c,e,tp) ...@@ -50,7 +50,7 @@ function c71400028.filter2(c,e,tp)
return c:IsCode(71400030) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_LINK,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 return c:IsCode(71400030) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_LINK,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c71400028.tg2(e,tp,eg,ep,ev,re,r,rp,chk) function c71400028.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400028.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp) and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_LMATERIAL) end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c71400028.op2(e,tp,eg,ep,ev,re,r,rp) function c71400028.op2(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -22,6 +22,7 @@ function c71400032.initial_effect(c) ...@@ -22,6 +22,7 @@ function c71400032.initial_effect(c)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCondition(c71400032.con2) e2:SetCondition(c71400032.con2)
e2:SetCost(c71400032.cost2)
e2:SetTarget(c71400032.tg2) e2:SetTarget(c71400032.tg2)
e2:SetOperation(c71400032.op2) e2:SetOperation(c71400032.op2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -33,11 +34,21 @@ function c71400032.tg1(e,c) ...@@ -33,11 +34,21 @@ function c71400032.tg1(e,c)
end end
function c71400032.con2(e,tp,eg,ep,ev,re,r,rp) function c71400032.con2(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return Duel.IsExistingMatchingCard(c71400032.filter2con,tp,LOCATION_MZONE,LOCATION_MZONE,4,nil) and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function c71400032.filterc2(c)
return c:IsFaceup() and c:IsSetCard(0x714) and c:IsRace(RACE_PLANT) and c:IsAbleToGraveAsCost() and Duel.IsExistingTarget(c71400032.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c)
end
function c71400032.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c71400032.filterc2,tp,LOCATION_ONFIELD,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c71400032.filterc2,tp,LOCATION_ONFIELD,0,1,1,c)
Duel.SendtoGrave(g,REASON_COST)
end end
function c71400032.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c71400032.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c71400032.filter2(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c71400032.filter2(chkc) end
if chk==0 then return Duel.IsExistingTarget(c71400032.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,c71400032.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,c71400032.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
...@@ -57,7 +68,8 @@ function c71400032.op2(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,7 +68,8 @@ function c71400032.op2(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_CANNOT_ATTACK) e2:SetCode(EFFECT_CANNOT_ATTACK)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
local g=Duel.GetMatchingGroup(c71400032.filter2a,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil) local g=Duel.GetMatchingGroup(c71400032.filter2a,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if Duel.IsExistingMatchingCard(c71400032.filter2b,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71400032,1)) then local lg=Duel.GetMatchingGroup(c71400032.filter2b,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if lg:GetCount()>0 and lg:GetSum(Card.GetLink)>=4 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71400032,1)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
...@@ -69,9 +81,6 @@ end ...@@ -69,9 +81,6 @@ end
function c71400032.filter2(c) function c71400032.filter2(c)
return c:IsRace(RACE_PLANT) and aux.NegateMonsterFilter(c) return c:IsRace(RACE_PLANT) and aux.NegateMonsterFilter(c)
end end
function c71400032.filter2con(c)
return c:IsFaceup() and c:IsRace(RACE_PLANT)
end
function c71400032.filter2a(c) function c71400032.filter2a(c)
return c:IsSetCard(0xd714) and c:IsAbleToHand() return c:IsSetCard(0xd714) and c:IsAbleToHand()
end end
......
...@@ -58,15 +58,14 @@ function c71400034.op1(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,15 +58,14 @@ function c71400034.op1(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c71400034.cost2(e,tp,eg,ep,ev,re,r,rp,chk) function c71400034.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400034.filter2c,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c71400034.filter2c,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.DiscardHand(tp,c71400034.filter2c,1,1,REASON_COST+REASON_DISCARD,nil) Duel.DiscardHand(tp,c71400034.filter2c,1,1,REASON_COST,nil)
end end
function c71400034.filter2c(c) function c71400034.filter2c(c)
return c:IsSetCard(0x7714) and c:IsType(TYPE_FIELD) and c:IsDiscardable() return c:IsSetCard(0x7714) and c:IsType(TYPE_FIELD) and c:IsAbleToDeckAsCost()
end end
function c71400034.con2(e,tp,eg,ep,ev,re,r,rp) function c71400034.con2(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsOnField() and re:GetHandler():IsRelateToEffect(re) and (re:IsActiveType(TYPE_MONSTER) return re:IsActiveType(TYPE_MONSTER)
or (re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not re:IsHasType(EFFECT_TYPE_ACTIVATE)))
end end
function c71400034.filter2(c) function c71400034.filter2(c)
return c:IsSetCard(0x714) and c:IsType(TYPE_LINK) and c:IsFaceup() return c:IsSetCard(0x714) and c:IsType(TYPE_LINK) and c:IsFaceup()
...@@ -75,13 +74,16 @@ function c71400034.filter2b(c,tp) ...@@ -75,13 +74,16 @@ function c71400034.filter2b(c,tp)
return c:IsAbleToRemove(tp) and not c71400034.filter2(c) return c:IsAbleToRemove(tp) and not c71400034.filter2(c)
end end
function c71400034.tg2(e,tp,eg,ep,ev,re,r,rp,chk) function c71400034.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsAbleToDeck() end rc=re:GetHandler()
Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0) if chk==0 then return rc:IsRelateToEffect(re) and rc:IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,rc,1,0,0)
end end
function c71400034.op2(e,tp,eg,ep,ev,re,r,rp) function c71400034.op2(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsRelateToEffect(re) and Duel.SendtoDeck(eg,nil,2,REASON_EFFECT)==1 then local rc=re:GetHandler()
local g=Duel.GetMatchingGroup(c71400034.filter2b,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp) if rc:IsRelateToEffect(re) and Duel.SendtoDeck(rc,nil,2,REASON_EFFECT)==1 then
if Duel.IsExistingMatchingCard(c71400034.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71400034,2)) then local g=Duel.GetMatchingGroup(c71400034.filter2b,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),tp)
local lg=Duel.GetMatchingGroup(c71400034.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if lg:GetCount()>0 and lg:GetSum(Card.GetLink)>=4 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71400034,2)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
......
...@@ -31,7 +31,6 @@ function c71400059.op1(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,7 +31,6 @@ function c71400059.op1(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_XYZ_LEVEL) e1:SetCode(EFFECT_XYZ_LEVEL)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(c71400059.xyztg) e1:SetTarget(c71400059.xyztg)
e1:SetValue(c71400059.xyzlv) e1:SetValue(c71400059.xyzlv)
......
...@@ -21,12 +21,13 @@ function c71400067.initial_effect(c) ...@@ -21,12 +21,13 @@ function c71400067.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,71500067) e2:SetCountLimit(1,71500067)
e2:SetCondition(c71400067.con2) e2:SetCondition(c71400067.con2)
e2:SetCost(c71400067.cost2) e2:SetCost(c71400067.cost2)
e2:SetTarget(c71400067.tg2) e2:SetTarget(c71400067.tg2)
e2:SetOperation(c71400067.op2) e2:SetOperation(c71400067.op2)
c:RegisterEffect(e1) c:RegisterEffect(e2)
if not c71400067.global_check then if not c71400067.global_check then
c71400067.global_check=true c71400067.global_check=true
local ge1=Effect.CreateEffect(c) local ge1=Effect.CreateEffect(c)
...@@ -38,7 +39,7 @@ function c71400067.initial_effect(c) ...@@ -38,7 +39,7 @@ function c71400067.initial_effect(c)
end end
function c71400067.spcheckop(e,tp,eg,ep,ev,re,r,rp) function c71400067.spcheckop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst() local tc=eg:GetFirst()
if tc:IsSummonType(SUMMON_TYPE_XYZ) and tc:IsSetCard(0x714) then Duel.RegisterFlagEffect(0,71400067,RESET_PHASE+PHASE_END,0,1) end if tc:IsSummonType(SUMMON_TYPE_XYZ) and tc:IsSetCard(0x714) then Duel.RegisterFlagEffect(0,71400067,EVENT_PHASE+PHASE_END,0,1) end
end end
function c71400067.con1(e,tp,eg,ep,ev,re,r,rp) function c71400067.con1(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
...@@ -84,6 +85,7 @@ function c71400067.op2(e,tp,eg,ep,ev,re,r,rp) ...@@ -84,6 +85,7 @@ function c71400067.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c71400067.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,e:GetHandler()):GetFirst() local tc=Duel.SelectMatchingCard(tp,c71400067.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,e:GetHandler()):GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP) then if tc and Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP) then
local c=e:GetHandler()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400067,2)) e1:SetDescription(aux.Stringid(71400067,2))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
--幻异梦境-梦海底
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400070.initial_effect(c)
--same effect send this card to grave and spsummon another card check
local e0=aux.AddThisCardInGraveAlreadyCheck(c)
--Activate
--See AddYumeFieldGlobal
--change attribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400070,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,71400070)
e1:SetRange(LOCATION_FZONE)
e1:SetOperation(c71400070.op1)
c:RegisterEffect(e1)
--activate field
yume.AddYumeFieldGlobal(c,71400070,1)
--to grave
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(71400070,1))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,71500070)
e3:SetLabelObject(e0)
e3:SetCondition(c71400070.con3)
e3:SetCost(c71400070.cost3)
e3:SetTarget(c71400070.tg3)
e3:SetOperation(c71400070.op3)
c:RegisterEffect(e3)
end
function c71400070.op1(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_FZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetValue(ATTRIBUTE_WATER)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
local e1g=e1:Clone()
e1g:SetTargetRange(LOCATION_GRAVE,LOCATION_GRAVE)
e1g:SetCondition(c71400070.gravecon)
Duel.RegisterEffect(e1g,tp)
end
function c71400070.gravecon(e)
local tp=e:GetHandlerPlayer()
return not Duel.IsPlayerAffectedByEffect(tp,EFFECT_NECRO_VALLEY)
and not Duel.IsPlayerAffectedByEffect(1-tp,EFFECT_NECRO_VALLEY)
end
function c71400070.filtercon3(c,se)
return c:IsFaceup() and c:IsSetCard(0x714) and c:IsType(TYPE_XYZ) and (se==nil or c:GetReasonEffect()~=se)
end
function c71400070.con3(e,tp,eg,ep,ev,re,r,rp)
local se=e:GetLabelObject():GetLabelObject()
return eg:IsExists(c71400070.filtercon3,1,nil,se)
end
function c71400070.filterc3(c)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
and c:IsSetCard(0xb714) and c:IsType(TYPE_FIELD) and c:IsAbleToDeckAsCost()
end
function c71400070.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400070.filterc3,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,3,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c71400070.filterc3,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,e:GetHandler())
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function c71400070.filter3(c)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsSetCard(0x714) and c:IsAbleToGrave()
end
function c71400070.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400070.filter3,tp,LOCATION_DECK,0,1,nil) and yume.IsYumeFieldOnField(tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c71400070.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c71400070.filter3,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
\ No newline at end of file
--蝶现-「启」
yume=yume or {}
if c71401001 then
function c71401001.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71401001,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED)
e1:SetCountLimit(1,71401001)
e1:SetCondition(c71401001.con1)
e1:SetCost(c71401001.cost1)
e1:SetTarget(c71401001.tg1)
e1:SetOperation(c71401001.op1)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71401001,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,71501001)
e2:SetCost(c71401001.cost2)
e2:SetTarget(c71401001.tg2)
e2:SetOperation(c71401001.op2)
c:RegisterEffect(e2)
local e2a=e2:Clone()
e2a:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e2a)
yume.ButterflyCounter()
end
function c71401001.con1(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER)
end
function c71401001.filterc1(c,tp)
return c:IsFaceup() and c:IsType(TYPE_CONTINUOUS) and c:IsAbleToRemoveAsCost()
and Duel.GetMZoneCount(tp,c)>0
end
function c71401001.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71401001.filterc1,tp,LOCATION_ONFIELD,0,1,nil,tp) and Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c71401001.filterc1,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
yume.RegButterflyCostLimit(e,tp)
end
function c71401001.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c71401001.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c71401001.filter2ext(c)
return c:IsFaceup() and c:IsType(TYPE_CONTINUOUS)
end
function c71401001.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end
yume.RegButterflyCostLimit(e,tp)
end
function c71401001.filter2(c,e,tp,check)
return c:IsRace(RACE_SPELLCASTER) and c:IsLevel(4)
and (c:IsAbleToHand() or check and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end
function c71401001.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local check=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return Duel.IsExistingMatchingCard(c71401001.filter2ext,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(c71401001.filter2,tp,LOCATION_DECK,0,1,nil,e,tp,check) end
end
function c71401001.op2(e,tp,eg,ep,ev,re,r,rp)
local check=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c71401001.filter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,check)
local tc=g:GetFirst()
if tc then
if tc:IsAbleToHand() and (not (check and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)) or Duel.SelectOption(tp,1190,1152)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
function yume.ButterflyCounter()
Duel.AddCustomActivityCounter(71401001,ACTIVITY_CHAIN,yume.ButterflyCounterFilter)
end
function yume.ButterflyCounterFilter(re,tp,cid)
return not re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function yume.RegButterflyCostLimit(e,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(yume.ButterflyAcLimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function yume.ButterflyAcLimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function yume.AddButterflySpell(c,id)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71401001,2))
e1:SetRange(LOCATION_HAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,id)
e1:SetCost(yume.ButterflyPlaceCost)
e1:SetTarget(yume.ButterflyPlaceTg)
e1:SetOperation(yume.ButterflySpellOp)
c:RegisterEffect(e1)
end
function yume.ButterflyPlaceTg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and e:GetHandler():CheckUniqueOnField(tp) end
end
function yume.ButterflyPlaceCost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end
yume.RegButterflyCostLimit(e,tp)
end
function yume.ButterflySpellOp(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
end
end
function yume.AddButterflyTrap(c,id)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71401001,3))
e1:SetRange(LOCATION_HAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,id)
e1:SetCost(yume.ButterflyPlaceCost)
e1:SetTarget(yume.ButterflyPlaceTg)
e1:SetOperation(yume.ButterflyTrapOp)
c:RegisterEffect(e1)
end
function yume.ButterflyTrapOp(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_TRAP+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--蝶梦-「绽」
xpcall(function() require("expansions/script/c71401001") end,function() require("script/c71401001") end)
function c71401002.initial_effect(c)
yume.AddButterflySpell(c,71401002)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71401002,0))
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_SZONE)
e2:SetCountLimit(1,71501002)
e2:SetCondition(c71401002.con2)
e2:SetCost(c71401002.cost2)
e2:SetTarget(c71401002.tg2)
e2:SetOperation(c71401002.op2)
c:RegisterEffect(e2)
yume.ButterflyCounter()
end
function c71401002.con2(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and e:GetHandler():GetType()==TYPE_SPELL+TYPE_CONTINUOUS
end
function c71401002.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end
yume.RegButterflyCostLimit(e,tp)
end
function c71401002.filter2(c,tp)
return c:IsRace(RACE_SPELLCASTER) and c:IsLevel(4) and c:IsAttribute(ATTRIBUTE_DARK) and (c:IsAbleToHand() or not c:IsForbidden() and c:CheckUniqueOnField(tp))
end
function c71401002.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71401002.filter2,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c71401002.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c71401002.filter2,tp,LOCATION_DECK,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc then
local b1=tc:IsAbleToHand()
local b2=not tc:IsForbidden() and tc:CheckUniqueOnField(tp)
if b1 and (not b2 or Duel.SelectOption(tp,1152,aux.Stringid(71401002,1))==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
if Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
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_CONTINUOUS)
tc:RegisterEffect(e1)
end
end
end
end
\ No newline at end of file
--蝶忆-「染」
xpcall(function() require("expansions/script/c71401001") end,function() require("script/c71401001") end)
function c71401003.initial_effect(c)
yume.AddButterflyTrap(c,71401003)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71401003,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,71501003)
e2:SetCondition(c71401003.con2)
e2:SetCost(c71401003.cost2)
e2:SetTarget(c71401003.tg2)
e2:SetOperation(c71401003.op2)
c:RegisterEffect(e2)
yume.ButterflyCounter()
end
function c71401003.con2(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and e:GetHandler():GetType()==TYPE_TRAP+TYPE_CONTINUOUS
end
function c71401003.filterc2(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c71401003.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71401003.filterc2,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) and Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c71401003.filterc2,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
yume.RegButterflyCostLimit(e,tp)
end
function c71401003.filter2(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_LIGHT) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and (c:IsAbleToHand() or not c:IsForbidden() and c:CheckUniqueOnField(tp))
end
function c71401003.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71401003.filter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c71401003.filter2a(c)
return c:IsAbleToRemove() and c:IsFaceup()
end
function c71401003.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c71401003.filter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
local tc=g:GetFirst()
if tc then
local b1=tc:IsAbleToHand()
local b2=not tc:IsForbidden() and tc:CheckUniqueOnField(tp)
local flag=0
if b1 and (not b2 or Duel.SelectOption(tp,1152,aux.Stringid(71401003,1))==0) then
flag=Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
if Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
flag=1
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
local rg=Duel.GetMatchingGroup(c71401003.filter2a,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if flag>0 and rg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71401003,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local srg=rg:Select(tp,1,1,nil)
Duel.Remove(srg,POS_FACEUP,REASON_EFFECT)
end
end
end
\ No newline at end of file
--蝶现-「像」
xpcall(function() require("expansions/script/c71401001") end,function() require("script/c71401001") end)
function c71401004.initial_effect(c)
--same effect send this card to grave and spsummon another card check
local e0=aux.AddThisCardInGraveAlreadyCheck(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71401004,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED)
e1:SetCountLimit(1,71401004)
e1:SetLabelObject(e0)
e1:SetCost(c71401004.cost1)
e1:SetCondition(c71401004.con1)
e1:SetTarget(c71401004.tg1)
e1:SetOperation(c71401004.op1)
c:RegisterEffect(e1)
local e1a=e1:Clone()
e1a:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e1a)
--banish
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71401004,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCountLimit(1,71501004)
e2:SetCondition(c71401004.con2)
e2:SetCost(c71401004.cost2)
e2:SetTarget(c71401004.tg2)
e2:SetOperation(c71401004.op2)
c:RegisterEffect(e2)
yume.ButterflyCounter()
end
function c71401004.filtercon1(c,tp,se)
return se==nil or c:GetReasonEffect()~=se
end
function c71401004.con1(e,tp,eg,ep,ev,re,r,rp)
local se=e:GetLabelObject():GetLabelObject()
return eg:IsExists(c71401004.filtercon1,1,nil,tp,se)
end
function c71401004.filterc1(c,tp)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToGraveAsCost()
and Duel.GetMZoneCount(tp,c)>0
end
function c71401004.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71401004.filterc1,tp,LOCATION_MZONE,0,1,nil,tp) and Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c71401004.filterc1,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
yume.RegButterflyCostLimit(e,tp)
end
function c71401004.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c71401004.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c71401004.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end
yume.RegButterflyCostLimit(e,tp)
end
function c71401004.con2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP)
end
function c71401004.filter2ext(c)
return c:IsFaceup() and c:IsType(TYPE_CONTINUOUS)
end
function c71401004.filter2(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsAbleToRemove()
end
function c71401004.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71401004.filter2ext,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(c71401004.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c71401004.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c71401004.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_SPELLCASTER))
e1:SetValue(1)
Duel.RegisterEffect(e1,tp)
end
\ No newline at end of file
--蝶梦-「转」
xpcall(function() require("expansions/script/c71401001") end,function() require("script/c71401001") end)
function c71401005.initial_effect(c)
yume.AddButterflySpell(c,71401005)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71401005,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_REMOVE)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,71501005)
e2:SetCondition(c71401005.con2)
e2:SetCost(c71401005.cost2)
e2:SetTarget(c71401005.tg2)
e2:SetOperation(c71401005.op2)
c:RegisterEffect(e2)
yume.ButterflyCounter()
end
function c71401005.con2(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and e:GetHandler():GetType()==TYPE_SPELL+TYPE_CONTINUOUS
end
function c71401005.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end
yume.RegButterflyCostLimit(e,tp)
end
function c71401005.filter2(c,e,tp)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c71401005.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c71401005.filter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c71401005.filter2a(c)
return c:IsFacedown() and c:IsAbleToRemove()
end
function c71401005.filter2b(c)
return c:IsFaceup() and c:GetType() & 0x20004==0x20004
end
function c71401005.op2(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,c71401005.filter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then
local rg=Duel.GetMatchingGroup(c71401005.filter2a,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if Duel.IsExistingMatchingCard(c71401005.filter2b,tp,LOCATION_ONFIELD,0,1,nil) and rg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71401005,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local srg=rg:Select(tp,1,1,nil)
Duel.Remove(srg,POS_FACEUP,REASON_EFFECT)
end
end
end
\ No newline at end of file
--蝶忆-「依」
xpcall(function() require("expansions/script/c71401001") end,function() require("script/c71401001") end)
function c71401006.initial_effect(c)
yume.AddButterflyTrap(c,71401006)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71401006,0))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1,71501006)
e2:SetCondition(c71401006.con2)
e2:SetCost(c71401006.cost2)
e2:SetTarget(c71401006.tg2)
e2:SetOperation(c71401006.op2)
c:RegisterEffect(e2)
yume.ButterflyCounter()
end
function c71401006.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetType()==TYPE_TRAP+TYPE_CONTINUOUS
end
function c71401006.filterc2(c)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToRemoveAsCost()
end
function c71401006.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71401006.filterc2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,2,nil) and Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c71401006.filterc2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,2,2,nil)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
yume.RegButterflyCostLimit(e,tp)
end
function c71401006.tg2(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 c71401006.filter2(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER)
end
function c71401006.op2(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateEffect(ev) and Duel.IsExistingMatchingCard(c71401006.filter2,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(71401006,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(g)
local tc=g:GetFirst()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
end
\ No newline at end of file
--蝶现-「宴」
xpcall(function() require("expansions/script/c71401001") end,function() require("script/c71401001") end)
function c71401007.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71401007,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED)
e1:SetCountLimit(1,71401007)
e1:SetCondition(c71401007.con1)
e1:SetCost(c71401007.cost1)
e1:SetTarget(c71401007.tg1)
e1:SetOperation(c71401007.op1)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71401007,1))
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1,71501007)
e2:SetCost(c71401007.cost2)
e2:SetTarget(c71401007.tg2)
e2:SetOperation(c71401007.op2)
c:RegisterEffect(e2)
yume.ButterflyCounter()
end
function c71401007.con1(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
function c71401007.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) and Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
yume.RegButterflyCostLimit(e,tp)
end
function c71401007.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c71401007.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c71401007.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end
yume.RegButterflyCostLimit(e,tp)
end
function c71401007.filter2ext(c)
return c:IsFaceup() and c:IsType(TYPE_CONTINUOUS)
end
function c71401007.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71401007.filter2ext,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsPlayerCanDraw(tp) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
end
function c71401007.filter2(c,e,tp)
return c:IsLevel(4) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c71401007.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,CATEGORY_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,2,nil)
if g:GetCount()==0 then return end
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
Duel.ShuffleDeck(tp)
Duel.BreakEffect()
local sg=Duel.GetMatchingGroup(c71401007.filter2,tp,LOCATION_HAND,0,nil,e,tp)
if Duel.Draw(tp,g:GetCount(),REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71401007,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--蝶幻-「胧」
xpcall(function() require("expansions/script/c71401001") end,function() require("script/c71401001") end)
function c71401008.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),aux.NonTuner(Card.IsRace,RACE_SPELLCASTER),1)
c:EnableReviveLimit()
--remove
local e1=Effect.CreateEffect(c)
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:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0xff,0xff)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1)
--place
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71401008,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,71401008)
e2:SetCost(c71401008.cost2)
e2:SetOperation(c71401008.op2)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(71401008,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,71501008)
e3:SetCondition(c71401008.con3)
e3:SetCost(c71401008.cost3)
e3:SetTarget(c71401008.tg3)
e3:SetOperation(c71401008.op3)
c:RegisterEffect(e3)
yume.ButterflyCounter()
end
function c71401008.filterc2(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemoveAsCost()
and (c:IsLocation(LOCATION_SZONE) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) and Duel.IsExistingMatchingCard(c71401008.filter2,tp,LOCATION_DECK,0,1,nil,c,tp)
end
function c71401008.filter2(c,cc,tp)
return c:IsLevel(4) and not c:IsForbidden() and c:CheckUniqueOnField(tp,LOCATION_ONFIELD,cc)
end
function c71401008.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71401008.filterc2,tp,LOCATION_ONFIELD,0,1,nil,tp) and Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c71401008.filterc2,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
yume.RegButterflyCostLimit(e,tp)
end
function c71401008.op1(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 tc=Duel.SelectMatchingCard(tp,c71401008.filter2,tp,LOCATION_DECK,0,1,1,nil,nil,tp):GetFirst()
if tc then
local c=e:GetHandler()
local ctype=Duel.SelectOption(tp,aux.Stringid(71401008,2),aux.Stringid(71401008,3))==0 and TYPE_SPELL or TYPE_TRAP
if Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(ctype+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
if c:IsRelateToEffect(e) and not c:IsImmuneToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(71401008,4)) then
Duel.BreakEffect()
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e2=Effect.CreateEffect(c)
e2:SetCode(EFFECT_CHANGE_TYPE)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e2:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e2)
end
end
end
end
end
function c71401008.con3(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetType()==TYPE_SPELL+TYPE_CONTINUOUS
end
function c71401008.filterc3(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c71401008.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71401008.filterc3,tp,LOCATION_MZONE,0,1,nil) and Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c71401008.filterc3,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
yume.RegButterflyCostLimit(e,tp)
end
function c71401008.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED)
end
function c71401008.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,1,1,nil)
if sg:GetCount()>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--蝶蚀-「巡」
xpcall(function() require("expansions/script/c71401001") end,function() require("script/c71401001") end)
function c71401009.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),4,2)
c:EnableReviveLimit()
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetValue(c71401009.atkval)
c:RegisterEffect(e1)
--remove spell/trap
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71401009,0))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE+TIMING_EQUIP)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,71401009)
e2:SetCondition(c71401009.con2)
e2:SetCost(c71401009.cost2)
e2:SetTarget(c71401009.tg2)
e2:SetOperation(c71401009.op2)
c:RegisterEffect(e2)
--remove monster
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(71401009,1))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,71501009)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCondition(c71401009.con3)
e3:SetCost(c71401009.cost3)
e3:SetTarget(c71401009.tg3)
e3:SetOperation(c71401009.op3)
c:RegisterEffect(e3)
yume.ButterflyCounter()
end
function c71401009.atkfilter(c)
return c:GetOriginalType()&TYPE_MONSTER~=0
end
function c71401009.atkval(e,c)
return Duel.GetMatchingGroupCount(c71401009.atkfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)*200
end
function c71401009.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c71401009.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) and Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
yume.RegButterflyCostLimit(e,tp)
end
function c71401009.filter2(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemove()
end
function c71401009.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71401009.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_ONFIELD)
end
function c71401009.op2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c71401009.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(yume.ButterflyAcLimit)
if Duel.GetCurrentPhase()==PHASE_MAIN1 then
e1:SetReset(RESET_PHASE+PHASE_MAIN1)
else
e1:SetReset(RESET_PHASE+PHASE_MAIN2)
end
Duel.RegisterEffect(e1,1-tp)
if c:IsRelateToEffect(e) and not c:IsImmuneToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(71401009,2)) then
Duel.BreakEffect()
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e2=Effect.CreateEffect(c)
e2:SetCode(EFFECT_CHANGE_TYPE)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e2:SetValue(TYPE_TRAP+TYPE_CONTINUOUS)
c:RegisterEffect(e2)
end
end
end
end
function c71401009.con3(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetType()==TYPE_TRAP+TYPE_CONTINUOUS
end
function c71401009.filterc3(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c71401009.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71401009.filterc3,tp,LOCATION_MZONE,0,1,nil) and Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c71401009.filterc3,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
yume.RegButterflyCostLimit(e,tp)
end
function c71401009.filter3(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function c71401009.tg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and c71401009.filter3(chkc) end
if chk==0 then return Duel.IsExistingTarget(c71401009.filter3,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c71401009.filter3,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c71401009.op3(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
...@@ -22,6 +22,7 @@ function c71402001.initial_effect(c) ...@@ -22,6 +22,7 @@ function c71402001.initial_effect(c)
e2:SetRange(LOCATION_GRAVE+LOCATION_REMOVED) e2:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCost(c71402001.cost2) e2:SetCost(c71402001.cost2)
e2:SetTarget(c71402001.tg3)
e2:SetOperation(c71402001.op2) e2:SetOperation(c71402001.op2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--double tuner check --double tuner check
...@@ -53,9 +54,10 @@ end ...@@ -53,9 +54,10 @@ end
function c71402001.op1(e,tp,eg,ep,ev,re,r,rp) function c71402001.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,71402002,0,TYPES_TOKEN_MONSTER,5000,5000,12,RACE_FIEND,ATTRIBUTE_LIGHT,POS_FACEUP) then if Duel.IsPlayerCanSpecialSummonMonster(tp,71402002,0,TYPES_TOKEN_MONSTER,5000,5000,12,RACE_FIEND,ATTRIBUTE_LIGHT,POS_FACEUP) then
local c=e:GetHandler()
local token=Duel.CreateToken(tp,71402002) local token=Duel.CreateToken(tp,71402002)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
...@@ -63,6 +65,7 @@ function c71402001.op1(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,6 +65,7 @@ function c71402001.op1(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(c71402001.atklimit) e1:SetValue(c71402001.atklimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
token:RegisterEffect(e1) token:RegisterEffect(e1)
Duel.SpecialSummonComplete()
end end
end end
function c71402001.atklimit(e,c) function c71402001.atklimit(e,c)
......
--基础数学老师 巴迪
function c71402003.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c71402003.mfilter,2,2)
--unique
c:SetUniqueOnField(1,0,71402003)
--multi attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK_MONSTER)
e1:SetValue(c71402003.raval)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71402003,0))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_BATTLE_START)
e2:SetTarget(c71402003.tg2)
e2:SetOperation(c71402003.op2)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(71402003,1))
e3:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
e3:SetCountLimit(1)
e3:SetCondition(c71402003.con3)
e3:SetTarget(c71402003.tg3)
e3:SetOperation(c71402003.op3)
c:RegisterEffect(e3)
if not c71402003.global_check then
c71402003.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAIN_SOLVED)
ge1:SetOperation(c71402003.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c71402003.mfilter(c)
return c:GetFlagEffect(71402003)==0 and c:IsLocation(LOCATION_ONFIELD)
end
function c71402003.checkop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if not rc:IsRelateToEffect(re) or not re:IsActiveType(TYPE_MONSTER) then return end
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
if loc==LOCATION_MZONE and rc:GetFlagEffect(71402003)==0 then
rc:RegisterFlagEffect(71402003,RESET_EVENT+RESETS_STANDARD,0,1)
end
end
function c71402003.raval(e,c)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_HAND)
end
function c71402003.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetHandler():GetBattleTarget()
if chk==0 then return tc and tc:IsControler(1-tp) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0)
end
function c71402003.op2(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
if tc:IsRelateToBattle() then
Duel.Remove(tc,POS_FACEDOWN,REASON_RULE)
end
end
function c71402003.con3(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetActivityCount(1-tp,ACTIVITY_SUMMON)+Duel.GetActivityCount(1-tp,ACTIVITY_SPSUMMON)>0
end
function c71402003.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,1)
end
function c71402003.op3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.Draw(1-tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
--出游之月神 --小仓朝日
function c9910052.initial_effect(c) function c9910052.initial_effect(c)
--search --search
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCost(c9910052.thcost)
e1:SetTarget(c9910052.thtg) e1:SetTarget(c9910052.thtg)
e1:SetOperation(c9910052.thop) e1:SetOperation(c9910052.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -18,6 +19,24 @@ function c9910052.initial_effect(c) ...@@ -18,6 +19,24 @@ function c9910052.initial_effect(c)
e2:SetTarget(c9910052.sptg) e2:SetTarget(c9910052.sptg)
e2:SetOperation(c9910052.spop) e2:SetOperation(c9910052.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(9910052,ACTIVITY_SPSUMMON,c9910052.counterfilter)
end
function c9910052.counterfilter(c)
return c:IsRace(RACE_FAIRY)
end
function c9910052.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(9910052,tp,ACTIVITY_SPSUMMON)==0 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(c9910052.splimit)
Duel.RegisterEffect(e1,tp)
end
function c9910052.splimit(e,c)
return not c:IsRace(RACE_FAIRY)
end end
function c9910052.thfilter(c) function c9910052.thfilter(c)
return c:IsSetCard(0x9951) and c:IsType(TYPE_TUNER) and c:IsAbleToHand() return c:IsSetCard(0x9951) and c:IsType(TYPE_TUNER) and c:IsAbleToHand()
...@@ -48,16 +67,15 @@ function c9910052.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,16 +67,15 @@ function c9910052.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_END then
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN,2)
else
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN)
end
e1:SetValue(1) e1:SetValue(1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN)
e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
end end
......
...@@ -5,11 +5,11 @@ function c9910056.initial_effect(c) ...@@ -5,11 +5,11 @@ function c9910056.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--to deck --to deck
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(c9910056.drcon) e1:SetCountLimit(1,9910056)
e1:SetTarget(c9910056.drtg) e1:SetTarget(c9910056.drtg)
e1:SetOperation(c9910056.drop) e1:SetOperation(c9910056.drop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -19,15 +19,10 @@ function c9910056.initial_effect(c) ...@@ -19,15 +19,10 @@ function c9910056.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_TO_GRAVE_REDIRECT) e1:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c9910056.rmcon)
e1:SetTarget(c9910056.rmtarget)
e1:SetTargetRange(0,LOCATION_ONFIELD) e1:SetTargetRange(0,LOCATION_ONFIELD)
e1:SetValue(LOCATION_REMOVED) e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c9910056.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c9910056.filter(c) function c9910056.filter(c)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsRace(RACE_FAIRY) and c:IsAbleToDeck() return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsRace(RACE_FAIRY) and c:IsAbleToDeck()
end end
...@@ -39,17 +34,10 @@ function c9910056.drtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -39,17 +34,10 @@ function c9910056.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c9910056.drop(e,tp,eg,ep,ev,re,r,rp) function c9910056.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c9910056.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,2,2,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c9910056.filter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,2,2,nil)
if g:GetCount()>0 and Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0 then if g:GetCount()>0 and Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
end end
function c9910056.rmcon(e)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,nil)
end
function c9910056.rmtarget(e,c)
return not c:IsLocation(0x80) and c:IsFaceup()
end
...@@ -8,22 +8,19 @@ function c9910059.initial_effect(c) ...@@ -8,22 +8,19 @@ function c9910059.initial_effect(c)
e1:SetCountLimit(1,9910059+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,9910059+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c9910059.activate) e1:SetOperation(c9910059.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--set --move
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetCategory(CATEGORY_POSITION+CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCondition(c9910059.setcon) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetOperation(c9910059.setop) e2:SetCondition(c9910059.seqcon)
e2:SetTarget(c9910059.seqtg)
e2:SetOperation(c9910059.seqop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetRange(LOCATION_FZONE)
e3:SetOperation(c9910059.regop)
c:RegisterEffect(e3)
end end
function c9910059.filter(c) function c9910059.filter(c)
return c:IsFacedown() and c:IsAbleToHand() return c:IsFacedown() and c:IsAbleToHand()
...@@ -47,30 +44,62 @@ function c9910059.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,30 +44,62 @@ function c9910059.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,9910059,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,9910059,RESET_PHASE+PHASE_END,0,1)
end end
end end
function c9910059.regop(e,tp,eg,ep,ev,re,r,rp) function c9910059.seqcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c9910059.seqfilter(c)
return c:IsFaceup() and c:IsRace(RACE_FAIRY)
end
function c9910059.seqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c9910059.seqfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c9910059.seqfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL)>0 end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(9910059,2))
Duel.SelectTarget(tp,c9910059.seqfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c9910059.seqop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local c=e:GetHandler() local c=e:GetHandler()
local turnp=Duel.GetTurnPlayer() local tc=Duel.GetFirstTarget()
local tc=eg:GetFirst() if not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
while tc do Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
if tc:GetSummonPlayer()==turnp then local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local flag=c:GetFlagEffectLabel(9910059) local nseq=math.log(s,2)
if flag then Duel.MoveSequence(tc,nseq)
c:SetFlagEffectLabel(9910059,flag+1) local fid=c:GetFieldID()
tc:RegisterFlagEffect(9910059,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetCondition(c9910059.poscon)
e1:SetOperation(c9910059.posop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c9910059.poscon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc and tc:GetFlagEffectLabel(9910059)==e:GetLabel() then
return true
else else
c:RegisterFlagEffect(9910059,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,1) e:Reset()
end return false
end
tc=eg:GetNext()
end end
end end
function c9910059.setcon(e,tp,eg,ep,ev,re,r,rp) function c9910059.thfilter(c)
local ct=e:GetHandler():GetFlagEffectLabel(9910059) return c:IsSetCard(0x9951) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
return ct and ct>=3
end end
function c9910059.setop(e,tp,eg,ep,ev,re,r,rp) function c9910059.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() Duel.Hint(HINT_CARD,0,9910059)
if c:IsRelateToEffect(e) and c:IsSSetable() then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if Duel.ChangePosition(c,POS_FACEDOWN)~=1 then return end local tc=e:GetLabelObject()
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0) if not tc:IsCanChangePosition() or Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c9910059.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
end end
...@@ -7,13 +7,20 @@ function c9910080.initial_effect(c) ...@@ -7,13 +7,20 @@ function c9910080.initial_effect(c)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--remove --remove
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetDescription(aux.Stringid(9910080,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE) e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_SZONE) e1:SetRange(LOCATION_SZONE)
e1:SetOperation(c9910080.operation) e1:SetCountLimit(2)
e1:SetCondition(c9910080.rmcon)
e1:SetTarget(c9910080.rmtg)
e1:SetOperation(c9910080.rmop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--to deck --to deck
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9910080,3))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DISABLE) e2:SetCategory(CATEGORY_TODECK+CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
...@@ -27,18 +34,24 @@ end ...@@ -27,18 +34,24 @@ end
function c9910080.cfilter(c,tp) function c9910080.cfilter(c,tp)
return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD)
end end
function c9910080.operation(e,tp,eg,ep,ev,re,r,rp) function c9910080.rmcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c9910080.cfilter,1,nil,tp)
end
function c9910080.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE)
end
function c9910080.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if eg:IsExists(c9910080.cfilter,1,nil,tp) if not c:IsRelateToEffect(e) then return end
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
and Duel.SelectYesNo(tp,aux.Stringid(9910080,0)) then
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,2,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,2,nil)
if #g>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
local ct=Duel.GetOperatedGroup():FilterCount(Card.IsAttribute,nil,ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) local ct=Duel.GetOperatedGroup():FilterCount(Card.IsAttribute,nil,ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
if ct==0 and c:IsCanTurnSet() then if ct==0 and c:IsRelateToEffect(e) and c:IsCanTurnSet() then
Duel.BreakEffect() Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN) Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0) Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end end
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function c9910085.initial_effect(c) function c9910085.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c9910085.condition) e1:SetCondition(c9910085.condition)
...@@ -33,41 +33,52 @@ function c9910085.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -33,41 +33,52 @@ function c9910085.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
local cat=e:GetCategory() end
local cate=CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_REMOVE
if bit.band(re:GetHandler():GetOriginalType(),TYPE_MONSTER)~=0 then if bit.band(re:GetHandler():GetOriginalType(),TYPE_MONSTER)~=0 then
e:SetCategory(bit.bor(cat,CATEGORY_SPECIAL_SUMMON)) e:SetCategory(cate+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
else else
e:SetCategory(bit.band(cat,bit.bnot(CATEGORY_SPECIAL_SUMMON))) e:SetCategory(cate)
end
end end
end end
function c9910085.activate(e,tp,eg,ep,ev,re,r,rp) function c9910085.activate(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
if not Duel.NegateActivation(ev) then return end if not Duel.NegateActivation(ev)
if rc:IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 and not rc:IsLocation(LOCATION_HAND+LOCATION_DECK) or not rc:IsRelateToEffect(re) or Duel.Destroy(eg,REASON_EFFECT)==0 then return end
and not rc:IsHasEffect(EFFECT_NECRO_VALLEY) then local b1=not rc:IsLocation(LOCATION_HAND+LOCATION_DECK+LOCATION_REMOVED) and rc:IsAbleToRemove(tp,POS_FACEDOWN)
if e:GetLabel()==1 and rc:IsType(TYPE_MONSTER) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local b2=not (rc:IsLocation(LOCATION_HAND+LOCATION_DECK) or rc:IsLocation(LOCATION_REMOVED) and rc:IsFacedown())
and (not rc:IsLocation(LOCATION_EXTRA) or Duel.GetLocationCountFromEx(tp,tp,nil,rc)>0) and aux.NecroValleyFilter()(rc) and e:GetLabel()==1
and rc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) local b3=rc:IsType(TYPE_MONSTER) and rc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
and Duel.SelectYesNo(tp,aux.Stringid(9910085,0)) then and (not rc:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
or rc:IsLocation(LOCATION_EXTRA) and rc:IsFaceup() and Duel.GetLocationCountFromEx(tp,tp,nil,rc)>0)
local b4=(rc:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) and rc:IsSSetable()
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(9910085,0)
opval[off-1]=1
off=off+1
end
if b2 and (b3 or b4) then
ops[off]=aux.Stringid(9910085,1)
opval[off-1]=2
off=off+1
end
ops[off]=aux.Stringid(9910085,2)
opval[off-1]=3
off=off+1
local op=Duel.SelectOption(tp,table.unpack(ops))
if opval[op]==1 then
Duel.BreakEffect()
Duel.Remove(rc,POS_FACEDOWN,REASON_EFFECT)
elseif opval[op]==2 then
Duel.BreakEffect() Duel.BreakEffect()
if b3 then
Duel.SpecialSummon(rc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) Duel.SpecialSummon(rc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,rc) Duel.ConfirmCards(1-tp,rc)
elseif e:GetLabel()==1 and (rc:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) else
and rc:IsSSetable() and Duel.SelectYesNo(tp,aux.Stringid(9910085,1)) then
Duel.BreakEffect()
Duel.SSet(tp,rc) Duel.SSet(tp,rc)
elseif rc:IsType(TYPE_MONSTER) and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and (not rc:IsLocation(LOCATION_EXTRA) or Duel.GetLocationCountFromEx(1-tp,tp,nil,rc)>0)
and rc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE,1-tp)
and Duel.SelectYesNo(tp,aux.Stringid(9910085,2)) then
Duel.BreakEffect()
Duel.SpecialSummon(rc,0,tp,1-tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,rc)
elseif (rc:IsType(TYPE_FIELD) or Duel.GetLocationCount(1-tp,LOCATION_SZONE)>0)
and rc:IsSSetable() and Duel.SelectYesNo(tp,aux.Stringid(9910085,3)) then
Duel.BreakEffect()
Duel.SSet(tp,rc,1-tp)
end end
end end
end end
...@@ -33,10 +33,10 @@ function c9910088.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -33,10 +33,10 @@ function c9910088.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c9910088.disfilter(c,tp) function c9910088.disfilter(c,tp)
return c:IsDiscardable(REASON_EFFECT) return c:IsSetCard(0x9951) and c:IsType(TYPE_MONSTER) and c:IsDiscardable(REASON_EFFECT)
and Duel.IsExistingMatchingCard(c9910088.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,c) and Duel.IsExistingMatchingCard(c9910088.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,c)
end end
function c9910088.sumfilter(c,tp) function c9910088.sumfilter(c)
return c:IsSummonable(true,nil) and c:IsRace(RACE_FAIRY) return c:IsSummonable(true,nil) and c:IsRace(RACE_FAIRY)
end end
function c9910088.operation(e,tp,eg,ep,ev,re,r,rp) function c9910088.operation(e,tp,eg,ep,ev,re,r,rp)
...@@ -45,7 +45,7 @@ function c9910088.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,7 +45,7 @@ function c9910088.operation(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
if Duel.IsExistingMatchingCard(c9910088.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) if Duel.IsExistingMatchingCard(c9910088.disfilter,tp,LOCATION_HAND,0,1,nil,tp)
and Duel.SelectYesNo(tp,aux.Stringid(9910088,0)) then and Duel.SelectYesNo(tp,aux.Stringid(9910088,0)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
......
...@@ -3,8 +3,8 @@ function c9910213.initial_effect(c) ...@@ -3,8 +3,8 @@ function c9910213.initial_effect(c)
--recover --recover
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9910213,0)) e1:SetDescription(aux.Stringid(9910213,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_RECOVER+CATEGORY_SEARCH+CATEGORY_TOHAND) e1:SetCategory(CATEGORY_RECOVER+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,9910213+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,9910213+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c9910213.target) e1:SetTarget(c9910213.target)
...@@ -32,30 +32,20 @@ function c9910213.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -32,30 +32,20 @@ function c9910213.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c9910213.activate(e,tp,eg,ep,ev,re,r,rp) function c9910213.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c9910213.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
if Duel.Recover(tp,1000,REASON_EFFECT)<=0 then return end if Duel.Recover(tp,1000,REASON_EFFECT)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c9910213.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c9910213.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
function c9910213.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_WIND)
end
function c9910213.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c9910213.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000) Duel.PayLPCost(tp,1000)
end end
function c9910213.spfilter(c,e,tp) function c9910213.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsSetCard(0x955) and (c:IsAbleToHand() or (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) return c:IsSetCard(0x955) and (c:IsLevelBelow(4) or c:IsLink(1)) and (c:IsAbleToHand() or (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
end end
function c9910213.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c9910213.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c9910213.spfilter(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c9910213.spfilter(chkc,e,tp) end
......
...@@ -7,6 +7,7 @@ function c9910237.initial_effect(c) ...@@ -7,6 +7,7 @@ function c9910237.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,9910237)
e1:SetTarget(c9910237.target) e1:SetTarget(c9910237.target)
e1:SetOperation(c9910237.operation) e1:SetOperation(c9910237.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -17,8 +18,8 @@ function c9910237.initial_effect(c) ...@@ -17,8 +18,8 @@ function c9910237.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,9910237) e2:SetCountLimit(1,9910237)
e2:SetCondition(c9910237.tgcon)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetTarget(c9910237.tgtg) e2:SetTarget(c9910237.tgtg)
e2:SetOperation(c9910237.tgop) e2:SetOperation(c9910237.tgop)
...@@ -50,6 +51,9 @@ function c9910237.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,6 +51,9 @@ function c9910237.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function c9910237.tgcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()>0
end
function c9910237.lvfilter(c) function c9910237.lvfilter(c)
return c:IsRace(RACE_PSYCHO) and c:IsAbleToDeck() return c:IsRace(RACE_PSYCHO) and c:IsAbleToDeck()
end end
......
...@@ -12,26 +12,25 @@ function c9910285.initial_effect(c) ...@@ -12,26 +12,25 @@ function c9910285.initial_effect(c)
e1:SetTarget(c9910285.target) e1:SetTarget(c9910285.target)
e1:SetOperation(c9910285.operation) e1:SetOperation(c9910285.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--reload --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,9910286) e2:SetCountLimit(1,9910285+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(c9910285.drcon) e2:SetCondition(c9910285.spcon)
e2:SetTarget(c9910285.drtg) e2:SetValue(c9910285.spval)
e2:SetOperation(c9910285.drop) e2:SetOperation(c9910285.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--move --to hand
local e3=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,9910287) e1:SetCondition(c9910285.thcon)
e3:SetTarget(c9910285.seqtg) e1:SetOperation(c9910285.thop)
e3:SetOperation(c9910285.seqop) c:RegisterEffect(e1)
c:RegisterEffect(e3)
end end
function c9910285.cfilter(c) function c9910285.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsAbleToDeckAsCost() return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsAbleToDeckAsCost()
...@@ -57,49 +56,30 @@ function c9910285.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,49 +56,30 @@ function c9910285.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c9910285.lfilter(c,mc) function c9910285.spcon(e,c)
return c:IsSetCard(0x957) and c:IsType(TYPE_LINK) and c:GetLinkedGroup():IsContains(mc) if c==nil then return true end
end local tp=c:GetControler()
function c9910285.drcon(e,tp,eg,ep,ev,re,r,rp) local zone=Duel.GetLinkedZone(tp)
return Duel.IsExistingMatchingCard(c9910285.lfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e:GetHandler()) return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
end end
function c9910285.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c9910285.spval(e,c)
local h1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) return SUMMON_VALUE_SELF,Duel.GetLinkedZone(c:GetControler())
local h2=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
if chk==0 then return (Duel.IsPlayerCanDraw(tp) or h1==0)
and (Duel.IsPlayerCanDraw(1-tp) or h2==0)
and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,LOCATION_HAND,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,PLAYER_ALL,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1)
end end
function c9910285.drop(e,tp,eg,ep,ev,re,r,rp) function c9910285.lfilter(c,mc)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,LOCATION_HAND) return c:IsSetCard(0x957) and c:IsType(TYPE_LINK) and c:GetLinkedGroup():IsContains(mc)
if Duel.SendtoDeck(g,nil,0,REASON_EFFECT)~=0 then
local og=g:Filter(Card.IsLocation,nil,LOCATION_DECK)
if og:IsExists(Card.IsControler,1,nil,tp) then Duel.ShuffleDeck(tp) end
if og:IsExists(Card.IsControler,1,nil,1-tp) then Duel.ShuffleDeck(1-tp) end
Duel.BreakEffect()
local ct1=og:FilterCount(aux.FilterEqualFunction(Card.GetPreviousControler,tp),nil)
local ct2=og:FilterCount(aux.FilterEqualFunction(Card.GetPreviousControler,1-tp),nil)
Duel.Draw(tp,ct1,REASON_EFFECT)
Duel.Draw(1-tp,ct2,REASON_EFFECT)
end
end
function c9910285.seqfilter(c)
return c:IsFaceup() and c:IsSetCard(0x957)
end end
function c9910285.seqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c9910285.thcon(e,tp,eg,ep,ev,re,r,rp)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c9910285.seqfilter(chkc) end local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(c9910285.seqfilter,tp,LOCATION_MZONE,0,1,nil) return c:GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF
and Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL)>0 end and Duel.IsExistingMatchingCard(c9910285.lfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,c)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(9910285,1))
Duel.SelectTarget(tp,c9910285.seqfilter,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c9910285.seqop(e,tp,eg,ep,ev,re,r,rp) function c9910285.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local c=e:GetHandler()
if not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local e1=Effect.CreateEffect(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE) e1:SetType(EFFECT_TYPE_SINGLE)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
local nseq=math.log(s,2) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
Duel.MoveSequence(tc,nseq) e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_HAND)
c:RegisterEffect(e1)
end end
--星幽洞视 --星幽洞视
function c9910291.initial_effect(c) function c9910291.initial_effect(c)
--Activate --Activate1
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW+CATEGORY_REMOVE) e1:SetDescription(aux.Stringid(9910291,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,9910291+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,9910291+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c9910291.cost) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(c9910291.target) e1:SetTarget(c9910291.target)
e1:SetOperation(c9910291.activate) e1:SetOperation(c9910291.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Activate2
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9910291,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,9910291+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(c9910291.cost)
e1:SetTarget(c9910291.target2)
e1:SetOperation(c9910291.activate2)
c:RegisterEffect(e1)
end
function c9910291.thfilter(c)
return c:IsSetCard(0x957) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
and (c:IsFaceup() or not c:IsLocation(LOCATION_EXTRA))
end
function c9910291.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9910291.thfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(c9910291.chainlm)
end
end
function c9910291.chainlm(e,rp,tp)
return not e:GetHandler():IsType(TYPE_MONSTER) or e:GetHandler():IsType(TYPE_PENDULUM)
end
function c9910291.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c9910291.thfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end end
function c9910291.rfilter(c,e,tp) function c9910291.rfilter(c,e,tp)
return c:IsSetCard(0x957) and Duel.GetMZoneCount(tp,c)>0 return c:IsSetCard(0x957) and Duel.GetMZoneCount(tp,c)>0
...@@ -25,59 +60,28 @@ function c9910291.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -25,59 +60,28 @@ function c9910291.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(g:GetFirst():GetCode()) e:SetLabel(g:GetFirst():GetCode())
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c9910291.target(e,tp,eg,ep,ev,re,r,rp,chk) function c9910291.target2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(tp,6) if chk==0 then return true end
local b1=Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1)
local b2=g:FilterCount(Card.IsAbleToRemove,nil,tp,POS_FACEDOWN)>2
if chk==0 then return b1 or b2 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(c9910291.chainlm) Duel.SetChainLimit(c9910291.chainlm)
end end
end end
function c9910291.chainlm(e,rp,tp) function c9910291.spfilter2(c,e,tp)
return not e:GetHandler():IsType(TYPE_MONSTER) or e:GetHandler():IsType(TYPE_PENDULUM) return c:IsSetCard(0x957) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9910291.thfilter(c)
return c:IsSetCard(0x957) and c:IsAbleToHand()
end end
function c9910291.activate(e,tp,eg,ep,ev,re,r,rp) function c9910291.activate2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local code=e:GetLabel() local code=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c9910291.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,code) local g=Duel.SelectMatchingCard(tp,c9910291.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,code)
if g:GetCount()==0 or Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)==0 then return end if g:GetCount()==0 or Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)==0 then return end
Duel.ShuffleDeck(tp) local tg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c9910291.spfilter2),tp,LOCATION_GRAVE,0,nil,e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tg:GetCount()>0
and Duel.SelectYesNo(tp,aux.Stringid(9910291,2)) then
Duel.BreakEffect() Duel.BreakEffect()
local g=Duel.GetDecktopGroup(tp,6) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local b1=Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1) local sg=tg:Select(tp,1,1,nil)
local b2=g:FilterCount(Card.IsAbleToRemove,nil,tp,POS_FACEDOWN)>2 Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(9910291,0)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(9910291,1)
opval[off-1]=2
off=off+1
end
if off==1 then return end
local op=Duel.SelectOption(tp,table.unpack(ops))
if opval[op]==1 then
Duel.Draw(tp,1,REASON_EFFECT)
Duel.Draw(1-tp,1,REASON_EFFECT)
elseif opval[op]==2 then
local g=Duel.GetDecktopGroup(1-tp,6)
Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=g:Filter(Card.IsAbleToRemove,nil,tp,POS_FACEDOWN)
if tg:GetCount()==0 then return end
local sg=tg:Select(tp,3,3,nil)
Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT)
Duel.ShuffleDeck(1-tp)
end end
end end
--风暴星幽使 伊势琴里 --风暴星幽使
function c9910294.initial_effect(c) function c9910294.initial_effect(c)
--link summon --link summon
aux.AddLinkProcedure(c,nil,2,2,c9910294.lcheck)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_PENDULUM),2,2) --to extra
--to extra & to hand & spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOEXTRA+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) e1:SetDescription(aux.Stringid(9910294,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCategory(CATEGORY_TOEXTRA)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(c9910294.condition) e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c9910294.target) e1:SetCondition(c9910294.tecon)
e1:SetOperation(c9910294.operation) e1:SetCost(c9910294.cost)
e1:SetTarget(c9910294.tetg)
e1:SetOperation(c9910294.teop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9910294,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_RELEASE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c9910294.descon)
e2:SetCost(c9910294.cost)
e2:SetTarget(c9910294.destg)
e2:SetOperation(c9910294.desop)
c:RegisterEffect(e2)
end end
function c9910294.condition(e,tp,eg,ep,ev,re,r,rp) function c9910294.lcheck(g)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) return g:IsExists(Card.IsLinkType,1,nil,TYPE_PENDULUM)
end end
function c9910294.target(e,tp,eg,ep,ev,re,r,rp,chk) function c9910294.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=3 end local c=e:GetHandler()
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) if chk==0 then return c:GetFlagEffect(9910294)==0 end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_DECK) c:RegisterFlagEffect(9910294,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c9910294.tgfilter(c) function c9910294.cfilter1(c,lg)
return c:IsType(TYPE_PENDULUM) and c:IsAbleToGrave() return c:IsFaceup() and lg:IsContains(c) and c:IsSetCard(0x957)
end end
function c9910294.thfilter(c) function c9910294.tecon(e,tp,eg,ep,ev,re,r,rp)
return c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() local lg=e:GetHandler():GetLinkedGroup()
return lg and eg:IsExists(c9910294.cfilter1,1,nil,lg)
end end
function c9910294.spfilter(c,e,tp) function c9910294.tefilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_PENDULUM)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end end
function c9910294.operation(e,tp,eg,ep,ev,re,r,rp) function c9910294.tetg(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return end if chk==0 then return Duel.IsExistingMatchingCard(c9910294.tefilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.ConfirmDecktop(tp,3) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local g=Duel.GetDecktopGroup(tp,3):Filter(Card.IsType,nil,TYPE_PENDULUM) Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
if not g:IsExists(c9910294.tgfilter,1,nil) then Duel.ShuffleDeck(tp) return end end
if Duel.GetFlagEffect(tp,9910494)==0 and Duel.SelectYesNo(tp,aux.Stringid(9910294,4)) then function c9910294.fselect(g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) return g:GetClassCount(Card.GetLocation)==g:GetCount()
local sg0=g:FilterSelect(tp,c9910294.tgfilter,1,1,nil) end
Duel.SendtoGrave(sg0,REASON_EFFECT) function c9910294.teop(e,tp,eg,ep,ev,re,r,rp)
g:Sub(sg0) local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c9910294.tefilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
Duel.RegisterFlagEffect(tp,9910494,RESET_PHASE+PHASE_END,0,1) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(9910294,2))
end local sg=g:SelectSubGroup(tp,c9910294.fselect,false,1,2)
if Duel.GetFlagEffect(tp,9910494)==0 or g:GetCount()==0 then Duel.ShuffleDeck(tp) return end if sg and sg:GetCount()>0 then
if Duel.GetFlagEffect(tp,9910495)==0 and Duel.SelectYesNo(tp,aux.Stringid(9910294,0)) then Duel.SendtoExtraP(sg,nil,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(9910294,3))
local sg1=g:Select(tp,1,1,nil)
Duel.SendtoExtraP(sg1,tp,REASON_EFFECT)
g:Sub(sg1)
Duel.RegisterFlagEffect(tp,9910495,RESET_PHASE+PHASE_END,0,1)
end
if Duel.GetFlagEffect(tp,9910495)==0 or not g:IsExists(c9910294.thfilter,1,nil) then Duel.ShuffleDeck(tp) return end
if Duel.GetFlagEffect(tp,9910496)==0 and Duel.SelectYesNo(tp,aux.Stringid(9910294,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg2=g:FilterSelect(tp,c9910294.thfilter,1,1,nil)
Duel.SendtoHand(sg2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg2)
Duel.ShuffleHand(tp)
g:Sub(sg2)
Duel.RegisterFlagEffect(tp,9910496,RESET_PHASE+PHASE_END,0,1)
end end
if Duel.GetFlagEffect(tp,9910496)==0 or not g:IsExists(c9910294.spfilter,1,nil,e,tp) then Duel.ShuffleDeck(tp) return end end
if Duel.GetFlagEffect(tp,9910497)==0 and Duel.SelectYesNo(tp,aux.Stringid(9910294,2)) then function c9910294.cfilter2(c,tp,zone)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local seq=c:GetPreviousSequence()
local sg3=g:FilterSelect(tp,c9910294.spfilter,1,1,nil,e,tp) if c:IsPreviousControler(1-tp) then seq=seq+16 end
Duel.SpecialSummon(sg3,0,tp,tp,false,false,POS_FACEUP) return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousSetCard(0x957) and bit.extract(zone,seq)~=0
Duel.RegisterFlagEffect(tp,9910497,RESET_PHASE+PHASE_END,0,1) end
function c9910294.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c9910294.cfilter2,1,nil,tp,e:GetHandler():GetLinkedZone())
end
function c9910294.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c9910294.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end end
Duel.ShuffleDeck(tp)
end end
...@@ -3,22 +3,32 @@ function c9910301.initial_effect(c) ...@@ -3,22 +3,32 @@ function c9910301.initial_effect(c)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsRace,RACE_PLANT),1) aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsRace,RACE_PLANT),1)
c:EnableReviveLimit() c:EnableReviveLimit()
--atk limit & disable --draw
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE) e1:SetDescription(aux.Stringid(9910301,0))
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCategory(CATEGORY_DRAW)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCondition(c9910301.discon1) e1:SetCondition(c9910301.drcon)
e1:SetTarget(c9910301.distg) e1:SetTarget(c9910301.drtg)
e1:SetOperation(c9910301.disop) e1:SetOperation(c9910301.drop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() --disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9910301,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCondition(c9910301.discon2) e2:SetCountLimit(1)
e2:SetCondition(c9910301.discon)
e2:SetTarget(c9910301.distg)
e2:SetOperation(c9910301.disop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--to extra --to extra
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -32,44 +42,64 @@ function c9910301.initial_effect(c) ...@@ -32,44 +42,64 @@ function c9910301.initial_effect(c)
e3:SetOperation(c9910301.teop) e3:SetOperation(c9910301.teop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c9910301.discon1(e,tp,eg,ep,ev,re,r,rp) function c9910301.filter(c)
return not Duel.IsExistingMatchingCard(c9910301.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) return c:IsFaceup() and c:IsRace(RACE_PLANT) and c:GetOriginalType()&TYPE_MONSTER~=0
end end
function c9910301.discon2(e,tp,eg,ep,ev,re,r,rp) function c9910301.drcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c9910301.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) return tp==Duel.GetTurnPlayer() and Duel.IsExistingMatchingCard(c9910301.filter,tp,LOCATION_SZONE,0,1,nil)
end end
function c9910301.filter(c) function c9910301.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
return c:IsFaceup() and c:IsSetCard(0x956) if chk==0 then return true end
local gc=Duel.GetMatchingGroupCount(c9910301.filter,tp,LOCATION_SZONE,0,nil)
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,gc)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c9910301.drop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local gc=Duel.GetMatchingGroupCount(c9910301.filter,tp,LOCATION_SZONE,0,nil)
if gc>0 then
Duel.Draw(p,gc,REASON_EFFECT)
end
end
function c9910301.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c9910301.filter,tp,LOCATION_SZONE,0,2,nil)
end end
function c9910301.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c9910301.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chkc then return chkc:IsOnField() and aux.NegateAnyFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
function c9910301.disop(e,tp,eg,ep,ev,re,r,rp) function c9910301.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET) e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_ATTACK) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3) tc:RegisterEffect(e3)
end end
end
end end
function c9910301.tecon(e,tp,eg,ep,ev,re,r,rp) function c9910301.tecon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp return Duel.GetTurnPlayer()==tp
......
...@@ -37,7 +37,6 @@ function c9910302.initial_effect(c) ...@@ -37,7 +37,6 @@ function c9910302.initial_effect(c)
e3:SetRange(LOCATION_GRAVE) e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetCondition(c9910302.tecon) e3:SetCondition(c9910302.tecon)
e3:SetCost(c9910302.cost)
e3:SetTarget(c9910302.tetg) e3:SetTarget(c9910302.tetg)
e3:SetOperation(c9910302.teop) e3:SetOperation(c9910302.teop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
......
...@@ -38,18 +38,55 @@ function c9910305.thop(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -38,18 +38,55 @@ function c9910305.thop(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.ConfirmCards(1-tp,tg) Duel.ConfirmCards(1-tp,tg)
end end
end end
function c9910305.filter(c) function c9910305.filter1(c)
return c:IsSetCard(0x956) and c:IsType(TYPE_MONSTER) and not c:IsCode(9910305) and c:IsAbleToHand() return c:IsSetCard(0x956) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c9910305.filter2(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_PLANT) and c:IsAbleToHand()
end end
function c9910305.target(e,tp,eg,ep,ev,re,r,rp,chk) function c9910305.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9910305.filter,tp,LOCATION_DECK,0,1,nil) end local b1=Duel.IsExistingMatchingCard(c9910305.filter1,tp,LOCATION_DECK,0,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) and Duel.GetFlagEffect(tp,9910305)==0
local b2=Duel.IsExistingMatchingCard(c9910305.filter2,tp,LOCATION_DECK,0,1,nil)
and Duel.GetFlagEffect(tp,9910306)==0
if chk==0 then return b1 or b2 end
end end
function c9910305.operation(e,tp,eg,ep,ev,re,r,rp) function c9910305.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c9910305.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local b1=Duel.IsExistingMatchingCard(c9910305.filter1,tp,LOCATION_DECK,0,1,nil)
and Duel.GetFlagEffect(tp,9910305)==0
local b2=Duel.IsExistingMatchingCard(c9910305.filter2,tp,LOCATION_DECK,0,1,nil)
and Duel.GetFlagEffect(tp,9910306)==0
local op=0
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(9910305,0),aux.Stringid(9910305,1))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(9910305,0))
elseif b2 then op=Duel.SelectOption(tp,aux.Stringid(9910305,1))+1
else return end
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c9910305.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c9910305.filter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
Duel.RegisterFlagEffect(tp,9910305,RESET_PHASE+PHASE_END,0,1)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c9910305.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
Duel.RegisterFlagEffect(tp,9910306,RESET_PHASE+PHASE_END,0,1)
end
end
function c9910305.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not (c:IsType(TYPE_SYNCHRO) and c:IsRace(RACE_PLANT)) and c:IsLocation(LOCATION_EXTRA)
end end
...@@ -3,24 +3,23 @@ function c9910315.initial_effect(c) ...@@ -3,24 +3,23 @@ function c9910315.initial_effect(c)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsRace,RACE_PLANT),1) aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsRace,RACE_PLANT),1)
c:EnableReviveLimit() c:EnableReviveLimit()
--can not be attack target --to grave
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) e1:SetCountLimit(1)
e1:SetCondition(c9910315.atcon) e1:SetCost(c9910315.tgcost)
e1:SetValue(aux.imval1) e1:SetTarget(c9910315.tgtg)
e1:SetOperation(c9910315.tgop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--to grave --Negate
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1) e2:SetCondition(c9910315.negcon)
e2:SetCost(c9910315.tgcost) e2:SetOperation(c9910315.negop)
e2:SetTarget(c9910315.tgtg)
e2:SetOperation(c9910315.tgop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--to extra --to extra
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -34,12 +33,6 @@ function c9910315.initial_effect(c) ...@@ -34,12 +33,6 @@ function c9910315.initial_effect(c)
e3:SetOperation(c9910315.teop) e3:SetOperation(c9910315.teop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c9910315.atfilter(c)
return c:IsFaceup() and c:IsRace(RACE_PLANT)
end
function c9910315.atcon(e)
return Duel.IsExistingMatchingCard(c9910315.atfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler())
end
function c9910315.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) function c9910315.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
...@@ -66,6 +59,23 @@ function c9910315.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,6 +59,23 @@ function c9910315.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end end
end end
function c9910315.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_PLANT) and c:GetOriginalType()&TYPE_MONSTER~=0
end
function c9910315.negcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=c:GetEquipGroup()
return g:IsExists(c9910315.cfilter,1,nil) and rp==1-tp
and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE
and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev) and c:GetFlagEffect(9910315)==0
end
function c9910315.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(9910315,0)) then
Duel.Hint(HINT_CARD,0,9910315)
Duel.NegateEffect(ev)
e:GetHandler():RegisterFlagEffect(9910315,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
end
function c9910315.tecon(e,tp,eg,ep,ev,re,r,rp) function c9910315.tecon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp return Duel.GetTurnPlayer()==tp
end end
......
...@@ -12,8 +12,7 @@ function c9910318.initial_effect(c) ...@@ -12,8 +12,7 @@ function c9910318.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--tohand --tohand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9910318,0)) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_EQUIP)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
...@@ -31,7 +30,7 @@ end ...@@ -31,7 +30,7 @@ end
function c9910318.thfilter(c) function c9910318.thfilter(c)
return c:IsCode(9910307) and c:IsAbleToHand() return c:IsCode(9910307) and c:IsAbleToHand()
end end
function c9910318.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c9910318.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9910318.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c9910318.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
...@@ -46,7 +45,7 @@ function c9910318.thcon2(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,7 +45,7 @@ function c9910318.thcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end end
function c9910318.thfilter2(c) function c9910318.thfilter2(c)
return c:IsSetCard(0x956) and not c:IsCode(9910318) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0x956) and c:IsAbleToHand()
end end
function c9910318.thtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c9910318.thtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c9910318.thfilter2(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c9910318.thfilter2(chkc) end
...@@ -55,9 +54,38 @@ function c9910318.thtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -55,9 +54,38 @@ function c9910318.thtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.SelectTarget(tp,c9910318.thfilter2,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,c9910318.thfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
function c9910318.eqfilter(c,tp)
return c:IsRace(RACE_PLANT) and c:IsAttribute(ATTRIBUTE_LIGHT)
and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function c9910318.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO)
end
function c9910318.thop2(e,tp,eg,ep,ev,re,r,rp) function c9910318.thop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND)
Duel.SendtoHand(tc,nil,REASON_EFFECT) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
local g1=Duel.GetMatchingGroup(aux.NecroValleyFilter(c9910318.eqfilter),tp,LOCATION_GRAVE,0,nil,tp)
local g2=Duel.GetMatchingGroup(c9910318.cfilter,tp,LOCATION_MZONE,0,nil)
if #g1>0 and #g2>0 and Duel.SelectYesNo(tp,aux.Stringid(9910318,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(9910318,1))
local ec=g1:Select(tp,1,1,nil):GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(9910318,2))
local sc=g2:Select(tp,1,1,nil):GetFirst()
Duel.HintSelection(Group.FromCards(ec,sc))
if not Duel.Equip(tp,ec,sc) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c9910318.eqlimit)
e1:SetLabelObject(sc)
ec:RegisterEffect(e1)
end end
end
end
function c9910318.eqlimit(e,c)
return e:GetLabelObject()==c
end end
...@@ -46,8 +46,11 @@ function c9910320.sumop(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,8 +46,11 @@ function c9910320.sumop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x956)) e1:SetTarget(c9910320.extg)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,9910320,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,9910320,RESET_PHASE+PHASE_END,0,1)
end end
function c9910320.extg(e,c)
return c:IsSetCard(0x956) or (c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_PLANT))
end
...@@ -21,7 +21,7 @@ function c9910327.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -21,7 +21,7 @@ function c9910327.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c9910327.synfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c9910327.synfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c9910327.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingTarget(c9910327.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsPlayerCanSpecialSummonMonster(tp,9910328,0,0x4011,0,0,4,RACE_PLANT,ATTRIBUTE_LIGHT) end and Duel.IsPlayerCanSpecialSummonMonster(tp,9910309,0,0x4011,0,0,4,RACE_PLANT,ATTRIBUTE_LIGHT) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c9910327.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c9910327.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
...@@ -29,7 +29,7 @@ function c9910327.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -29,7 +29,7 @@ function c9910327.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c9910327.activate(e,tp,eg,ep,ev,re,r,rp) function c9910327.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,9910328,0,0x4011,0,0,4,RACE_PLANT,ATTRIBUTE_LIGHT) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,9910309,0,0x4011,0,0,4,RACE_PLANT,ATTRIBUTE_LIGHT) then return end
local token=Duel.CreateToken(tp,9910328) local token=Duel.CreateToken(tp,9910328)
if token and Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) if token and Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then
......
--神树精灵 镰鼬
function c9910354.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9910354,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CUSTOM+9910354)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9910354)
e1:SetTarget(c9910354.sptg)
e1:SetOperation(c9910354.spop)
c:RegisterEffect(e1)
--equip
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,9910355)
e2:SetCondition(c9910354.eqcon)
e2:SetTarget(c9910354.eqtg)
e2:SetOperation(c9910354.eqop)
c:RegisterEffect(e2)
--spsummon tuner
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_HANDES)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,9910356)
e3:SetCondition(c9910354.dccon)
e3:SetTarget(c9910354.dctg)
e3:SetOperation(c9910354.dcop)
c:RegisterEffect(e3)
if not c9910354.global_check then
c9910354.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
ge1:SetCode(EVENT_CHAIN_SOLVED)
ge1:SetCondition(c9910354.regcon)
ge1:SetOperation(c9910354.regop)
Duel.RegisterEffect(ge1,0)
end
end
function c9910354.acfilter(c)
return c:IsSetCard(0x956) and c:IsType(TYPE_MONSTER) and c:IsPreviousPosition(POS_FACEUP)
end
function c9910354.regcon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return tg and tg:IsExists(c9910354.acfilter,1,nil)
end
function c9910354.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(re:GetHandler(),EVENT_CUSTOM+9910354,re,r,rp,ep,ev)
end
function c9910354.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 c9910354.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c9910354.eqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
end
function c9910354.cfilter2(c)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO)
end
function c9910354.eqfilter(c)
return c:IsRace(RACE_PLANT) and c:IsAttribute(ATTRIBUTE_LIGHT) and not c:IsForbidden()
end
function c9910354.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c9910354.cfilter2(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c9910354.cfilter2,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c9910354.eqfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c9910354.cfilter2,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK)
end
function c9910354.eqop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if not tc:IsFaceup() or not tc:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local sg=Duel.SelectMatchingCard(tp,c9910354.eqfilter,tp,LOCATION_DECK,0,1,1,nil)
local sc=sg:GetFirst()
if sc then
if not Duel.Equip(tp,sc,tc) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c9910354.eqlimit)
e1:SetLabelObject(tc)
sc:RegisterEffect(e1)
end
end
function c9910354.eqlimit(e,c)
return e:GetLabelObject()==c
end
function c9910354.dccon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetPreviousLocation()==LOCATION_GRAVE
end
function c9910354.dctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1)
end
function c9910354.dcop(e,tp,eg,ep,ev,re,r,rp)
Duel.DiscardHand(1-tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end
--天空漫步者 白濑未萌
function c9910591.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x955),2,2)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DESTROY+CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,9910591)
e1:SetCondition(c9910591.thcon)
e1:SetCost(c9910591.thcost)
e1:SetTarget(c9910591.thtg)
e1:SetOperation(c9910591.thop)
e1:SetLabel(9910591)
c:RegisterEffect(e1)
if not c9910591.global_check then
c9910591.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(c9910591.checkop1)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_CHAIN_NEGATED)
ge2:SetOperation(c9910591.checkop2)
Duel.RegisterEffect(ge2,0)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge3:SetCode(EVENT_CHAIN_SOLVED)
ge3:SetOperation(c9910591.checkop3)
Duel.RegisterEffect(ge3,0)
end
end
function c9910591.checkop1(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if not rc:IsRelateToEffect(re) or not re:IsActiveType(TYPE_MONSTER) or re:GetLabel()==9910591 then return end
local p,loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION)
if loc~=LOCATION_MZONE then return end
if rc:GetFlagEffect(9910591+p)==0 then
rc:RegisterFlagEffect(9910591+p,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1,1)
else
local flag=rc:GetFlagEffectLabel(9910591+p)
if flag then rc:SetFlagEffectLabel(9910591+p,flag+1) end
end
end
function c9910591.checkop2(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if not rc:IsRelateToEffect(re) or not re:IsActiveType(TYPE_MONSTER) or re:GetLabel()==9910591 then return end
local p,loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION)
if loc~=LOCATION_MZONE or rc:GetFlagEffect(9910591+p)==0 then return end
local flag=rc:GetFlagEffectLabel(9910591+p)
if flag==1 then
rc:ResetFlagEffect(9910591+p)
elseif flag then
rc:SetFlagEffectLabel(9910591+p,flag-1)
end
end
function c9910591.checkop3(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if not rc:IsRelateToEffect(re) or not re:IsActiveType(TYPE_MONSTER) or re:GetLabel()==9910591 then return end
local p,loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION)
if loc==LOCATION_MZONE and rc:GetFlagEffect(9910593+p)==0 then
rc:RegisterFlagEffect(9910593+p,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
end
function c9910591.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c9910591.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c9910591.filter1(c)
return c:IsFaceup() and c:IsRace(RACE_PSYCHO) and c:IsAbleToHand()
end
function c9910591.filter2(c,p)
return c:IsFaceup() and c:IsRace(RACE_PSYCHO) and (c:GetFlagEffect(9910591+p)>0 or c:GetFlagEffect(9910593+p)>0)
end
function c9910591.filter3(c,b1,b2,p)
return (b1 and c9910591.filter1(c)) or (b2 and c9910591.filter2(c,p))
end
function c9910591.filter4(c,b2,b3)
return c:IsAbleToHand() or (b2 and b3)
end
function c9910591.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local b1=Duel.IsExistingTarget(c9910591.filter1,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,nil)
local b2=Duel.IsExistingTarget(c9910591.filter2,tp,LOCATION_MZONE,0,1,nil,tp)
and Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil)
and Duel.IsExistingMatchingCard(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,nil)
if chkc then return false end
if chk==0 then return b1 or b2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g1=Duel.SelectTarget(tp,c9910591.filter3,tp,LOCATION_MZONE,0,1,1,nil,b1,b2,p)
local tc=g1:GetFirst()
e:SetLabelObject(tc)
local b3=c9910591.filter2(tc,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g2=Duel.SelectTarget(tp,c9910591.filter4,tp,0,LOCATION_MZONE,1,1,nil,b2,b3)
end
function c9910591.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=e:GetLabelObject()
if tc:IsRelateToEffect(e) and (tc:GetFlagEffect(9910591+tp)>0 or tc:GetFlagEffect(9910593+tp)>0)
and Duel.IsExistingMatchingCard(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(9910591,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local sg=Duel.SelectMatchingCard(tp,aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
if sg:GetCount()>0 then
local sc=sg:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
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)
sc:RegisterEffect(e2)
Duel.AdjustInstantly()
Duel.NegateRelatedChain(sc,RESET_TURN_SET)
Duel.Destroy(sc,REASON_EFFECT)
end
else
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
end
--万界星尘 拉尼亚凯亚
function c9910646.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,10,2,nil,nil,99)
c:EnableReviveLimit()
--atk & def
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(c9910646.atkval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c9910646.imcon)
e3:SetOperation(c9910646.imop)
c:RegisterEffect(e3)
--material
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCategory(CATEGORY_REMOVE)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(c9910646.xmcon)
e4:SetOperation(c9910646.xmop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetOperation(c9910646.valcheck)
e5:SetLabelObject(e4)
c:RegisterEffect(e5)
end
function c9910646.atkval(e,c)
return c:GetOverlayCount()*1000
end
function c9910646.imcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and e:GetHandler():GetFlagEffect(9910646)
end
function c9910646.imop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) and Duel.SelectYesNo(tp,aux.Stringid(9910646,0)) then
if c:RemoveOverlayCard(tp,1,1,REASON_EFFECT)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c9910646.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN)
c:RegisterEffect(e1)
c:RegisterFlagEffect(9910646,RESET_CHAIN,0,1)
end
end
end
function c9910646.efilter(e,re)
return re:GetOwner()~=e:GetOwner()
end
function c9910646.valcheck(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=0
if c:GetSummonType()==SUMMON_TYPE_XYZ then ct=c:GetOverlayCount() end
e:GetLabelObject():SetLabel(ct)
end
function c9910646.xmcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function c9910646.matfilter(c,e)
return c:IsCanOverlay() and not c:IsImmuneToEffect(e)
end
function c9910646.xmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=e:GetLabel()-c:GetOverlayCount()
local loc=LOCATION_ONFIELD+LOCATION_GRAVE
local g=Duel.GetMatchingGroup(c9910646.matfilter,tp,loc,loc,c,e)
if ct<=0 or ct>g:GetCount() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local sg=g:Select(tp,ct,ct,nil)
Duel.HintSelection(sg)
for tc in aux.Next(sg) do
local og=tc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
tc:CancelToGrave()
Duel.Overlay(c,Group.FromCards(tc))
end
end
--引力探测器 天界星琴号
function c9910649.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9910649)
e1:SetCondition(c9910649.spcon)
e1:SetTarget(c9910649.sptg)
e1:SetOperation(c9910649.spop)
c:RegisterEffect(e1)
--disable summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_SUMMON)
e2:SetCountLimit(1,9910650)
e2:SetCondition(c9910649.dscon)
e2:SetCost(c9910649.dscost)
e2:SetTarget(c9910649.dstg)
e2:SetOperation(c9910649.dsop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON)
c:RegisterEffect(e3)
if not c9910649.global_check then
c9910649.global_check=true
local ge1=Effect.GlobalEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_BATTLED)
ge1:SetOperation(c9910649.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c9910649.check(c)
return c and c:IsType(TYPE_XYZ)
end
function c9910649.checkop(e,tp,eg,ep,ev,re,r,rp)
if c9910649.check(Duel.GetAttacker()) or c9910649.check(Duel.GetAttackTarget()) then
Duel.RegisterFlagEffect(tp,9910649,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(1-tp,9910649,RESET_PHASE+PHASE_END,0,1)
end
end
function c9910649.spcon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
and Duel.GetFlagEffect(tp,9910649)>0
end
function c9910649.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 c9910649.thfilter(c)
return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand()
end
function c9910649.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0 then
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c9910649.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9910649,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
sg=sg:Select(tp,1,1,nil)
Duel.BreakEffect()
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
function c9910649.dscon(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0
end
function c9910649.dscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) end
Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST)
end
function c9910649.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 c9910649.xfilter(c,e)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and not c:IsImmuneToEffect(e)
end
function c9910649.ofilter(c,e)
return c:IsCanOverlay() and not c:IsImmuneToEffect(e)
end
function c9910649.dsop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
local g=Duel.GetMatchingGroup(c9910649.xfilter,tp,LOCATION_MZONE,0,nil,e)
local sg=eg:Filter(c9910649.ofilter,nil,e)
if g:GetCount()==0 or sg:GetCount()==0 or Duel.SelectOption(tp,1191,aux.Stringid(9910649,1))==0 then
Duel.SendtoGrave(eg,REASON_EFFECT)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=g:Select(tp,1,1,nil):GetFirst()
local og=Group.CreateGroup()
for sc in aux.Next(sg) do
og:Merge(sc:GetOverlayGroup())
end
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(tc,sg)
end
end
--光影捕捉者 弥界星烛号
function c9910652.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CUSTOM+9910652)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9910652)
e1:SetTarget(c9910652.sptg)
e1:SetOperation(c9910652.spop)
c:RegisterEffect(e1)
--negate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,9910653)
e1:SetCondition(c9910652.negcon)
e1:SetTarget(c9910652.negtg)
e1:SetOperation(c9910652.negop)
c:RegisterEffect(e1)
if not c9910652.global_check then
c9910652.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
ge1:SetCode(EVENT_CHAIN_SOLVED)
ge1:SetCondition(c9910652.regcon)
ge1:SetOperation(c9910652.regop)
Duel.RegisterEffect(ge1,0)
end
end
function c9910652.regcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsType(TYPE_XYZ)
end
function c9910652.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(re:GetHandler(),EVENT_CUSTOM+9910652,re,r,rp,ep,ev)
end
function c9910652.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) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c9910652.spfilter(c,e,tp)
return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9910652.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 return end
local g=Duel.GetMatchingGroup(c9910652.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(9910652,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
function c9910652.negcon(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return bit.band(loc,LOCATION_SZONE)~=0 and re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c9910652.xfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function c9910652.xfilter2(c,e)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and not c:IsImmuneToEffect(e)
end
function c9910652.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
local rc=re:GetHandler()
if chk==0 then return rc:IsCanOverlay()
and Duel.IsExistingMatchingCard(c9910652.xfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function c9910652.negop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc:IsRelateToEffect(re) and not rc:IsImmuneToEffect(e)
and Duel.IsExistingMatchingCard(c9910652.xfilter2,tp,LOCATION_MZONE,0,1,nil,e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local sg=Duel.SelectMatchingCard(tp,c9910652.xfilter2,tp,LOCATION_MZONE,0,1,1,nil,e)
local sc=sg:GetFirst()
rc:CancelToGrave()
Duel.Overlay(sc,Group.FromCards(rc))
if Duel.SelectYesNo(tp,aux.Stringid(9910652,1)) then
Duel.BreakEffect()
Duel.NegateActivation(ev)
end
end
end
--绝界星景
function c9910654.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCondition(c9910654.condition)
e1:SetTarget(c9910654.target)
e1:SetOperation(c9910654.activate)
c:RegisterEffect(e1)
end
function c9910654.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_XYZ)
end
function c9910654.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c9910654.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c9910654.spfilter(c,e,tp)
return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAttack(0) and c:IsDefense(3000)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9910654.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9910654.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c9910654.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,c9910654.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) then
local ct=Duel.GetCurrentChain()
if ct<2 then return end
local te,tep=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
local og=Duel.GetOverlayGroup(tp,1,1)
if tep==1-tp and e:IsHasType(EFFECT_TYPE_ACTIVATE) and og:IsExists(Card.IsAbleToHand,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(9910654,0)) then
Duel.BreakEffect()
local g1=Group.CreateGroup()
Duel.ChangeTargetCard(ct-1,g1)
Duel.ChangeChainOperation(ct-1,c9910654.repop)
end
end
end
function c9910654.repop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetOverlayGroup(tp,1,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local tg=g:FilterSelect(tp,Card.IsAbleToHand,1,1,nil)
if tg:GetCount()>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
end
--超维接触机 浩界星扉号
function c9910666.initial_effect(c)
--summon with no tribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9910666,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(c9910666.ntcon)
c:RegisterEffect(e1)
--counter
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_BECOME_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,9910666)
e2:SetCondition(c9910666.spcon)
e2:SetTarget(c9910666.spcon)
e2:SetOperation(c9910666.spop)
c:RegisterEffect(e2)
--level
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_MOVE)
e3:SetCondition(c9910666.lvcon)
e3:SetTarget(c9910666.lvtg)
e3:SetOperation(c9910666.lvop)
c:RegisterEffect(e3)
end
function c9910666.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c9910666.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
end
function c9910666.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9910666.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9910666.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c9910666.spop(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 g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c9910666.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
local res=tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
if res 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:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
if c:IsRelateToEffect(e) and c:IsAbleToRemove() and Duel.SelectYesNo(tp,aux.Stringid(9910666,1)) then
Duel.BreakEffect()
Duel.Remove(c,0,REASON_EFFECT+REASON_TEMPORARY)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(c)
e1:SetCountLimit(1)
e1:SetOperation(c9910666.retop)
Duel.RegisterEffect(e1,tp)
end
end
function c9910666.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
function c9910666.lvcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_MZONE) and c:IsPreviousLocation(LOCATION_REMOVED) and not c:IsReason(REASON_SPSUMMON)
end
function c9910666.filter(c)
return c:IsFaceup() and c:GetLevel()>0
end
function c9910666.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c9910666.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c9910666.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c9910666.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c9910666.lvop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(9910666,2))
local lv=Duel.AnnounceNumber(tp,1,2,3,4,5)
local sel=0
if tc:GetLevel()<=lv then
sel=Duel.SelectOption(tp,aux.Stringid(9910666,3))
else
sel=Duel.SelectOption(tp,aux.Stringid(9910666,3),aux.Stringid(9910666,4))
end
if sel==1 then
lv=-lv
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCondition(c9910666.drcon)
e1:SetOperation(c9910666.drop)
Duel.RegisterEffect(e1,tp)
end
function c9910666.drcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)<2
end
function c9910666.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,9910666)
local ht=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
if ht<2 then
Duel.Draw(tp,2-ht,REASON_EFFECT)
end
end
...@@ -14,13 +14,19 @@ function c9910807.initial_effect(c) ...@@ -14,13 +14,19 @@ function c9910807.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1,9910807) e2:SetCountLimit(1)
e2:SetCondition(c9910807.thcon) e2:SetCondition(c9910807.thcon)
e2:SetCost(c9910807.thcost) e2:SetCost(c9910807.thcost)
e2:SetTarget(c9910807.thtg) e2:SetTarget(c9910807.thtg)
e2:SetOperation(c9910807.thop) e2:SetOperation(c9910807.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c9910807.exconfilter(c)
return c:IsSetCard(0x6951) and c:IsType(TYPE_FUSION) and c:IsFaceup()
end
function c9910807.excon(tp)
return Duel.IsExistingMatchingCard(c9910807.exconfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c9910807.filter1(c,e) function c9910807.filter1(c,e)
return not c:IsImmuneToEffect(e) return not c:IsImmuneToEffect(e)
end end
...@@ -28,11 +34,30 @@ function c9910807.filter2(c,e,tp,m,f,chkf) ...@@ -28,11 +34,30 @@ function c9910807.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x6951) and (not f or f(c)) return c:IsType(TYPE_FUSION) and c:IsSetCard(0x6951) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end end
function c9910807.fexfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end
function c9910807.frcheck(tp,sg,fc)
return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1
end
function c9910807.gcheck(sg)
return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1
end
function c9910807.target(e,tp,eg,ep,ev,re,r,rp,chk) function c9910807.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp) local mg1=Duel.GetFusionMaterial(tp)
if c9910807.excon(tp) then
local mg2=Duel.GetMatchingGroup(c9910807.fexfilter,tp,LOCATION_DECK,0,nil)
if mg2:GetCount()>0 then
mg1:Merge(mg2)
aux.FCheckAdditional=c9910807.frcheck
aux.GCheckAdditional=c9910807.gcheck
end
end
local res=Duel.IsExistingMatchingCard(c9910807.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) local res=Duel.IsExistingMatchingCard(c9910807.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
aux.FCheckAdditional=nil
aux.GCheckAdditional=nil
if not res then if not res then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
...@@ -49,7 +74,21 @@ end ...@@ -49,7 +74,21 @@ end
function c9910807.activate(e,tp,eg,ep,ev,re,r,rp) function c9910807.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c9910807.filter1,nil,e) local mg1=Duel.GetFusionMaterial(tp):Filter(c9910807.filter1,nil,e)
local exmat=false
if c9910807.excon(tp) then
local mg2=Duel.GetMatchingGroup(c9910807.fexfilter,tp,LOCATION_DECK,0,nil)
if mg2:GetCount()>0 then
mg1:Merge(mg2)
exmat=true
end
end
if exmat then
aux.FCheckAdditional=c9910807.frcheck
aux.GCheckAdditional=c9910807.gcheck
end
local sg1=Duel.GetMatchingGroup(c9910807.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) local sg1=Duel.GetMatchingGroup(c9910807.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
aux.FCheckAdditional=nil
aux.GCheckAdditional=nil
local mg2=nil local mg2=nil
local sg2=nil local sg2=nil
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
...@@ -66,7 +105,13 @@ function c9910807.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,7 +105,13 @@ function c9910807.activate(e,tp,eg,ep,ev,re,r,rp)
local tg=sg:Select(tp,1,1,nil) local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst() local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
if exmat then
aux.FCheckAdditional=c9910807.frcheck
aux.GCheckAdditional=c9910807.gcheck
end
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
aux.FCheckAdditional=nil
aux.GCheckAdditional=nil
tc:SetMaterial(mat1) tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect() Duel.BreakEffect()
......
--创生之础 --创生之础
function c9910816.initial_effect(c) function c9910816.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_PZONE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,9910816)
e1:SetCondition(c9910816.thcon)
e1:SetTarget(c9910816.thtg)
e1:SetOperation(c9910816.thop)
c:RegisterEffect(e1)
--special summon --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9910816,3))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCountLimit(1,9910817) e2:SetCountLimit(1,9910816)
e2:SetCost(c9910816.spcost) e2:SetCost(c9910816.spcost)
e2:SetTarget(c9910816.sptg) e2:SetTarget(c9910816.sptg)
e2:SetOperation(c9910816.spop) e2:SetOperation(c9910816.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--to grave --to grave
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(9910816,3))
e3:SetCategory(CATEGORY_TOGRAVE) e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e3:SetCode(EVENT_CHAINING)
e3:SetCode(EVENT_TO_DECK) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,9910818) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,9910817)
e3:SetCondition(c9910816.tgcon) e3:SetCondition(c9910816.tgcon)
e3:SetTarget(c9910816.tgtg) e3:SetTarget(c9910816.tgtg)
e3:SetOperation(c9910816.tgop) e3:SetOperation(c9910816.tgop)
...@@ -113,8 +100,7 @@ function c9910816.splimit(e,c,tp,sumtp,sumpos) ...@@ -113,8 +100,7 @@ function c9910816.splimit(e,c,tp,sumtp,sumpos)
return bit.band(sumtp,SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK return bit.band(sumtp,SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK
end end
function c9910816.tgcon(e,tp,eg,ep,ev,re,r,rp) function c9910816.tgcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x6951) and rp==tp and re:GetHandler()~=e:GetHandler()
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_EXTRA)
end end
function c9910816.tgfilter(c) function c9910816.tgfilter(c)
return c:IsSetCard(0x6951) and c:IsAbleToGrave() return c:IsSetCard(0x6951) and c:IsAbleToGrave()
......
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