Commit 8883efc3 authored by 未闻皂名's avatar 未闻皂名

2022/12/17 新增:23PR,KP12新卡,调整极大和选择效果的逻辑

parent 1079287a
No preview for this file type
No preview for this file type
......@@ -186,30 +186,21 @@ function RushDuel.CreateSingleEffect(e, desc, card, code, value, reset, forced)
return e1
end
-- 创建效果: 选择效果 (自动生成Target和Operation)
function RushDuel.CreateMultiChooseEffect(card, hint1, condition1, operation1, hint2, condition2, operation2)
function RushDuel.CreateMultiChooseEffect(card, hint1, target1, operation1, hint2, target2, operation2)
local e1 = Effect.CreateEffect(card)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
if condition1 ~= nil or condition2 ~= nil then
e1:SetTarget(RushDuel.MultiChooseTarget(condition1, condition2))
end
e1:SetOperation(RushDuel.MultiChooseOperation(hint1, condition1, operation1, hint2, condition2, operation2))
e1:SetTarget(RushDuel.MultiChooseTarget(hint1, target1, hint2, target2))
e1:SetOperation(RushDuel.MultiChooseOperation(operation1, operation2))
return e1
end
function RushDuel.MultiChooseTarget(condition1, condition2, target)
function RushDuel.MultiChooseTarget(hint1, target1, hint2, target2)
return function(e, tp, eg, ep, ev, re, r, rp, chk)
local effect1 = target1 == nil or target1(e, tp, eg, ep, ev, re, r, rp, 0)
local effect2 = target2 == nil or target2(e, tp, eg, ep, ev, re, r, rp, 0)
if chk == 0 then
return (condition1 == nil or condition1(e, tp, eg, ep, ev, re, r, rp, false)) or (condition2 == nil or condition2(e, tp, eg, ep, ev, re, r, rp, false))
end
if target ~= nil then
target(e, tp, eg, ep, ev, re, r, rp)
return effect1 or effect2
end
end
end
function RushDuel.MultiChooseOperation(hint1, condition1, operation1, hint2, condition2, operation2)
return function(e, tp, eg, ep, ev, re, r, rp)
local effect1 = condition1 == nil or condition1(e, tp, eg, ep, ev, re, r, rp, true)
local effect2 = condition2 == nil or condition2(e, tp, eg, ep, ev, re, r, rp, true)
local option = 0
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_EFFECT)
if effect1 and effect2 then
......@@ -221,6 +212,17 @@ function RushDuel.MultiChooseOperation(hint1, condition1, operation1, hint2, con
Duel.SelectOption(tp, hint2)
option = 2
end
if option == 1 and target1 ~= nil then
target1(e, tp, eg, ep, ev, re, r, rp, 1)
elseif option == 2 and target2 ~= nil then
target2(e, tp, eg, ep, ev, re, r, rp, 1)
end
e:SetLabel(option)
end
end
function RushDuel.MultiChooseOperation(operation1, operation2)
return function(e, tp, eg, ep, ev, re, r, rp)
local option = e:GetLabel()
if option == 1 then
operation1(e, tp, eg, ep, ev, re, r, rp)
elseif option == 2 then
......
......@@ -4,6 +4,46 @@ RushDuel = RushDuel or {}
TYPE_MAXIMUM = 0x400 -- 极大怪兽
SUMMON_TYPE_MAXIMUM = 0x45000000 -- 极大模式
-- 初始化极大怪兽规则
function RushDuel.InitMaximum()
-- 不可改变表示形式
local e1 = Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SET_POSITION)
e1:SetTargetRange(LOCATION_MZONE, LOCATION_MZONE)
e1:SetTarget(RushDuel.MaximumMonster)
e1:SetValue(POS_FACEUP_ATTACK)
Duel.RegisterEffect(e1, 0)
local e2 = e1:Clone()
e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e2:SetValue(0)
Duel.RegisterEffect(e2, 0)
local e3 = e2:Clone()
e3:SetCode(EFFECT_CANNOT_CHANGE_POS_E)
e3:SetTarget(RushDuel.MaximumMonsterAtk)
Duel.RegisterEffect(e3, 0)
local e4 = e2:Clone()
e4:SetCode(EFFECT_CANNOT_TURN_SET)
Duel.RegisterEffect(e4, 0)
-- 极大召唤时的表示形式
local e5 = Effect.GlobalEffect()
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_LIMIT_SPECIAL_SUMMON_POSITION)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetTargetRange(1, 1)
e5:SetTarget(RushDuel.MaximumSummonPosition)
Duel.RegisterEffect(e5, 0)
end
function RushDuel.MaximumMonster(e, c)
return c:IsSummonType(SUMMON_TYPE_MAXIMUM) and c:GetOverlayCount() > 0
end
function RushDuel.MaximumMonsterAtk(e, c)
return c:IsPosition(POS_FACEUP_ATTACK) and RushDuel.MaximumMonster(e, c)
end
function RushDuel.MaximumSummonPosition(e, c, tp, sumtp, sumpos)
return c:IsType(TYPE_MAXIMUM) and (sumtp & SUMMON_TYPE_MAXIMUM) == SUMMON_TYPE_MAXIMUM and (sumpos & POS_DEFENSE) > 0
end
-- 添加极大召唤手续
function RushDuel.AddMaximumProcedure(c, max_atk, left_code, right_code)
-- 极大召唤 手续
......@@ -55,59 +95,24 @@ function RushDuel.AddMaximumProcedure(c, max_atk, left_code, right_code)
e3:SetCondition(RushDuel.MaximumMode)
e3:SetValue(max_atk)
c:RegisterEffect(e3)
-- 不可改变表示形式
-- 占用3个主要怪兽区域
local e4 = Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_SET_POSITION)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE + EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_MAX_MZONE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(POS_FACEUP_ATTACK)
e4:SetTargetRange(1, 0)
e4:SetCondition(RushDuel.MaximumMode)
e4:SetValue(1)
c:RegisterEffect(e4)
-- 离开场上时, 所有部件一同离开
local e5 = Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE + EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
e5:SetRange(LOCATION_MZONE)
e5:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_LEAVE_FIELD_P)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
e5:SetCondition(RushDuel.MaximumMode)
e5:SetOperation(RushDuel.MaximumLeaveOperation)
c:RegisterEffect(e5)
local e6 = e5:Clone()
e6:SetCode(EFFECT_CANNOT_CHANGE_POS_E)
e6:SetCondition(RushDuel.MaximumPositionCondition)
c:RegisterEffect(e6)
local e7 = Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_CANNOT_TURN_SET)
e7:SetProperty(EFFECT_FLAG_SINGLE_RANGE + EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
e7:SetRange(LOCATION_MZONE)
e7:SetCondition(RushDuel.MaximumMode)
c:RegisterEffect(e7)
-- 占用3个主要怪兽区域
local e8 = Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD)
e8:SetCode(EFFECT_MAX_MZONE)
e8:SetProperty(EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
e8:SetRange(LOCATION_MZONE)
e8:SetTargetRange(1, 0)
e8:SetCondition(RushDuel.MaximumMode)
e8:SetValue(1)
c:RegisterEffect(e8)
-- 离开场上时, 所有部件一同离开
local e9 = Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS)
e9:SetCode(EVENT_LEAVE_FIELD_P)
e9:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
e9:SetCondition(RushDuel.MaximumMode)
e9:SetOperation(RushDuel.MaximumLeaveOperation)
c:RegisterEffect(e9)
-- 极大召唤时的表示形式
local ge1 = Effect.GlobalEffect()
ge1:SetType(EFFECT_TYPE_FIELD)
ge1:SetCode(EFFECT_LIMIT_SPECIAL_SUMMON_POSITION)
ge1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
ge1:SetTargetRange(1, 1)
ge1:SetTarget(RushDuel.MaximumSummonPosition)
Duel.RegisterEffect(ge1, 0)
end
function RushDuel.MaximumSummonFilter(c, e, tp, left_code, right_code)
return c:IsCode(left_code, right_code) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false, POS_FACEUP)
......@@ -143,6 +148,3 @@ function RushDuel.MaximumLeaveOperation(e, tp, eg, ep, ev, re, r, rp)
Duel.Remove(g, POS_FACEUP, REASON_RULE)
end
end
function RushDuel.MaximumSummonPosition(e, c, tp, sumtp, sumpos)
return c:IsType(TYPE_MAXIMUM) and (sumtp & SUMMON_TYPE_MAXIMUM) == SUMMON_TYPE_MAXIMUM and (sumpos & POS_DEFENSE) > 0
end
......@@ -66,6 +66,8 @@ function RushDuel.InitRule()
RushDuel.CreatePlayerTargetGlobalEffect(EFFECT_SKIP_M2)
-- 手卡无限制
RushDuel.CreatePlayerTargetGlobalEffect(EFFECT_HAND_LIMIT, 100)
-- 极大怪兽
RushDuel.InitMaximum()
end
-- 初始化传说卡
function RushDuel.InitLegend(c)
......
......@@ -7,19 +7,21 @@ function cm.initial_effect(c)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.eff1con,cm.eff1op,aux.Stringid(m,2),cm.eff2con,cm.eff2op)
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.target1,cm.operation1,aux.Stringid(m,2),cm.target2,cm.operation2)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE)
e1:SetCost(cm.cost)
c:RegisterEffect(e1)
end
--Multi-Choose Effect
cm.cost=RD.CostSendDeckTopToGrave(1)
--Destroy
function cm.eff1con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,nil)
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,nil) end
e:SetCategory(CATEGORY_DESTROY)
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_DESTROY,Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,1,nil,function(g)
Duel.Destroy(g,REASON_EFFECT)
end)
......@@ -31,11 +33,12 @@ end
function cm.atkfilter(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR)
end
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(cm.atkfilter,tp,0,LOCATION_MZONE,1,nil)
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(cm.atkfilter,tp,0,LOCATION_MZONE,1,nil) end
e:SetCategory(CATEGORY_ATKCHANGE)
end
function cm.eff2op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.atkfilter,tp,0,LOCATION_MZONE,nil)
local atk=g:GetSum(Card.GetAttack)
if atk==0 then return end
......
......@@ -7,19 +7,21 @@ function cm.initial_effect(c)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.eff1con,cm.eff1op,aux.Stringid(m,2),cm.eff2con,cm.eff2op)
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.target1,cm.operation1,aux.Stringid(m,2),cm.target2,cm.operation2)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_POSITION+CATEGORY_DESTROY)
c:RegisterEffect(e1)
end
--Position
function cm.posfilter(c)
return RD.IsCanChangePosition(c) and (not c:IsPosition(POS_FACEUP_ATTACK) or c:IsCanTurnSet())
end
function cm.eff1con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.posfilter,tp,0,LOCATION_MZONE,1,nil)
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.posfilter,tp,0,LOCATION_MZONE,1,nil) end
e:SetCategory(CATEGORY_POSITION)
local g=Duel.GetMatchingGroup(cm.posfilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,cm.posfilter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
local tc=g:GetFirst()
local pos=POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE
......@@ -39,11 +41,14 @@ end
function cm.desfilter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON)
end
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_MZONE,1,nil)
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_MZONE,1,nil) end
e:SetCategory(CATEGORY_DESTROY)
local g=Duel.GetMatchingGroup(cm.desfilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function cm.eff2op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_MZONE,0,nil)
if ct==0 then return end
RD.SelectAndDoAction(HINTMSG_DESTROY,cm.desfilter,tp,0,LOCATION_MZONE,1,ct,nil,function(g)
......
......@@ -7,35 +7,40 @@ function cm.initial_effect(c)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.eff1con,cm.eff1op,aux.Stringid(m,2),cm.eff2con,cm.eff2op)
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.target1,cm.operation1,aux.Stringid(m,2),cm.target2,cm.operation2)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
e1:SetCost(cm.cost)
c:RegisterEffect(e1)
end
--Multi-Choose Effect
cm.cost=RD.CostSendGraveToDeckBottom(Card.IsAbleToDeckOrExtraAsCost,1,1)
--To Deck(Grave)
function cm.tdfilter1(c)
function cm.filter1(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function cm.eff1con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.tdfilter1,tp,0,LOCATION_GRAVE,1,nil)
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,tp,0,LOCATION_GRAVE,1,nil) end
e:SetCategory(CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
local g=Duel.GetMatchingGroup(cm.filter1,tp,0,LOCATION_GRAVE,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_TODECK,aux.NecroValleyFilter(cm.tdfilter1),tp,0,LOCATION_GRAVE,1,3,nil,function(g)
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_TODECK,aux.NecroValleyFilter(cm.filter1),tp,0,LOCATION_GRAVE,1,3,nil,function(g)
RD.SendToDeckAndExists(g)
end)
end
--To Deck(Monstar)
function cm.tdfilter2(c)
function cm.filter2(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToDeck()
end
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.tdfilter2,tp,0,LOCATION_MZONE,1,nil)
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter2,tp,0,LOCATION_MZONE,1,nil) end
e:SetCategory(CATEGORY_TODECK)
local g=Duel.GetMatchingGroup(cm.filter2,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function cm.eff2op(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_TODECK,cm.tdfilter2,tp,0,LOCATION_MZONE,1,2,nil,function(g)
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_TODECK,cm.filter2,tp,0,LOCATION_MZONE,1,2,nil,function(g)
RD.SendToDeckAndExists(g)
end)
end
\ No newline at end of file
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.eff1con,cm.eff1op,aux.Stringid(m,2),cm.eff2con,cm.eff2op)
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.target1,cm.operation1,aux.Stringid(m,2),cm.target2,cm.operation2)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetCost(cm.cost)
......@@ -16,10 +16,10 @@ end
--Multi-Choose Effect
cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1)
--Atk & Def Down(Single)
function cm.eff1con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil)
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
end
function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(aux.Stringid(m,3),Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.AttachAtkDef(e,g:GetFirst(),-1500,-1500,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
......@@ -28,10 +28,10 @@ end
function cm.downfilter(c)
return c:IsFaceup() and c:IsRace(RACE_DINOSAUR)
end
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.downfilter,tp,0,LOCATION_MZONE,1,nil)
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.downfilter,tp,0,LOCATION_MZONE,1,nil) end
end
function cm.eff2op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.downfilter,tp,0,LOCATION_MZONE,nil)
g:ForEach(function(tc)
RD.AttachAtkDef(e,tc,-2000,-2000,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
......
......@@ -7,9 +7,8 @@ function cm.initial_effect(c)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.eff1con,cm.eff1op,aux.Stringid(m,2),cm.eff2con,cm.eff2op)
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.target1,cm.operation1,aux.Stringid(m,2),cm.target2,cm.operation2)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetCost(cm.cost)
c:RegisterEffect(e1)
end
......@@ -19,10 +18,11 @@ cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.atkfilter(c)
return c:IsType(TYPE_MONSTER)
end
function cm.eff1con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.atkfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil)
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.atkfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
e:SetCategory(CATEGORY_ATKCHANGE)
end
function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local g=Duel.GetMatchingGroup(cm.atkfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
......@@ -34,10 +34,13 @@ end
function cm.tdfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_GRAVE,0,1,nil)
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
e:SetCategory(CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_GRAVE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function cm.eff2op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_TODECK,aux.NecroValleyFilter(cm.tdfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
if RD.SendToDeckAndExists(g) then
Duel.ShuffleDeck(tp)
......
......@@ -7,9 +7,8 @@ function cm.initial_effect(c)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),nil,cm.eff1op,aux.Stringid(m,2),cm.eff2con,cm.eff2op)
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.target1,cm.operation1,aux.Stringid(m,2),cm.target2,cm.operation2)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
c:RegisterEffect(e1)
......@@ -27,7 +26,11 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
end
cm.cost=RD.CostSendDeckTopToGrave(1)
--Atk Up
function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
e:SetCategory(CATEGORY_ATKCHANGE)
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachAtkDef(e,c,900,0,RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
......@@ -35,10 +38,11 @@ function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
end
end
--Pierce
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP() and RD.IsCanAttachExtraAttack(e:GetHandler(),1)
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsAbleToEnterBP() and RD.IsCanAttachExtraAttack(e:GetHandler(),1) end
e:SetCategory(0)
end
function cm.eff2op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachExtraAttack(e,c,1,aux.Stringid(m,4),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
......
......@@ -7,9 +7,8 @@ function cm.initial_effect(c)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.eff1con,cm.eff1op,aux.Stringid(m,2),cm.eff2con,cm.eff2op)
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.target1,cm.operation1,aux.Stringid(m,2),cm.target2,cm.operation2)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetCost(cm.cost)
c:RegisterEffect(e1)
end
......@@ -22,25 +21,25 @@ cm.cost=RD.CostSendHandToGrave(cm.costfilter,1,1)
function cm.spfilter(c,e,tp)
return c:IsRace(RACE_HYDRAGON) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.eff1con(e,tp,eg,ep,ev,re,r,rp,op)
local filter=cm.spfilter
if op then filter=aux.NecroValleyFilter(cm.spfilter) end
return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(filter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)
end
--To Hand
function cm.thfilter(c)
return c:IsCode(list[3]) and c:IsAbleToHand()
end
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp,op)
local filter=cm.thfilter
if op then filter=aux.NecroValleyFilter(cm.thfilter) end
return Duel.IsExistingMatchingCard(filter,tp,LOCATION_GRAVE,0,1,nil)
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
e:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.eff2op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
RD.SendToHandAndExists(g,1-tp)
end)
......
......@@ -7,19 +7,19 @@ function cm.initial_effect(c)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.eff1con,cm.eff1op,aux.Stringid(m,2),cm.eff2con,cm.eff2op)
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.target1,cm.operation1,aux.Stringid(m,2),cm.target2,cm.operation2)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY)
e1:SetCost(cm.cost)
c:RegisterEffect(e1)
end
--Multi-Choose Effect
cm.cost=RD.CostSendDeckTopToGrave(1)
--Atk Up
function cm.eff1con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)>0
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)>0 end
e:SetCategory(CATEGORY_ATKCHANGE)
end
function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)*300
......@@ -27,10 +27,13 @@ function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
end
end
--Destroy
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_SZONE,1,nil)
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_SZONE,1,nil) end
e:SetCategory(CATEGORY_DESTROY)
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_SZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.eff2op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_SZONE,nil)
if g:GetCount()==0 then return end
Duel.ConfirmCards(tp,g)
......
......@@ -7,9 +7,8 @@ function cm.initial_effect(c)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),nil,cm.eff1op,aux.Stringid(m,2),nil,cm.eff2op)
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.target1,cm.operation1,aux.Stringid(m,2),cm.target2,cm.operation2)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_ATKCHANGE+CATEGORY_RECOVER+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetCondition(cm.condition)
c:RegisterEffect(e1)
end
......@@ -18,7 +17,12 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
--Damage
function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
e:SetCategory(CATEGORY_DAMAGE+CATEGORY_ATKCHANGE)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,2000)
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
if Duel.Damage(tp,2000,REASON_EFFECT)~=0 then
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
......@@ -33,7 +37,12 @@ end
function cm.spfilter(c,e,tp)
return c:IsLevelAbove(7) and c:IsRace(RACE_PSYCHO) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.eff2op(e,tp,eg,ep,ev,re,r,rp)
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
e:SetCategory(CATEGORY_RECOVER+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
if Duel.Recover(tp,1000,REASON_EFFECT)~=0 then
RD.CanSelectAndSpecialSummon(aux.Stringid(m,4),aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP,true)
end
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),nil,cm.eff1op,aux.Stringid(m,2),cm.eff2con,cm.eff2op)
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.target1,cm.operation1,aux.Stringid(m,2),cm.target2,cm.operation2)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_POSITION)
e1:SetCost(cm.cost)
......@@ -16,7 +16,11 @@ end
--Multi-Choose Effect
cm.cost=RD.CostSendDeckTopToGrave(1)
--Cannot Special Summon
function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
e:SetCategory(CATEGORY_ATKCHANGE)
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachAtkDef(e,c,500,0,RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
......@@ -39,10 +43,13 @@ end
function cm.posfilter(c)
return RD.IsCanChangePosition(c)
end
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
e:SetCategory(CATEGORY_POSITION)
local g=Duel.GetMatchingGroup(cm.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function cm.eff2op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,cm.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,function(g)
RD.ChangePosition(g)
end)
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.eff1con,cm.eff1op,aux.Stringid(m,2),cm.eff2con,cm.eff2op)
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.target1,cm.operation1,aux.Stringid(m,2),cm.target2,cm.operation2)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION+CATEGORY_DESTROY)
c:RegisterEffect(e1)
......@@ -16,21 +16,24 @@ end
function cm.thfilter(c)
return c:IsAttack(0) and c:IsAbleToHand()
end
function cm.eff1con(e,tp,eg,ep,ev,re,r,rp,op)
local filter=cm.thfilter
if op then filter=aux.NecroValleyFilter(cm.thfilter) end
return Duel.IsExistingMatchingCard(filter,tp,LOCATION_GRAVE,0,1,nil)
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
e:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
RD.SendToHandAndExists(g,1-tp)
end)
end
--Destroy
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsDefensePos,tp,0,LOCATION_MZONE,1,nil)
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDefensePos,tp,0,LOCATION_ONFIELD,1,nil) end
e:SetCategory(CATEGORY_DESTROY)
local g=Duel.GetMatchingGroup(Card.IsDefensePos,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.eff2op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_DESTROY,Card.IsDefensePos,tp,0,LOCATION_MZONE,1,2,nil,function(g)
Duel.Destroy(g,REASON_EFFECT)
end)
......
......@@ -7,19 +7,19 @@ function cm.initial_effect(c)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.eff1con,cm.eff1op,aux.Stringid(m,2),cm.eff2con,cm.eff2op)
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.target1,cm.operation1,aux.Stringid(m,2),cm.target2,cm.operation2)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetCost(cm.cost)
c:RegisterEffect(e1)
end
--Multi-Choose Effect
cm.cost=RD.CostSendDeckTopToGrave(1)
--Atk Down
function cm.eff1con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil)
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
e:SetCategory(CATEGORY_ATKCHANGE)
end
function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(aux.Stringid(m,3),Card.IsFaceup,tp,0,LOCATION_MZONE,1,3,nil,function(g)
g:ForEach(function(tc)
RD.AttachAtkDef(e,tc,-1500,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
......@@ -31,10 +31,11 @@ function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
end)
end
--Direct Attack
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP() and RD.IsCanAttachDirectAttack(e:GetHandler())
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsAbleToEnterBP() and RD.IsCanAttachDirectAttack(e:GetHandler()) end
e:SetCategory(0)
end
function cm.eff2op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachDirectAttack(e,c,aux.Stringid(m,5),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
......
......@@ -7,9 +7,8 @@ function cm.initial_effect(c)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),nil,cm.eff1op,aux.Stringid(m,2),cm.eff2con,cm.eff2op)
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.target1,cm.operation1,aux.Stringid(m,2),cm.target2,cm.operation2)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_DRAW+CATEGORY_TOGRAVE)
e1:SetCost(cm.cost)
c:RegisterEffect(e1)
end
......@@ -19,14 +18,22 @@ function cm.costfilter(c)
end
cm.cost=RD.CostSendGraveSubToDeck(cm.costfilter,aux.dncheck,2,2)
--Damage
function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
e:SetCategory(CATEGORY_DAMAGE)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1500)
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(1-tp,1500,REASON_EFFECT)
end
--Draw
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerCanDraw(tp,3)
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,3) end
e:SetCategory(CATEGORY_DRAW+CATEGORY_TOGRAVE)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,3)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_HAND)
end
function cm.eff2op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
if Duel.Draw(tp,3,REASON_EFFECT)~=0 then
RD.SelectAndDoAction(HINTMSG_TOGRAVE,Card.IsAbleToGrave,tp,LOCATION_HAND,0,2,2,nil,function(g)
Duel.BreakEffect()
......
......@@ -7,22 +7,20 @@ function cm.initial_effect(c)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.eff1con,cm.eff1op,aux.Stringid(m,2),cm.eff2con,cm.eff2op)
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.target1,cm.operation1,aux.Stringid(m,2),cm.target2,cm.operation2)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
c:RegisterEffect(e1)
end
--Multi-Choose Effect
function cm.spfilter(c,e,tp)
return c:IsLevelBelow(8) and c:IsRace(RACE_WARRIOR+RACE_FAIRY) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.eff1con(e,tp,eg,ep,ev,re,r,rp,op)
local filter=cm.spfilter
if op then filter=aux.NecroValleyFilter(cm.spfilter) end
return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(filter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)
end
--To Deck
......@@ -32,11 +30,14 @@ end
function cm.tdfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.ctfilter,tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingMatchingCard(cm.tdfilter,tp,0,LOCATION_GRAVE,1,nil)
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.ctfilter,tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingMatchingCard(cm.tdfilter,tp,0,LOCATION_GRAVE,1,nil) end
e:SetCategory(CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,0,LOCATION_GRAVE,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function cm.eff2op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(cm.ctfilter,tp,LOCATION_GRAVE,0,nil)
if ct==0 then return end
RD.SelectAndDoAction(HINTMSG_TODECK,aux.NecroValleyFilter(cm.tdfilter),tp,0,LOCATION_GRAVE,1,ct,nil,function(g)
......
......@@ -7,19 +7,21 @@ function cm.initial_effect(c)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.eff1con,cm.eff1op,aux.Stringid(m,2),cm.eff2con,cm.eff2op)
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.target1,cm.operation1,aux.Stringid(m,2),cm.target2,cm.operation2)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DRAW+CATEGORY_TOGRAVE+CATEGORY_ATKCHANGE)
e1:SetCost(cm.cost)
c:RegisterEffect(e1)
end
--Multi-Choose Effect
cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1)
--Draw
function cm.eff1con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerCanDraw(tp,2)
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
e:SetCategory(CATEGORY_DRAW+CATEGORY_TOGRAVE)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND)
end
function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
if Duel.Draw(tp,2,REASON_EFFECT)~=0 then
RD.SelectAndDoAction(HINTMSG_TOGRAVE,Card.IsAbleToGrave,tp,LOCATION_HAND,0,1,1,nil,function(g)
Duel.BreakEffect()
......@@ -31,10 +33,11 @@ end
function cm.downfilter(c)
return c:IsFaceup() and c:IsRace(RACE_REPTILE)
end
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.downfilter,tp,0,LOCATION_MZONE,1,nil)
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.downfilter,tp,0,LOCATION_MZONE,1,nil) end
e:SetCategory(CATEGORY_ATKCHANGE)
end
function cm.eff2op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(aux.Stringid(m,3),cm.downfilter,tp,0,LOCATION_MZONE,1,3,nil,function(g)
g:ForEach(function(tc)
RD.AttachAtkDef(e,tc,-1000,-1000,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
......
......@@ -7,9 +7,8 @@ function cm.initial_effect(c)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.eff1con,cm.eff1op,aux.Stringid(m,2),cm.eff2con,cm.eff2op)
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.target1,cm.operation1,aux.Stringid(m,2),cm.target2,cm.operation2)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
c:RegisterEffect(e1)
......@@ -26,10 +25,11 @@ cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.filter(c)
return c:IsType(TYPE_MONSTER)
end
function cm.eff1con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil)
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil) end
e:SetCategory(CATEGORY_ATKCHANGE)
end
function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_GRAVE,0,nil)
......@@ -39,10 +39,13 @@ function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
end
end
--Destroy
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
e:SetCategory(CATEGORY_DESTROY)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function cm.eff2op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
......
......@@ -7,19 +7,19 @@ function cm.initial_effect(c)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.eff1con,cm.eff1op,aux.Stringid(m,2),cm.eff2con,cm.eff2op)
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.target1,cm.operation1,aux.Stringid(m,2),cm.target2,cm.operation2)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetCost(cm.cost)
c:RegisterEffect(e1)
end
--Multi-Choose Effect
cm.cost=RD.CostSendDeckTopToGrave(1)
--Atk 0
function cm.eff1con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil)
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
e:SetCategory(CATEGORY_ATKCHANGE)
end
function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(aux.Stringid(m,3),Card.IsFaceup,tp,0,LOCATION_MZONE,1,3,nil,function(g)
g:ForEach(function(tc)
RD.SetBaseAtkDef(e,tc,0,nil,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
......@@ -37,10 +37,13 @@ end
function cm.spfilter(c,e,tp)
return RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_ONFIELD,1,nil)
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end
e:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
local g=Duel.GetMatchingGroup(cm.desfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.eff2op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_DESTROY,cm.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil,function(g)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
RD.CanSelectAndSpecialSummon(aux.Stringid(m,5),aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP,true)
......
......@@ -7,19 +7,19 @@ function cm.initial_effect(c)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.eff1con,cm.eff1op,aux.Stringid(m,2),cm.eff2con,cm.eff2op)
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.target1,cm.operation1,aux.Stringid(m,2),cm.target2,cm.operation2)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetCost(cm.cost)
c:RegisterEffect(e1)
end
--Multi-Choose Effect
cm.cost=RD.CostSendDeckTopToGrave(1)
--Atk Up
function cm.eff1con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
e:SetCategory(CATEGORY_ATKCHANGE)
end
function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
if g:GetCount()==0 then return end
g:ForEach(function(tc)
......@@ -32,10 +32,11 @@ function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
end
--Indes
cm.indval=RD.ValueEffectIndesType(0,TYPE_TRAP)
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
e:SetCategory(0)
end
function cm.eff2op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
if g:GetCount()==0 then return end
g:ForEach(function(tc)
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.eff1con,cm.eff1op,aux.Stringid(m,2),cm.eff2con,cm.eff2op)
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.target1,cm.operation1,aux.Stringid(m,2),cm.target2,cm.operation2)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY)
e1:SetCost(cm.cost)
......@@ -17,10 +17,11 @@ end
cm.cost=RD.CostSendDeckTopToGrave(1)
--Atk Up
cm.indval=RD.ValueEffectIndesType(0,TYPE_TRAP)
function cm.eff1con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 end
e:SetCategory(CATEGORY_ATKCHANGE)
end
function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)*1000
......@@ -32,10 +33,13 @@ end
function cm.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_ONFIELD,1,nil)
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end
e:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
local g=Duel.GetMatchingGroup(cm.desfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.eff2op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_DESTROY,cm.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil,function(g)
Duel.Destroy(g,REASON_EFFECT)
end)
......
......@@ -7,16 +7,18 @@ function cm.initial_effect(c)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.eff1con,cm.eff1op,aux.Stringid(m,2),cm.eff2con,cm.eff2op)
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.target1,cm.operation1,aux.Stringid(m,2),cm.target2,cm.operation2)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_POSITION+CATEGORY_ATKCHANGE+CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
c:RegisterEffect(e1)
end
--Position
function cm.eff1con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(RD.IsCanChangePosition,tp,LOCATION_MZONE,0,1,nil)
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(RD.IsCanChangePosition,tp,LOCATION_MZONE,0,1,nil) end
e:SetCategory(CATEGORY_POSITION+CATEGORY_ATKCHANGE)
local g=Duel.GetMatchingGroup(RD.IsCanChangePosition,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(RD.IsCanChangePosition,tp,LOCATION_MZONE,0,nil)
if g:GetCount()>0 and RD.ChangePosition(g)~=0 then
RD.CanSelectAndDoAction(aux.Stringid(m,3),aux.Stringid(m,4),Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil,function(g)
......@@ -30,12 +32,13 @@ end
function cm.tdfilter(c)
return c:IsAbleToDeck()
end
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp,op)
local filter=cm.tdfilter
if op then filter=aux.NecroValleyFilter(cm.tdfilter) end
return Duel.IsExistingMatchingCard(filter,tp,0,LOCATION_GRAVE,1,nil)
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,0,LOCATION_GRAVE,1,nil) end
e:SetCategory(CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,0,LOCATION_GRAVE,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function cm.eff2op(e,tp,eg,ep,ev,re,r,rp)
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_TODECK,aux.NecroValleyFilter(cm.tdfilter),tp,0,LOCATION_GRAVE,1,7,nil,function(g)
RD.SendToDeckAndExists(g)
end)
......
......@@ -7,9 +7,8 @@ function cm.initial_effect(c)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),nil,cm.eff1op,aux.Stringid(m,2),nil,cm.eff2op)
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.target1,cm.operation1,aux.Stringid(m,2),cm.target2,cm.operation2)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_ATKCHANGE+CATEGORY_RECOVER+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetCondition(cm.condition)
c:RegisterEffect(e1)
end
......@@ -18,7 +17,12 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
--Damage
function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
e:SetCategory(CATEGORY_DAMAGE+CATEGORY_ATKCHANGE)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,2000)
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
if Duel.Damage(tp,2000,REASON_EFFECT)~=0 then
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
......@@ -33,7 +37,12 @@ end
function cm.spfilter(c,e,tp)
return c:IsLevelAbove(7) and c:IsRace(RACE_PSYCHO) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.eff2op(e,tp,eg,ep,ev,re,r,rp)
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
e:SetCategory(CATEGORY_RECOVER+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
if Duel.Recover(tp,1000,REASON_EFFECT)~=0 then
RD.CanSelectAndSpecialSummon(aux.Stringid(m,4),aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP,true)
end
......
local m=120234002
local cm=_G["c"..m]
cm.name="波头之魔导人偶"
function cm.initial_effect(c)
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Draw
function cm.costfilter(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsAbleToGraveAsCost()
end
function cm.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
cm.cost=RD.CostSendHandToGrave(cm.costfilter,1,1)
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,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_DESTROY,cm.filter,tp,0,LOCATION_ONFIELD,1,1,nil,function(g)
Duel.Destroy(g,REASON_EFFECT)
end)
end
\ No newline at end of file
local m=120234004
local cm=_G["c"..m]
cm.name="沉默的死者"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.spfilter(c,e,tp)
return c:IsType(TYPE_NORMAL) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP_DEFENSE)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP_DEFENSE)~=0 then
local tc=Duel.GetOperatedGroup():GetFirst()
RD.AttachCannotAttack(e,tc,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD)
end
end
\ No newline at end of file
local m=120234005
local cm=_G["c"..m]
cm.name="万能地雷 阔剑式"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.filter(c)
return c:IsPosition(POS_FACEUP_ATTACK)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
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_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil)
local dg=g:GetMaxGroup(Card.GetAttack)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
local dg=g:GetMaxGroup(Card.GetAttack)
if dg:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=dg:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Destroy(sg,REASON_EFFECT)
else
Duel.Destroy(dg,REASON_EFFECT)
end
end
end
\ No newline at end of file
local m=120235000
local cm=_G["c"..m]
cm.name="闪电之战士 吉尔福德"
function cm.initial_effect(c)
--Summon Procedure
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,0))
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCondition(cm.sumcon)
e0:SetOperation(cm.sumop)
e0:SetValue(SUMMON_TYPE_ADVANCE+SUMMON_VALUE_SELF)
c:RegisterEffect(e0)
--Check Material
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCondition(cm.regcon)
e1:SetOperation(cm.regop)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.condition)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
--Summon Procedure
function cm.sumcon(e,c,minc)
if c==nil then return true end
return minc<=3 and Duel.CheckTribute(c,3)
end
function cm.sumop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectTribute(tp,c,3,3)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
--Check Material
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE+SUMMON_VALUE_SELF
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp,c)
e:GetHandler():RegisterFlagEffect(20235000,RESET_EVENT+RESETS_STANDARD,0,1)
end
--Destroy
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsSummonTurn(c) and c:GetFlagEffect(20235000)~=0
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,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(nil,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
\ No newline at end of file
local m=120235008
local cm=_G["c"..m]
cm.name="虚空噬骸兵·灾祸标兵"
cm.name="虚空噬骸兵·铁甲骑兵"
function cm.initial_effect(c)
--Discard Deck
local e1=Effect.CreateEffect(c)
......
local m=120235016
local list={120196050}
local cm=_G["c"..m]
cm.name="猫爪女孩"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Special Summon
function cm.spfilter(c,e,tp)
return c:IsRace(RACE_BEAST) and RD.IsDefense(c,200) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.exfilter(c)
return c:IsType(TYPE_NORMAL)
end
function cm.setfilter(c)
return c:IsCode(list[1]) and c:IsSSetable()
end
cm.cost=RD.CostSendHandToDeckBottom(Card.IsAbleToDeckAsCost,1,1,false)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)~=0
and RD.IsOperatedGroupExists(cm.exfilter,1,nil) then
RD.CanSelectAndSet(aux.Stringid(m,1),aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,1,1,nil,e)
end
end
\ No newline at end of file
local m=120235028
local cm=_G["c"..m]
cm.name="升雷之战士 吉尔福德"
function cm.initial_effect(c)
--Special Summon Limit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(e0)
--Multiple Attack
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Multiple Attack
function cm.costfilter(c)
return c:IsRace(RACE_WARRIOR) and c:IsAbleToDeckOrExtraAsCost()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.IsAbleToEnterBP() and RD.IsSummonTurn(c) and RD.IsCanAttachExtraAttackMonster(c,2)
end
cm.cost=RD.CostSendGraveToDeck(cm.costfilter,2,2)
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachExtraAttackMonster(e,c,2,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
end
end
\ No newline at end of file
local m=120235034
local list={120235002,120196050}
local cm=_G["c"..m]
cm.name="双冷龙"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[1])
--Multi-Choose Effect
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.target1,cm.operation1,aux.Stringid(m,2),cm.target2,cm.operation2)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
c:RegisterEffect(e1)
end
--Multi-Choose Effect
function cm.confilter1(c)
return c:IsRace(RACE_DRAGON) or c:IsRace(RACE_HYDRAGON)
end
function cm.confilter2(c)
return c:IsType(TYPE_MONSTER) and not cm.confilter1(c)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.confilter1,tp,LOCATION_GRAVE,0,1,nil)
and not Duel.IsExistingMatchingCard(cm.confilter2,tp,LOCATION_GRAVE,0,1,nil)
end
cm.cost=RD.CostPayLP(500)
--Attack Twice
function cm.filter(c)
return c:IsFaceup() and c:IsType(TYPE_NORMAL) and RD.IsCanAttachExtraAttack(c,1)
end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil) end
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(aux.Stringid(m,3),cm.filter,tp,LOCATION_MZONE,0,1,1,nil,function(g)
RD.AttachExtraAttack(e,g:GetFirst(),1,aux.Stringid(m,4),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
end
--Set
function cm.setfilter(c)
return c:IsCode(list[2]) and c:IsSSetable()
end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSet(aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,1,1,nil,e)
end
\ No newline at end of file
local m=120235035
local list={120235003}
local cm=_G["c"..m]
cm.name="THE☆星齿车戒龙"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[1])
--Multi-Choose Effect
local e1=RD.CreateMultiChooseEffect(c,aux.Stringid(m,1),cm.target1,cm.operation1,aux.Stringid(m,2),cm.target2,cm.operation2)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
c:RegisterEffect(e1)
end
--Multi-Choose Effect
function cm.confilter1(c,tp)
return c:IsType(TYPE_NORMAL) and Duel.IsExistingMatchingCard(cm.confilter2,tp,LOCATION_GRAVE,0,1,c,c:GetCode())
end
function cm.confilter2(c,code)
return c:IsType(TYPE_NORMAL) and c:IsCode(code)
end
function cm.check(g)
return g:GetClassCount(Card.GetCode)==1
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.confilter1,tp,LOCATION_GRAVE,0,1,nil,tp)
end
cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1)
--Attack Twice
function cm.filter1(c)
return c:IsPosition(POS_FACEUP_ATTACK) and RD.IsCanAttachExtraAttack(c,1)
end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_MZONE,0,nil)
if chk==0 then return Duel.IsAbleToEnterBP() and g:CheckSubGroup(cm.check,2,2) end
e:SetCategory(0)
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
RD.SelectGroupAndDoAction(aux.Stringid(m,3),cm.filter1,cm.check,tp,LOCATION_MZONE,0,2,2,nil,function(g)
g:ForEach(function(tc)
RD.AttachExtraAttack(e,tc,1,aux.Stringid(m,4),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
end)
end
--Special Summon
function cm.filter2(c,e,tp)
return c:IsType(TYPE_NORMAL) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_GRAVE,0,nil,e,tp)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetMZoneCount(tp)>1
and g:CheckSubGroup(cm.check,2,2,nil) end
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_GRAVE)
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
RD.SelectGroupAndSpecialSummon(aux.NecroValleyFilter(cm.filter2),cm.check,tp,LOCATION_GRAVE,0,2,2,nil,e,POS_FACEUP)
end
\ No newline at end of file
local m=120235046
local cm=_G["c"..m]
cm.name="THE☆复制"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
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)
end
--Activate
function cm.confilter(c)
return c:IsFaceup() and c:IsLevelAbove(7)
end
function cm.spfilter(c,e,tp)
return c:IsType(TYPE_NORMAL) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil,c:GetCode())
end
function cm.filter(c,code)
return c:IsFaceup() and c:IsCode(code)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.confilter,tp,0,LOCATION_MZONE,1,nil)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)
end
\ No newline at end of file
local m=120235048
local cm=_G["c"..m]
cm.name="恶行斩击刃"
function cm.initial_effect(c)
--Activate
RD.RegisterEquipEffect(c,nil,nil,cm.target)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(cm.upval)
c:RegisterEffect(e1)
--Cannot Direct Attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
c:RegisterEffect(e2)
end
--Activate
function cm.filter(c,code)
return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON) and c:IsCode(code)
end
function cm.target(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON)
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,c,c:GetCode())
end
--Atk Up
function cm.upval(e,c)
local ec=e:GetHandler():GetEquipTarget()
return ec:GetBaseAttack()
end
\ No newline at end of file
local m=120235066
local cm=_G["c"..m]
cm.name="连击龙 齿车戒龙"
function cm.initial_effect(c)
--Attack Twice
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Atk Twice
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP() and RD.IsCanAttachExtraAttack(e:GetHandler(),1)
end
cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
--Extra Attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCondition(aux.bdcon)
e1:SetOperation(cm.chop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=RD.AttachExtraAttack(e,c,1,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
e2:SetCondition(cm.atkcon)
end
end
function cm.chop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(20110001,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE,0,1)
end
function cm.atkcon(e)
return e:GetHandler():GetFlagEffect(20110001)~=0
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