Commit af7e2d6d authored by tsubaki's avatar tsubaki

2.0.2

parent 0bfd577d
Pipeline #43266 passed with stage
in 16 seconds
No preview for this file type
......@@ -25,6 +25,7 @@
!counter 0x245 气质指示物
!counter 0x254c 虚幻指示物
!counter 0x500d 结晶指示物
!counter 0x618 水果指示物
!counter 0x830 虹龙玉指示物
!counter 0x1999 算数指示物
......@@ -259,6 +260,7 @@
!setname 0x816f 时符
!setname 0x817 河城荷取
!setname 0x818 彩符
!setname 0xa82 姬海棠果
!setname 0x820 河童
!setname 0x824 犬走椛
!setname 0x826 辉针
......
No preview for this file type
pics/20216.jpg

96.7 KB | W: | H:

pics/20216.jpg

47.2 KB | W: | H:

pics/20216.jpg
pics/20216.jpg
pics/20216.jpg
pics/20216.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/29003.jpg

95.6 KB | W: | H:

pics/29003.jpg

79.2 KB | W: | H:

pics/29003.jpg
pics/29003.jpg
pics/29003.jpg
pics/29003.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/29510.jpg

95.7 KB | W: | H:

pics/29510.jpg

100 KB | W: | H:

pics/29510.jpg
pics/29510.jpg
pics/29510.jpg
pics/29510.jpg
  • 2-up
  • Swipe
  • Onion skin
