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) ...@@ -186,30 +186,21 @@ function RushDuel.CreateSingleEffect(e, desc, card, code, value, reset, forced)
return e1 return e1
end end
-- 创建效果: 选择效果 (自动生成Target和Operation) -- 创建效果: 选择效果 (自动生成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) local e1 = Effect.CreateEffect(card)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
if condition1 ~= nil or condition2 ~= nil then e1:SetTarget(RushDuel.MultiChooseTarget(hint1, target1, hint2, target2))
e1:SetTarget(RushDuel.MultiChooseTarget(condition1, condition2)) e1:SetOperation(RushDuel.MultiChooseOperation(operation1, operation2))
end
e1:SetOperation(RushDuel.MultiChooseOperation(hint1, condition1, operation1, hint2, condition2, operation2))
return e1 return e1
end 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) 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 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)) return effect1 or effect2
end
if target ~= nil then
target(e, tp, eg, ep, ev, re, r, rp)
end 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 local option = 0
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_EFFECT) Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_EFFECT)
if effect1 and effect2 then if effect1 and effect2 then
...@@ -221,6 +212,17 @@ function RushDuel.MultiChooseOperation(hint1, condition1, operation1, hint2, con ...@@ -221,6 +212,17 @@ function RushDuel.MultiChooseOperation(hint1, condition1, operation1, hint2, con
Duel.SelectOption(tp, hint2) Duel.SelectOption(tp, hint2)
option = 2 option = 2
end 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 if option == 1 then
operation1(e, tp, eg, ep, ev, re, r, rp) operation1(e, tp, eg, ep, ev, re, r, rp)
elseif option == 2 then elseif option == 2 then
......
...@@ -4,6 +4,46 @@ RushDuel = RushDuel or {} ...@@ -4,6 +4,46 @@ RushDuel = RushDuel or {}
TYPE_MAXIMUM = 0x400 -- 极大怪兽 TYPE_MAXIMUM = 0x400 -- 极大怪兽
SUMMON_TYPE_MAXIMUM = 0x45000000 -- 极大模式 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) function RushDuel.AddMaximumProcedure(c, max_atk, left_code, right_code)
-- 极大召唤 手续 -- 极大召唤 手续
...@@ -55,59 +95,24 @@ 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:SetCondition(RushDuel.MaximumMode)
e3:SetValue(max_atk) e3:SetValue(max_atk)
c:RegisterEffect(e3) c:RegisterEffect(e3)
-- 不可改变表示形式 -- 占用3个主要怪兽区域
local e4 = Effect.CreateEffect(c) local e4 = Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_SET_POSITION) e4:SetCode(EFFECT_MAX_MZONE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE + EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetValue(POS_FACEUP_ATTACK) e4:SetTargetRange(1, 0)
e4:SetCondition(RushDuel.MaximumMode) e4:SetCondition(RushDuel.MaximumMode)
e4:SetValue(1)
c:RegisterEffect(e4) c:RegisterEffect(e4)
-- 离开场上时, 所有部件一同离开
local e5 = Effect.CreateEffect(c) local e5 = Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE) e5:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EFFECT_CANNOT_CHANGE_POSITION) e5:SetCode(EVENT_LEAVE_FIELD_P)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE + EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE) e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(RushDuel.MaximumMode) e5:SetCondition(RushDuel.MaximumMode)
e5:SetOperation(RushDuel.MaximumLeaveOperation)
c:RegisterEffect(e5) 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 end
function RushDuel.MaximumSummonFilter(c, e, tp, left_code, right_code) 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) 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) ...@@ -143,6 +148,3 @@ function RushDuel.MaximumLeaveOperation(e, tp, eg, ep, ev, re, r, rp)
Duel.Remove(g, POS_FACEUP, REASON_RULE) Duel.Remove(g, POS_FACEUP, REASON_RULE)
end end
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() ...@@ -66,6 +66,8 @@ function RushDuel.InitRule()
RushDuel.CreatePlayerTargetGlobalEffect(EFFECT_SKIP_M2) RushDuel.CreatePlayerTargetGlobalEffect(EFFECT_SKIP_M2)
-- 手卡无限制 -- 手卡无限制
RushDuel.CreatePlayerTargetGlobalEffect(EFFECT_HAND_LIMIT, 100) RushDuel.CreatePlayerTargetGlobalEffect(EFFECT_HAND_LIMIT, 100)
-- 极大怪兽
RushDuel.InitMaximum()
end end
-- 初始化传说卡 -- 初始化传说卡
function RushDuel.InitLegend(c) function RushDuel.InitLegend(c)
......
...@@ -7,19 +7,21 @@ function cm.initial_effect(c) ...@@ -7,19 +7,21 @@ function cm.initial_effect(c)
--Fusion Material --Fusion Material
RD.AddFusionProcedure(c,list[1],list[2]) RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect --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:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Multi-Choose Effect --Multi-Choose Effect
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
--Destroy --Destroy
function cm.eff1con(e,tp,eg,ep,ev,re,r,rp) function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,nil) 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 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) RD.SelectAndDoAction(HINTMSG_DESTROY,Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,1,nil,function(g)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end) end)
...@@ -31,11 +33,12 @@ end ...@@ -31,11 +33,12 @@ end
function cm.atkfilter(c) function cm.atkfilter(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR) return c:IsFaceup() and c:IsRace(RACE_WARRIOR)
end end
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp) function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil) 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) and Duel.IsExistingMatchingCard(cm.atkfilter,tp,0,LOCATION_MZONE,1,nil) end
e:SetCategory(CATEGORY_ATKCHANGE)
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.atkfilter,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(cm.atkfilter,tp,0,LOCATION_MZONE,nil)
local atk=g:GetSum(Card.GetAttack) local atk=g:GetSum(Card.GetAttack)
if atk==0 then return end if atk==0 then return end
......
...@@ -7,19 +7,21 @@ function cm.initial_effect(c) ...@@ -7,19 +7,21 @@ function cm.initial_effect(c)
--Fusion Material --Fusion Material
RD.AddFusionProcedure(c,list[1],list[2]) RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect --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:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_POSITION+CATEGORY_DESTROY)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Position --Position
function cm.posfilter(c) function cm.posfilter(c)
return RD.IsCanChangePosition(c) and (not c:IsPosition(POS_FACEUP_ATTACK) or c:IsCanTurnSet()) return RD.IsCanChangePosition(c) and (not c:IsPosition(POS_FACEUP_ATTACK) or c:IsCanTurnSet())
end end
function cm.eff1con(e,tp,eg,ep,ev,re,r,rp) function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(cm.posfilter,tp,0,LOCATION_MZONE,1,nil) 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 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) RD.SelectAndDoAction(HINTMSG_POSCHANGE,cm.posfilter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
local tc=g:GetFirst() local tc=g:GetFirst()
local pos=POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE local pos=POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE
...@@ -39,11 +41,14 @@ end ...@@ -39,11 +41,14 @@ end
function cm.desfilter(c) function cm.desfilter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) return c:IsFaceup() and c:IsRace(RACE_DRAGON)
end end
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp) function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil) 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) 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 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) local ct=Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_MZONE,0,nil)
if ct==0 then return end if ct==0 then return end
RD.SelectAndDoAction(HINTMSG_DESTROY,cm.desfilter,tp,0,LOCATION_MZONE,1,ct,nil,function(g) RD.SelectAndDoAction(HINTMSG_DESTROY,cm.desfilter,tp,0,LOCATION_MZONE,1,ct,nil,function(g)
......
...@@ -7,35 +7,40 @@ function cm.initial_effect(c) ...@@ -7,35 +7,40 @@ function cm.initial_effect(c)
--Fusion Material --Fusion Material
RD.AddFusionProcedure(c,list[1],list[2]) RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect --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:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Multi-Choose Effect --Multi-Choose Effect
cm.cost=RD.CostSendGraveToDeckBottom(Card.IsAbleToDeckOrExtraAsCost,1,1) cm.cost=RD.CostSendGraveToDeckBottom(Card.IsAbleToDeckOrExtraAsCost,1,1)
--To Deck(Grave) --To Deck(Grave)
function cm.tdfilter1(c) function cm.filter1(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end end
function cm.eff1con(e,tp,eg,ep,ev,re,r,rp) function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(cm.tdfilter1,tp,0,LOCATION_GRAVE,1,nil) 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 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_TODECK,aux.NecroValleyFilter(cm.tdfilter1),tp,0,LOCATION_GRAVE,1,3,nil,function(g) RD.SelectAndDoAction(HINTMSG_TODECK,aux.NecroValleyFilter(cm.filter1),tp,0,LOCATION_GRAVE,1,3,nil,function(g)
RD.SendToDeckAndExists(g) RD.SendToDeckAndExists(g)
end) end)
end end
--To Deck(Monstar) --To Deck(Monstar)
function cm.tdfilter2(c) function cm.filter2(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToDeck() return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToDeck()
end end
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp) function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(cm.tdfilter2,tp,0,LOCATION_MZONE,1,nil) 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 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,cm.tdfilter2,tp,0,LOCATION_MZONE,1,2,nil,function(g) RD.SelectAndDoAction(HINTMSG_TODECK,cm.filter2,tp,0,LOCATION_MZONE,1,2,nil,function(g)
RD.SendToDeckAndExists(g) RD.SendToDeckAndExists(g)
end) end)
end end
\ No newline at end of file
...@@ -7,7 +7,7 @@ function cm.initial_effect(c) ...@@ -7,7 +7,7 @@ function cm.initial_effect(c)
--Fusion Material --Fusion Material
RD.AddFusionProcedure(c,list[1],list[2]) RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect --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:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
...@@ -16,10 +16,10 @@ end ...@@ -16,10 +16,10 @@ end
--Multi-Choose Effect --Multi-Choose Effect
cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1) cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1)
--Atk & Def Down(Single) --Atk & Def Down(Single)
function cm.eff1con(e,tp,eg,ep,ev,re,r,rp) function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
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.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) RD.AttachAtkDef(e,g:GetFirst(),-1500,-1500,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end) end)
...@@ -28,10 +28,10 @@ end ...@@ -28,10 +28,10 @@ end
function cm.downfilter(c) function cm.downfilter(c)
return c:IsFaceup() and c:IsRace(RACE_DINOSAUR) return c:IsFaceup() and c:IsRace(RACE_DINOSAUR)
end end
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp) function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(cm.downfilter,tp,0,LOCATION_MZONE,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(cm.downfilter,tp,0,LOCATION_MZONE,1,nil) end
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) local g=Duel.GetMatchingGroup(cm.downfilter,tp,0,LOCATION_MZONE,nil)
g:ForEach(function(tc) g:ForEach(function(tc)
RD.AttachAtkDef(e,tc,-2000,-2000,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachAtkDef(e,tc,-2000,-2000,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
......
...@@ -7,9 +7,8 @@ function cm.initial_effect(c) ...@@ -7,9 +7,8 @@ function cm.initial_effect(c)
--Fusion Material --Fusion Material
RD.AddFusionProcedure(c,list[1],list[2]) RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect --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:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
...@@ -19,10 +18,11 @@ cm.cost=RD.CostSendDeckTopToGrave(1) ...@@ -19,10 +18,11 @@ cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.atkfilter(c) function cm.atkfilter(c)
return c:IsType(TYPE_MONSTER) return c:IsType(TYPE_MONSTER)
end end
function cm.eff1con(e,tp,eg,ep,ev,re,r,rp) function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(cm.atkfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(cm.atkfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
e:SetCategory(CATEGORY_ATKCHANGE)
end 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() local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
local g=Duel.GetMatchingGroup(cm.atkfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil) local g=Duel.GetMatchingGroup(cm.atkfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
...@@ -34,10 +34,13 @@ end ...@@ -34,10 +34,13 @@ end
function cm.tdfilter(c) function cm.tdfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end end
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp) function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_GRAVE,0,1,nil) 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 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) RD.SelectAndDoAction(HINTMSG_TODECK,aux.NecroValleyFilter(cm.tdfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
if RD.SendToDeckAndExists(g) then if RD.SendToDeckAndExists(g) then
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
......
...@@ -7,9 +7,8 @@ function cm.initial_effect(c) ...@@ -7,9 +7,8 @@ function cm.initial_effect(c)
--Fusion Material --Fusion Material
RD.AddFusionProcedure(c,list[1],list[2]) RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect --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:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -27,7 +26,11 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -27,7 +26,11 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
end end
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
--Atk Up --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() local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachAtkDef(e,c,900,0,RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END) 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) ...@@ -35,10 +38,11 @@ function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
end end
end end
--Pierce --Pierce
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp) function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsAbleToEnterBP() and RD.IsCanAttachExtraAttack(e:GetHandler(),1) if chk==0 then return Duel.IsAbleToEnterBP() and RD.IsCanAttachExtraAttack(e:GetHandler(),1) end
e:SetCategory(0)
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 c=e:GetHandler() local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then 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) 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) ...@@ -7,9 +7,8 @@ function cm.initial_effect(c)
--Fusion Material --Fusion Material
RD.AddFusionProcedure(c,list[1],list[2]) RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect --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:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
...@@ -22,25 +21,25 @@ cm.cost=RD.CostSendHandToGrave(cm.costfilter,1,1) ...@@ -22,25 +21,25 @@ cm.cost=RD.CostSendHandToGrave(cm.costfilter,1,1)
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsRace(RACE_HYDRAGON) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP) return c:IsRace(RACE_HYDRAGON) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end end
function cm.eff1con(e,tp,eg,ep,ev,re,r,rp,op) function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
local filter=cm.spfilter if chk==0 then return Duel.GetMZoneCount(tp)>0
if op then filter=aux.NecroValleyFilter(cm.spfilter) end and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
return Duel.GetMZoneCount(tp)>0 e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
and Duel.IsExistingMatchingCard(filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
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.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP) RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)
end end
--To Hand --To Hand
function cm.thfilter(c) function cm.thfilter(c)
return c:IsCode(list[3]) and c:IsAbleToHand() return c:IsCode(list[3]) and c:IsAbleToHand()
end end
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp,op) function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
local filter=cm.thfilter if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
if op then filter=aux.NecroValleyFilter(cm.thfilter) end e:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
return Duel.IsExistingMatchingCard(filter,tp,LOCATION_GRAVE,0,1,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end 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.SelectAndDoAction(HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
RD.SendToHandAndExists(g,1-tp) RD.SendToHandAndExists(g,1-tp)
end) end)
......
...@@ -7,19 +7,19 @@ function cm.initial_effect(c) ...@@ -7,19 +7,19 @@ function cm.initial_effect(c)
--Fusion Material --Fusion Material
RD.AddFusionProcedure(c,list[1],list[2]) RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect --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:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Multi-Choose Effect --Multi-Choose Effect
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
--Atk Up --Atk Up
function cm.eff1con(e,tp,eg,ep,ev,re,r,rp) function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)>0 if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)>0 end
e:SetCategory(CATEGORY_ATKCHANGE)
end 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() local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)*300 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) ...@@ -27,10 +27,13 @@ function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
end end
end end
--Destroy --Destroy
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp) function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_SZONE,1,nil) 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 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) local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_SZONE,nil)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
Duel.ConfirmCards(tp,g) Duel.ConfirmCards(tp,g)
......
...@@ -7,9 +7,8 @@ function cm.initial_effect(c) ...@@ -7,9 +7,8 @@ function cm.initial_effect(c)
--Fusion Material --Fusion Material
RD.AddFusionProcedure(c,list[1],list[2]) RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect --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:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_ATKCHANGE+CATEGORY_RECOVER+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
...@@ -18,7 +17,12 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -18,7 +17,12 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end end
--Damage --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 if Duel.Damage(tp,2000,REASON_EFFECT)~=0 then
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
...@@ -33,7 +37,12 @@ end ...@@ -33,7 +37,12 @@ end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsLevelAbove(7) and c:IsRace(RACE_PSYCHO) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP) return c:IsLevelAbove(7) and c:IsRace(RACE_PSYCHO) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end 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 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) RD.CanSelectAndSpecialSummon(aux.Stringid(m,4),aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP,true)
end end
......
...@@ -7,7 +7,7 @@ function cm.initial_effect(c) ...@@ -7,7 +7,7 @@ function cm.initial_effect(c)
--Fusion Material --Fusion Material
RD.AddFusionProcedure(c,list[1],list[2]) RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect --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:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_POSITION) e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_POSITION)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
...@@ -16,7 +16,11 @@ end ...@@ -16,7 +16,11 @@ end
--Multi-Choose Effect --Multi-Choose Effect
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
--Cannot Special Summon --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() local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then 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) RD.AttachAtkDef(e,c,500,0,RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
...@@ -39,10 +43,13 @@ end ...@@ -39,10 +43,13 @@ end
function cm.posfilter(c) function cm.posfilter(c)
return RD.IsCanChangePosition(c) return RD.IsCanChangePosition(c)
end end
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp) function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(cm.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) 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 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.SelectAndDoAction(HINTMSG_POSCHANGE,cm.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,function(g)
RD.ChangePosition(g) RD.ChangePosition(g)
end) end)
......
...@@ -7,7 +7,7 @@ function cm.initial_effect(c) ...@@ -7,7 +7,7 @@ function cm.initial_effect(c)
--Fusion Material --Fusion Material
RD.AddFusionProcedure(c,list[1],list[2]) RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect --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:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION+CATEGORY_DESTROY) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION+CATEGORY_DESTROY)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -16,21 +16,24 @@ end ...@@ -16,21 +16,24 @@ end
function cm.thfilter(c) function cm.thfilter(c)
return c:IsAttack(0) and c:IsAbleToHand() return c:IsAttack(0) and c:IsAbleToHand()
end end
function cm.eff1con(e,tp,eg,ep,ev,re,r,rp,op) function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
local filter=cm.thfilter if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
if op then filter=aux.NecroValleyFilter(cm.thfilter) end e:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
return Duel.IsExistingMatchingCard(filter,tp,LOCATION_GRAVE,0,1,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
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(HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
RD.SendToHandAndExists(g,1-tp) RD.SendToHandAndExists(g,1-tp)
end) end)
end end
--Destroy --Destroy
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp) function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(Card.IsDefensePos,tp,0,LOCATION_MZONE,1,nil) 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 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) RD.SelectAndDoAction(HINTMSG_DESTROY,Card.IsDefensePos,tp,0,LOCATION_MZONE,1,2,nil,function(g)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end) end)
......
...@@ -7,19 +7,19 @@ function cm.initial_effect(c) ...@@ -7,19 +7,19 @@ function cm.initial_effect(c)
--Fusion Material --Fusion Material
RD.AddFusionProcedure(c,list[1],list[2]) RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect --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:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Multi-Choose Effect --Multi-Choose Effect
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
--Atk Down --Atk Down
function cm.eff1con(e,tp,eg,ep,ev,re,r,rp) function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
e:SetCategory(CATEGORY_ATKCHANGE)
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,3,nil,function(g) RD.SelectAndDoAction(aux.Stringid(m,3),Card.IsFaceup,tp,0,LOCATION_MZONE,1,3,nil,function(g)
g:ForEach(function(tc) g:ForEach(function(tc)
RD.AttachAtkDef(e,tc,-1500,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) 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) ...@@ -31,10 +31,11 @@ function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
end) end)
end end
--Direct Attack --Direct Attack
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp) function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsAbleToEnterBP() and RD.IsCanAttachDirectAttack(e:GetHandler()) if chk==0 then return Duel.IsAbleToEnterBP() and RD.IsCanAttachDirectAttack(e:GetHandler()) end
e:SetCategory(0)
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 c=e:GetHandler() local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then 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) 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) ...@@ -7,9 +7,8 @@ function cm.initial_effect(c)
--Fusion Material --Fusion Material
RD.AddFusionProcedure(c,list[1],list[2]) RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect --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:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_DRAW+CATEGORY_TOGRAVE)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
...@@ -19,14 +18,22 @@ function cm.costfilter(c) ...@@ -19,14 +18,22 @@ function cm.costfilter(c)
end end
cm.cost=RD.CostSendGraveSubToDeck(cm.costfilter,aux.dncheck,2,2) cm.cost=RD.CostSendGraveSubToDeck(cm.costfilter,aux.dncheck,2,2)
--Damage --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) Duel.Damage(1-tp,1500,REASON_EFFECT)
end end
--Draw --Draw
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp) function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsPlayerCanDraw(tp,3) 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 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 if Duel.Draw(tp,3,REASON_EFFECT)~=0 then
RD.SelectAndDoAction(HINTMSG_TOGRAVE,Card.IsAbleToGrave,tp,LOCATION_HAND,0,2,2,nil,function(g) RD.SelectAndDoAction(HINTMSG_TOGRAVE,Card.IsAbleToGrave,tp,LOCATION_HAND,0,2,2,nil,function(g)
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -7,22 +7,20 @@ function cm.initial_effect(c) ...@@ -7,22 +7,20 @@ function cm.initial_effect(c)
--Fusion Material --Fusion Material
RD.AddFusionProcedure(c,list[1],list[2]) RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect --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:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Multi-Choose Effect --Multi-Choose Effect
function cm.spfilter(c,e,tp) 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) return c:IsLevelBelow(8) and c:IsRace(RACE_WARRIOR+RACE_FAIRY) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end end
function cm.eff1con(e,tp,eg,ep,ev,re,r,rp,op) function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
local filter=cm.spfilter if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
if op then filter=aux.NecroValleyFilter(cm.spfilter) end e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
return Duel.GetMZoneCount(tp)>0 Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
and Duel.IsExistingMatchingCard(filter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
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.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP) RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)
end end
--To Deck --To Deck
...@@ -32,11 +30,14 @@ end ...@@ -32,11 +30,14 @@ end
function cm.tdfilter(c) function cm.tdfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end end
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp) function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(cm.ctfilter,tp,LOCATION_GRAVE,0,1,nil) 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) 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 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) local ct=Duel.GetMatchingGroupCount(cm.ctfilter,tp,LOCATION_GRAVE,0,nil)
if ct==0 then return end if ct==0 then return end
RD.SelectAndDoAction(HINTMSG_TODECK,aux.NecroValleyFilter(cm.tdfilter),tp,0,LOCATION_GRAVE,1,ct,nil,function(g) 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) ...@@ -7,19 +7,21 @@ function cm.initial_effect(c)
--Fusion Material --Fusion Material
RD.AddFusionProcedure(c,list[1],list[2]) RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect --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:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DRAW+CATEGORY_TOGRAVE+CATEGORY_ATKCHANGE)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Multi-Choose Effect --Multi-Choose Effect
cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1) cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1)
--Draw --Draw
function cm.eff1con(e,tp,eg,ep,ev,re,r,rp) function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsPlayerCanDraw(tp,2) 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 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 if Duel.Draw(tp,2,REASON_EFFECT)~=0 then
RD.SelectAndDoAction(HINTMSG_TOGRAVE,Card.IsAbleToGrave,tp,LOCATION_HAND,0,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_TOGRAVE,Card.IsAbleToGrave,tp,LOCATION_HAND,0,1,1,nil,function(g)
Duel.BreakEffect() Duel.BreakEffect()
...@@ -31,10 +33,11 @@ end ...@@ -31,10 +33,11 @@ end
function cm.downfilter(c) function cm.downfilter(c)
return c:IsFaceup() and c:IsRace(RACE_REPTILE) return c:IsFaceup() and c:IsRace(RACE_REPTILE)
end end
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp) function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(cm.downfilter,tp,0,LOCATION_MZONE,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(cm.downfilter,tp,0,LOCATION_MZONE,1,nil) end
e:SetCategory(CATEGORY_ATKCHANGE)
end 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) RD.SelectAndDoAction(aux.Stringid(m,3),cm.downfilter,tp,0,LOCATION_MZONE,1,3,nil,function(g)
g:ForEach(function(tc) g:ForEach(function(tc)
RD.AttachAtkDef(e,tc,-1000,-1000,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachAtkDef(e,tc,-1000,-1000,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
......
...@@ -7,9 +7,8 @@ function cm.initial_effect(c) ...@@ -7,9 +7,8 @@ function cm.initial_effect(c)
--Fusion Material --Fusion Material
RD.AddFusionProcedure(c,list[1],list[2]) RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect --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:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -26,10 +25,11 @@ cm.cost=RD.CostSendDeckTopToGrave(1) ...@@ -26,10 +25,11 @@ cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.filter(c) function cm.filter(c)
return c:IsType(TYPE_MONSTER) return c:IsType(TYPE_MONSTER)
end end
function cm.eff1con(e,tp,eg,ep,ev,re,r,rp) function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil) end
e:SetCategory(CATEGORY_ATKCHANGE)
end 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() local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_GRAVE,0,nil) 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) ...@@ -39,10 +39,13 @@ function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
end end
end end
--Destroy --Destroy
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp) function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) 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 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) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
......
...@@ -7,19 +7,19 @@ function cm.initial_effect(c) ...@@ -7,19 +7,19 @@ function cm.initial_effect(c)
--Fusion Material --Fusion Material
RD.AddFusionProcedure(c,list[1],list[2]) RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect --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:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Multi-Choose Effect --Multi-Choose Effect
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
--Atk 0 --Atk 0
function cm.eff1con(e,tp,eg,ep,ev,re,r,rp) function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
e:SetCategory(CATEGORY_ATKCHANGE)
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,3,nil,function(g) RD.SelectAndDoAction(aux.Stringid(m,3),Card.IsFaceup,tp,0,LOCATION_MZONE,1,3,nil,function(g)
g:ForEach(function(tc) g:ForEach(function(tc)
RD.SetBaseAtkDef(e,tc,0,nil,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.SetBaseAtkDef(e,tc,0,nil,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
...@@ -37,10 +37,13 @@ end ...@@ -37,10 +37,13 @@ end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP) return RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end end
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp) function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_ONFIELD,1,nil) 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 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) RD.SelectAndDoAction(HINTMSG_DESTROY,cm.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil,function(g)
if Duel.Destroy(g,REASON_EFFECT)~=0 then 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) 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) ...@@ -7,19 +7,19 @@ function cm.initial_effect(c)
--Fusion Material --Fusion Material
RD.AddFusionProcedure(c,list[1],list[2]) RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect --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:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Multi-Choose Effect --Multi-Choose Effect
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
--Atk Up --Atk Up
function cm.eff1con(e,tp,eg,ep,ev,re,r,rp) function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
e:SetCategory(CATEGORY_ATKCHANGE)
end 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) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
g:ForEach(function(tc) g:ForEach(function(tc)
...@@ -32,10 +32,11 @@ function cm.eff1op(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,10 +32,11 @@ function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
end end
--Indes --Indes
cm.indval=RD.ValueEffectIndesType(0,TYPE_TRAP) cm.indval=RD.ValueEffectIndesType(0,TYPE_TRAP)
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp) function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
e:SetCategory(0)
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(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
g:ForEach(function(tc) g:ForEach(function(tc)
......
...@@ -7,7 +7,7 @@ function cm.initial_effect(c) ...@@ -7,7 +7,7 @@ function cm.initial_effect(c)
--Fusion Material --Fusion Material
RD.AddFusionProcedure(c,list[1],list[2]) RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect --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:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY) e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
...@@ -17,10 +17,11 @@ end ...@@ -17,10 +17,11 @@ end
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
--Atk Up --Atk Up
cm.indval=RD.ValueEffectIndesType(0,TYPE_TRAP) cm.indval=RD.ValueEffectIndesType(0,TYPE_TRAP)
function cm.eff1con(e,tp,eg,ep,ev,re,r,rp) function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 end
e:SetCategory(CATEGORY_ATKCHANGE)
end 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() local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)*1000 local atk=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)*1000
...@@ -32,10 +33,13 @@ end ...@@ -32,10 +33,13 @@ end
function cm.desfilter(c) function cm.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp) function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_ONFIELD,1,nil) 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 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) RD.SelectAndDoAction(HINTMSG_DESTROY,cm.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil,function(g)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end) end)
......
...@@ -7,16 +7,18 @@ function cm.initial_effect(c) ...@@ -7,16 +7,18 @@ function cm.initial_effect(c)
--Fusion Material --Fusion Material
RD.AddFusionProcedure(c,list[1],list[2]) RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect --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:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_POSITION+CATEGORY_ATKCHANGE+CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Position --Position
function cm.eff1con(e,tp,eg,ep,ev,re,r,rp) function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(RD.IsCanChangePosition,tp,LOCATION_MZONE,0,1,nil) 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 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) local g=Duel.GetMatchingGroup(RD.IsCanChangePosition,tp,LOCATION_MZONE,0,nil)
if g:GetCount()>0 and RD.ChangePosition(g)~=0 then 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) 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 ...@@ -30,12 +32,13 @@ end
function cm.tdfilter(c) function cm.tdfilter(c)
return c:IsAbleToDeck() return c:IsAbleToDeck()
end end
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp,op) function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
local filter=cm.tdfilter if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,0,LOCATION_GRAVE,1,nil) end
if op then filter=aux.NecroValleyFilter(cm.tdfilter) end e:SetCategory(CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
return Duel.IsExistingMatchingCard(filter,tp,0,LOCATION_GRAVE,1,nil) local g=Duel.GetMatchingGroup(cm.tdfilter,tp,0,LOCATION_GRAVE,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end 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.SelectAndDoAction(HINTMSG_TODECK,aux.NecroValleyFilter(cm.tdfilter),tp,0,LOCATION_GRAVE,1,7,nil,function(g)
RD.SendToDeckAndExists(g) RD.SendToDeckAndExists(g)
end) end)
......
...@@ -7,9 +7,8 @@ function cm.initial_effect(c) ...@@ -7,9 +7,8 @@ function cm.initial_effect(c)
--Fusion Material --Fusion Material
RD.AddFusionProcedure(c,list[1],list[2]) RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect --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:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_ATKCHANGE+CATEGORY_RECOVER+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
...@@ -18,7 +17,12 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -18,7 +17,12 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end end
--Damage --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 if Duel.Damage(tp,2000,REASON_EFFECT)~=0 then
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
...@@ -33,7 +37,12 @@ end ...@@ -33,7 +37,12 @@ end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsLevelAbove(7) and c:IsRace(RACE_PSYCHO) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP) return c:IsLevelAbove(7) and c:IsRace(RACE_PSYCHO) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end 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 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) RD.CanSelectAndSpecialSummon(aux.Stringid(m,4),aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP,true)
end 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 m=120235008
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="虚空噬骸兵·灾祸标兵" cm.name="虚空噬骸兵·铁甲骑兵"
function cm.initial_effect(c) function cm.initial_effect(c)
--Discard Deck --Discard Deck
local e1=Effect.CreateEffect(c) 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