Commit 0bcb6465 authored by Tachibana's avatar Tachibana

ndyd

parent a0b82861
Pipeline #4466 passed with stages
in 22 minutes and 45 seconds
......@@ -29,6 +29,7 @@ function c20000001.initial_effect(c)
--Break
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(20000001,1))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
......
......@@ -4,7 +4,7 @@ bm=bm or {}
bm.setcode=0x350 --血族
bm.name=23000000
bm.version=20210727
bm.version=20210804
mz=LOCATION_MZONE
pz=LOCATION_PZONE
......@@ -175,6 +175,17 @@ 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()
......@@ -219,26 +230,35 @@ 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 c:IsSynchroType(TYPE_XYZ) and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and not c:IsType(TYPE_TUNER) and e:GetLabel()~=100 then return true end
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsNotTuner(syncard) and c:IsCanBeSynchroMaterial(syncard)
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)
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)
return bm.CheckGroup(tsg,bm.goal,Group.FromCards(c),minc,maxc,tp,lv,syncard,c,e)
end
function bm.goal(g,tp,lv,syncard,tuc)
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()
return g:CheckWithSumEqual(bm.val,lv,ct,ct,syncard)
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
......@@ -246,6 +266,10 @@ function bm.syncon(e,c,tuner,mg)
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
......@@ -267,9 +291,9 @@ function bm.syncon(e,c,tuner,mg)
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)
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)
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)
......@@ -301,7 +325,7 @@ function bm.syntg(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg)
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)
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()
......@@ -312,7 +336,7 @@ function bm.syntg(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg)
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)
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)
......@@ -329,6 +353,25 @@ end
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
......@@ -342,9 +385,12 @@ function bm.eqop(e,tp,eg,ep,ev,re,r,rp)
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
se.__overlay_remove_replace_yilong.flag=true
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)
......
......@@ -8,7 +8,7 @@ if not pcall(function() require("expansions/script/c23000000") end) then
end
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,5,3,cm.ovfilter,aux.Stringid(bm.name,9),99,cm.xyzop)
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)
......
......@@ -8,7 +8,7 @@ if not pcall(function() require("expansions/script/c23000000") end) then
end
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,5,3,cm.ovfilter,aux.Stringid(bm.name,9),99,cm.xyzop)
aux.AddXyzProcedure(c,nil,5,3,cm.ovfilter,aux.Stringid(bm.name,9),3,cm.xyzop)
c:EnableReviveLimit()
--Recover
local e2=Effect.CreateEffect(c)
......
......@@ -89,5 +89,5 @@ function cm.desrepval(e,c)
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,93854893)
Duel.Hint(HINT_CARD,0,m)
end
\ No newline at end of file
......@@ -8,7 +8,7 @@ if not pcall(function() require("expansions/script/c23000000") end) then
end
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,5,3,cm.ovfilter,aux.Stringid(bm.name,9),99,cm.xyzop)
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)
......
......@@ -8,7 +8,7 @@ if not pcall(function() require("expansions/script/c23000000") end) then
end
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,5,3,cm.ovfilter,aux.Stringid(bm.name,9),99,cm.xyzop)
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)
......
......@@ -8,7 +8,7 @@ if not pcall(function() require("expansions/script/c23000000") end) then
end
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,5,3,cm.ovfilter,aux.Stringid(bm.name,9),99,cm.xyzop)
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)
......
--血族魔物 烈焰梦魇
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) or 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=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+EFFECT_TYPE_SINGLE)
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
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