--寒符『西雅图冷雨夜』
local s,id=GetID()
function s.initial_effect(c)
-- ① 发动效果
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(s.cost)
c:RegisterEffect(e1)
-- ② 准备阶段伤害效果
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCondition(s.damcon)
e2:SetOperation(s.damop)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
-- ③ 破坏怪兽效果
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(s.descon)
e3:SetOperation(s.desop)
e3:SetLabelObject(e1)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e4)
local e5=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
end
-- ① 支付基本分作为发动代价
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000,true) end
local lp=Duel.GetLP(tp)
local t={}
local f=math.floor((lp)/1000)
local l=1
while l<=f and l<=20 do
t[l]=l*1000
l=l+1
end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,0))
local announce=Duel.AnnounceNumber(tp,table.unpack(t))
Duel.PayLPCost(tp,announce,true)
e:SetLabel(announce)
e:GetHandler():SetHint(CHINT_NUMBER,announce)
end
-- ② 准备阶段伤害
function s.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp and e:GetLabelObject():GetLabel()>0
end
function s.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local pay=e:GetLabelObject():GetLabel()
local damage=Duel.GetTurnCount()*200*math.floor(pay/2000)
Duel.Damage(1-tp,damage,REASON_EFFECT)
end
-- ③ 破坏攻击力·守备力合计过低的怪兽
function s.atkfilter(c,e,tp)
return c:IsControler(tp)
end
function s.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.atkfilter,1,nil,nil,1-tp)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local pay=e:GetLabelObject():GetLabel()
local killine=pay/8 -- 支付基本分的1/4
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local dg=Group.CreateGroup()
for tc in aux.Next(g) do
local ad=tc:GetAttack()+tc:GetDefense()
if ad<=killine then
dg:AddCard(tc)
end
end
if #dg>0 then
Duel.Destroy(dg,REASON_EFFECT)
end
end
--咏花舞雪的亡灵✿西行寺幽幽子
local s,id=GetID()
function s.initial_effect(c)
-- 不能通常召唤
c:EnableReviveLimit()
--special summon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
-- ① 丢弃自身,从游戏外放置20086并放4个指示物
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,0))
e4:SetCategory(CATEGORY_TOKEN+CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_HAND)
e4:SetCost(s.cost1)
e4:SetTarget(s.target1)
e4:SetOperation(s.op1)
c:RegisterEffect(e4)
-- ② 墓地特殊召唤(LP4000以下)
-- 记录送去墓地的回合
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetOperation(s.regop)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(id,1))
e6:SetCategory(CATEGORY_SPECIAL_SUMMON)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_GRAVE)
e6:SetCondition(s.spcon2)
e6:SetTarget(s.sptg2)
e6:SetOperation(s.spop2)
c:RegisterEffect(e6)
-- ③ 直接胜利效果
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(id,2))
e7:SetCategory(CATEGORY_DAMAGE)
e7:SetType(EFFECT_TYPE_IGNITION)
e7:SetRange(LOCATION_MZONE)
e7:SetCountLimit(1)
e7:SetCondition(s.wincon)
e7:SetOperation(s.winop)
c:RegisterEffect(e7)
end
function s.spcon(e,re)
return not re or re:GetHandler()~=e:GetHandler()
end
function s.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function s.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0)
end
function s.op1(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft<=0 then return end
local token=Duel.CreateToken(tp,20086)
if not token then return end
if Duel.MoveToField(token,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
-- 放置4个指示物
token:AddCounter(0x128b,4)
-- 结束阶段取除
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(s.rmcon)
e1:SetOperation(s.rmop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
token:RegisterEffect(e1)
end
end
function s.rmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0x128b)>0
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveCounter(tp,0x128b,4,REASON_EFFECT)
end
function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
return aux.exccon(e) and (Duel.GetLP(tp)<=4000 or Duel.GetLP(1-tp)<=4000)
end
function s.sptg2(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,true,true) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)
end
end
function s.wincon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<=4000 and Duel.GetLP(1-tp)<=2000
end
function s.winop(e,tp,eg,ep,ev,re,r,rp)
Duel.SetLP(1-tp,0)
end
--须臾与长生的连结✿藤原妹红
local s,id=GetID()
function s.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkAttribute,ATTRIBUTE_FIRE),2,2)
c:EnableReviveLimit()
-- 效果①:支付一半LP,从手卡·卡组特召1只0x261怪兽到对方场上
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetCost(s.spcost1)
e1:SetTarget(s.sptg1)
e1:SetOperation(s.spop1)
c:RegisterEffect(e1)
-- 效果②:自己LP≤2000时,从墓地特殊召唤自身
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+1) -- 不同id避免冲突
e2:SetCondition(s.spcon2)
e2:SetTarget(s.sptg2)
e2:SetOperation(s.spop2)
c:RegisterEffect(e2)
end
function s.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLP(tp)>1 end
Duel.PayLPCost(tp,Duel.GetLP(tp)/2)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x261) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)
end
function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function s.spop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,1-tp,false,false,POS_FACEUP)
end
end
function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<=2000
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--姬海棠金果
local s,id=GetID()
function s.initial_effect(c)
-- 发动效果
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
-- ② 同纵列怪兽放置效果(永续效果)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ADJUST)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(s.ssetop)
c:RegisterEffect(e2)
--remain field
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_REMAIN_FIELD)
c:RegisterEffect(e3)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local opt=0
-- 检查分支1是否可行:卡组或墓地有23260,且魔陷区有空位
local b1=Duel.GetLocationCount(tp,LOCATION_SZONE)>0
-- 检查分支2是否可行:场上有怪兽且怪兽区有空位
local b2=Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if not b1 and not b2 then return false end
e:SetLabel(0)
return true
end
local b1=Duel.GetLocationCount(tp,LOCATION_SZONE)>0
local b2=Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
local off=1
local ops={}
if b1 then
ops[off]=aux.Stringid(id,0)
off=off+1
end
if b2 then
ops[off]=aux.Stringid(id,1)
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
e:SetLabel(op)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local op=e:GetLabel()
-- 将自身转变为永续魔法留在场上
if op==0 then
-- 分支①:从卡组或墓地选23260安置到自己魔陷区
local token=Duel.CreateToken(tp,23260)
if token then
Duel.MoveToField(token,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
else
-- 分支②:选择自己场上1只怪兽移动到未使用的怪兽区域
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
local mg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_MZONE,0,1,1,nil)
local mc=mg:GetFirst()
if mc then
-- 获取当前可用空位(主怪兽区1~5)
local avail_zones={}
for i=0,4 do
local zone_bit=1<<i
if Duel.CheckLocation(tp,LOCATION_MZONE,i) then
table.insert(avail_zones,i+1) -- 保存编号1~5
end
end
-- 让玩家选择一个空位
local target_zone
if #avail_zones==1 then
target_zone=avail_zones[1]
else
-- 多次选择直到合法
while true do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ZONE)
local zone=Duel.AnnounceNumber(tp,table.unpack(avail_zones))
if Duel.CheckLocation(tp,LOCATION_MZONE,zone-1) then
target_zone=zone
break
end
end
end
local seq=target_zone-1
local zone_bit=1<<seq
-- 移动怪兽,保持原表示形式
Duel.MoveSequence(mc,seq)
end
end
end
function s.filter(c)
return c:IsCode(23260)
end
-- ② 永续效果:将同纵列的对方怪兽当作魔法卡覆盖到魔陷区
function s.ssetop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local seq=4-c:GetSequence() -- 0~4,表示纵列
-- 获取对方同纵列怪兽区的怪兽
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
for tc in aux.Next(g) do
local tcs=tc:GetSequence()
if tcs==5 then tcs=1 end
if tcs==6 then tcs=3 end
if tcs==seq then
-- 检查该纵列对方魔陷区是否为空
if Duel.CheckLocation(1-tp,LOCATION_SZONE,seq) then
-- 将怪兽移动到对方魔陷区相同纵列,覆盖
local zone_bit=1<<seq
if Duel.MoveToField(tc,1-tp,1-tp,LOCATION_SZONE,POS_FACEDOWN,true,zone_bit) then
-- 改变卡类型为永续魔法,离开魔陷区时恢复
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
end
end
end
--姬海棠果树
local s,id=GetID()
function s.initial_effect(c)
c:EnableCounterPermit(0x618)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
-- 效果①:1回合2次,主要阶段选择1个发动
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_DRAW+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(2)
e1:SetCost(s.negcost)
e1:SetTarget(s.optg)
e1:SetOperation(s.opop)
c:RegisterEffect(e1)
-- 效果②:结束阶段,从游戏外叠放1只「0xa82」怪兽
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(s.addop)
c:RegisterEffect(e2)
-- 效果③:1回合1次,取除1素材无效破坏效果
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_NEGATE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCountLimit(1)
e3:SetCondition(s.negcon)
e3:SetCost(s.negcost)
e3:SetTarget(s.negtg)
e3:SetOperation(s.negop)
c:RegisterEffect(e3)
end
function s.filter(c,e,tp)
return c:IsSetCard(0xa82) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.optg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=Duel.IsExistingMatchingCard(s.filter,tp,0x43,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
local b2
local b3=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0
if chk==0 then
return b1 or b3
end
-- 构建选项列表和映射
local ops={}
local map={}
if b1 then
table.insert(ops,aux.Stringid(id,3)) -- 特殊召唤素材怪兽
table.insert(map,1)
end
table.insert(ops,aux.Stringid(id,4)) -- 素材回手
table.insert(map,2)
if b3 then
table.insert(ops,aux.Stringid(id,5)) -- 手牌回卡组底并抽1
table.insert(map,3)
end
local sel=Duel.SelectOption(tp,table.unpack(ops))
e:SetLabel(map[sel+1]) -- 存储实际选项编号1~3
end
function s.opop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local opt=e:GetLabel()
if opt==1 then
-- 选项1:特殊召唤素材中的怪兽
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,0x43,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
elseif opt==2 then
-- 选项2:选1张素材回到手卡
local t = {
[1] = {desc=aux.Stringid(id,6),code=23028},
[2] = {desc=aux.Stringid(id,7),code=23249},
--[3] = {desc=aux.Stringid(id,8),code=23504},
[3] = {desc=aux.Stringid(id,9),code=514102},
}
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,10))
local sel=Duel.SelectOption(tp,Nef.unpackOneMember(t, "desc"))+1
local code=t[sel].code
local token=Duel.CreateToken(tp,code)
if token then
Duel.SendtoHand(token,nil,REASON_EFFECT)
end
elseif opt==3 then
-- 选项3:选1张手卡回到卡组最下面,然后抽1
local hg=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
if #hg==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local shg=hg:Select(tp,1,1,nil)
local tc=shg:GetFirst()
if tc then
Duel.SendtoDeck(tc,nil,1,REASON_EFFECT)
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
function s.addop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x618,1)
end
function s.negcon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) or not Duel.IsChainNegatable(ev) then return false end
if re:IsHasCategory(CATEGORY_NEGATE)
and Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT):IsHasType(EFFECT_TYPE_ACTIVATE) then return false end
local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY)
return ex and tg~=nil and tc+tg:FilterCount(Card.IsOnField,nil)-tg:GetCount()>0
end
function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsCanRemoveCounter(tp,0x618,1,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0x618,1,REASON_COST)
end
function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function s.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
--河童与军火库的连结✿河城荷取
function c23513.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c23513.matfilter,1)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(23513,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,23513)
e1:SetCondition(c23513.eqcon)
e1:SetTarget(c23513.eqtg)
e1:SetOperation(c23513.eqop)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetCondition(c23513.adcon)
e2:SetValue(c23513.atkval)
c:RegisterEffect(e2)
end
function c23513.matfilter(c)
return c:GetEquipCount()>0
end
function c23513.eqcon(e,tp,eg,ep,ev,re,r,rp)
return c23513.can_equip_monster(e:GetHandler())
end
function c23513.eqfilter(c)
return c:GetFlagEffect(23513)==0
end
function c23513.can_equip_monster(c)
local g=c:GetEquipGroup():Filter(c23513.eqfilter,nil)
return g:GetCount()==0
end
function c23513.eqfilter2(c,tp,lg)
return c:IsFaceup() and (c:IsAbleToChangeControler() or c:IsControler(tp)) and lg:IsContains(c)
end
function c23513.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local lg=e:GetHandler():GetLinkedGroup()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToChangeControler() end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c23513.eqfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp,lg) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c23513.eqfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp,lg)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c23513.eqlimit(e,c)
return e:GetOwner()==c
end
function c23513.equip_monster(c,tp,tc)
if not Duel.Equip(tp,tc,c,false) then return end
--Add Equip limit
--tc:RegisterFlagEffect(23513,RESET_EVENT+RESETS_STANDARD,0,0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c23513.eqlimit)
tc:RegisterEffect(e1)
end
function c23513.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then
c23513.equip_monster(c,tp,tc)
end
end
function c23513.adcon(e)
local c=e:GetHandler()
local g=c:GetEquipGroup():Filter(c23513.eqfilter,nil)
return g:GetCount()>0
end
function c23513.atkval(e,c)
local c=e:GetHandler()
local g=c:GetEquipGroup():Filter(c23513.eqfilter,nil)
local atk=0
for tc in aux.Next(g) do
local atk=atk+tc:GetTextAttack()
if bit.band(g:GetFirst():GetOriginalType(),TYPE_MONSTER)==0 or atk<0 then
return 0
else
return atk
end
end
end
--非想天之女✿比那名居天子
local s,id,o=GetID()
function s.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x208),aux.NonTuner(nil),1)
--Immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetTarget(s.etarget)
e1:SetValue(s.efilter)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(s.discost1)
e2:SetCondition(s.discon1)
e2:SetTarget(s.distg1)
e2:SetOperation(s.disop1)
c:RegisterEffect(e2)
--tohand
local e3=e2:Clone()
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_DISABLE+CATEGORY_TOHAND)
e3:SetCost(s.discost2)
e3:SetCondition(s.discon2)
e3:SetTarget(s.distg2)
e3:SetOperation(s.disop2)
c:RegisterEffect(e3)
end
--
function s.etarget(e,c)
local te,g=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TARGET_CARDS)
return (not te or not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) or not g or not g:IsContains(c))
and e:GetHandler()~=c
end
function s.efilter(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
--
function s.filter(c)
return not c:IsPosition(POS_FACEUP_DEFENSE) and c:IsCanChangePosition()
and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function s.discost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.SelectMatchingCard(tp,s.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.ChangePosition(g,POS_FACEUP_DEFENSE)
end
function s.discon1(e,tp,eg,ep,ev,re,r,rp)
if rp~=1-tp or not (re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev)) then return false end
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return loc&LOCATION_MZONE>0
end
function s.distg1(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 s.disop1(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 s.discost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.ChangePosition(g,POS_FACEUP_DEFENSE)
end
function s.discon2(e,tp,eg,ep,ev,re,r,rp)
if rp~=1-tp or not (re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev)) then return false end
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return loc&LOCATION_GRAVE>0
end
function s.distg2(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():IsAbleToHand() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_TOHAND,eg,1,0,0)
end
end
function s.disop2(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
if Duel.NegateEffect(ev) and tc:IsRelateToEffect(re) then
if tc:IsAbleToHand() then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tc:GetControler(),tc)
end
end
end
\ No newline at end of file
--五色的酒杯✿物部布都
local s,id=GetID()
function s.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,s.matfilter,1)
c:EnableReviveLimit()
c:SetSPSummonOnce(id)
-- 效果①:解放自身给与300伤害
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id) -- 效果本身没有写次数限制,但加上id防止重复利用同名卡的另一个效果?实际上没有其他效果,
--但为了保险加一个,也可不加。这里不加,因为解放后离场,自然不能再发动。但为了避免同一张卡多次发动(比如被连锁?),加一个限制也行。但文本没写,我们就不加。
e1:SetCost(s.damcost)
e1:SetTarget(s.damtg)
e1:SetOperation(s.damop)
c:RegisterEffect(e1)
end
function s.matfilter(c)
return c:IsLinkType(TYPE_LINK) or c:IsLinkType(TYPE_RITUAL)
end
function s.splimit(e,c,tp)
return c:IsCode(id) and Duel.GetFlagEffect(tp,id)>0
end
function s.damcon(e,tp,eg,ep,ev,re,r,rp)
return true -- 任意时点均可
end
function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable() end
Duel.Release(c,REASON_COST)
end
function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(300)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300)
end
function s.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
--脉动起舞的妖精☆克劳恩皮丝✿
function c31096.initial_effect(c)
end
--狂气的地狱妖精☆克劳恩皮丝✿
function c31099.initial_effect(c)
end
--白发教团的双子猫
local s,id,o=GetID()
function s.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x191),2,2)
--darw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCode(EVENT_CHAINING)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(s.chcon1)
e1:SetCost(s.chcost1)
e1:SetTarget(s.chtg1)
e1:SetOperation(s.chop1)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCode(EVENT_CHAINING)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(s.chcon2)
e2:SetCost(s.chcost2)
e2:SetTarget(s.chtg2)
e2:SetOperation(s.chop2)
c:RegisterEffect(e2)
end
--
function s.filter1(c,g)
return g:IsContains(c) and c:IsFaceup() and c:IsLevelAbove(1)
and not c:IsLevel(c:GetOriginalLevel()) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function s.chcon1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep==1-tp
and re:IsActiveType(TYPE_SPELL)
end
function s.chcost1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local lg=c:GetLinkedGroup()
if chk==0 then return Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_MZONE,0,1,nil,lg) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_MZONE,0,1,1,nil,lg)
local tc=g:GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(tc:GetOriginalLevel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
function s.chtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
end
function s.chop1(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeChainOperation(ev,s.chop3)
end
function s.chop3(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(1-tp,1,REASON_EFFECT)
end
--
function s.filter2(c,g)
return g:IsContains(c) and c:IsFaceup()
and not c:IsLevel(c:GetOriginalLevel()) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function s.chcon2(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep==1-tp
and re:IsActiveType(TYPE_MONSTER)
end
function s.chcost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local lg=c:GetLinkedGroup()
if chk==0 then return Duel.CheckReleaseGroup(tp,s.filter2,1,nil,lg) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectReleaseGroup(tp,s.filter2,1,1,nil,lg)
Duel.Release(g,REASON_COST)
end
function s.chtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function s.chop2(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeChainOperation(ev,s.chop4)
end
function s.chop4(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsAbleToHand() then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-c:GetControler(),c)
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