Commit b3f3d518 authored by 未闻皂名's avatar 未闻皂名

2022/3/14 特殊召唤参数变更,模块化部分KP04的卡

parent 3859ee2a
...@@ -88,7 +88,7 @@ function RushDuel.CanSelectGroupAndDoAction(desc, hint, filter, check, tp, s_ran ...@@ -88,7 +88,7 @@ function RushDuel.CanSelectGroupAndDoAction(desc, hint, filter, check, tp, s_ran
end end
-- 操作: 选择怪兽特殊召唤 -- 操作: 选择怪兽特殊召唤
function RushDuel.SelectAndSpecialSummon(filter, e, tp, s_range, o_range, min, max, expect, pos, break_effect) function RushDuel.SelectAndSpecialSummon(filter, tp, s_range, o_range, min, max, expect, e, pos, break_effect)
local ct = RushDuel.GetMZoneCount(tp, max) local ct = RushDuel.GetMZoneCount(tp, max)
if ct >= min then if ct >= min then
local hint_selection = RushDuel._private_is_include_public(s_range, o_range) local hint_selection = RushDuel._private_is_include_public(s_range, o_range)
...@@ -97,7 +97,7 @@ function RushDuel.SelectAndSpecialSummon(filter, e, tp, s_range, o_range, min, m ...@@ -97,7 +97,7 @@ function RushDuel.SelectAndSpecialSummon(filter, e, tp, s_range, o_range, min, m
return 0 return 0
end end
-- 可选操作: 选择怪兽特殊召唤 -- 可选操作: 选择怪兽特殊召唤
function RushDuel.CanSelectAndSpecialSummon(desc, filter, e, tp, s_range, o_range, min, max, expect, pos, break_effect) function RushDuel.CanSelectAndSpecialSummon(desc, filter, tp, s_range, o_range, min, max, expect, e, pos, break_effect)
local ct = RushDuel.GetMZoneCount(tp, max) local ct = RushDuel.GetMZoneCount(tp, max)
if ct >= min then if ct >= min then
local hint_selection = RushDuel._private_is_include_public(s_range, o_range) local hint_selection = RushDuel._private_is_include_public(s_range, o_range)
......
...@@ -42,6 +42,12 @@ end ...@@ -42,6 +42,12 @@ end
function RushDuel.AttachEffectIndes(e, card, value, desc, reset) function RushDuel.AttachEffectIndes(e, card, value, desc, reset)
return RushDuel.CreateSingleEffect(e, desc, card, EFFECT_INDESTRUCTABLE_EFFECT, value, reset) return RushDuel.CreateSingleEffect(e, desc, card, EFFECT_INDESTRUCTABLE_EFFECT, value, reset)
end end
-- 赋予: 战斗, 效果破坏抗性 (有次数限制)
function RushDuel.AttachIndesCount(e, card, count, value, desc, reset)
local e1 = RushDuel.CreateSingleEffect(e, desc, card, EFFECT_INDESTRUCTABLE_COUNT, value, reset)
e1:SetCountLimit(count)
return e1
end
-- 赋予: 攻击宣言特效 -- 赋予: 攻击宣言特效
function RushDuel.AttachAttackAnnounce(e, card, operation, desc, reset) function RushDuel.AttachAttackAnnounce(e, card, operation, desc, reset)
local e1 = Effect.CreateEffect(e:GetHandler()) local e1 = Effect.CreateEffect(e:GetHandler())
......
...@@ -31,7 +31,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -31,7 +31,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),e,tp,LOCATION_GRAVE,0,1,1,nil,POS_FACEUP_DEFENCE) RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP_DEFENCE)
if Duel.GetFlagEffect(tp,m)~=0 then return end if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.CreateHintEffect(e,aux.Stringid(m,1),tp,1,0,RESET_PHASE+PHASE_END) RD.CreateHintEffect(e,aux.Stringid(m,1),tp,1,0,RESET_PHASE+PHASE_END)
RD.CreateAttackLimitEffect(e,cm.atktg,tp,LOCATION_MZONE,0,RESET_PHASE+PHASE_END) RD.CreateAttackLimitEffect(e,cm.atktg,tp,LOCATION_MZONE,0,RESET_PHASE+PHASE_END)
......
...@@ -30,6 +30,6 @@ end ...@@ -30,6 +30,6 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) and RD.ChangePosition(c)~=0 then if c:IsFaceup() and c:IsRelateToEffect(e) and RD.ChangePosition(c)~=0 then
RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.spfilter),e,tp,LOCATION_GRAVE,0,1,1,nil,POS_FACEUP,true) RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP,true)
end end
end end
\ No newline at end of file
...@@ -28,6 +28,6 @@ end ...@@ -28,6 +28,6 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if Duel.Destroy(g,REASON_EFFECT)~=0 then if Duel.Destroy(g,REASON_EFFECT)~=0 then
RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.spfilter),e,tp,LOCATION_GRAVE,0,1,1,nil,POS_FACEUP_DEFENCE,false) RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP_DEFENCE,false)
end end
end end
\ No newline at end of file
...@@ -32,5 +32,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -32,5 +32,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(cm.spfilter,e,tp,LOCATION_HAND,0,1,1,nil,POS_FACEUP) RD.SelectAndSpecialSummon(cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,POS_FACEUP)
end end
\ No newline at end of file
...@@ -34,7 +34,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -34,7 +34,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if RD.SelectAndSpecialSummon(cm.spfilter,e,tp,LOCATION_HAND,0,1,1,nil,POS_FACEUP)~=0 if RD.SelectAndSpecialSummon(cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,POS_FACEUP)~=0
and RD.IsOperatedGroupExists(cm.exfilter,1,nil) and RD.IsOperatedGroupExists(cm.exfilter,1,nil)
and c:IsFaceup() and c:IsFaceup()
and c:IsRelateToEffect(e) then and c:IsRelateToEffect(e) then
......
...@@ -26,5 +26,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -26,5 +26,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),e,tp,LOCATION_GRAVE,0,1,1,nil,POS_FACEUP) RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)
end end
\ No newline at end of file
...@@ -27,5 +27,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -27,5 +27,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(cm.spfilter,e,tp,LOCATION_HAND,0,1,2,nil,POS_FACEUP) RD.SelectAndSpecialSummon(cm.spfilter,tp,LOCATION_HAND,0,1,2,nil,e,POS_FACEUP)
end end
\ No newline at end of file
...@@ -28,7 +28,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -28,7 +28,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),e,tp,LOCATION_GRAVE,0,1,1,nil,POS_FACEUP_DEFENCE) RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP_DEFENCE)
if Duel.GetFlagEffect(tp,m)~=0 then return end if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.CreateHintEffect(e,aux.Stringid(m,1),tp,1,0,RESET_PHASE+PHASE_END) RD.CreateHintEffect(e,aux.Stringid(m,1),tp,1,0,RESET_PHASE+PHASE_END)
RD.CreateAttackLimitEffect(e,cm.atktg,tp,LOCATION_MZONE,0,RESET_PHASE+PHASE_END) RD.CreateAttackLimitEffect(e,cm.atktg,tp,LOCATION_MZONE,0,RESET_PHASE+PHASE_END)
......
...@@ -28,7 +28,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -28,7 +28,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),e,tp,LOCATION_GRAVE,0,1,1,nil,POS_FACEUP_DEFENCE) RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP_DEFENCE)
if Duel.GetFlagEffect(tp,m)~=0 then return end if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.CreateHintEffect(e,aux.Stringid(m,1),tp,1,0,RESET_PHASE+PHASE_END) RD.CreateHintEffect(e,aux.Stringid(m,1),tp,1,0,RESET_PHASE+PHASE_END)
RD.CreateAttackLimitEffect(e,cm.atktg,tp,LOCATION_MZONE,0,RESET_PHASE+PHASE_END) RD.CreateAttackLimitEffect(e,cm.atktg,tp,LOCATION_MZONE,0,RESET_PHASE+PHASE_END)
......
...@@ -30,5 +30,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -30,5 +30,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),e,tp,LOCATION_GRAVE,0,1,2,nil,POS_FACEUP) RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,2,nil,e,POS_FACEUP)
end end
\ No newline at end of file
...@@ -30,5 +30,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -30,5 +30,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),e,tp,LOCATION_GRAVE,0,1,1,nil,POS_FACEUP) RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)
end end
\ No newline at end of file
...@@ -34,7 +34,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -34,7 +34,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if RD.SelectAndSpecialSummon(cm.spfilter,e,tp,LOCATION_HAND,0,1,1,nil,POS_FACEUP)~=0 if RD.SelectAndSpecialSummon(cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,POS_FACEUP)~=0
and RD.IsOperatedGroupExists(cm.exfilter,1,nil) and RD.IsOperatedGroupExists(cm.exfilter,1,nil)
and c:IsFaceup() and c:IsFaceup()
and c:IsRelateToEffect(e) then and c:IsRelateToEffect(e) then
......
...@@ -26,5 +26,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -26,5 +26,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(cm.spfilter,e,tp,LOCATION_HAND,0,1,1,nil,POS_FACEUP) RD.SelectAndSpecialSummon(cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,POS_FACEUP)
end end
\ No newline at end of file
...@@ -30,5 +30,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -30,5 +30,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),e,tp,LOCATION_GRAVE,0,1,1,nil,POS_FACEUP) RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)
end end
\ No newline at end of file
...@@ -34,6 +34,6 @@ end ...@@ -34,6 +34,6 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and RD.SendToGraveAndExists(c) then if c:IsRelateToEffect(e) and RD.SendToGraveAndExists(c) then
RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),e,tp,LOCATION_GRAVE,0,1,1,nil,POS_FACEUP_DEFENSE,true) RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP_DEFENSE,true)
end end
end end
\ No newline at end of file
...@@ -28,5 +28,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -28,5 +28,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),e,tp,LOCATION_GRAVE,0,1,1,nil,POS_FACEUP) RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)
end end
\ No newline at end of file
...@@ -28,6 +28,6 @@ end ...@@ -28,6 +28,6 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker() local tc=Duel.GetAttacker()
if tc:IsRelateToBattle() and tc:IsAttackPos() and RD.ChangePosition(tc,POS_FACEUP_DEFENSE)~=0 then if tc:IsRelateToBattle() and tc:IsAttackPos() and RD.ChangePosition(tc,POS_FACEUP_DEFENSE)~=0 then
RD.CanSelectAndSpecialSummon(HINTMSG_SPSUMMON,aux.NecroValleyFilter(cm.spfilter),e,tp,LOCATION_GRAVE,0,1,1,nil,POS_FACEUP) RD.CanSelectAndSpecialSummon(HINTMSG_SPSUMMON,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)
end end
end end
\ No newline at end of file
...@@ -32,5 +32,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -32,5 +32,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),e,tp,LOCATION_GRAVE,0,1,1,nil,POS_FACEUP) RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)
end end
\ No newline at end of file
...@@ -32,5 +32,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -32,5 +32,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(cm.spfilter,e,tp,LOCATION_HAND,0,1,1,nil,POS_FACEUP) RD.SelectAndSpecialSummon(cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,POS_FACEUP)
end end
\ No newline at end of file
...@@ -27,5 +27,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -27,5 +27,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(cm.spfilter,e,tp,LOCATION_HAND,0,1,1,nil,POS_FACEUP) RD.SelectAndSpecialSummon(cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,POS_FACEUP)
end end
\ No newline at end of file
...@@ -27,7 +27,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -27,7 +27,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(cm.spfilter,e,tp,LOCATION_HAND,0,1,1,nil,POS_FACEUP) RD.SelectAndSpecialSummon(cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,POS_FACEUP)
if Duel.GetFlagEffect(tp,m)~=0 then return end if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.CreateHintEffect(e,aux.Stringid(m,1),tp,1,0,RESET_PHASE+PHASE_END) RD.CreateHintEffect(e,aux.Stringid(m,1),tp,1,0,RESET_PHASE+PHASE_END)
RD.CreateAttackLimitEffect(e,cm.atktg,tp,LOCATION_MZONE,0,RESET_PHASE+PHASE_END) RD.CreateAttackLimitEffect(e,cm.atktg,tp,LOCATION_MZONE,0,RESET_PHASE+PHASE_END)
......
...@@ -33,5 +33,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -33,5 +33,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),e,tp,LOCATION_GRAVE,0,1,1,nil,POS_FACEUP) RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)
end end
\ No newline at end of file
...@@ -29,5 +29,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -29,5 +29,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(cm.spfilter,e,tp,LOCATION_HAND,0,1,1,nil,POS_FACEUP_ATTACK) RD.SelectAndSpecialSummon(cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,POS_FACEUP_ATTACK)
end end
\ No newline at end of file
...@@ -20,7 +20,7 @@ function cm.initial_effect(c) ...@@ -20,7 +20,7 @@ function cm.initial_effect(c)
end end
--Special Summon --Special Summon
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end end
function cm.desfilter(c) function cm.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
...@@ -32,7 +32,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -32,7 +32,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.SelectAndSpecialSummon(cm.spfilter,e,tp,LOCATION_HAND,0,1,2,nil,POS_FACEUP)~=0 then if RD.SelectAndSpecialSummon(cm.spfilter,tp,LOCATION_HAND,0,1,2,nil,e,POS_FACEUP)~=0 then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_DESTROY,cm.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil,function(g) RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_DESTROY,cm.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil,function(g)
Duel.BreakEffect() Duel.BreakEffect()
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
......
...@@ -37,7 +37,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -37,7 +37,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if RD.SelectAndSpecialSummon(cm.spfilter,e,tp,LOCATION_HAND,0,1,1,nil,POS_FACEUP)~=0 then if RD.SelectAndSpecialSummon(cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,POS_FACEUP)~=0 then
local tc=Duel.GetOperatedGroup():GetFirst() local tc=Duel.GetOperatedGroup():GetFirst()
RD.AttachAtkDef(e,tc,e:GetLabel()*100,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachAtkDef(e,tc,e:GetLabel()*100,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end end
......
...@@ -34,5 +34,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -34,5 +34,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter), e, tp, LOCATION_GRAVE,0,1,1,nil, POS_FACEUP_ATTACK) RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP_ATTACK)
end end
\ No newline at end of file
...@@ -45,7 +45,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -45,7 +45,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),e,tp,LOCATION_GRAVE,0,1,1,nil,POS_FACEUP)~=0 then if RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)~=0 then
local sg=Duel.GetMatchingGroup(cm.exfilter,tp,LOCATION_GRAVE,0,nil) local sg=Duel.GetMatchingGroup(cm.exfilter,tp,LOCATION_GRAVE,0,nil)
if sg:CheckSubGroup(cm.excheck,3,3) then if sg:CheckSubGroup(cm.excheck,3,3) then
RD.CanDraw(aux.Stringid(m,1),tp,1,true) RD.CanDraw(aux.Stringid(m,1),tp,1,true)
......
...@@ -30,5 +30,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -30,5 +30,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),e,tp,LOCATION_GRAVE,0,1,1,nil,POS_FACEUP) RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)
end end
\ No newline at end of file
...@@ -35,6 +35,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -35,6 +35,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if RD.Damage()~=0 and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,1,nil) then if RD.Damage()~=0 and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,1,nil) then
RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),cm.spfilter,e,tp,LOCATION_HAND,0,1,1,nil,POS_FACEUP) RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,POS_FACEUP)
end end
end end
\ No newline at end of file
...@@ -29,7 +29,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -29,7 +29,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.SelectAndSpecialSummon(cm.spfilter,e,tp,LOCATION_HAND,0,1,1,nil,POS_FACEUP)~=0 then if RD.SelectAndSpecialSummon(cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,POS_FACEUP)~=0 then
local tc=Duel.GetOperatedGroup():GetFirst() local tc=Duel.GetOperatedGroup():GetFirst()
RD.AttachAtkDef(e,tc,500,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachAtkDef(e,tc,500,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
if Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_GRAVE,0,1,nil) then if Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_GRAVE,0,1,nil) then
......
...@@ -27,7 +27,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -27,7 +27,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_TOGRAVE,Card.IsAbleToGrave,tp,LOCATION_MZONE,0,1,7,nil,function(g) RD.SelectAndDoAction(HINTMSG_TOGRAVE,Card.IsAbleToGrave,tp,LOCATION_MZONE,0,1,7,nil,function(g)
if Duel.SendtoGrave(g,REASON_EFFECT)~=0 then if Duel.SendtoGrave(g,REASON_EFFECT)~=0 then
local lv=Duel.GetOperatedGroup():Filter(cm.exfilter,nil):GetSum(Card.GetOriginalLevel) local lv=Duel.GetOperatedGroup():Filter(cm.exfilter,nil):GetSum(Card.GetOriginalLevel)
if lv>=10 and RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.spfilter),e,tp,LOCATION_GRAVE,0,1,1,nil,POS_FACEUP)~=0 then if lv>=10 and RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)~=0 then
local tc=Duel.GetOperatedGroup():GetFirst() local tc=Duel.GetOperatedGroup():GetFirst()
RD.AttachAtkDef(e,tc,300,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachAtkDef(e,tc,300,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end end
......
...@@ -24,29 +24,16 @@ end ...@@ -24,29 +24,16 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(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
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1)) local function filter(tc)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tdfilter),tp,LOCATION_GRAVE,0,1,3,nil,c:GetRace()) return cm.tdfilter(tc,c:GetRace())
if g:GetCount()>0 then end
Duel.HintSelection(g) RD.SelectAndDoAction(HINTMSG_TODECK,aux.NecroValleyFilter(filter),tp,LOCATION_GRAVE,0,1,3,nil,function(g)
local atk=g:GetSum(Card.GetLevel)*100 local atk=g:GetSum(Card.GetLevel)*100
local e1=Effect.CreateEffect(c) RD.AttachAtkDef(e,c,atk,0,RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
Duel.BreakEffect() Duel.BreakEffect()
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)==0 then return end if RD.SendToDeckAndExists(g) and Duel.GetOperatedGroup():GetCount() == 1 then
local og=Duel.GetOperatedGroup() RD.AttachPierce(e,c,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
if og:FilterCount(Card.IsLocation,nil,LOCATION_DECK)==1 then
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PIERCE)
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
end
end end
end)
end end
end end
\ No newline at end of file
...@@ -17,19 +17,7 @@ end ...@@ -17,19 +17,7 @@ end
function cm.costfilter(c) function cm.costfilter(c)
return c:IsType(TYPE_NORMAL) and c:IsAbleToDeckOrExtraAsCost() return c:IsType(TYPE_NORMAL) and c:IsAbleToDeckOrExtraAsCost()
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) cm.cost=RD.CostSendGraveToDeckBottom(cm.costfilter,4,4)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_GRAVE,0,4,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_GRAVE,0,4,4,nil)
Duel.ConfirmCards(1-tp,g)
Duel.SendtoDeck(g,nil,0,REASON_COST)
local ct=Duel.GetOperatedGroup():FilterCount(Card.IsLocation,nil,LOCATION_DECK)
Duel.SortDecktop(tp,tp,ct)
for i=1,ct do
local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
Duel.MoveSequence(tc,1)
end
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)>0 end if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)>0 end
end end
...@@ -37,22 +25,8 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,22 +25,8 @@ function cm.operation(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)*700 local atk=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)*700
local e1=Effect.CreateEffect(c) RD.AttachAtkDef(e,c,atk,0,RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
e1:SetType(EFFECT_TYPE_SINGLE) RD.AttachIndesCount(e,c,1,cm.indval,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetValue(cm.indval)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
end end
end end
function cm.indval(e,re,r,rp) function cm.indval(e,re,r,rp)
......
...@@ -19,26 +19,15 @@ end ...@@ -19,26 +19,15 @@ end
function cm.thfilter(c) function cm.thfilter(c)
return c:IsCode(list[1]) and c:IsAbleToHand() return c:IsCode(list[1]) and c:IsAbleToHand()
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) cm.cost=RD.CostSendDeckTopToGrave(1)
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end
Duel.DiscardDeck(tp,1,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetTargetPlayer(tp) RD.TargetRecover(tp,400)
Duel.SetTargetParam(400)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,400)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) if RD.Recover()~=0 then
if Duel.Recover(p,d,REASON_EFFECT)~=0 RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,99,nil,function(g)
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,nil) RD.SendToHandAndExists(g,1-tp)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then end)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,99,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end end
end end
\ No newline at end of file
...@@ -17,8 +17,11 @@ end ...@@ -17,8 +17,11 @@ end
function cm.confilter(c) function cm.confilter(c)
return c:IsFaceup() and c:IsAttack(0) return c:IsFaceup() and c:IsAttack(0)
end end
function cm.exfilter(c)
return c:IsAttack(0)
end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsAttack(0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_NORMAL) and c:IsAttack(0) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) return Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
...@@ -28,15 +31,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -28,15 +31,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2) Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.DiscardDeck(tp,2,REASON_EFFECT)==0 then return end if RD.SendDeckTopToGraveAndExists(tp,2,cm.exfilter,1,nil) then
local g=Duel.GetOperatedGroup() RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)
if g:IsExists(Card.IsAttack,1,nil,0) and Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end end
end end
\ No newline at end of file
...@@ -22,11 +22,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -22,11 +22,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) RD.SelectAndDoAction(HINTMSG_RTOHAND,cm.thfilter,tp,LOCATION_MZONE,0,1,1,nil,function(g)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_MZONE,0,1,1,nil) RD.SendToHandAndExists(g,1-tp)
if g:GetCount()>0 then end)
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end end
\ No newline at end of file
...@@ -18,30 +18,17 @@ function cm.costfilter(c,e,tp) ...@@ -18,30 +18,17 @@ function cm.costfilter(c,e,tp)
return c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,c,e,tp) return c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,c,e,tp)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsAttack(0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsAttack(0) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
Duel.SendtoGrave(g,REASON_COST)
end end
cm.cost=RD.CostSendHandToGrave(cm.costfilter,1,1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<1 then return end if RD.SelectAndSpecialSummon(cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,POS_FACEUP)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local tc=Duel.GetOperatedGroup():GetFirst()
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) RD.AttachAtkDef(e,tc,tc:GetBaseDefense(),0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
local tc=g:GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(tc:GetBaseDefense())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end end
end end
\ No newline at end of file
...@@ -6,7 +6,7 @@ function cm.initial_effect(c) ...@@ -6,7 +6,7 @@ function cm.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_XMATERIAL) e1:SetType(EFFECT_TYPE_XMATERIAL)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetCondition(RushDuel.MaximumMode) e1:SetCondition(RD.MaximumMode)
e1:SetValue(cm.atkval) e1:SetValue(cm.atkval)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
......
...@@ -12,7 +12,7 @@ function cm.initial_effect(c) ...@@ -12,7 +12,7 @@ function cm.initial_effect(c)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(RushDuel.MaximumMode) e1:SetCondition(RD.MaximumMode)
e1:SetValue(cm.efilter) e1:SetValue(cm.efilter)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
......
...@@ -9,7 +9,7 @@ function cm.initial_effect(c) ...@@ -9,7 +9,7 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetLabel(m) e1:SetLabel(m)
e1:SetCondition(RushDuel.MaximumMode) e1:SetCondition(RD.MaximumMode)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.operation) e1:SetOperation(cm.operation)
...@@ -19,13 +19,7 @@ end ...@@ -19,13 +19,7 @@ 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.cost(e,tp,eg,ep,ev,re,r,rp,chk) cm.cost=RD.CostSendGraveToDeckBottom(Card.IsAbleToDeckOrExtraAsCost,1,1)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.SendtoDeck(g,nil,1,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end and Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
...@@ -34,16 +28,11 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -34,16 +28,11 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) RD.SelectAndDoAction(HINTMSG_DESTROY,cm.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,function(g)
local g=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) if Duel.Destroy(g,REASON_EFFECT)~=0
if g:GetCount()>0 then and Duel.Draw(tp,1,REASON_EFFECT)~=0
Duel.HintSelection(g) and g:GetFirst():IsType(TYPE_FIELD) then
if Duel.Destroy(g,REASON_EFFECT)~=0 then RD.CanDraw(aux.Stringid(m,1),tp,1)
Duel.Draw(tp,1,REASON_EFFECT)
if g:GetFirst():IsType(TYPE_FIELD) and Duel.IsPlayerCanDraw(tp,1)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end end
end)
end end
\ No newline at end of file
...@@ -15,7 +15,7 @@ function cm.initial_effect(c) ...@@ -15,7 +15,7 @@ function cm.initial_effect(c)
end end
--Special Summon --Special Summon
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_WYRM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_WYRM) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_FZONE,LOCATION_FZONE,1,nil) return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_FZONE,LOCATION_FZONE,1,nil)
...@@ -26,10 +26,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -26,10 +26,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<1 then return end RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end end
\ No newline at end of file
...@@ -18,19 +18,11 @@ end ...@@ -18,19 +18,11 @@ end
function cm.costfilter(c) function cm.costfilter(c)
return c:IsRace(RACE_WYRM) and c:IsAbleToGraveAsCost() return c:IsRace(RACE_WYRM) and c:IsAbleToGraveAsCost()
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) cm.cost=RD.CostSendHandToGrave(cm.costfilter,1,1)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) RD.TargetDraw(tp,1)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) RD.Draw()
Duel.Draw(p,d,REASON_EFFECT)
end end
\ No newline at end of file
...@@ -29,6 +29,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -29,6 +29,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.SelectAndSet(aux.NecroValleyFilter(cm.setfilter),e,tp,LOCATION_GRAVE,0,1,1,nil)~=0 then if RD.SelectAndSet(aux.NecroValleyFilter(cm.setfilter),e,tp,LOCATION_GRAVE,0,1,1,nil)~=0 then
RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.spfilter),e,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,POS_FACEUP,true) RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP,true)
end end
end end
\ No newline at end of file
...@@ -28,7 +28,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -28,7 +28,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.SelectAndSpecialSummon(cm.spfilter,e,tp,LOCATION_HAND,0,2,2,nil,POS_FACEUP)~=0 then if RD.SelectAndSpecialSummon(cm.spfilter,tp,LOCATION_HAND,0,2,2,nil,e,POS_FACEUP)~=0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Damage(1-tp,700,REASON_EFFECT) Duel.Damage(1-tp,700,REASON_EFFECT)
end end
......
...@@ -36,5 +36,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -36,5 +36,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),e,tp,LOCATION_GRAVE,0,1,1,nil,POS_FACEUP_DEFENCE) RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP_DEFENCE)
end end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment