Commit 33d13261 authored by 聖園ミカ's avatar 聖園ミカ 🐟

byd

parent 3ad711b1
No preview for this file type
......@@ -220,14 +220,6 @@
11451901 0 --迷托邦幕启 迷梦
11451902 0 --迷托邦夜守 迷昔
11451906 0 --迷托邦的昨日再演
#115
11500004 0 --从者蔷薇的秘密温室
11500008 0 --单从者蔷薇花体
11500014 0 --枯萎从者蔷薇 失败抵价
11500018 0 --血肉之神的至高灌溉
11500020 0 --血肉祭礼
11500022 0 --红从者蔷薇·诱惑角
11500026 0 --血从者蔷薇·秋
#116
11600051 2 --璃月 申鹤
11600054 2 --璃月 辛焱
......@@ -1162,7 +1154,6 @@
35100143 1 --异质绝望-摇奖机
35100151 1 --异质绝望 新月渚
35100199 0 --异质绝望英雄传说
35100421 0 --时耀恋人 虚梦之冬
#357
35700111 1 --翼战机动-紧急出击
35700121 1 --原型翼战机-变核翼组
......
--多彩的从者蔷薇
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(REASON_COST,tp,s.refilter,1,nil) end
local g=Duel.SelectReleaseGroup(REASON_COST,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)
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)
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*200)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
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(REASON_COST,tp,Card.IsRace,1,nil,RACE_PLANT) end
local g=Duel.SelectReleaseGroup(REASON_COST,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)*100
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:IsAttribute(ATTRIBUTE_DARK) 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
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(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_DARK)
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
--丘比
local m=83250000
local m=98683200
local cm=_G["c"..m]
function cm.initial_effect(c)
......@@ -32,7 +32,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e3)
end
function cm.thfilter(c)
return c:IsSetCard(0xf41) and c:IsType(TYPE_MONSTER) and c:IsType(TYPE_RITUAL) and c:IsAbleToHand()
return c:IsSetCard(0x872) and c:IsType(TYPE_MONSTER) and c:IsType(TYPE_RITUAL) 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
......@@ -50,7 +50,7 @@ end
function cm.cfilter(c)
return c:GetType()==TYPE_SPELL+TYPE_RITUAL and c:IsCode(83250007) and c:IsAbleToGraveAsCost() and c:CheckActivateEffect(true,true,false)~=nil
return c:GetType()==TYPE_SPELL+TYPE_RITUAL and c:IsCode(98683207) and c:IsAbleToGraveAsCost() and c:CheckActivateEffect(true,true,false)~=nil
end
function cm.rscost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
......
--愿望的仪式
local m=83250007
local m=98683207
local cm=_G["c"..m]
function cm.initial_effect(c)
......@@ -19,13 +19,13 @@ end
function cm.ritual_filter(c)
return c:IsSetCard(0xf41)
return c:IsSetCard(0x872)
end
function cm.setfilter(c)
return c:IsFaceup() and c:IsCode(83250000) and c:IsAbleToDeck()
return c:IsFaceup() and c:IsCode(98683200) and c:IsAbleToDeck()
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSSetable()
......
--小丘比
local m=83250017
local m=98683217
local cm=_G["c"..m]
function cm.initial_effect(c)
......@@ -44,7 +44,7 @@ function cm.initial_effect(c)
end
--LINK
function cm.linkcon(c)
return (c:IsSetCard(0xf41) and c:IsLevelBelow(4)) or c:IsCode(83250000)
return (c:IsSetCard(0x872) and c:IsLevelBelow(4)) or c:IsCode(98683200)
end
function cm.matval(e,lc,mg,c,tp)
if e:GetHandler()~=lc then return false,nil end
......@@ -55,7 +55,7 @@ end
--special summon
function cm.spfilter1(c,e,tp)
return c:IsSetCard(0xf41) and c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true,POS_FACEUP)
return c:IsSetCard(0x872) and c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true,POS_FACEUP)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......@@ -86,7 +86,7 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.filter(c)
return c:IsCode(83250025) and c:IsAbleToHand()
return c:IsCode(98683225) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
--魔法少女 七海八千代
local m=83250021
local m=98683221
local cm=_G["c"..m]
function cm.initial_effect(c)
......@@ -32,7 +32,7 @@ end
--atk
function cm.fil1(c)
return c:IsSetCard(0xf41) and c:IsFaceup() and c:IsType(TYPE_RITUAL)
return c:IsSetCard(0x872) and c:IsFaceup() and c:IsType(TYPE_RITUAL)
end
function cm.adval(e,c)
local tp=e:GetHandler():GetControler()
......@@ -43,7 +43,7 @@ end
--sp
function cm.spcfilter(c,tp)
return c:IsPreviousControler(tp) and c:IsPreviousSetCard(0xf41) and c:IsPreviousLocation(LOCATION_MZONE)
return c:IsPreviousControler(tp) and c:IsPreviousSetCard(0x872) and c:IsPreviousLocation(LOCATION_MZONE)
and c:GetReasonPlayer()==1-tp
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
......
--魔法少女 由比鹤乃
local m=83250022
local m=98683222
local cm=_G["c"..m]
function cm.initial_effect(c)
......
--魔法少女 深月菲莉希亚
local m=83250023
local m=98683223
local cm=_G["c"..m]
function cm.initial_effect(c)
......
--魔法少女 二叶莎奈
local m=83250024
local m=98683224
local cm=_G["c"..m]
function cm.initial_effect(c)
......@@ -31,7 +31,7 @@ end
--atk
function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttackTarget()
return at and Duel.GetTurnPlayer()~=tp and at:IsSetCard(0xf41) and at~=e:GetHandler()
return at and Duel.GetTurnPlayer()~=tp and at:IsSetCard(0x872) and at~=e:GetHandler()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
......
--来神滨市吧
local m=83250025
local m=98683225
local cm=_G["c"..m]
function cm.initial_effect(c)
......@@ -15,10 +15,10 @@ function cm.initial_effect(c)
end
function cm.filter(c,e,tp)
return c:IsType(TYPE_RITUAL) and c:IsSetCard(0xf41) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true)
return c:IsType(TYPE_RITUAL) and c:IsSetCard(0x872) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true)
end
function cm.matfil(c,tp)
return c:IsSetCard(0xf41) and Duel.GetMZoneCount(tp,c)>0 and c:IsReleasable()
return c:IsSetCard(0x872) and Duel.GetMZoneCount(tp,c)>0 and c:IsReleasable()
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,e,tp)
......@@ -68,13 +68,13 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
--]]
end
function cm.splimit(e,c)
return not c:IsSetCard(0xf41)
return not c:IsSetCard(0x872)
end
function cm.stfilter(c,tp)
return c:IsCode(83250026) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
return c:IsCode(98683226) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function cm.cfilter(c)
return c:IsCode(83250026) and c:IsFaceup()
return c:IsCode(98683226) and c:IsFaceup()
end
--神滨市
local m=83250026
local m=98683226
local cm=_G["c"..m]
function cm.initial_effect(c)
......@@ -43,11 +43,11 @@ function cm.d2hmatchfilter(c,cd)
return c:IsFaceup() and c:IsCode(cd)
end
function cm.d2hfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xf41) and c:IsAbleToHand()
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x872) and c:IsAbleToHand()
and not Duel.IsExistingMatchingCard(cm.d2hmatchfilter,tp,LOCATION_ONFIELD,0,1,nil,c:GetCode())
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0xf41) and rp==tp
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x872) and rp==tp
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.d2hfilter,tp,LOCATION_DECK,0,nil,tp)
......@@ -91,7 +91,7 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.eftg(e,c)
return c:IsSetCard(0xf41) and c:IsType(TYPE_EFFECT)
return c:IsSetCard(0x872) and c:IsType(TYPE_EFFECT)
end
......
......@@ -174,11 +174,6 @@
#traveler_saga 幻旅传说
!counter 0x1970 记忆指示物
#◇血腥蔷薇 3143919737 115 0x3d1-0x3df
!setname 0x3d0 血肉
!setname 0x3d1 从者蔷薇|非蔷薇
#has_text_rosetoken 从者蔷薇衍生物记述
#神明也会陨落 3267407420 116 0x540-0x54f
!setname 0x3540 G.S
!setname 0x9540 原初的魔神
......@@ -1347,11 +1342,6 @@
!counter 0x1851 传染病指示物
!counter 0x853 灾厄指示物
#魔法纪录 1741642966 832 0xf40-0xf4f
!setname 0xf41 魔法纪录
!setname 0xf43 记忆结晶
!counter 0xf40 因果
#互联网流浪者-深渊 3565313751 842 0x840-0x84f
!setname 0x840 天弃乱域
......@@ -1466,5 +1456,9 @@
##◇小K 1318052139 669
##◇落 2403265619 707-708
##珠泪 773
##魔法纪录 1741642966 832
!setname 0x872 魔法纪录
!setname 0x873 记忆结晶
!counter 0x872 因果
##◇水叶 865
##芙兰朵露 978818523 896
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