Commit 8ec55bfd authored by Tachibana's avatar Tachibana

ndyd

parent a8a2dd13
......@@ -12,33 +12,6 @@
22100121
22100123
22100131
22100201
22100203
22100205
22100207
22100209
22100211
22100213
22100215
22100217
22100219
22100221
22100223
22100225
22100227
22100229
22100231
22100233
22100235
23000242
23000243
23000244
23000245
23000246
23000247
23000248
23000254
23000256
26818038
30099900
33200103
......@@ -49,14 +22,6 @@
22100125
22100127
22100129
23000232
23000233
23000241
23000249
23000251
23000252
23000253
23000255
26818037
!side
30010010
......
#created by ...
#main
33300200
33300201
33300202
33300203
33300204
33300205
33300206
33300207
33500959
33502026
33502701
40006762
......
No preview for this file type
......@@ -495,6 +495,10 @@
20000000 2 --史黛拉
20000050 2 --藏于心之Chein
20000056 0 --疾速机械剑齿虎
20000162 1 --虚构素体 A001
20000163 1 --虚构素体 B001
20000164 1 --虚构素体 C001
20000165 1 --虚构素体 D001
#201
20100214 2 --御刀使-柳濑舞衣
20100233 2 --出阵!刻下一闪之灯火
......@@ -595,15 +599,6 @@
22600104 0 --传灵 月问
22600219 0 --占星少女的启示
#230
23000001 1 --传令旗手
23000070 0 --血族禁忌之书
23000100 0 --血族 地狱挽歌 夜莱
23000200 0 --血腥夜愿 节制
23000232 1 --血族猎手 圣徒教官 凌参
23000233 1 --血族猎手 屠夫修女 凌参
23000241 0 --血族盟约 梦魇骑士
23000243 1 --血族魔物 三头犬
23000245 0 --血族魔物 烈焰梦魇
23000305 1 --白马将军·公孙瓒
23004005 0 --奇妙冒险团 礼物天使
23004020 0 --奇妙冒险团 多彩调配师
......
......@@ -19,10 +19,9 @@ function cm.initial_effect(c)
e2:SetCondition(cm.con1)
e2:SetOperation(cm.op1)
c:RegisterEffect(e2)
end
function cm.filter1(c)
return c:IsType(TYPE_FUSION) and c.fst==nil
return c:IsType(TYPE_FUSION)
end
function cm.con1(e,tp)
local sg=Duel.GetMatchingGroup(cm.filter1,tp,0x7f,0x7f,nil)
......@@ -229,6 +228,7 @@ function cm.rfilter(c,tp)
return c:IsCode(m) and c:IsAbleToRemove() and (not c:IsLocation(LOCATION_ONFIELD) or c:IsFaceup()) and Duel.GetLocationCountFromEx(tp,tp,c)>0
end
function cm.spfilter(c,e,tp)
if c.fst==nil then return false end
return c:IsType(TYPE_FUSION) and Duel.GetMatchingGroupCount(cm.rfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,nil,tp)>=c.fst and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -99,7 +99,7 @@ function cm.sppop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not (c:IsRelateToEffect(e) and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.tdfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp) and c:IsAbleToExtra()) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tdfilte)r,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tdfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if tc:GetCount()>0 then
if Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)~=0 then
Duel.SendtoExtraP(c,nil,REASON_EFFECT)
......
--默示界源核·磐石
local m=22100201
local cm=_G["c"..m]
Suyu_Cjz_ms=Suyu_Cjz_ms or {}
function Suyu_Cjz_ms.hnegate(c,code,acttype,actloc)
local tc=c
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,m)
e1:SetCost(aux.bfgcost)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if ep==tp or c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
return re:IsActiveType(acttype) and Duel.IsChainNegatable(ev) and re:GetActivateLocation()==actloc and Duel.IsExistingMatchingCard(function(c)
return c:IsType(TYPE_RITUAL) and c:IsSetCard(0x8fb)
end,tp,LOCATION_DECK,0,1,nil)
end)
e1:SetTarget(function(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)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end)
c:RegisterEffect(e1)
return e1
end
function Suyu_Cjz_ms.htgth(c,code,attr)
local tc=c
--tograve
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetDescription(aux.Stringid(m,2))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,code+1)
e2:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable(REASON_COST) and Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 and Duel.GetCustomActivityCount(code,tp,ACTIVITY_SPSUMMON)==0 end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_MSET)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetTargetRange(1,0)
e3:SetTarget(function(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsRace(RACE_MACHINE)
end)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end)
e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(function(c)
return c:IsLevel(6) and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_RITUAL) and c:IsAttribute(attr) and c:IsAbleToHand()
end,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,function(c)
return c:IsLevel(6) and c:IsRace(RACE_MACHINE) and c:IsAttribute(attr) and c:IsAbleToHand()
end,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end)
c:RegisterEffect(e2)
return e2
end
function Suyu_Cjz_ms.rcounterfilter(c)
return c:IsRace(RACE_MACHINE)
end
function Suyu_Cjz_ms.ritsp(c,ritmat,ritloc)
local tc=c
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,3))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE+LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg1=Duel.GetRitualMaterial(tp):Filter(Card.IsRace,nil,RACE_MACHINE)
local mg2=nil
if ritmat==0 then mg2=Duel.GetMatchingGroup(Suyu_Cjz_ms.exmfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,nil)
else mg2=Duel.GetMatchingGroup(Suyu_Cjz_ms.remfilter,tp,LOCATION_REMOVED,0,nil) end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(Suyu_Cjz_ms.ritfilter,tp,ritloc,0,1,nil,e,tp,mg1,mg2,ft)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,ritloc)
if ritmat==0 then Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_GRAVE+LOCATION_EXTRA)
else Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,tp,LOCATION_REMOVED) end
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local mg1=Duel.GetRitualMaterial(tp):Filter(Card.IsRace,nil,RACE_MACHINE)
local mg2=nil
if ritmat==0 then mg2=Duel.GetMatchingGroup(Suyu_Cjz_ms.exmfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,nil)
else mg2=Duel.GetMatchingGroup(Suyu_Cjz_ms.remfilter,tp,LOCATION_REMOVED,0,nil) end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,Suyu_Cjz_ms.ritfilter,tp,ritloc,0,1,1,nil,e,tp,mg1,mg2,ft)
local tc=tg:GetFirst()
if tc then
local mg=mg1:Filter(Card.IsCanBeRitualMaterial,tc,tc)
mg:Merge(mg2)
mg:RemoveCard(tc)
local mat=nil
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:FilterSelect(tp,Suyu_Cjz_ms.mfilterf,1,1,nil,tp,mg,tc)
Duel.SetSelectedCard(mat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat2=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc)
mat:Merge(mat2)
end
tc:SetMaterial(mat)
if ritmat==0 then
rmat=mat:Filter(Card.IsLocation,nil,LOCATION_EXTRA)
if #rmat>0 then
Duel.Remove(rmat,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
mat:Sub(rmat)
end
else
rmat=mat:Filter(Card.IsLocation,nil,LOCATION_REMOVED)
if #rmat>0 then
Duel.SendtoGrave(rmat,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
mat:Sub(rmat)
end
end
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end)
c:RegisterEffect(e1)
--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.ritlimit)
c:RegisterEffect(e0)
return e0,e1
end
function Suyu_Cjz_ms.ritfilter(c,e,tp,m1,m2,ft)
if bit.band(c:GetType(),0x81)~=0x81
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c)
mg:Merge(m2)
if ft>0 then
return mg:CheckWithSumGreater(Card.GetRitualLevel,c:GetLevel(),c)
else
return mg:IsExists(Suyu_Cjz_ms.mfilterf,1,nil,tp,mg,c)
end
end
function Suyu_Cjz_ms.mfilterf(c,tp,mg,rc)
if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 then
Duel.SetSelectedCard(c)
return mg:CheckWithSumGreater(Card.GetRitualLevel,rc:GetLevel(),rc)
else return false end
end
function Suyu_Cjz_ms.exmfilter(c)
local res=true
if c:IsLocation(LOCATION_EXTRA) then
res=c:IsType(TYPE_PENDULUM)
end
return c:GetLevel()>0 and c:IsRace(RACE_MACHINE) and res and c:IsAbleToRemove()
end
function Suyu_Cjz_ms.remfilter(c)
return c:GetLevel()>0 and c:IsRace(RACE_MACHINE) and c:IsAbleToGrave()
end
function Suyu_Cjz_ms.ritspeff(c,code,cat,loc,con)
local tc=c
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(code,1))
e2:SetCategory(cat)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end)
e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(con,tp,0,loc,1,nil) end
Duel.SetOperationInfo(0,cat,nil,1,0,0)
end)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(con,tp,0,loc,nil)
if g1:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local sg1=g1:Select(tp,1,1,nil)
local attr=e:GetHandler():GetOriginalAttribute()
local rea=REASON_EFFECT
if Duel.GetMatchingGroupCount(function(c)
return c:IsLevelAbove(12) and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_RITUAL) and c:IsAttribute(attr)
end,tp,LOCATION_MZONE,0,nil)>0 then
rea=REASON_RULE
end
if cat==CATEGORY_TOGRAVE then
Duel.SendtoGrave(sg1,rea)
else
Duel.Remove(sg1,POS_FACEUP,rea)
end
end)
c:RegisterEffect(e2)
return e2
end
function Suyu_Cjz_ms.reth(c,code)
local tc=c
--tograve
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,code)
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local res=c:IsPreviousLocation(LOCATION_EXTRA) and c:IsPreviousPosition(POS_FACEUP)
return c:IsPreviousLocation(LOCATION_GRAVE) or res
end)
e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
local attr=e:GetHandler():GetOriginalAttribute()
if chk==0 then return Duel.IsExistingMatchingCard(function(c)
return c:IsLevelAbove(10) and c:IsRace(RACE_MACHINE) and c:IsAttribute(attr) and c:IsAbleToHand()
end,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local attr=e:GetHandler():GetOriginalAttribute()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,function(c)
return c:IsLevelAbove(10) and c:IsRace(RACE_MACHINE) and c:IsAttribute(attr) and c:IsAbleToHand()
end,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end)
c:RegisterEffect(e2)
return e2
end
function Suyu_Cjz_ms.ritspLP(c,code)
local tc=c
local e3=aux.AddRitualProcGreater2(c,nil,nil,nil,nil)
e3:SetDescription(aux.Stringid(m,6))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCode(0)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_MZONE+LOCATION_PZONE)
e3:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(code)==0 end
c:RegisterFlagEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,5))
end)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,7))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE+LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(code)==0 end
c:RegisterFlagEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,5))
end)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>0 and Duel.IsExistingMatchingCard(Suyu_Cjz_ms.ritfilterLP,tp,LOCATION_HAND,0,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,Suyu_Cjz_ms.ritfilterLP,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local tc=tg:GetFirst()
if tc and ft>0 then
Duel.PayLPCost(tp,tc:GetLevel()*400)
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end)
c:RegisterEffect(e1)
--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.ritlimit)
c:RegisterEffect(e0)
return e0,e1,e3
end
function Suyu_Cjz_ms.ritfilterLP(c,e,tp)
return c:IsRace(RACE_MACHINE) and c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) and Duel.GetLP(tp)>c:GetLevel()*400
end
function Suyu_Cjz_ms.htgthbow(c,code)
local tc=c
--tograve
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetDescription(aux.Stringid(m,8))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,code)
e2:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable(REASON_COST) end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end)
e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
local attr=e:GetHandler():GetOriginalAttribute()
if chk==0 then return Duel.IsExistingMatchingCard(function(c)
return c:IsLevelBelow(6) and c:IsRace(RACE_MACHINE) and c:IsAttribute(attr) and c:IsAbleToHand()
end,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local attr=e:GetHandler():GetOriginalAttribute()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,function(c)
return c:IsLevelBelow(6) and c:IsRace(RACE_MACHINE) and c:IsAttribute(attr) and c:IsAbleToHand()
end,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end)
c:RegisterEffect(e2)
return e2
end
function Suyu_Cjz_ms.ritsprule(c,code,loc,etp,posu,con)
local tc=c
--place
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(con,tp,0,loc,nil)
if #g<1 then return end
if etp==0 then tp=1-tp end
local sg=g:Select(1-tp,1,1,nil)
Duel.Remove(sg,posu,REASON_RULE)
local attr=e:GetHandler():GetOriginalAttribute()
local tg=Duel.GetMatchingGroup(Card.IsCode,e:GetHandlerPlayer(),0,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA+LOCATION_GRAVE+LOCATION_ONFIELD,nil,sg:GetFirst():GetCode())
if Duel.GetMatchingGroupCount(function(c)
return c:IsLevelBelow(6) and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_RITUAL) and c:IsAttribute(attr)
end,tp,LOCATION_MZONE,0,nil)>0 and #tg>0 then
local tg0=tg:Select(1-e:GetHandlerPlayer(),1,1,nil)
Duel.Remove(tg0,posu,REASON_RULE)
end
end)
c:RegisterEffect(e3)
return e3
end
-------------------------------
if not cm then return end
function cm.initial_effect(c)
local e1=Suyu_Cjz_ms.hnegate(c,m,TYPE_MONSTER,LOCATION_HAND)
local e2=Suyu_Cjz_ms.htgth(c,m,ATTRIBUTE_EARTH)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,Suyu_Cjz_ms.rcounterfilter)
end
--默示界源核·烈风
local m=22100203
local cm=_G["c"..m]
Duel.LoadScript("c22100201.lua")
function cm.initial_effect(c)
local e1=Suyu_Cjz_ms.hnegate(c,m,TYPE_SPELL+TYPE_TRAP,LOCATION_ONFIELD)
local e2=Suyu_Cjz_ms.htgth(c,m,ATTRIBUTE_WIND)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,Suyu_Cjz_ms.rcounterfilter)
end
--默示界源核·清露
local m=22100205
local cm=_G["c"..m]
Duel.LoadScript("c22100201.lua")
function cm.initial_effect(c)
local e1=Suyu_Cjz_ms.hnegate(c,m,TYPE_MONSTER,LOCATION_ONFIELD)
local e2=Suyu_Cjz_ms.htgth(c,m,ATTRIBUTE_WATER)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,Suyu_Cjz_ms.rcounterfilter)
end
--默示界源核·薪火
local m=22100207
local cm=_G["c"..m]
Duel.LoadScript("c22100201.lua")
function cm.initial_effect(c)
local e1=Suyu_Cjz_ms.hnegate(c,m,TYPE_SPELL+TYPE_TRAP,LOCATION_HAND)
local e2=Suyu_Cjz_ms.htgth(c,m,ATTRIBUTE_FIRE)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,Suyu_Cjz_ms.rcounterfilter)
end
--默示界源核·晨光
local m=22100209
local cm=_G["c"..m]
Duel.LoadScript("c22100201.lua")
function cm.initial_effect(c)
local e1=Suyu_Cjz_ms.hnegate(c,m,TYPE_MONSTER,LOCATION_GRAVE)
local e2=Suyu_Cjz_ms.htgth(c,m,ATTRIBUTE_LIGHT)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,Suyu_Cjz_ms.rcounterfilter)
end
--默示界源核·黯魂
local m=22100211
local cm=_G["c"..m]
Duel.LoadScript("c22100201.lua")
function cm.initial_effect(c)
local e1=Suyu_Cjz_ms.hnegate(c,m,TYPE_SPELL+TYPE_TRAP,LOCATION_GRAVE)
local e2=Suyu_Cjz_ms.htgth(c,m,ATTRIBUTE_DARK)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,Suyu_Cjz_ms.rcounterfilter)
end
--默示界·锈岩
local m=22100213
local cm=_G["c"..m]
Duel.LoadScript("c22100201.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c)
local e0,e1=Suyu_Cjz_ms.ritsp(c,1,LOCATION_HAND+LOCATION_GRAVE)
local e2=Suyu_Cjz_ms.ritspeff(c,m,CATEGORY_TOGRAVE,LOCATION_MZONE,cm.con)
local e3=Suyu_Cjz_ms.reth(c,m)
end
function cm.con(c)
return c:IsType(TYPE_MONSTER) and c:GetDefense()>=c:GetAttack()
end
\ No newline at end of file
--默示界·飙岚
local m=22100215
local cm=_G["c"..m]
Duel.LoadScript("c22100201.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c)
local e0,e1=Suyu_Cjz_ms.ritsp(c,1,LOCATION_HAND+LOCATION_EXTRA)
local e2=Suyu_Cjz_ms.ritspeff(c,m,CATEGORY_TOGRAVE,LOCATION_SZONE,cm.con)
local e3=Suyu_Cjz_ms.reth(c,m)
end
function cm.con(c)
return c:IsFacedown()
end
\ No newline at end of file
--默示界·潮瀑
local m=22100217
local cm=_G["c"..m]
Duel.LoadScript("c22100201.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c)
local e0,e1=Suyu_Cjz_ms.ritsp(c,0,LOCATION_HAND+LOCATION_EXTRA)
local e2=Suyu_Cjz_ms.ritspeff(c,m,CATEGORY_TOGRAVE,LOCATION_ONFIELD,cm.con)
local e3=Suyu_Cjz_ms.reth(c,m)
end
function cm.con(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsFaceup()
end
\ No newline at end of file
--默示界·爆焰
local m=22100219
local cm=_G["c"..m]
Duel.LoadScript("c22100201.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c)
local e0,e1=Suyu_Cjz_ms.ritsp(c,0,LOCATION_HAND+LOCATION_GRAVE)
local e2=Suyu_Cjz_ms.ritspeff(c,m,CATEGORY_TOGRAVE,LOCATION_MZONE,cm.con)
local e3=Suyu_Cjz_ms.reth(c,m)
end
function cm.con(c)
return c:IsType(TYPE_MONSTER) and c:GetDefense()<=c:GetAttack()
end
\ No newline at end of file
--默示界·幽光
local m=22100221
local cm=_G["c"..m]
Duel.LoadScript("c22100201.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c)
local e0,e1=Suyu_Cjz_ms.ritsp(c,1,LOCATION_EXTRA+LOCATION_GRAVE)
local e2=Suyu_Cjz_ms.ritspeff(c,m,CATEGORY_REMOVE,LOCATION_GRAVE,cm.con)
local e3=Suyu_Cjz_ms.reth(c,m)
end
function cm.con(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
\ No newline at end of file
--默示界·耀暗
local m=22100223
local cm=_G["c"..m]
Duel.LoadScript("c22100201.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c)
local e0,e1=Suyu_Cjz_ms.ritsp(c,1,LOCATION_EXTRA+LOCATION_GRAVE)
local e2=Suyu_Cjz_ms.ritspeff(c,m,CATEGORY_REMOVE,LOCATION_GRAVE,cm.con)
local e3=Suyu_Cjz_ms.reth(c,m)
end
function cm.con(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemove()
end
\ No newline at end of file
--默示界·创生之意
local m=22100225
local cm=_G["c"..m]
Duel.LoadScript("c22100201.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c)
local e0,e1,e5=Suyu_Cjz_ms.ritspLP(c,m)
local e3=Suyu_Cjz_ms.htgthbow(c,m)
local e4=Suyu_Cjz_ms.ritsprule(c,m,LOCATION_MZONE,1,POS_FACEUP,cm.con)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(cm.indcon)
e2:SetTarget(cm.indtg)
e2:SetValue(1)
c:RegisterEffect(e2)
end
function cm.mat_filter(c)
return c:GetOriginalRace()==RACE_MACHINE
end
function cm.con(c)
return c:IsType(TYPE_MONSTER) and c:GetBaseDefense()>=c:GetBaseAttack()
end
function cm.indcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function cm.indtg(e,c)
return c:IsType(TYPE_RITUAL)
end
\ No newline at end of file
--默示界·无限之意
local m=22100227
local cm=_G["c"..m]
Duel.LoadScript("c22100201.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c)
local e0,e1,e5=Suyu_Cjz_ms.ritspLP(c,m)
local e3=Suyu_Cjz_ms.htgthbow(c,m)
local e4=Suyu_Cjz_ms.ritsprule(c,m,LOCATION_ONFIELD,1,POS_FACEUP,cm.con)
--indes
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:SetCondition(cm.indcon)
e2:SetTarget(cm.indtg)
e2:SetValue(cm.atkval)
c:RegisterEffect(e2)
local e6=e2:Clone()
e6:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e6)
end
function cm.mat_filter(c)
return c:GetOriginalRace()==RACE_MACHINE
end
function cm.con(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsFaceup()
end
function cm.indcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function cm.indtg(e,c)
return c:IsType(TYPE_RITUAL)
end
function cm.atkval(e)
return Duel.GetMatchingGroupCount(cm.PD,e:GetHandlerPlayer(),LOCATION_GRAVE+LOCATION_MZONE+LOCATION_EXTRA,0,nil)*300
end
function cm.PD(c)
return c:IsType(TYPE_RITUAL) and c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
\ No newline at end of file
--默示界·永恒之意
local m=22100229
local cm=_G["c"..m]
Duel.LoadScript("c22100201.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c)
local e0,e1,e5=Suyu_Cjz_ms.ritspLP(c,m)
local e3=Suyu_Cjz_ms.htgthbow(c,m)
local e4=Suyu_Cjz_ms.ritsprule(c,m,LOCATION_ONFIELD,1,POS_FACEUP,cm.con)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_DISABLE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(cm.indcon)
e2:SetTarget(cm.indtg)
c:RegisterEffect(e2)
end
function cm.mat_filter(c)
return c:GetOriginalRace()==RACE_MACHINE
end
function cm.con(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsFacedown()
end
function cm.indcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function cm.indtg(e,c)
return c:IsType(TYPE_RITUAL)
end
\ No newline at end of file
--默示界·湮灭之意
local m=22100231
local cm=_G["c"..m]
Duel.LoadScript("c22100201.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c)
local e0,e1,e5=Suyu_Cjz_ms.ritspLP(c,m)
local e3=Suyu_Cjz_ms.htgthbow(c,m)
local e4=Suyu_Cjz_ms.ritsprule(c,m,LOCATION_MZONE,1,POS_FACEUP,cm.con)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(cm.indcon)
e2:SetTarget(cm.indtg)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
end
function cm.mat_filter(c)
return c:GetOriginalRace()==RACE_MACHINE
end
function cm.con(c)
return c:IsType(TYPE_MONSTER) and c:GetBaseDefense()<=c:GetBaseAttack()
end
function cm.indcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function cm.indtg(e,c)
return c:IsType(TYPE_RITUAL)
end
\ No newline at end of file
--默示界·守序之意
local m=22100233
local cm=_G["c"..m]
Duel.LoadScript("c22100201.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c)
local e0,e1,e10=Suyu_Cjz_ms.ritspLP(c,m)
local e3=Suyu_Cjz_ms.htgthbow(c,m)
local e4=Suyu_Cjz_ms.ritsprule(c,m,LOCATION_GRAVE,0,POS_FACEDOWN,cm.con)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_RELEASE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(0,1)
e2:SetCondition(cm.indcon)
e2:SetTarget(cm.indtg)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
--cannot material
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e5:SetTarget(cm.indtg)
e5:SetValue(1)
e5:SetTargetRange(LOCATION_MZONE,0)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e6)
local e7=e5:Clone()
e7:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e7)
local e8=e5:Clone()
e8:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e8)
end
function cm.mat_filter(c)
return c:GetOriginalRace()==RACE_MACHINE
end
function cm.con(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function cm.indcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function cm.indtg(e,c)
return c:IsType(TYPE_RITUAL) and c:IsControler(e:GetHandlerPlayer())
end
\ No newline at end of file
--默示界·自由之意
local m=22100235
local cm=_G["c"..m]
Duel.LoadScript("c22100201.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c)
local e0,e1,e5=Suyu_Cjz_ms.ritspLP(c,m)
local e3=Suyu_Cjz_ms.htgthbow(c,m)
local e4=Suyu_Cjz_ms.ritsprule(c,m,LOCATION_GRAVE,0,POS_FACEDOWN,cm.con)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_REMOVE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCondition(cm.indcon)
e2:SetTarget(cm.indtg)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
end
function cm.mat_filter(c)
return c:GetOriginalRace()==RACE_MACHINE
end
function cm.con(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemove()
end
function cm.indcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function cm.indtg(e,c)
return c:IsType(TYPE_RITUAL)
end
\ No newline at end of file
--翼龙注:系列函数库,不能当卡使用
--卡号范围23000000~23000230
bm=bm or {}
bm.setcode=0x350 --血族
bm.name=23000000
bm.version=20210805
mz=LOCATION_MZONE
pz=LOCATION_PZONE
ex=LOCATION_EXTRA
dk=LOCATION_DECK
ga=LOCATION_GRAVE
sz=LOCATION_SZONE
of=LOCATION_ONFIELD
rm=LOCATION_REMOVED
ha=LOCATION_HAND
fz=LOCATION_FZONE
loc_ncp=mz+rm --need check public
loc_nncp=dk+ha+ga --not need check public
--check name
function bm.nf(c)
return c:IsSetCard(bm.setcode)
end
function bm.yr(c)
return c:IsFaceup() and c:IsCode(23000020,23000150,23000190,23000210)
end
function bm.nfu(c)
return bm.nf(c) and c:IsFaceup()
end
function bm.nfs(c)
return bm.nf(c) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function bm.nfm(c)
return bm.nf(c) and c:IsType(TYPE_MONSTER)
end
function bm.nfp(c,tp)
return c:IsSetCard(bm.setcode) and c:IsControler(tp)
end
--check not target
function bm.cnt(c)
return (c:IsFaceup() and c:IsLocation(loc_ncp)) or (c:IsLocation(loc_nncp) and not c:IsHasEffect(47355498))
end
--to xx check
function bm.nt(c)
return bm.nf(c) and c:IsAbleToHand() and bm.cnt(c)
end
--SpecialSummon check
function bm.spck(c,e,tp,sg,sumtype,pos,num)
sg=sg or nil
sumtype=sumtype or 0
pos=pos or POS_FACEUP
num=num or 1
return bm.nf(c) and bm.cnt(c) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,sumtype,tp,false,false,pos) and Duel.GetMZoneCount(tp,sg)>=num
end
--Xyz success condition
function bm.xyzscon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
--RemoveOverlayCard as cost
function bm.rocost(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
--counterfilter
--Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,bm.counterfilter)
function bm.counterfilter(c)
return bm.nf(c)
end
function bm.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return not bm.nf(c)
end
--SpecialSummon limit cost
function bm.sptgcost(summon_check,cost_func)
return function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 and not cost_func then
return Duel.GetCustomActivityCount(bm.name,tp,ACTIVITY_SUMMON)<=summon_check and Duel.GetCustomActivityCount(bm.name,tp,ACTIVITY_SPSUMMON)==0
elseif chk==0 and cost_func then
return Duel.GetCustomActivityCount(bm.name,tp,ACTIVITY_SUMMON)<=summon_check and Duel.GetCustomActivityCount(bm.name,tp,ACTIVITY_SPSUMMON)==0 and cost_func(e,tp,eg,ep,ev,re,r,rp,0)
end
if cost_func then cost_func(e,tp,eg,ep,ev,re,r,rp,1) 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(bm.sumlimit)
Duel.RegisterEffect(e1,tp)
if summon_check==0 then
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
end
end
--SpecialSummon tg
function bm.sptg(num,loc,filter_func)
return function(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(bm.spck,tp,loc,0,nil,e,tp)
if filter_func then g=g:Filter(filter_func,nil) end
if num==1 then
if chk==0 then return #g>0 end
end
if num==2 then
if chk==0 then
return not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and g:GetClassCount(Card.GetCode)>=2
end
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,num,tp,loc)
end
end
--SpecialSummon OP
function bm.spop(num,loc,dis_flag,filter_func,Other_func)
return function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(bm.spck,tp,loc,0,nil,e,tp)
if filter_func then g=g:Filter(filter_func,nil) end
if num>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if num>1 and g:GetClassCount(Card.GetCode)<2 then return end
if num-1<Duel.GetLocationCount(tp,LOCATION_MZONE) and g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg1=g:Select(tp,1,1,nil)
if num>1 then
g:Remove(Card.IsCode,nil,sg1:GetFirst():GetCode())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg2=g:Select(tp,1,1,nil)
g:Remove(Card.IsCode,nil,sg2:GetFirst():GetCode())
sg1:Merge(sg2)
end
local tc=sg1:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
if dis_flag then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
end
if Other_func then Other_func(tc,c) end
tc=sg1:GetNext()
end
Duel.SpecialSummonComplete()
end
end
end
--atk all
function bm.atkallcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP() and not e:GetHandler():IsHasEffect(EFFECT_ATTACK_ALL)
end
function bm.atkallop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ATTACK_ALL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
--check rank or level
function bm.rol(c)
return c:IsFaceup() and c:GetRank()+c:GetLevel()>0
end
--check atk
function bm.atkc(c)
return c:IsFaceup() and c:IsAttackAbove(1)
end
--Others Synchro materal
--[[
label=0
调整+调整以外的怪兽1只以上
这张卡同调召唤的场合,也可以把自己场上的超量怪兽当作3星怪兽使用。
label=100
「血族」调整2只+调整以外的「血族」怪兽1只
这张卡同调召唤的场合,也可以把自己场上的超量怪兽当作3星调整怪兽使用。
label=50
「血族」同调调整+调整以外的「血族」怪兽1只以上
这张卡同调召唤的场合,也可以把自己场上的超量怪兽当作3星怪兽使用。
--]]
function bm.CheckGroupRecursive(c,sg,g,f,min,max,ext_params)
sg:AddCard(c)
local ct=sg:GetCount()
local res=(ct>=min and f(sg,table.unpack(ext_params))) or (ct<max and g:IsExists(bm.CheckGroupRecursive,1,sg,sg,g,f,min,max,ext_params))
sg:RemoveCard(c)
return res
end
function bm.CheckGroup(g,f,cg,min,max,...)
local min=min or 1
local max=max or g:GetCount()
if min>max then return false end
local ext_params={...}
local sg=Group.CreateGroup()
if cg then sg:Merge(cg) end
local ct=sg:GetCount()
if ct>=min and ct<max and f(sg,...) then return true end
return g:IsExists(bm.CheckGroupRecursive,1,sg,sg,g,f,min,max,ext_params)
end
function bm.val(c,syncard)
local slv=c:GetSynchroLevel(syncard)
if c:IsSynchroType(TYPE_XYZ) and c:IsLocation(LOCATION_MZONE) then
slv=3
end
return slv
end
function bm.SelectGroup(tp,desc,g,f,cg,min,max,...)
local min=min or 1
local max=max or g:GetCount()
local ext_params={...}
local sg=Group.CreateGroup()
if cg then sg:Merge(cg) end
local ct=sg:GetCount()
while ct<max and not (ct>=min and f(sg,...) and not (g:IsExists(bm.CheckGroupRecursive,1,sg,sg,g,f,min,max,ext_params) and Duel.SelectYesNo(tp,210))) do
Duel.Hint(HINT_SELECTMSG,tp,desc)
local tg=g:FilterSelect(tp,bm.CheckGroupRecursive,1,1,sg,sg,g,f,min,max,ext_params)
if tg:GetCount()==0 then error("Incorrect Group Filter",2) end
sg:Merge(tg)
ct=sg:GetCount()
end
return sg
end
function bm.matfilter1(c,syncard,tp,e)
if c:IsFacedown() then return false end
if e:GetLabel()==100 and not bm.nf(c) then return false end
if e:GetLabel()==50 and not (bm.nf(c) and c:IsType(TYPE_SYNCHRO)) then return false end
if c:IsSynchroType(TYPE_XYZ) and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and (c:IsType(TYPE_TUNER) or e:GetLabel()==100) then return true end
return c:IsSynchroType(TYPE_TUNER) and c:IsCanBeSynchroMaterial(syncard) and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE))
end
function bm.matfilter2(c,syncard,tp,e)
if e:GetLabel()==100 and not bm.nf(c) then return false end
if e:GetLabel()==50 and not bm.nf(c) then return false end
if c:IsSynchroType(TYPE_XYZ) and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and (not c:IsType(TYPE_TUNER) or e:GetLabel()==100) then return true end
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and (c:IsNotTuner(syncard) or e:GetLabel()==100) and c:IsCanBeSynchroMaterial(syncard)
and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE))
end
function bm.synfilter(c,syncard,lv,g2,g3,minc,maxc,tp,e)
local tsg=c:IsHasEffect(EFFECT_HAND_SYNCHRO) and g3 or g2
local f=c.tuner_filter
if c.tuner_filter then tsg=tsg:Filter(f,nil) end
return bm.CheckGroup(tsg,bm.goal,Group.FromCards(c),minc,maxc,tp,lv,syncard,c,e)
end
function bm.matfilter100(c)
return not (c:IsType(TYPE_TUNER) or c:IsSynchroType(TYPE_XYZ))
end
function bm.goal(g,tp,lv,syncard,tuc,e)
if Duel.GetLocationCountFromEx(tp,tp,g,syncard)<=0 then return false end
if tuc:IsHasEffect(EFFECT_HAND_SYNCHRO) and g:IsExists(Card.IsLocation,2,tuc,LOCATION_HAND) then return false end
local ct=g:GetCount()
local flag=true
if e:GetLabel()==100 then
flag=g:IsExists(bm.matfilter1,2,nil,syncard,tp,e) and g:IsExists(bm.matfilter100,1,nil)
end
return flag and g:CheckWithSumEqual(bm.val,lv,ct,ct,syncard)
end
function bm.syncon(e,c,tuner,mg)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local minc=2
local maxc=c:GetLevel()
if e:GetLabel()==100 then
minc=3
maxc=3
end
local g1=nil
local g2=nil
local g3=nil
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
if mg then
g1=mg:Filter(bm.matfilter1,nil,c,tp,e)
g2=mg:Filter(bm.matfilter2,nil,c,tp,e)
g3=g2:Clone()
else
local mpg=Duel.GetMatchingGroup(nil,tp,mz,mz,nil)
g1=mpg:Filter(bm.matfilter1,nil,c,tp,e)
g2=mpg:Filter(bm.matfilter2,nil,c,tp,e)
g3=Duel.GetMatchingGroup(bm.matfilter2,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c,tp,e)
end
local lv=c:GetLevel()
local sg=nil
if tuner then
return bm.matfilter1(c,tp,e) and bm.synfilter(tuner,c,lv,g2,g3,minc,maxc,tp,e)
else
return g1:IsExists(bm.synfilter,1,nil,c,lv,g2,g3,minc,maxc,tp,e)
end
end
function bm.syntg(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg)
local minc=2
local maxc=c:GetLevel()
local g1=nil
local g2=nil
local g3=nil
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
if mg then
g1=mg:Filter(bm.matfilter1,nil,c,tp,e)
g2=mg:Filter(bm.matfilter2,nil,c,tp,e)
g3=g2:Clone()
else
local mpg=Duel.GetMatchingGroup(nil,tp,mz,mz,nil)
g1=mpg:Filter(bm.matfilter1,nil,c,tp,e)
g2=mpg:Filter(bm.matfilter2,nil,c,tp,e)
g3=Duel.GetMatchingGroup(bm.matfilter2,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c,tp,e)
end
local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL)
local lv=c:GetLevel()
local tuc=nil
if tuner then
tuc=tuner
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
if not pe then
local t1=g1:FilterSelect(tp,bm.synfilter,1,1,nil,c,lv,g2,g3,minc,maxc,tp,e)
tuc=t1:GetFirst()
else
tuc=pe:GetOwner()
Group.FromCards(tuc):Select(tp,1,1,nil)
end
end
tuc:RegisterFlagEffect(m,RESET_EVENT+0x1fe0000,0,1)
local tsg=tuc:IsHasEffect(EFFECT_HAND_SYNCHRO) and g3 or g2
local f=tuc.tuner_filter
if tuc.tuner_filter then tsg=tsg:Filter(f,nil) end
local g=bm.SelectGroup(tp,HINTMSG_SMATERIAL,tsg,bm.goal,Group.FromCards(tuc),minc,maxc,tp,lv,c,tuc,e)
if g then
g:KeepAlive()
e:SetLabelObject(g)
return true
else return false end
end
function bm.synop(e,tp,eg,ep,ev,re,r,rp,c,tuner,mg)
local g=e:GetLabelObject()
c:SetMaterial(g)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO)
g:DeleteGroup()
end
--equip effect
function bm.eqfilter(c,tp)
return c:IsType(TYPE_MONSTER) and (c:IsControler(tp) or c:IsAbleToChangeControler()) and c:IsFaceup()
end
function bm.eq_add_cost(code,cost)
return function(e,tp,eg,ep,ev,re,r,rp,chk)
if cost then
return cost(e,tp,eg,ep,ev,re,r,rp,chk)
else
if chk==0 then return true end
end
local e01=Effect.CreateEffect(e:GetHandler())
e01:SetType(EFFECT_TYPE_FIELD)
e01:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e01:SetCode(EFFECT_CANNOT_ACTIVATE)
e01:SetTargetRange(1,0)
e01:SetValue(function(e00,re00,tp00)
return re00.__setcountlimit_code.this==code
end)
e01:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e01,tp)
end
end
function bm.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not (c:IsFaceup() and c:IsRelateToEffect(e)) then return end
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(bm.eqfilter),tp,mz+ga,mz+ga,1,1,c,tp)
local tc=g:GetFirst()
if tc then
local f=Card.RegisterEffect
Card.RegisterEffect=function(sc,se,forced)
if not se.__overlay_remove_replace_yilong then
local Effect_copy=Effect
Effect_copy.__overlay_remove_replace_yilong={}
Effect_copy.__setcountlimit_code={}
Effect=Effect_copy
end
if bm.nf(tc) then se.__overlay_remove_replace_yilong.flag=true end
se.__setcountlimit_code.this=tc:GetOriginalCodeRule()
se:SetCost(bm.eq_add_cost(tc:GetOriginalCodeRule(),se:GetCost()))
return f(sc,se,forced)
end
local cid=c:CopyEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD)
Card.RegisterEffect=f
if not Duel.Equip(tp,tc,c) then return end
tc:RegisterFlagEffect(c:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD,0,0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetLabelObject(c)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(bm.eqlimit)
tc:RegisterEffect(e1)
end
end
function bm.eqlimit(e,c)
return c==e:GetLabelObject()
end
function bm.rcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_COST)~=0 and re:IsActivated() and re.__overlay_remove_replace_yilong.flag and ep==e:GetOwnerPlayer() and re:GetActivateLocation()&LOCATION_MZONE~=0 and re:GetHandler()==e:GetHandler()
end
--Fusion Effect
function bm.handfusion(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29280589,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(ha+mz)
e1:SetCost(bm.hfcost)
e1:SetTarget(bm.hftarget)
e1:SetOperation(bm.hfactivate)
return e1
end
function bm.hfcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsLocation(mz) or not e:GetHandler():IsPublic() end
end
function bm.hffilter1(c,e)
return not c:IsImmuneToEffect(e)
end
function bm.hffilter2(c,e,tp,m,f,gc,chkf)
return c:IsType(TYPE_FUSION) and bm.nf(c) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc,chkf)
end
function bm.hftarget(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local res=Duel.IsExistingMatchingCard(bm.hffilter2,tp,ex,0,1,nil,e,tp,mg1,nil,c,chkf)
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(bm.hffilter2,tp,ex,0,1,nil,e,tp,mg2,mf,c,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,ex)
end
function bm.hfactivate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
local mg1=Duel.GetFusionMaterial(tp):Filter(bm.hffilter1,nil,e)
local sg1=Duel.GetMatchingGroup(bm.hffilter2,tp,ex,0,nil,e,tp,mg1,nil,c,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(bm.hffilter2,tp,ex,0,nil,e,tp,mg2,mf,c,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,c,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,c,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
--EVENT add
EVENT_ATTACK_UP_YL = EVENT_CUSTOM+23000254 --攻击力上升(血族死敌 凯恩)
bm.atkup_cache = bm.atkup_cache or {}
function bm.isthis(c,tc)
return c==tc
end
function bm.add_atkup_event_check(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ADJUST)
e1:SetOperation(bm.atkup_event_check_op)
return e1
end
function bm.atkup_event_check_op()
local g=Duel.GetFieldGroup(0,mz,mz)
local now={}
for tc in aux.Next(g) do
local new={}
local tce={tc:IsHasEffect(EFFECT_UPDATE_ATTACK)}
local vf
for k,v in pairs(tce) do
local flag=false
for k1,v1 in pairs(bm.atkup_cache) do
if v==v1 then flag=true end
end
if not flag then
vf=v:GetValue()
if tc:IsHasEffect(EFFECT_REVERSE_UPDATE) then
if type(vf) == "function" and vf(v,tc)<0 then
table.insert(new,v)
elseif vf<0 then
table.insert(new,v)
end
else
if type(vf) == "function" and vf(v,tc)>0 then
table.insert(new,v)
elseif vf>0 then
table.insert(new,v)
end
end
end
table.insert(now,v)
end
for k2,v2 in pairs(new) do
Duel.RaiseSingleEvent(tc,EVENT_ATTACK_UP_YL,v2,0,0,0,0)
end
end
bm.atkup_cache=now
end
function bm.atkup_event_multiop(e,tp,eg,ep,ev,re,r,rp)
local vf=re:GetValue()
local vf_c=vf
vf=function(te,tc,...)
local val
if type(vf_c) == "function" then
val=vf_c(te,tc,...)
else
val=vf_c
end
if val>0 and tc==e:GetHandler() then
return val*2
else
return val
end
end
re:SetValue(vf)
end
--传令旗手
function c23000001.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,23000001)
e1:SetCost(c23000001.thcost)
e1:SetTarget(c23000001.sptg)
e1:SetOperation(c23000001.spop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,23000001)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c23000001.target)
e2:SetOperation(c23000001.spop2)
c:RegisterEffect(e2)
end
function c23000001.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 c23000001.cfilter(c,tc)
return c:IsSynchroSummonable(tc)
end
function c23000001.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_SYNCHRO_MATERIAL,tp,false,false) and
Duel.IsExistingMatchingCard(c23000001.cfilter,tp,LOCATION_EXTRA,0,1,nil,c)
and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR) and c:IsType(TYPE_TUNER) and c:IsLevelBelow(4)
end
function c23000001.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c23000001.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonCount(tp,2) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c23000001.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c23000001.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
tc=g:GetFirst()
Duel.SpecialSummonStep(tc,SUMMON_VALUE_SYNCHRO_MATERIAL,tp,tp,false,false,POS_FACEUP)
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=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e2)
Duel.SpecialSummonComplete()
Duel.RaiseEvent(c,EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
if not tc:IsLocation(LOCATION_MZONE) then return end
local kg=Duel.GetMatchingGroup(c23000001.cfilter,tp,LOCATION_EXTRA,0,nil,tc)
if kg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=kg:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),tc)
end
end
end
function c23000001.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c23000001.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c23000001.spfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c23000001.spfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,tp,LOCATION_EXTRA)
end
function c23000001.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if aux.NecroValleyNegateCheck(tc) then return end
if tc:IsRelateToEffect(e) then
if Duel.SpecialSummonStep(tc,SUMMON_VALUE_SYNCHRO_MATERIAL,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)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e2)
Duel.SpecialSummonComplete()
Duel.RaiseEvent(c,EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
if not tc:IsLocation(LOCATION_MZONE) then return end
local g=Duel.GetMatchingGroup(c23000001.cfilter,tp,LOCATION_EXTRA,0,nil,tc)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),tc)
end
end
end
end
--血族 灵魂歌者 夜莱
local m=23000010
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,5,3,cm.ovfilter,aux.Stringid(bm.name,9),3,cm.xyzop)
c:EnableReviveLimit()
--xyz success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(bm.name,0))
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(bm.xyzscon)
e1:SetCost(bm.sptgcost(99))
e1:SetTarget(bm.sptg(2,dk))
e1:SetOperation(bm.spop(2,dk,true))
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(bm.name,ACTIVITY_SPSUMMON,bm.counterfilter)
--attack all
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(bm.name,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(bm.atkallcon)
e2:SetCost(bm.rocost)
e2:SetOperation(bm.atkallop)
c:RegisterEffect(e2)
--damage
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(bm.name,2))
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCondition(cm.damcon)
e3:SetTarget(cm.damtg)
e3:SetOperation(cm.damop)
c:RegisterEffect(e3)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsCode(23000100)
end
function cm.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,m)==0 end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function cm.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local t=Duel.GetAttackTarget()
if ev==1 then t=Duel.GetAttacker() end
e:SetLabel(t:GetAttack()/2)
return t:GetLocation()==LOCATION_GRAVE and t:IsType(TYPE_MONSTER)
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(e:GetLabel())
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetLabel())
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
\ No newline at end of file
--血族 漆黑之觋 夜刃
local m=23000020
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
function cm.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,cm.mfilter,cm.xyzcheck,2,2)
--xyz success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(bm.name,3))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCondition(bm.xyzscon)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,0,of,1,nil,TYPE_SPELL+TYPE_TRAP)end
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsType,tp,0,of,nil,TYPE_SPELL+TYPE_TRAP)
Duel.SendtoGrave(g,REASON_EFFECT)
end)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(bm.name,4))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,m)
e2:SetCondition(bm.xyzscon)
e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,0,of,1,nil,TYPE_MONSTER)end
end)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsType,tp,0,of,nil,TYPE_MONSTER)
Duel.SendtoGrave(g,REASON_EFFECT)
end)
c:RegisterEffect(e2)
--effect gain
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(cm.eftg)
e3:SetOperation(cm.efop)
c:RegisterEffect(e3)
end
function cm.mfilter(c,xyzc)
return c:IsXyzType(TYPE_XYZ) and bm.nf(c) and c:IsRank(5)
end
function cm.xyzcheck(g)
return g:GetClassCount(Card.GetRank)==1
end
function cm.eftgfil(c)
return bm.nf(c) and c:IsType(TYPE_XYZ)
end
function cm.eftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(cm.eftgfil,tp,ga,0,1,nil) end
local g=Duel.SelectTarget(tp,cm.eftgfil,tp,ga,0,1,1,nil)
e:SetLabel(g:GetFirst():GetOriginalCode())
end
function cm.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local code=e:GetLabel()
local cid=c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end
--血腥夜愿
local m=23000030
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
function cm.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e0:SetTarget(cm.target)
e0:SetOperation(cm.operation)
c:RegisterEffect(e0)
--atkup
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(bm.name,6))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCountLimit(1)
e4:SetTarget(cm.atktg)
e4:SetOperation(cm.atkop)
c:RegisterEffect(e4)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(bm.nt,tp,dk,0,nil)
if c:IsRelateToEffect(e) and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(bm.name,5)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=g:Select(tp,1,1,nil):GetFirst()
if tc then
Duel.SendtoHand(tc,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function cm.filter(c)
return bm.nfu(c) and c:GetLevel()>0
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,mz,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.filter,tp,mz,0,1,1,nil)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(tc:GetLevel()*300)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
--血腥夜愿 世界
local m=23000040
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
function cm.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(bm.name,7))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(fz)
e2:SetCountLimit(1)
e2:SetCost(cm.spcost)
e2:SetTarget(bm.sptg(1,ga))
e2:SetOperation(bm.spop(1,ga,false))
c:RegisterEffect(e2)
--atk/def up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_FZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(bm.nfu))
e1:SetValue(500)
c:RegisterEffect(e1)
local e3=e1:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
\ No newline at end of file
--血族 暮夜巡游 小欧
local m=23000050
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,5,3,cm.ovfilter,aux.Stringid(bm.name,9),3,cm.xyzop)
c:EnableReviveLimit()
--Recover
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(bm.name,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(bm.rocost)
e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(bm.rol,tp,0,mz,1,nil)end
end)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
--atk limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e3:SetRange(mz)
e3:SetTargetRange(0,1)
c:RegisterEffect(e3)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsCode(23000140)
end
function cm.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,m)==0 end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,bm.rol,tp,0,mz,1,1,nil):GetFirst()
if tc then
local lv=tc:GetLevel()+tc:GetRank()
Duel.Recover(tp,lv*500,REASON_EFFECT)
end
end
--血族 永夜 莉萝爱
local m=23000060
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
function cm.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,cm.mfilter,cm.xyzcheck,2,2)
--Recover
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(mz)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCondition(cm.condition)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
--destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(cm.desreptg)
e3:SetValue(cm.desrepval)
e3:SetOperation(cm.desrepop)
c:RegisterEffect(e3)
--effect gian
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_ADJUST)
e5:SetRange(LOCATION_MZONE)
e5:SetOperation(cm.efop)
c:RegisterEffect(e5)
end
function cm.mfilter(c,xyzc)
return c:IsXyzType(TYPE_XYZ) and bm.nf(c) and c:IsRank(5)
end
function cm.xyzcheck(g)
return g:GetClassCount(Card.GetRank)==1
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and bm.nfu(Duel.GetAttacker())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ev)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,0,0,tp,ev)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function cm.effilter(c)
return c:IsType(TYPE_MONSTER) and c:IsType(TYPE_XYZ)
end
function cm.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetMaterial()
local wg=ct:Filter(cm.effilter,nil,tp)
local wbc=wg:GetFirst()
while wbc do
local code=wbc:GetOriginalCode()
if c:IsFaceup() and c:GetFlagEffect(code)==0 then
c:CopyEffect(code,RESET_EVENT+0x1fe0000+EVENT_CHAINING,1)
c:RegisterFlagEffect(code,RESET_EVENT+0x1fe0000+EVENT_CHAINING,0,1)
end
wbc=wg:GetNext()
end
end
function cm.repfilter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function cm.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(cm.repfilter,1,nil,tp)
and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function cm.desrepval(e,c)
return cm.repfilter(c,e:GetHandlerPlayer())
end
function cm.desrepop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
Duel.Hint(HINT_CARD,0,m)
end
\ No newline at end of file
--血族禁忌之书
local m=23000070
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--return
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(bm.name,8))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.retg)
e2:SetOperation(cm.reop)
c:RegisterEffect(e2)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
function cm.tgfilter(c)
return c:IsAbleToGrave() and c:IsRace(RACE_ZOMBIE)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,dk,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,dk,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function cm.refilter(c)
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and c:IsAbleToGrave()
end
function cm.retg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.refilter,tp,rm,0,1,nil) end
end
function cm.reop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.refilter,tp,rm,0,1,1,nil)
if #g>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
\ No newline at end of file
--血族 裂空掠影 小爱
local m=23000080
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,5,3,cm.ovfilter,aux.Stringid(bm.name,9),3,cm.xyzop)
c:EnableReviveLimit()
--cannot be target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.tgcon)
e1:SetValue(aux.imval1)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(bm.name,6))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(bm.rocost)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsCode(23000130)
end
function cm.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,m)==0 end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function cm.tgcon(e)
return Duel.IsExistingMatchingCard(bm.nfu,e:GetHandlerPlayer(),mz,0,1,e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMatchingGroup(Card.IsFaceup,tp,0,mz,e:GetHandler()):GetSum(Card.GetAttack)>0 end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(bm.atkc,tp,0,mz,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=g:Select(tp,1,1,nil):GetFirst()
if c:IsFaceup() and c:IsRelateToEffect(e) and tc then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
e1:SetValue(tc:GetAttack())
c:RegisterEffect(e1)
end
end
--血族精英刺客
local m=23000090
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
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:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.spcon)
c:RegisterEffect(e1)
--get effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_XMATERIAL)
e2:SetCode(EFFECT_PIERCE)
e2:SetCondition(cm.condition)
c:RegisterEffect(e2)
end
function cm.spcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function cm.condition(e)
return bm.nf(e:GetHandler())
end
\ No newline at end of file
--血族 地狱挽歌 夜莱
local m=23000100
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,bm.nf,3,2)
c:EnableReviveLimit()
--xyz success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(bm.name,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_ACTION+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCondition(bm.xyzscon)
e1:SetCost(bm.sptgcost(0,nil))
e1:SetTarget(bm.sptg(1,ga,cm.spfilter))
e1:SetOperation(bm.spop(1,ga,false,cm.spfilter))
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(bm.name,ACTIVITY_SPSUMMON,bm.counterfilter)
Duel.AddCustomActivityCounter(bm.name,ACTIVITY_SUMMON,bm.counterfilter)
--attack all
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(bm.name,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(bm.atkallcon)
e2:SetCost(bm.rocost)
e2:SetOperation(bm.atkallop)
c:RegisterEffect(e2)
end
function cm.spfilter(c)
return c:IsLevelBelow(3)
end
\ No newline at end of file
--血族 夜莱
local m=23000110
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
function cm.initial_effect(c)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_HAND)
e2:SetTarget(cm.reptg)
e2:SetValue(cm.repval)
e2:SetOperation(cm.repop)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(bm.name,7))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,m)
e3:SetCost(bm.sptgcost(99))
e3:SetCondition(cm.spcon)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
end
function cm.repfilter(c,tp)
return bm.nfu(c) and c:IsOnField() 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)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() and not c:IsStatus(STATUS_DESTROY_CONFIRMED)
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.SendtoGrave(e:GetHandler(),REASON_EFFECT+REASON_DISCARD+REASON_REPLACE)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(bm.yr,tp,mz,0,1,nil) and aux.exccon(e)
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
--绝命的血族信件
local m=23000120
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(bm.name,7))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(bm.sptg(1,ga+ha))
e1:SetOperation(bm.spop(1,ga+ha,false))
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_GRAVE_ACTION+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost)
e2:SetCountLimit(1)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.thfilter(c)
return bm.nt(c) and c:IsType(TYPE_MONSTER)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,ga,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_GRAVE_ACTION,nil,1,tp,ga)
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,ga,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=23000130
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,bm.nf,3,2)
c:EnableReviveLimit()
--cannot be target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.tgcon)
e1:SetValue(aux.imval1)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(bm.name,6))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(bm.rocost)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
function cm.tgcon(e)
return Duel.IsExistingMatchingCard(bm.nfu,e:GetHandlerPlayer(),mz,0,1,e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMatchingGroup(Card.IsFaceup,tp,0,mz,e:GetHandler()):GetSum(Card.GetAttack)>0 end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(bm.atkc,tp,0,mz,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=g:Select(tp,1,1,nil):GetFirst()
if c:IsFaceup() and c:IsRelateToEffect(e) and tc then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
e1:SetValue(tc:GetAttack()/2)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--血族 血之心 小欧
local m=23000140
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,bm.nf,3,2)
c:EnableReviveLimit()
--atk limit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(0,LOCATION_MZONE)
e4:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e4:SetValue(cm.atlimit)
c:RegisterEffect(e4)
--pos
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(73580471,1))
e2:SetCategory(CATEGORY_POSITION+CATEGORY_ATKCHANGE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(bm.rocost)
e2:SetTarget(cm.postg)
e2:SetOperation(cm.posop)
c:RegisterEffect(e2)
end
function cm.atlimit(e,c)
return c~=e:GetHandler()
end
function cm.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDefensePos() end
if chk==0 then return Duel.IsExistingTarget(Card.IsDefensePos,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DEFENSE)
local g=Duel.SelectTarget(tp,Card.IsDefensePos,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function cm.posop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc or tc:IsAttackPos() or not tc:IsRelateToEffect(e) then return end
if Duel.ChangePosition(tc,POS_FACEUP_ATTACK)==0 then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(0)
tc:RegisterEffect(e1)
end
\ No newline at end of file
--血族 夜刃
local m=23000150
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
function cm.initial_effect(c)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(bm.name,3))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
local e1=e2:Clone()
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e1)
--spsummon and to grave
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCountLimit(1,m+1)
e3:SetCondition(cm.sptgcon)
e3:SetTarget(cm.sptgtg)
e3:SetOperation(cm.sptgop)
c:RegisterEffect(e3)
end
function cm.thfilter(c)
return bm.nt(c) and c:IsType(TYPE_SPELL+TYPE_TRAP)
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.sptgcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO and c:GetReasonCard():IsSetCard(bm.setcode)
end
function cm.filter(c,e,tp)
return c:IsSetCard(bm.setcode) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelBelow(4)
end
function cm.sptgtg(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,ga,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,ga)
end
function cm.sptgop(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,ga,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e2:SetValue(cm.synlimit)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
Duel.SpecialSummonComplete()
end
end
function cm.synlimit(e,c)
if not c then return false end
return not c:IsSetCard(bm.setcode)
end
--血族 小欧
local m=23000160
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
function cm.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.drcon)
e1:SetTarget(cm.drtg)
e1:SetOperation(cm.drop)
c:RegisterEffect(e1)
local e4=e1:Clone()
e4:SetCode(EVENT_REMOVE)
c:RegisterEffect(e4)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(bm.name,3))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_XYZ)
and c:IsPreviousLocation(LOCATION_OVERLAY)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)==2 then
Duel.DiscardHand(p,nil,1,1,REASON_EFFECT+REASON_DISCARD,nil)
end
end
function cm.thfilter(c)
return bm.nt(c) and c:IsType(TYPE_MONSTER)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--血族 莉萝爱
local m=23000170
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(bm.name,7))
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)
--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:SetCondition(cm.efcon)
e2:SetOperation(cm.efop)
c:RegisterEffect(e2)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(bm.nfu,tp,mz,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.efcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return r==REASON_XYZ and c:GetReasonCard():IsSetCard(bm.setcode)
end
function cm.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
e1:SetDescription(aux.Stringid(bm.name,6))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.atkcon)
e1:SetOperation(cm.atkop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--血族 小爱
local m=23000180
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
function cm.initial_effect(c)
--Summon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(bm.name,7))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(bm.sptg(1,ha))
e1:SetOperation(bm.spop(1,ha,false))
c:RegisterEffect(e1)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCondition(cm.descon)
e3:SetTarget(cm.destg)
e3:SetOperation(cm.desop)
c:RegisterEffect(e3)
local e2=e3:Clone()
e2:SetCode(EVENT_REMOVE)
c:RegisterEffect(e2)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_XYZ)
and c:IsPreviousLocation(LOCATION_OVERLAY)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,mz,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tc=Duel.SelectMatchingCard(tp,nil,tp,0,mz,1,1,nil):GetFirst()
if tc then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--血族 古典巫师 夜刃
local m=23000190
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,bm.nf,3,2)
c:EnableReviveLimit()
--xyz success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(bm.name,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCondition(bm.xyzscon)
e1:SetCost(bm.sptgcost(0,nil))
e1:SetTarget(bm.sptg(1,dk,cm.spfilter))
e1:SetOperation(bm.spop(1,dk,false,cm.spfilter))
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(bm.name,ACTIVITY_SPSUMMON,bm.counterfilter)
Duel.AddCustomActivityCounter(bm.name,ACTIVITY_SUMMON,bm.counterfilter)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(48905153,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCost(bm.rocost)
e3:SetTarget(cm.destg)
e3:SetOperation(cm.desop)
c:RegisterEffect(e3)
end
function cm.spfilter(c)
return c:IsLevelBelow(3)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,of,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tc=Duel.SelectMatchingCard(tp,nil,tp,0,of,1,1,nil):GetFirst()
if tc then
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
--血腥夜愿 节制
local m=23000200
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
function cm.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--bp
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_BP)
e1:SetRange(sz)
e1:SetTargetRange(0,1)
e1:SetCondition(aux.TRUE)
c:RegisterEffect(e1)
end
--血族 八页法师 夜刃
local m=23000210
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,5,3,cm.ovfilter,aux.Stringid(bm.name,9),3,cm.xyzop)
c:EnableReviveLimit()
--xyz success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(bm.name,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(bm.xyzscon)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(66523544,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(bm.rocost)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsCode(23000190)
end
function cm.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,m)==0 end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function cm.thfilter(c)
return bm.nt(c) and c:IsType(TYPE_MONSTER)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,ga,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_GRAVE_ACTION,nil,2,tp,ga)
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,ga,0,2,2,nil)
if g:GetCount()==2 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_ONFIELD,nil)
Duel.Destroy(g,REASON_EFFECT)
end
--血族 黑夜之女 莉萝爱
local m=23000220
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,5,3,cm.ovfilter,aux.Stringid(bm.name,9),3,cm.xyzop)
c:EnableReviveLimit()
--atk down
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(mz)
e2:SetTargetRange(0,mz)
e2:SetValue(cm.val)
c:RegisterEffect(e2)
--bd
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCost(bm.rocost)
e3:SetTarget(cm.destg)
e3:SetOperation(cm.desop)
c:RegisterEffect(e3)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsCode(23000230)
end
function cm.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,m)==0 end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function cm.val(e,c)
return (c:GetLevel()+c:GetRank())*-100
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(bm.nfu,tp,mz,0,1,nil) end
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,bm.nfu,tp,mz,0,1,1,nil):GetFirst()
if tc then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e1:SetCondition(aux.TRUE)
e1:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE))
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
--血族 血族骑士 莉萝爱
local m=23000230
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,bm.nf,3,2)
c:EnableReviveLimit()
--atkdown
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.atktg)
e1:SetOperation(cm.atkop)
c:RegisterEffect(e1)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(bm.name,3))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCost(bm.rocost)
e3:SetTarget(cm.destg)
e3:SetOperation(cm.desop)
c:RegisterEffect(e3)
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,mz,1,nil) end
local tc=e:GetHandler():GetBattleTarget()
local val=(tc:GetLevel()+tc:GetRank())*300
e:SetLabel(-val)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(e:GetLabel())
tc:RegisterEffect(e1)
end
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,0,of,1,nil,TYPE_SPELL+TYPE_TRAP) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=Duel.SelectMatchingCard(tp,Card.IsType,tp,0,of,1,1,nil,TYPE_SPELL+TYPE_TRAP):GetFirst()
if tc then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
--血族猎手 神徒鹰眼
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
local m=23000231
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
c:EnableReviveLimit()
--Synchro use others material
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetRange(LOCATION_EXTRA)
e0:SetLabel(0)--set 100 to use as tuner
e0:SetCondition(bm.syncon)
e0:SetTarget(bm.syntg)
e0:SetOperation(bm.synop)
e0:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e0)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(bm.name,7))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(cm.spcon)
e2:SetTarget(bm.sptg(1,ga))
e2:SetOperation(bm.spop(1,ga,false))
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_BECOME_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(cm.disacon)
e3:SetTarget(cm.disatg)
e3:SetOperation(cm.disaop)
c:RegisterEffect(e3)
end
function cm.valcheck(c)
return c:IsType(TYPE_XYZ) and bm.nf(c)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetHandler():GetMaterial():IsExists(cm.valcheck,1,nil)
end
function cm.tgfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and bm.nfu(c)
end
function cm.disacon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and eg:IsExists(cm.tgfilter,1,nil,tp)
end
function cm.disatg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function cm.disaop(e,tp,eg,ep,ev,re,r,rp)
if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD)~=0 then
Duel.NegateEffect(ev)
end
end
--血族猎手 圣徒教官 凌参
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
local m=23000232
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
c:EnableReviveLimit()
--Synchro use others material
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetRange(LOCATION_EXTRA)
e0:SetLabel(0)--set 100 to use as tuner
e0:SetCondition(bm.syncon)
e0:SetTarget(bm.syntg)
e0:SetOperation(bm.synop)
e0:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e0)
--Equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(bm.name,11))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(bm.eqfilter,tp,mz+ga,mz+ga,1,nil,tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,0,0)
end)
e1:SetOperation(bm.eqop)
c:RegisterEffect(e1)
--remove overlay replace
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(41418852,1))
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_OVERLAY_REMOVE_REPLACE)
e2:SetRange(mz)
e2:SetCondition(bm.rcon)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
return ev
end)
c:RegisterEffect(e2)
--act limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(0,1)
e3:SetValue(cm.aclimit)
c:RegisterEffect(e3)
end
function cm.disfilter(c)
return c:IsFaceup() and c:GetFlagEffect(m)~=0
end
function cm.aclimit(e,re,tp)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and e:GetHandler():GetEquipGroup():Filter(cm.disfilter,nil):IsExists(Card.IsCode,1,nil,rc:GetCode())
end
--血族猎手 屠夫修女 凌参
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
local m=23000233
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
c:EnableReviveLimit()
--Synchro use others material
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetRange(LOCATION_EXTRA)
e0:SetLabel(100)--set 100 to use as tuner
e0:SetCondition(bm.syncon)
e0:SetTarget(bm.syntg)
e0:SetOperation(bm.synop)
e0:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e0)
--Equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(bm.name,11))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(mz)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipCount()==0
end)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(bm.eqfilter,tp,mz+ga,mz+ga,1,nil,tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,0,0)
end)
e1:SetOperation(bm.eqop)
e1:SetCountLimit(1,m-1)
c:RegisterEffect(e1)
local e4=e1:Clone()
e4:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipGroup():FilterCount(cm.filter,nil)>0
end)
e4:SetCountLimit(1,m)
e4:SetTarget(cm.eqtg)
e4:SetOperation(cm.eqop)
c:RegisterEffect(e4)
--remove overlay replace
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(41418852,1))
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_OVERLAY_REMOVE_REPLACE)
e2:SetRange(mz)
e2:SetCondition(bm.rcon)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
return ev
end)
c:RegisterEffect(e2)
--act limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(0,1)
e3:SetValue(cm.aclimit)
c:RegisterEffect(e3)
end
function cm.aclimit(e,re,tp)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and e:GetHandler():GetEquipGroup():Filter(cm.filter,nil):IsExists(Card.IsCode,1,nil,rc:GetCode())
end
function cm.filter(c)
return c:IsFaceup() and c:GetOriginalType()&TYPE_MONSTER~=0
end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(bm.eqfilter,tp,mz+ga,mz+ga,1,nil,tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)+e:GetHandler():GetEquipGroup():Filter(cm.filter,nil):FilterCount(Card.IsControler,nil,tp)>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,0,0)
end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
local sg=e:GetHandler():GetEquipGroup():Filter(cm.filter,nil)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then
sg=sg:Filter(Card.IsControler,nil,tp)
end
if #sg>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tc=sg:Select(tp,1,1,nil):GetFirst()
if Duel.Destroy(tc,REASON_EFFECT)~=0 then
bm.eqop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
--血族猎手 靈兒
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
local m=23000234
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_BECOME_TARGET)
e1:SetRange(ha)
e1:SetCondition(cm.disacon)
e1:SetTarget(cm.disatg)
e1:SetOperation(cm.disaop)
c:RegisterEffect(e1)
--search
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_BE_MATERIAL)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.tgfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and bm.nfu(c)
end
function cm.disacon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and eg:IsExists(cm.tgfilter,1,nil,tp)
end
function cm.disatg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.disaop(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.NegateEffect(ev)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return r==REASON_SYNCHRO and c:GetReasonCard():IsSetCard(bm.setcode)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(bm.nt,tp,dk,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,bm.nt,tp,dk,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--血族猎手 鹰眼
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
local m=23000235
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon self
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(bm.name,7))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
--SpecialSummon ha+ga
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(mz)
e2:SetCountLimit(1)
e2:SetCost(cm.spcost2)
e2:SetTarget(bm.sptg(1,ga+ha,cm.spf))
e2:SetOperation(bm.spop(1,ga+ha,false,cm.spf,cm.lvc))
c:RegisterEffect(e2)
end
function cm.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA) or bm.nf(c)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_EXTRA) and not bm.nf(c)
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.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(-3)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_ATTACK_FINAL)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(0)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2,true)
local e3=e2:Clone()
e3:SetCode(EFFECT_SET_DEFENSE_FINAL)
c:RegisterEffect(e3,true)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_DISABLE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e4,true)
local e5=e4:Clone()
e5:SetCode(EFFECT_DISABLE_EFFECT)
c:RegisterEffect(e5,true)
end
Duel.SpecialSummonComplete()
end
function cm.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsLevelAbove(4) end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(-3)
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1,true)
end
function cm.spf(c)
return c:IsLevelAbove(1)
end
function cm.lvc(tc,c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(3)
e1:SetReset(RESET_EVENT+0xff0000)
tc:RegisterEffect(e1,true)
end
--血腥夜愿 魔术师
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
local m=23000236
local cm=_G["c"..m]
function cm.initial_effect(c)
--remove
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_ATKCHANGE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.filter(c)
return c:IsFaceup() and c:IsAbleToRemove() and not c:IsRace(RACE_PSYCHO)
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.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_REMOVE)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(tc)
e1:SetCountLimit(1)
e1:SetOperation(cm.retop)
Duel.RegisterEffect(e1,tp)
end
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetLabelObject()
if not Duel.ReturnToField(tc) then return end
local ct=Duel.GetMatchingGroupCount(nil,tp,0,of,nil)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(ct*800)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local gg=Duel.GetMatchingGroup(bm.nfm,tp,ga,0,nil)
if bm.nfu(tc) and tc:IsType(TYPE_XYZ) and #gg>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local sg=gg:Select(tp,2,2,nil)
Duel.Overlay(tc,sg)
end
end
--血族猎手 凌叁
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
local m=23000237
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon self
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(bm.name,7))
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:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA) or bm.nf(c)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_EXTRA) and not bm.nf(c)
end
function cm.filter(c)
return c:IsFaceup() and c:IsLevelBelow(4)
end
function cm.sptg(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 cm.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) 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,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
local lv=tc:GetLevel()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(-lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1,true)
end
Duel.SpecialSummonComplete()
end
\ No newline at end of file
--血族圣地
local m=23000238
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
function cm.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--return to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(bm.name,5))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(fz)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.rhcon)
e1:SetTarget(cm.rhtg)
e1:SetOperation(cm.rhop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(bm.name,7))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(fz)
e2:SetCountLimit(1,m-2)
e2:SetCost(cm.spcost)
e2:SetTarget(bm.sptg(1,dk))
e2:SetOperation(bm.spop(1,dk,false))
c:RegisterEffect(e2)
end
function cm.cfilter(c,tp)
return bm.nfu(c) and c:IsControler(tp) and (c:IsSummonType(SUMMON_TYPE_FUSION) or c:IsSummonType(SUMMON_TYPE_SYNCHRO) or c:IsSummonType(SUMMON_TYPE_XYZ))
end
function cm.rhcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.rhtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,of,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,1-tp,of)
end
function cm.rhop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,0,of,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=g:Select(tp,1,1,nil)
if #tg>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
\ No newline at end of file
--血族盟约 梦魇骑士
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
local m=23000241
local cm=_G["c"..m]
function cm.initial_effect(c)
--fusion summon
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(bm.nf),cm.matfilter,true)
--Negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(44665365,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(cm.discon)
e1:SetCost(cm.discost)
e1:SetTarget(cm.distg)
e1:SetOperation(cm.disop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetCountLimit(1,m)
e2:SetRange(ga)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.matfilter(c)
return c:IsFusionAttribute(ATTRIBUTE_DARK)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if ep==tp or c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
end
function cm.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeckAsCost()
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,ga,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,ga,0,2,2,nil)
Duel.SendtoDeck(g,nil,2,REASON_COST)
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.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
return at:GetControler()~=tp and Duel.GetAttackTarget()==nil
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,ga)
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 a=Duel.GetAttacker()
if a:IsAttackable() and not a:IsImmuneToEffect(e) then
Duel.CalculateDamage(a,c)
end
end
end
\ No newline at end of file
--血族同盟 掘墓人
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
local m=23000242
local cm=_G["c"..m]
function cm.initial_effect(c)
--sp success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(bm.name,7))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_ACTION+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetTarget(bm.sptg(1,ga))
e1:SetOperation(bm.spop(1,ga,false))
c:RegisterEffect(e1)
local e01=e1:Clone()
e01:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e01)
--return
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_GRAVE_ACTION+CATEGORY_TOHAND)
e2:SetDescription(aux.Stringid(bm.name,5))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost)
e2:SetCountLimit(1,m-2)
e2:SetTarget(cm.retg)
e2:SetOperation(cm.reop)
c:RegisterEffect(e2)
end
function cm.retg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(bm.nt,tp,ga,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,ga)
end
function cm.reop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,bm.nt,tp,ga,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--血族魔物 三头犬
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
local m=23000243
local cm=_G["c"..m]
function cm.initial_effect(c)
--fusion summon
local e1=bm.handfusion(c)
c:RegisterEffect(e1)
--return
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_GRAVE_ACTION+CATEGORY_TOHAND)
e2:SetDescription(aux.Stringid(bm.name,5))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.retg)
e2:SetOperation(cm.reop)
c:RegisterEffect(e2)
end
function cm.retg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return bm.nt(e:GetHandler()) and Duel.IsExistingMatchingCard(bm.cnt,tp,ga,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,ga)
end
function cm.reop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,bm.cnt,tp,ga,0,1,1,c)
if #g>0 and Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0 and c:IsLocation(ga) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--念刃 储物手套
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
local m=23000244
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.filter(c)
return c:IsRace(RACE_PSYCHO) and bm.nfu(c)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToChangeControler,tp,0,mz+ga,1,nil) and Duel.IsExistingMatchingCard(cm.filter,tp,mz,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=Duel.SelectMatchingCard(tp,Card.IsAbleToChangeControler,tp,0,mz,1,1,nil):GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc2=Duel.SelectMatchingCard(tp,bm.nfu,tp,mz,0,1,1,nil):GetFirst()
if tc and tc2 then
if not Duel.Equip(tp,tc,tc2) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetLabelObject(tc2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(bm.eqlimit)
tc:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_SZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetCondition(cm.discon)
e2:SetOperation(cm.disop)
tc:RegisterEffect(e2)
end
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsCode(e:GetHandler():GetCode()) and rp==1-tp
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
\ No newline at end of file
--血族魔物 烈焰梦魇
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
local m=23000245
local cm=_G["c"..m]
function cm.initial_effect(c)
--fusion summon
local e1=bm.handfusion(c)
c:RegisterEffect(e1)
--be material_fusion
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.sptgcon)
e2:SetTarget(bm.sptg(1,dk,cm.spfilter))
e2:SetOperation(bm.spop(1,dk,false,cm.spfilter))
c:RegisterEffect(e2)
end
function cm.sptgcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c:IsLocation(rm) and c:IsLocation(ga)) and r==REASON_FUSION
end
function cm.spfilter(c)
return c:IsLevelBelow(4)
end
\ No newline at end of file
--血族圣兽 独角兽
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
local m=23000246
local cm=_G["c"..m]
function cm.initial_effect(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m-2)
e1:SetCost(bm.sptgcost(99,cm.cost))
e1:SetTarget(bm.sptg(1,dk+ha+ga,cm.spfilter))
e1:SetOperation(bm.spop(1,dk+ha+ga,false,cm.spfilter))
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(bm.name,ACTIVITY_SPSUMMON,bm.counterfilter)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(63060238,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function cm.cost(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 cm.spfilter(c)
return c:IsRace(RACE_PSYCHO)
end
function cm.filter(c)
return (bm.nf(c) or c:IsCode(24094653)) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,dk,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,dk)
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.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
\ No newline at end of file
--血族刀轮欺诈师
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
local m=23000247
local cm=_G["c"..m]
function cm.initial_effect(c)
--lv
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
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:SetCondition(cm.efcon)
e2:SetOperation(cm.efop)
c:RegisterEffect(e2)
end
function cm.lvfilter(c)
return c:IsFaceup() and c:GetLevel()>0
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.lvfilter,tp,LOCATION_MZONE,0,1,nil) end
local op=Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1))
e:SetLabel(op)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local op=e:GetLabel()
local tg=Duel.GetMatchingGroup(cm.lvfilter,tp,LOCATION_MZONE,0,nil)
local tc=tg:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL+op)
e1:SetValue(2+op)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc=tg:GetNext()
end
end
function cm.efcon(e,tp,eg,ep,ev,re,r,rp)
local rc=e:GetHandler():GetReasonCard()
return bit.band(r,REASON_FUSION)~=0 and rc:IsSetCard(bm.setcode) and rc:IsType(TYPE_FUSION)
end
function cm.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
e1:SetDescription(aux.Stringid(m,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetValue(cm.indct)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
end
function cm.indct(e,re,r,rp)
return bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0
end
\ No newline at end of file
--血族友人 妮娜
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
local m=23000248
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(bm.name,7))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(ga+ha)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
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:SetCondition(cm.efcon)
e2:SetOperation(cm.efop)
c:RegisterEffect(e2)
end
function cm.costfilter(c)
return c:IsFaceup() and c:IsAbleToHandAsCost()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then
if ft<0 then return false end
if ft==0 then
return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_MZONE,0,1,nil)
else
return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
if ft==0 then
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_COST)
else
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_COST)
end
end
function cm.target(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 cm.operation(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.efcon(e,tp,eg,ep,ev,re,r,rp)
local rc=e:GetHandler():GetReasonCard()
return bit.band(r,REASON_FUSION)~=0 and rc:IsSetCard(bm.setcode) and rc:IsType(TYPE_FUSION)
end
function cm.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
e1:SetDescription(aux.Stringid(m,2))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
end
function cm.thfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and cm.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,0,of,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
\ No newline at end of file
--血族梦境 優美娜
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
local m=23000249
local cm=_G["c"..m]
function cm.initial_effect(c)
--fusion summon
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(bm.nf),cm.matfilter,true)
--imm Destroy
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetValue(1)
c:RegisterEffect(e1)
--immune trap
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TRUE)
e2:SetValue(cm.efilter)
c:RegisterEffect(e2)
end
function cm.matfilter(c)
return c:IsFusionAttribute(ATTRIBUTE_WATER)
end
function cm.efilter(e,te)
return te:IsActiveType(TYPE_TRAP) and te:GetOwner():GetControler()~=e:GetOwner():GetControler()
end
\ No newline at end of file
--血族盾卫 卡拉娜塔
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
local m=23000251
local cm=_G["c"..m]
function cm.initial_effect(c)
--fusion summon
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(bm.nf),cm.matfilter,true)
--imm Destroy
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
c:RegisterEffect(e1)
--attack up
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e2:SetCondition(cm.atkcon)
e2:SetCost(cm.atkcost)
e2:SetOperation(cm.atkop)
c:RegisterEffect(e2)
end
function cm.matfilter(c)
return c:IsFusionAttribute(ATTRIBUTE_FIRE)
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsControler(1-tp)
end
function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(m)==0 end
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL,0,1)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if c:IsRelateToBattle() and c:IsFaceup() and bc:IsRelateToBattle() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(300)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--血族死敌 菲娜
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
local m=23000252
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
c:EnableReviveLimit()
--Synchro use others material
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetRange(LOCATION_EXTRA)
e0:SetLabel(50)
e0:SetCondition(bm.syncon)
e0:SetTarget(bm.syntg)
e0:SetOperation(bm.synop)
e0:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e0)
--Atk up
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(cm.atkval)
c:RegisterEffect(e1)
local e3=e1:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
--negate
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(cm.discon)
e2:SetTarget(cm.distg)
e2:SetOperation(cm.disop)
c:RegisterEffect(e2)
--SpecialSummon
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,m)
e4:SetTarget(bm.sptg(1,ga,cm.spf))
e4:SetOperation(bm.spop(1,ga,false,cm.spf,cm.imm))
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_REMOVE)
c:RegisterEffect(e5)
end
function cm.atkval(e,c)
return Duel.GetMatchingGroupCount(bm.nfm,0,mz+ga,mz+ga,nil)*500
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainDisablable(ev) and ep==1-tp
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function cm.disop(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.spf(c)
return c:IsRace(RACE_PSYCHO)
end
function cm.imm(tc,c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(cm.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
tc:RegisterEffect(e2,true)
end
function cm.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer()
end
\ No newline at end of file
--血族猎手 负罪者 破碎南瓜
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
local m=23000253
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
c:EnableReviveLimit()
--Synchro use others material
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetRange(LOCATION_EXTRA)
e0:SetLabel(0)--set 100 to use as tuner
e0:SetCondition(bm.syncon)
e0:SetTarget(bm.syntg)
e0:SetOperation(bm.synop)
e0:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e0)
--disable
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(cm.discon)
e1:SetTarget(cm.disatg)
e1:SetOperation(cm.disaop)
c:RegisterEffect(e1)
--actlimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
e2:SetValue(cm.aclimit)
e2:SetCondition(cm.actcon)
c:RegisterEffect(e2)
end
function cm.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function cm.actcon(e)
return Duel.GetAttacker()==e:GetHandler()
end
function cm.valcheck(c)
return c:IsType(TYPE_XYZ) and bm.nf(c)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetHandler():GetMaterial():IsExists(cm.valcheck,1,nil)
end
function cm.filter(c)
return c:IsFaceup()
end
function cm.disatg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,0,mz,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.filter,tp,0,mz,1,1,nil)
end
function cm.disaop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
\ No newline at end of file
--血族死敌 凯恩
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
local m=23000254
local cm=_G["c"..m]
function cm.initial_effect(c)
--Special Summon self
local e1=Effect.CreateEffect(c)
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)
e1:SetCondition(cm.spcon1)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--effect gain
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e3:SetCondition(cm.efcon)
e3:SetOperation(cm.efop)
c:RegisterEffect(e3)
if not cm.global_check then
cm.global_check=true
local ge1=bm.add_atkup_event_check(c)
Duel.RegisterEffect(ge1,0)
end
end
function cm.cfilter1(c,tp)
return bm.nfu(c) and c:IsControler(tp)
end
function cm.spcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter1,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.spop1(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 cm.efcon(e,tp,eg,ep,ev,re,r,rp)
local rc=e:GetHandler():GetReasonCard()
return bit.band(r,REASON_FUSION+REASON_SYNCHRO+REASON_XYZ)~=0 and rc:IsSetCard(bm.setcode)
end
function cm.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(bm.name,6))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_ATTACK_UP_YL)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.etg)
e1:SetOperation(bm.atkup_event_multiop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1)
rc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
end
function cm.etg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetAttack()>0 and re:GetOwner()~=c end
end
\ No newline at end of file
--血族猎手 觉醒者 灵儿
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
local m=23000255
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
c:EnableReviveLimit()
--Synchro use others material
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetRange(LOCATION_EXTRA)
e0:SetLabel(0)--set 100 to use as tuner
e0:SetCondition(bm.syncon)
e0:SetTarget(bm.syntg)
e0:SetOperation(bm.synop)
e0:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e0)
--NegateActivation effect gain
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.gecon)
e1:SetOperation(cm.geop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(bm.name,7))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(mz)
e2:SetCountLimit(1)
e2:SetTarget(bm.sptg(1,ga))
e2:SetOperation(bm.spop(1,ga,false))
c:RegisterEffect(e2)
end
function cm.valcheck(c)
return c:IsType(TYPE_XYZ) and bm.nf(c)
end
function cm.valcheck1(c)
return c:IsRace(RACE_FAIRY) and bm.nf(c)
end
function cm.gecon(e,tp,eg,ep,ev,re,r,rp)
local f1 = e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetHandler():GetMaterial():IsExists(cm.valcheck,1,nil)
local f2 = cm.valcheck1(re:GetHandler())
return f1 and f2
end
function cm.geop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(mz)
e1:SetCountLimit(1)
e1:SetCondition(cm.discon)
e1:SetTarget(cm.distg)
e1:SetOperation(cm.disop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainDisablable(ev) and ep==1-tp
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function cm.disop(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
\ No newline at end of file
--血族猎手 破碎南瓜
if not pcall(function() require("expansions/script/c23000000") end) then
if not pcall(function() require("script/c23000000") end) then
require("c23000000")
end
end
local m=23000256
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon self
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(bm.name,7))
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.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetCondition(cm.srcon)
e2:SetTarget(bm.sptg(1,dk))
e2:SetOperation(bm.spop(1,dk,false))
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsFaceup() and c:IsLevelAbove(5)
end
function cm.sptg(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 cm.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) 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,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and c:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) and tc:IsLevelAbove(4) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(-3)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
tc:RegisterEffect(e1)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.srcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_BATTLE+REASON_EFFECT)
end
\ No newline at end of file
--魔王城的栖夜姬
local m=33300200
local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetSPSummonOnce(m)
--spsummon proc
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,1))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e0:SetRange(LOCATION_DECK)
e0:SetTargetRange(POS_FACEDOWN_DEFENSE,0)
e0:SetCondition(cm.spcon2)
e0:SetOperation(cm.spop2)
e0:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e0)
--destroy replace
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_DESTROY_REPLACE)
e1:SetTarget(cm.reptg)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_FLIP)
e3:SetOperation(cm.thop1)
c:RegisterEffect(e3)
end
function cm.spfilter2(c)
return c:IsSetCard(0x561) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToGraveAsCost()
end
function cm.fselect(g,tp)
return Duel.GetMZoneCount(tp,g)>0
end
function cm.spcon2(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(cm.spfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
return g:CheckSubGroup(cm.fselect,2,2,tp)
end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler()
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(cm.spfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
local rg=g:SelectSubGroup(tp,cm.fselect,false,2,2,tp)
Duel.SendtoGrave(rg,REASON_COST)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_SPSUMMON)
e1:SetCountLimit(1)
e1:SetLabelObject(e)
e1:SetCondition(cm.adjustcon)
e1:SetOperation(cm.adjustop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.adjustcon(e,tp,eg,ep,ev,re,r,rp)
return re==e:GetLabelObject()
end
function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetOwner()
Duel.ConfirmCards(1-tp,c)
end
function cm.reptg(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:IsOnField() and c:IsFaceup() end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE)
return true
else return false end
end
function cm.thfilter(c)
return c:IsSetCard(0x561) 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
if e:GetHandler():IsPreviousPosition(POS_FACEDOWN) then
e:SetLabel(1)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
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.thop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
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)
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
end
e:SetLabel(0)
end
end
\ No newline at end of file
--栖夜姬的出逃
local m=33300201
local cm=_G["c"..m]
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:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(cm.cost)
e2:SetTarget(cm.atttg)
e2:SetOperation(cm.attop)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsSetCard(0x561) 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.operation(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)
end
end
function cm.filter1(c)
return c:IsFacedown()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=Duel.SelectMatchingCard(tp,cm.filter1,tp,LOCATION_MZONE,0,1,1,nil)
Duel.ConfirmCards(1-tp,sg)
if sg:GetFirst():IsSetCard(0x561) then
local tc=sg:GetFirst()
e:SetLabel(1)
e:SetLabelObject(tc)
end
end
function cm.atttg(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,tp,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,tp,LOCATION_GRAVE)
end
function cm.attop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and e:GetLabel()==1 then
Duel.SendtoHand(c,nil,REASON_EFFECT)
local tc=e:GetLabelObject()
local op=2
if tc:IsPosition(POS_FACEDOWN) then
op=Duel.SelectOption(tp,aux.Stringid(m,2),aux.Stringid(m,3))
elseif tc:IsPosition(POS_FACEUP_ATTACK) then
op=Duel.SelectOption(tp,aux.Stringid(m,3))+1
else
op=Duel.SelectOption(tp,aux.Stringid(m,2))
end
if op==0 then
Duel.ChangePosition(tc,POS_FACEUP_ATTACK)
end
if op==1 then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)
end
end
end
\ No newline at end of file
--栖夜姬的复活
local m=33300202
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1)
e2:SetTarget(cm.atttg)
e2:SetOperation(cm.attop)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsSetCard(0x561) and c:IsAbleToHand() and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.sfilter(c)
return c:IsSetCard(0x561) and c:IsSummonable(true,nil)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(cm.sfilter,tp,LOCATION_HAND,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sg=Duel.SelectMatchingCard(tp,cm.sfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.Summon(tp,sg:GetFirst(),true,nil)
end
end
end
function cm.atttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsControler(tp) and cm.filter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,e:GetHandler()) end
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,tp,LOCATION_GRAVE)
end
function cm.attop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if Duel.SendtoDeck(tc,2,nil,REASON_EFFECT)~=0 then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
end
\ No newline at end of file
--栖夜姬的威胁
local m=33300203
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND)
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)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1)
e2:SetCost(cm.cost)
e2:SetTarget(cm.atttg)
e2:SetOperation(cm.attop)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsFaceup() and c:IsSetCard(0x561)
end
function cm.thfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
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.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(cm.thfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_ONFIELD)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local sg=Duel.GetMatchingGroup(cm.thfilter,tp,0,LOCATION_ONFIELD,nil)
if Duel.SendtoHand(sg,nil,REASON_EFFECT)~=0 then
if not tc:IsRelateToEffect(e) then return end
if Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
function cm.filter1(c)
return c:IsFacedown()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=Duel.SelectMatchingCard(tp,cm.filter1,tp,LOCATION_MZONE,0,1,1,nil)
Duel.ConfirmCards(1-tp,sg)
if sg:GetFirst():IsSetCard(0x561) then
local tc=sg:GetFirst()
e:SetLabel(1)
e:SetLabelObject(tc)
end
end
function cm.atttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_ONFIELD) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,1,tp,LOCATION_ONFIELD)
end
function cm.attop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if e:GetLabel()==1 then
Duel.Destroy(tc,REASON_EFFECT)
local tc=e:GetLabelObject()
local op=2
if tc:IsPosition(POS_FACEDOWN) then
op=Duel.SelectOption(tp,aux.Stringid(m,3),aux.Stringid(m,4))
elseif tc:IsPosition(POS_FACEUP_ATTACK) then
op=Duel.SelectOption(tp,aux.Stringid(m,4))+1
else
op=Duel.SelectOption(tp,aux.Stringid(m,3))
end
if op==0 then
Duel.ChangePosition(tc,POS_FACEUP_ATTACK)
end
if op==1 then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)
end
end
end
\ No newline at end of file
--栖夜姬的安眠
local m=33300204
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)
e1:SetCost(cm.remcost)
e1:SetOperation(cm.remop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_HAND)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.costfilter(c)
return c:IsFaceup() and c:IsSetCard(0x561) and c:IsAbleToRemoveAsCost()
end
function cm.remcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return 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_MZONE,0,1,1,nil)
if Duel.Remove(g,POS_FACEUP,REASON_COST+REASON_TEMPORARY)~=0 then
local rc=g:GetFirst()
if rc:IsType(TYPE_TOKEN) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(rc)
e1:SetCountLimit(1)
e1:SetOperation(cm.retop)
Duel.RegisterEffect(e1,tp)
end
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
function cm.remop(e,tp,eg,ep,ev,re,r,rp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CHANGE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
e2:SetValue(cm.val)
e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp)
end
function cm.val(e,re,dam,r,rp,rc)
if dam>1000 then
return 0
else
return dam
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_DRAW)
end
function cm.filter1(c)
return c:IsFaceup() and c:IsCanTurnSet() and c:IsSetCard(0x561)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return false end
local b1=Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_MZONE,0,1,nil)
if chk==0 then return b1 end
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,cm.filter1,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
end
end
\ No newline at end of file
--栖夜姬的黑格
local m=33300205
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
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 chkc:IsFacedown() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFacedown,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN)
local g=Duel.SelectTarget(tp,Card.IsFacedown,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function cm.filter(c,e)
return c:IsFacedown() and c:IsRelateToEffect(e)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)
if tc:IsSetCard(0x561) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetTargetRange(0,1)
e2:SetLabel(e:GetLabel())
e2:SetValue(cm.aclimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
function cm.aclimit(e,re,tp)
local c=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and (c:IsLevelAbove(5) or c:IsRankAbove(5) or c:IsLinkAbove(3))
end
\ No newline at end of file
--栖夜姬的寝具偷盗
local m=33300206
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(cm.cost)
e2:SetTarget(cm.atttg)
e2:SetOperation(cm.attop)
c:RegisterEffect(e2)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_TO_GRAVE)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
tc:RegisterFlagEffect(m,RESET_PHASE+PHASE_END+RESET_EVENT+RESETS_STANDARD,0,1)
tc=eg:GetNext()
end
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x561)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,0,0)
end
function cm.thfilter(c)
return c:GetFlagEffect(m)>0
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetCondition(cm.thcon)
e1:SetOperation(cm.thop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(cm.thfilter,tp,0,LOCATION_GRAVE,nil,tp)>0
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.GetMatchingGroup(cm.thfilter,tp,0,LOCATION_GRAVE,nil,tp)
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
function cm.filter1(c)
return c:IsFacedown()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=Duel.SelectMatchingCard(tp,cm.filter1,tp,LOCATION_MZONE,0,1,1,nil)
Duel.ConfirmCards(1-tp,sg)
if sg:GetFirst():IsSetCard(0x561) then
local tc=sg:GetFirst()
e:SetLabel(1)
e:SetLabelObject(tc)
end
end
function cm.atttg(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,tp,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,tp,LOCATION_GRAVE)
end
function cm.attop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and e:GetLabel()==1 then
Duel.SendtoHand(c,nil,REASON_EFFECT)
local tc=e:GetLabelObject()
local op=2
if tc:IsPosition(POS_FACEDOWN) then
op=Duel.SelectOption(tp,aux.Stringid(m,2),aux.Stringid(m,3))
elseif tc:IsPosition(POS_FACEUP_ATTACK) then
op=Duel.SelectOption(tp,aux.Stringid(m,3))+1
else
op=Duel.SelectOption(tp,aux.Stringid(m,2))
end
if op==0 then
Duel.ChangePosition(tc,POS_FACEUP_ATTACK)
end
if op==1 then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)
end
end
end
\ No newline at end of file
--栖夜姬的换装巡游
local m=33300207
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 e1_1=Effect.CreateEffect(c)
e1_1:SetDescription(aux.Stringid(m,0))
e1_1:SetCategory(CATEGORY_DESTROY)
e1_1:SetType(EFFECT_TYPE_QUICK_O)
e1_1:SetCode(EVENT_FREE_CHAIN)
e1_1:SetRange(LOCATION_SZONE)
e1_1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1_1:SetCountLimit(1,m)
e1_1:SetTarget(cm.thtg)
e1_1:SetOperation(cm.thop)
c:RegisterEffect(e1_1)
--set self
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCost(cm.cost)
e2:SetTarget(cm.atttg)
e2:SetOperation(cm.attop)
c:RegisterEffect(e2)
end
function cm.thfilter(c)
return c:IsSSetable() and c:IsSetCard(0x561) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.tgfilter(c)
return c:IsFaceup() and c:IsSetCard(0x561)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_ONFIELD) and cm.tgfilter(chkc,tp) and Duel.GetLocationCount(tp,LOCATION_SZONE,0)>0 end
if chk==0 then return Duel.IsExistingTarget(cm.tgfilter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE,0)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.tgfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE,0)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g)
local dc=g:GetFirst()
if dc:IsType(TYPE_QUICKPLAY) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
dc:RegisterEffect(e1)
end
if dc:IsType(TYPE_TRAP) then
local e1=Effect.CreateEffect(c)
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)
dc:RegisterEffect(e1)
end
if tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_ONFIELD) and Duel.SelectYesNo(tp,aux.Stringid(m,4)) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
end
function cm.filter1(c)
return c:IsFacedown()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=Duel.SelectMatchingCard(tp,cm.filter1,tp,LOCATION_MZONE,0,1,1,nil)
Duel.ConfirmCards(1-tp,sg)
if sg:GetFirst():IsSetCard(0x561) then
local tc=sg:GetFirst()
e:SetLabel(1)
e:SetLabelObject(tc)
end
end
function cm.atttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSSetable() and Duel.GetLocationCount(tp,LOCATION_SZONE,0)>0 end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,tp,LOCATION_GRAVE)
end
function cm.attop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and e:GetLabel()==1 then
Duel.SSet(tp,c)
local tc=e:GetLabelObject()
local op=2
if tc:IsPosition(POS_FACEDOWN) then
op=Duel.SelectOption(tp,aux.Stringid(m,2),aux.Stringid(m,3))
elseif tc:IsPosition(POS_FACEUP_ATTACK) then
op=Duel.SelectOption(tp,aux.Stringid(m,3))+1
else
op=Duel.SelectOption(tp,aux.Stringid(m,2))
end
if op==0 then
Duel.ChangePosition(tc,POS_FACEUP_ATTACK)
end
if op==1 then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)
end
end
end
\ No newline at end of file
--栖夜姬的恶魔城堡
local m=33500959
local cm=_G["c"..m]
local setc=0x561
function cm.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCost(cm.cost)
c:RegisterEffect(e0)
--act in set turn
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetCondition(cm.actcon)
c:RegisterEffect(e2)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_SZONE)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1)
e1:SetTarget(cm.drtg)
e1:SetOperation(cm.drop)
c:RegisterEffect(e1)
--discard limit
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetRange(LOCATION_SZONE)
e5:SetTargetRange(0,1)
e5:SetCode(EFFECT_CANNOT_DISCARD_HAND)
e5:SetCondition(cm.excon)
e5:SetValue(1)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_CANNOT_TO_GRAVE_AS_COST)
e6:SetRange(LOCATION_SZONE)
e6:SetTargetRange(0,LOCATION_HAND)
e6:SetCondition(cm.excon)
e6:SetValue(1)
c:RegisterEffect(e6)
if not cm.global_check then
cm.global_check=true
local e=Effect.CreateEffect(c)
e:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e:SetProperty(EFFECT_FLAG_DELAY)
e:SetCode(EVENT_SSET)
e:SetOperation(cm.op)
Duel.RegisterEffect(e,0)
end
end
function cm.op(e,tp,eg)
for tc in aux.Next(eg) do
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0)
end
end
function cm.actcon(e)
return e:GetHandler():GetFlagEffect(m)>0
end
function cm.cfilter(c)
return c:IsFacedown() and c:IsSetCard(setc)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return (c:GetFlagEffect(m)>0 and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)) or c:GetFlagEffect(m)==0 end
if c:GetFlagEffect(m)>0 and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
local sg=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.ChangePosition(sg,POS_FACEUP_DEFENSE)
e:SetLabel(1)
end
end
function cm.fdfilter(c)
return c:IsFaceup() and c:IsDefenseAbove(0) and c:IsCanTurnSet() and c:IsSetCard(setc)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local b1=Duel.GetCurrentPhase()~=PHASE_DAMAGE and Duel.IsPlayerCanDraw(tp,2) and Duel.IsPlayerCanDraw(1-tp,2)
local b2=Duel.GetCurrentPhase()~=PHASE_DAMAGE and Duel.IsExistingMatchingCard(cm.fdfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
if chk==0 then return b1 or b2 end
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(m,1)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(m,2)
opval[off-1]=2
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
e:SetLabel(sel)
if sel==2 then
e:SetCategory(CATEGORY_POSITION)
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,0,0)
elseif sel==1 then
e:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1)
end
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sel=e:GetLabel()
if sel==1 then
Duel.Draw(tp,2,REASON_EFFECT)
Duel.Draw(1-tp,2,REASON_EFFECT)
Duel.BreakEffect()
local turnp=Duel.GetTurnPlayer()
Duel.Hint(HINT_SELECTMSG,turnp,HINTMSG_DISCARD)
local g1=Duel.SelectMatchingCard(turnp,Card.IsDiscardable,turnp,LOCATION_HAND,0,2,2,nil)
Duel.ConfirmCards(1-turnp,g1)
Duel.Hint(HINT_SELECTMSG,1-turnp,HINTMSG_DISCARD)
local g2=Duel.SelectMatchingCard(1-turnp,Card.IsDiscardable,1-turnp,LOCATION_HAND,0,2,2,nil)
g1:Merge(g2)
local tc=g1:GetFirst()
while tc do
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_DISCARD)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,4))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc=g1:GetNext()
end
elseif sel==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,cm.fdfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
if Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)~=0 and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler())
if g then Duel.SendtoHand(g,nil,REASON_EFFECT) end
end
end
end
end
function cm.excon(e)
return Duel.IsExistingMatchingCard(cm.cfilter0,tp,LOCATION_MZONE,0,1,nil)
end
function cm.cfilter0(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsSetCard(setc)
end
\ No newline at end of file
......@@ -5,6 +5,7 @@ Duel.LoadScript("c64800046.lua")
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)
......
......@@ -515,7 +515,6 @@
#持剑者 380518667 221 0x8f0-0x8ff
!setname 0x8fa 源键
!setname 0x8fb 默示界
#兔锅 1874883039 222
#named_with_Valhalla 瓦尔哈拉
......@@ -528,9 +527,6 @@
!setname 0x262 占星少女
#拳定天下 1805927248 230 0x350-0x35f
!setname 0x350 血族
!setname 0x3350 血腥夜愿
!setname 0x5350 血族猎手
!setname 0x351 奇妙冒险团
!setname 0x35b 白马义从
......
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