Commit 47478cd4 authored by 未闻皂名's avatar 未闻皂名

2025/2/8 扭防抗性调整更新

parent 6215534f
Pipeline #33042 passed with stages
in 9 minutes and 55 seconds
...@@ -226,18 +226,43 @@ function RushDuel.CanSelectGroupAndSet(desc, filter, check, tp, s_range, o_range ...@@ -226,18 +226,43 @@ function RushDuel.CanSelectGroupAndSet(desc, filter, check, tp, s_range, o_range
return 0 return 0
end end
-- 过滤可以改变表示形式的卡
function RushDuel.FilterChangePositionTarget(card, effect, player, reason, hints)
local effects = {card:IsHasEffect(EFFECT_CANNOT_CHANGE_POSITION_EFFECT)}
for i, e in ipairs(effects) do
local value = e:GetValue()
if value == 1 then
hints:AddCard(e:GetHandler())
return false
elseif type(value) == "function" and value(e, effect, reason, player) then
hints:AddCard(e:GetHandler())
return false
end
end
return true
end
-- 操作: 改变表示形式 -- 操作: 改变表示形式
function RushDuel.ChangePosition(target, pos) function RushDuel.ChangePosition(target, effect, player, reason, pos)
if pos == nil then local hints = Group.CreateGroup()
return Duel.ChangePosition(target, POS_FACEUP_DEFENSE, POS_FACEUP_DEFENSE, POS_FACEUP_ATTACK, POS_FACEUP_ATTACK) local group = RushDuel.ToGroup(target):Filter(RushDuel.FilterChangePositionTarget, nil, effect, player, reason, hints)
local tc = hints:GetFirst()
if tc then
Duel.Hint(HINT_CARD, 0, tc:GetOriginalCode())
end
if group:GetCount() > 0 then
if pos == nil then
return Duel.ChangePosition(group, POS_FACEUP_DEFENSE, POS_FACEUP_DEFENSE, POS_FACEUP_ATTACK, POS_FACEUP_ATTACK)
else
return Duel.ChangePosition(group, pos)
end
else else
return Duel.ChangePosition(target, pos) return 0
end end
end end
-- 操作: 加入/返回手卡, 并给对方确认 -- 操作: 加入/返回手卡, 并给对方确认
function RushDuel.SendToHandAndExists(target, confirm_player, filter, count, expect) function RushDuel.SendToHandAndExists(target, confirm_player, filter, count, expect)
local g = RushDuel.ToMaximunGroup(target):Filter(Card.IsAbleToHand,nil) local g = RushDuel.ToMaximunGroup(target):Filter(Card.IsAbleToHand, nil)
if Duel.SendtoHand(g, nil, REASON_EFFECT) == 0 then if Duel.SendtoHand(g, nil, REASON_EFFECT) == 0 then
return false return false
end end
...@@ -248,7 +273,7 @@ function RushDuel.SendToHandAndExists(target, confirm_player, filter, count, exp ...@@ -248,7 +273,7 @@ function RushDuel.SendToHandAndExists(target, confirm_player, filter, count, exp
end end
-- 操作: 返回对方手卡, 不能确认那些卡 -- 操作: 返回对方手卡, 不能确认那些卡
function RushDuel.SendToOpponentHand(target) function RushDuel.SendToOpponentHand(target)
local g = RushDuel.ToMaximunGroup(target):Filter(Card.IsAbleToHand,nil) local g = RushDuel.ToMaximunGroup(target):Filter(Card.IsAbleToHand, nil)
return Duel.SendtoHand(g, nil, REASON_EFFECT) return Duel.SendtoHand(g, nil, REASON_EFFECT)
end end
...@@ -297,12 +322,12 @@ end ...@@ -297,12 +322,12 @@ end
-- 操作: 返回卡组 -- 操作: 返回卡组
function RushDuel.SendToDeckAndExists(target, filter, count, expect) function RushDuel.SendToDeckAndExists(target, filter, count, expect)
local g = RushDuel.ToMaximunGroup(target):Filter(Card.IsAbleToDeck,nil) local g = RushDuel.ToMaximunGroup(target):Filter(Card.IsAbleToDeck, nil)
return Duel.SendtoDeck(g, nil, SEQ_DECKSHUFFLE, REASON_EFFECT) ~= 0 and RushDuel.IsOperatedGroupExists(filter, count, expect) return Duel.SendtoDeck(g, nil, SEQ_DECKSHUFFLE, REASON_EFFECT) ~= 0 and RushDuel.IsOperatedGroupExists(filter, count, expect)
end end
-- 操作: 返回卡组上面 (排序) -- 操作: 返回卡组上面 (排序)
function RushDuel.SendToDeckTop(target, sort_player) function RushDuel.SendToDeckTop(target, sort_player)
local g = RushDuel.ToMaximunGroup(target):Filter(Card.IsAbleToDeck,nil) local g = RushDuel.ToMaximunGroup(target):Filter(Card.IsAbleToDeck, nil)
if sort_player ~= nil then if sort_player ~= nil then
local og, ct = RushDuel.SendToDeckSort(g, SEQ_DECKTOP, REASON_EFFECT, sort_player) local og, ct = RushDuel.SendToDeckSort(g, SEQ_DECKTOP, REASON_EFFECT, sort_player)
return ct return ct
...@@ -312,7 +337,7 @@ function RushDuel.SendToDeckTop(target, sort_player) ...@@ -312,7 +337,7 @@ function RushDuel.SendToDeckTop(target, sort_player)
end end
-- 操作: 返回卡组下面 (排序) -- 操作: 返回卡组下面 (排序)
function RushDuel.SendToDeckBottom(target, sort_player) function RushDuel.SendToDeckBottom(target, sort_player)
local g = RushDuel.ToMaximunGroup(target):Filter(Card.IsAbleToDeck,nil) local g = RushDuel.ToMaximunGroup(target):Filter(Card.IsAbleToDeck, nil)
if sort_player ~= nil then if sort_player ~= nil then
local og, ct = RushDuel.SendToDeckSort(g, SEQ_DECKBOTTOM, REASON_EFFECT, sort_player) local og, ct = RushDuel.SendToDeckSort(g, SEQ_DECKBOTTOM, REASON_EFFECT, sort_player)
return ct return ct
...@@ -322,19 +347,19 @@ function RushDuel.SendToDeckBottom(target, sort_player) ...@@ -322,19 +347,19 @@ function RushDuel.SendToDeckBottom(target, sort_player)
end end
-- 操作: 返回卡组上面或下面 (排序) -- 操作: 返回卡组上面或下面 (排序)
function RushDuel.SendToDeckTopOrBottom(target, sort_player, top_desc, bottom_desc) function RushDuel.SendToDeckTopOrBottom(target, sort_player, top_desc, bottom_desc)
local g = RushDuel.ToMaximunGroup(target):Filter(Card.IsAbleToDeck,nil) local g = RushDuel.ToMaximunGroup(target):Filter(Card.IsAbleToDeck, nil)
local sequence = Duel.SelectOption(sort_player, top_desc, bottom_desc) local sequence = Duel.SelectOption(sort_player, top_desc, bottom_desc)
local og, ct = RushDuel.SendToDeckSort(g, sequence, REASON_EFFECT, sort_player) local og, ct = RushDuel.SendToDeckSort(g, sequence, REASON_EFFECT, sort_player)
return ct return ct
end end
-- 操作: 返回对方卡组上面 (排序) -- 操作: 返回对方卡组上面 (排序)
function RushDuel.SendToOpponentDeck(target) function RushDuel.SendToOpponentDeck(target)
local g = RushDuel.ToMaximunGroup(target):Filter(Card.IsAbleToDeck,nil) local g = RushDuel.ToMaximunGroup(target):Filter(Card.IsAbleToDeck, nil)
return Duel.SendtoDeck(g, nil, SEQ_DECKSHUFFLE, REASON_EFFECT) return Duel.SendtoDeck(g, nil, SEQ_DECKSHUFFLE, REASON_EFFECT)
end end
-- 操作: 返回对方卡组上面 (排序) -- 操作: 返回对方卡组上面 (排序)
function RushDuel.SendToOpponentDeckTop(target, player) function RushDuel.SendToOpponentDeckTop(target, player)
local g = RushDuel.ToMaximunGroup(target):Filter(Card.IsAbleToDeck,nil) local g = RushDuel.ToMaximunGroup(target):Filter(Card.IsAbleToDeck, nil)
if g:GetCount() == 1 then if g:GetCount() == 1 then
return Duel.SendtoDeck(g, nil, SEQ_DECKTOP, REASON_EFFECT) return Duel.SendtoDeck(g, nil, SEQ_DECKTOP, REASON_EFFECT)
else else
...@@ -344,7 +369,7 @@ function RushDuel.SendToOpponentDeckTop(target, player) ...@@ -344,7 +369,7 @@ function RushDuel.SendToOpponentDeckTop(target, player)
end end
-- 操作: 返回对方卡组下面 (排序) -- 操作: 返回对方卡组下面 (排序)
function RushDuel.SendToOpponentDeckBottom(target, player) function RushDuel.SendToOpponentDeckBottom(target, player)
local g = RushDuel.ToMaximunGroup(target):Filter(Card.IsAbleToDeck,nil) local g = RushDuel.ToMaximunGroup(target):Filter(Card.IsAbleToDeck, nil)
if g:GetCount() == 1 then if g:GetCount() == 1 then
return Duel.SendtoDeck(g, nil, SEQ_DECKBOTTOM, REASON_EFFECT) return Duel.SendtoDeck(g, nil, SEQ_DECKBOTTOM, REASON_EFFECT)
else else
......
...@@ -51,15 +51,6 @@ function RushDuel.IsCanChangePosition(card, effect, player, reason) ...@@ -51,15 +51,6 @@ function RushDuel.IsCanChangePosition(card, effect, player, reason)
if not card:IsCanChangePosition() or RushDuel.IsMaximumMode(card) then if not card:IsCanChangePosition() or RushDuel.IsMaximumMode(card) then
return false return false
end end
local effects = {card:IsHasEffect(EFFECT_CANNOT_CHANGE_POSITION_EFFECT)}
for i, e in ipairs(effects) do
local value = e:GetValue()
if value == 1 then
return false
elseif type(value) == "function" and value(e, effect, reason, player) then
return false
end
end
return true return true
end end
-- 条件: 可否特殊召唤 -- 条件: 可否特殊召唤
......
...@@ -95,7 +95,7 @@ end ...@@ -95,7 +95,7 @@ end
function RushDuel._private_action_change_position(position, set_label_before, set_object_before, set_label_after, set_object_after) function RushDuel._private_action_change_position(position, set_label_before, set_object_before, set_label_after, set_object_after)
return function(g, e, tp, eg, ep, ev, re, r, rp) return function(g, e, tp, eg, ep, ev, re, r, rp)
RushDuel.SetLabelAndObject(e, g, set_label_before, set_object_before) RushDuel.SetLabelAndObject(e, g, set_label_before, set_object_before)
if RushDuel.ChangePosition(g, position) ~= 0 then if RushDuel.ChangePosition(g, e, tp, REASON_COST, position) ~= 0 then
local og = Duel.GetOperatedGroup() local og = Duel.GetOperatedGroup()
RushDuel.SetLabelAndObject(e, og, set_label_after, set_object_after) RushDuel.SetLabelAndObject(e, og, set_label_after, set_object_after)
end end
...@@ -358,9 +358,9 @@ function RushDuel.CostChangeSelfPosition(pos1, pos2) ...@@ -358,9 +358,9 @@ function RushDuel.CostChangeSelfPosition(pos1, pos2)
return (not pos1 or c:IsPosition(pos1)) and RushDuel.IsCanChangePosition(c, e, tp, REASON_COST) return (not pos1 or c:IsPosition(pos1)) and RushDuel.IsCanChangePosition(c, e, tp, REASON_COST)
end end
if pos2 then if pos2 then
RD.ChangePosition(c, pos2) RushDuel.ChangePosition(c, e, tp, REASON_COST, pos2)
else else
RD.ChangePosition(c) RushDuel.ChangePosition(c, e, tp, REASON_COST)
end end
end end
end end
......
...@@ -47,8 +47,8 @@ function RushDuel.HintOrConfirm(group, hint_selection, confirm, target_player) ...@@ -47,8 +47,8 @@ function RushDuel.HintOrConfirm(group, hint_selection, confirm, target_player)
end end
end end
-- 将 卡片组/卡片/效果 转化为卡片组, 对于极大怪兽, 其素材也包含其中 -- 将 卡片组/卡片/效果 转化为卡片组
function RushDuel.ToMaximunGroup(target) function RushDuel.ToGroup(target)
local type = Auxiliary.GetValueType(target) local type = Auxiliary.GetValueType(target)
local g = Group.CreateGroup() local g = Group.CreateGroup()
if type == "Group" then if type == "Group" then
...@@ -58,6 +58,12 @@ function RushDuel.ToMaximunGroup(target) ...@@ -58,6 +58,12 @@ function RushDuel.ToMaximunGroup(target)
elseif type == "Effect" then elseif type == "Effect" then
g:AddCard(target:GetHandler()) g:AddCard(target:GetHandler())
end end
return g
end
-- 将 卡片组/卡片/效果 转化为卡片组, 对于极大怪兽, 其素材也包含其中
function RushDuel.ToMaximunGroup(target)
local g = RushDuel.ToGroup(target)
local overlay = Group.CreateGroup() local overlay = Group.CreateGroup()
g:ForEach(function(tc) g:ForEach(function(tc)
if RushDuel.IsMaximumMode(tc) then if RushDuel.IsMaximumMode(tc) then
......
...@@ -25,5 +25,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -25,5 +25,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 filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,RD.ChangePosition) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.ChangePosition(g,e,tp,REASON_EFFECT)
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)
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 c:IsFaceup() and c:IsRelateToEffect(e) and RD.ChangePosition(c)~=0 then if c:IsFaceup() and c:IsRelateToEffect(e) and RD.ChangePosition(c,e,tp,REASON_EFFECT)~=0 then
RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,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
...@@ -26,6 +26,6 @@ end ...@@ -26,6 +26,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 filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.ChangePosition(g,POS_FACEUP_ATTACK) RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_ATTACK)
end) end)
end end
\ No newline at end of file
...@@ -35,6 +35,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,6 +35,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if ct==0 then return end if ct==0 then return end
local filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,ct,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,ct,nil,function(g)
RD.ChangePosition(g,POS_FACEUP_DEFENSE) RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)
end) end)
end end
\ No newline at end of file
...@@ -43,7 +43,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,7 +43,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.Damage(1-tp,ct*100,REASON_EFFECT)~=0 if Duel.Damage(1-tp,ct*100,REASON_EFFECT)~=0
and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_ONFIELD,0,1,nil) then and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_ONFIELD,0,1,nil) then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(sg) RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(sg)
RD.ChangePosition(sg,POS_FACEUP_DEFENSE) RD.ChangePosition(sg,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)
end) end)
end end
end end
\ No newline at end of file
...@@ -39,7 +39,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,7 +39,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,1,nil) then if Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,1,nil) then
local filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.CanSelectAndDoAction(aux.Stringid(m,3),HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(sg) RD.CanSelectAndDoAction(aux.Stringid(m,3),HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(sg)
RD.ChangePosition(sg) RD.ChangePosition(sg,e,tp,REASON_EFFECT)
end) end)
end end
end) end)
......
...@@ -28,6 +28,6 @@ end ...@@ -28,6 +28,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 filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,2,nil,function(g) RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,2,nil,function(g)
RD.ChangePosition(g,POS_FACEDOWN_DEFENSE) RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)
end) end)
end end
\ No newline at end of file
...@@ -37,7 +37,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,7 +37,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
local mg=Duel.GetMatchingGroup(filter,tp,0,LOCATION_MZONE,nil) local mg=Duel.GetMatchingGroup(filter,tp,0,LOCATION_MZONE,nil)
if g:IsExists(Card.IsCode,1,nil,list[1]) and mg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,4)) then if g:IsExists(Card.IsCode,1,nil,list[1]) and mg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,4)) then
RD.ChangePosition(mg,POS_FACEUP_DEFENSE) RD.ChangePosition(mg,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)
end end
end) end)
end end
......
...@@ -29,6 +29,6 @@ end ...@@ -29,6 +29,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 filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.ChangePosition(g,POS_FACEUP_ATTACK) RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_ATTACK)
end) end)
end end
\ No newline at end of file
...@@ -30,5 +30,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -30,5 +30,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
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.SelectAndDoAction(HINTMSG_POSCHANGE,RD.IsCanChangePosition,tp,0,LOCATION_MZONE,1,3,nil,RD.ChangePosition) RD.SelectAndDoAction(HINTMSG_POSCHANGE,RD.IsCanChangePosition,tp,0,LOCATION_MZONE,1,3,nil,function(g)
RD.ChangePosition(g,e,tp,REASON_EFFECT)
end)
end end
\ No newline at end of file
...@@ -25,6 +25,6 @@ end ...@@ -25,6 +25,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 filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_SET,filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_SET,filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,function(g)
RD.ChangePosition(g,POS_FACEDOWN_DEFENSE) RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)
end) end)
end end
\ No newline at end of file
...@@ -27,6 +27,6 @@ end ...@@ -27,6 +27,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 filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.ChangePosition(g,POS_FACEUP_ATTACK) RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_ATTACK)
end) end)
end end
\ No newline at end of file
...@@ -42,6 +42,6 @@ end ...@@ -42,6 +42,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 filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.SelectGroupAndDoAction(HINTMSG_POSCHANGE,filter,cm.check,tp,LOCATION_MZONE,LOCATION_MZONE,2,2,nil,function(g) RD.SelectGroupAndDoAction(HINTMSG_POSCHANGE,filter,cm.check,tp,LOCATION_MZONE,LOCATION_MZONE,2,2,nil,function(g)
RD.ChangePosition(g,POS_FACEUP_DEFENSE) RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)
end) end)
end end
\ No newline at end of file
...@@ -24,6 +24,6 @@ end ...@@ -24,6 +24,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 filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.SelectAndDoAction(HINTMSG_DEFENSE,filter,tp,LOCATION_MZONE,0,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_DEFENSE,filter,tp,LOCATION_MZONE,0,1,1,nil,function(g)
RD.ChangePosition(g,POS_FACEUP_ATTACK) RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_ATTACK)
end) end)
end end
\ No newline at end of file
...@@ -30,6 +30,6 @@ end ...@@ -30,6 +30,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 filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.ChangePosition(g,POS_FACEDOWN_DEFENSE) RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)
end) end)
end end
\ No newline at end of file
...@@ -25,7 +25,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -25,7 +25,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
local g=Duel.GetMatchingGroup(filter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(filter,tp,LOCATION_MZONE,0,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
local ct=RD.ChangePosition(g,POS_FACEUP_DEFENSE) local ct=RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)
Duel.Recover(tp,ct*400,REASON_EFFECT) Duel.Recover(tp,ct*400,REASON_EFFECT)
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 tc=eg:GetFirst() local tc=eg:GetFirst()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
RD.ChangePosition(tc,POS_FACEDOWN_DEFENSE) RD.ChangePosition(tc,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)
end end
end end
\ No newline at end of file
...@@ -32,6 +32,6 @@ end ...@@ -32,6 +32,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 filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,2,nil,function(g) RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,2,nil,function(g)
RD.ChangePosition(g,POS_FACEDOWN_DEFENSE) RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)
end) end)
end end
\ No newline at end of file
...@@ -26,7 +26,7 @@ end ...@@ -26,7 +26,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if RD.ChangePosition(g,POS_FACEUP_DEFENCE)~=0 then if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_DEFENCE)~=0 then
RD.AttachAtkDef(e,g:GetFirst(),0,-600,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachAtkDef(e,g:GetFirst(),0,-600,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end end
end) end)
......
...@@ -23,6 +23,6 @@ end ...@@ -23,6 +23,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 filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.ChangePosition(g,POS_FACEUP_DEFENSE) RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)
end) end)
end end
\ No newline at end of file
...@@ -37,7 +37,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,7 +37,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
local sg=Duel.GetMatchingGroup(filter,tp,LOCATION_MZONE,0,nil) local sg=Duel.GetMatchingGroup(filter,tp,LOCATION_MZONE,0,nil)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
RD.ChangePosition(sg,POS_FACEUP_DEFENSE) RD.ChangePosition(sg,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)
end end
end end
end) 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)
end 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,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)~=0 then
RD.CanSelectAndSpecialSummon(HINTMSG_SPSUMMON,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,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
...@@ -29,6 +29,6 @@ end ...@@ -29,6 +29,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 filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.ChangePosition(g,POS_FACEUP_ATTACK) RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_ATTACK)
end) end)
end end
\ No newline at end of file
...@@ -34,7 +34,7 @@ end ...@@ -34,7 +34,7 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,LOCATION_MZONE,0,1,2,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,LOCATION_MZONE,0,1,2,nil,function(g)
if RD.ChangePosition(g,POS_FACEUP_DEFENSE)~=0 and Duel.GetFlagEffect(tp,m)==0 then if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)~=0 and Duel.GetFlagEffect(tp,m)==0 then
RD.CreateHintEffect(e,aux.Stringid(m,1),tp,0,1,RESET_PHASE+PHASE_END) RD.CreateHintEffect(e,aux.Stringid(m,1),tp,0,1,RESET_PHASE+PHASE_END)
RD.CreateCannotDirectAttackEffect(e,nil,tp,0,LOCATION_MZONE,RESET_PHASE+PHASE_END) RD.CreateCannotDirectAttackEffect(e,nil,tp,0,LOCATION_MZONE,RESET_PHASE+PHASE_END)
RD.CreateCannotSelectBattleTargetEffect(e,cm.atkcon,nil,cm.atklimit,tp,0,LOCATION_MZONE,RESET_PHASE+PHASE_END) RD.CreateCannotSelectBattleTargetEffect(e,cm.atkcon,nil,cm.atklimit,tp,0,LOCATION_MZONE,RESET_PHASE+PHASE_END)
......
...@@ -30,6 +30,6 @@ end ...@@ -30,6 +30,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 filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,2,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,2,nil,function(g)
RD.ChangePosition(g,POS_FACEUP_DEFENSE) RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)
end) end)
end end
\ No newline at end of file
...@@ -35,7 +35,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,7 +35,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if ct==0 then return end if ct==0 then return end
local filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,ct,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,ct,nil,function(g)
if RD.ChangePosition(g,POS_FACEUP_ATTACK)~=0 then if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_ATTACK)~=0 then
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
og:ForEach(function(tc) og: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)
......
...@@ -30,7 +30,7 @@ end ...@@ -30,7 +30,7 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,LOCATION_MZONE,0,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,LOCATION_MZONE,0,1,1,nil,function(g)
if RD.ChangePosition(g)~=0 then if RD.ChangePosition(g,e,tp,REASON_EFFECT)~=0 then
RD.AttachAtkDef(e,g:GetFirst(),1500,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachAtkDef(e,g:GetFirst(),1500,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end end
end) end)
......
...@@ -30,7 +30,7 @@ end ...@@ -30,7 +30,7 @@ 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() if tc:IsRelateToBattle() and tc:IsAttackPos()
and RD.ChangePosition(tc,POS_FACEUP_DEFENSE)~=0 and RD.ChangePosition(tc,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)~=0
and tc:IsRace(RACE_DRAGON+RACE_SPELLCASTER+RACE_FAIRY) then and tc:IsRace(RACE_DRAGON+RACE_SPELLCASTER+RACE_FAIRY) 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.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
......
...@@ -31,7 +31,7 @@ end ...@@ -31,7 +31,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if RD.ChangePosition(g,POS_FACEUP_ATTACK)~=0 then if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_ATTACK)~=0 then
Duel.Recover(tp,g:GetFirst():GetBaseAttack(),REASON_EFFECT) Duel.Recover(tp,g:GetFirst():GetBaseAttack(),REASON_EFFECT)
end end
end) end)
......
...@@ -34,7 +34,7 @@ end ...@@ -34,7 +34,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if RD.ChangePosition(g,POS_FACEDOWN_DEFENSE)~=0 then if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)~=0 then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(sg) RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(sg)
RD.SendToHandAndExists(sg,1-tp) RD.SendToHandAndExists(sg,1-tp)
end) end)
......
...@@ -28,7 +28,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -28,7 +28,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst() local tc=g:GetFirst()
RD.AttachAtkDef(e,tc,1000,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachAtkDef(e,tc,1000,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
if RD.IsCanChangePosition(tc,e,tp,REASON_EFFECT) and Duel.SelectEffectYesNo(tp,tc,aux.Stringid(m,2)) then if RD.IsCanChangePosition(tc,e,tp,REASON_EFFECT) and Duel.SelectEffectYesNo(tp,tc,aux.Stringid(m,2)) then
RD.ChangePosition(tc) RD.ChangePosition(tc,e,tp,REASON_EFFECT)
end end
end) end)
end end
\ No newline at end of file
...@@ -31,7 +31,7 @@ end ...@@ -31,7 +31,7 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if RD.ChangePosition(g)~=0 and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,1,nil) then if RD.ChangePosition(g,e,tp,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,1,nil) then
RD.CanDraw(aux.Stringid(m,1),tp,1) RD.CanDraw(aux.Stringid(m,1),tp,1)
end end
end) end)
......
...@@ -34,6 +34,6 @@ end ...@@ -34,6 +34,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(cm.filter,tp,0,LOCATION_MZONE,nil,e,tp) local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
RD.ChangePosition(g,POS_FACEUP_DEFENSE) RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)
end end
end end
\ No newline at end of file
...@@ -38,7 +38,7 @@ end ...@@ -38,7 +38,7 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if RD.ChangePosition(g,POS_FACEUP_DEFENSE)~=0 then if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)~=0 then
Duel.Damage(1-tp,500,REASON_EFFECT) Duel.Damage(1-tp,500,REASON_EFFECT)
end end
end) end)
......
...@@ -24,6 +24,6 @@ end ...@@ -24,6 +24,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 filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,function(g)
RD.ChangePosition(g,POS_FACEUP_DEFENSE) RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)
end) end)
end end
\ No newline at end of file
...@@ -31,7 +31,7 @@ end ...@@ -31,7 +31,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if RD.ChangePosition(g,POS_FACEUP_ATTACK)~=0 and g:GetFirst():IsAttribute(ATTRIBUTE_EARTH) then if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_ATTACK)~=0 and g:GetFirst():IsAttribute(ATTRIBUTE_EARTH) then
RD.CanDraw(aux.Stringid(m,1),tp,1) RD.CanDraw(aux.Stringid(m,1),tp,1)
end end
end) end)
......
...@@ -31,6 +31,6 @@ end ...@@ -31,6 +31,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 filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.ChangePosition(g,POS_FACEUP_DEFENSE) RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)
end) end)
end end
\ No newline at end of file
...@@ -27,7 +27,7 @@ end ...@@ -27,7 +27,7 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if RD.ChangePosition(g,POS_FACEUP_ATTACK)~=0 and g:GetFirst():IsType(TYPE_NORMAL) then if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_ATTACK)~=0 and g:GetFirst():IsType(TYPE_NORMAL) then
RD.CanDraw(aux.Stringid(m,1),tp,1) RD.CanDraw(aux.Stringid(m,1),tp,1)
end end
end) end)
......
...@@ -23,6 +23,6 @@ end ...@@ -23,6 +23,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 filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.ChangePosition(g,POS_FACEUP_ATTACK) RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_ATTACK)
end) end)
end end
\ No newline at end of file
...@@ -33,6 +33,6 @@ end ...@@ -33,6 +33,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=eg:GetFirst() local tc=eg:GetFirst()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
RD.ChangePosition(tc,POS_FACEDOWN_DEFENSE) RD.ChangePosition(tc,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)
end end
end end
\ No newline at end of file
...@@ -32,7 +32,7 @@ end ...@@ -32,7 +32,7 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,LOCATION_MZONE,0,1,2,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,LOCATION_MZONE,0,1,2,nil,function(g)
if RD.ChangePosition(g,POS_FACEUP_DEFENSE)~=0 if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)~=0
and Duel.GetMatchingGroupCount(Card.IsDefensePos,tp,LOCATION_MZONE,0,nil)==3 then and Duel.GetMatchingGroupCount(Card.IsDefensePos,tp,LOCATION_MZONE,0,nil)==3 then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_TODECK,aux.NecroValleyFilter(cm.tdfilter),tp,0,LOCATION_GRAVE,1,5,nil,function(sg) RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_TODECK,aux.NecroValleyFilter(cm.tdfilter),tp,0,LOCATION_GRAVE,1,5,nil,function(sg)
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -32,7 +32,7 @@ function cm.operation1(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,7 +32,7 @@ function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
pos=POS_FACEUP_ATTACK pos=POS_FACEUP_ATTACK
end end
pos=Duel.SelectPosition(tp,tc,pos) pos=Duel.SelectPosition(tp,tc,pos)
RD.ChangePosition(tc,pos) RD.ChangePosition(tc,e,tp,REASON_EFFECT,pos)
end) end)
end end
--Destroy --Destroy
......
...@@ -45,7 +45,7 @@ end ...@@ -45,7 +45,7 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,LOCATION_MZONE,0,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,LOCATION_MZONE,0,1,1,nil,function(g)
if RD.ChangePosition(g,POS_FACEUP_DEFENSE)~=0 then if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)~=0 then
local sg=Duel.GetMatchingGroup(cm.exfilter,tp,LOCATION_GRAVE,0,nil) local sg=Duel.GetMatchingGroup(cm.exfilter,tp,LOCATION_GRAVE,0,nil)
local race=RD.GroupBor(sg,Card.GetRace) local race=RD.GroupBor(sg,Card.GetRace)
if race~=0 then if race~=0 then
......
...@@ -27,10 +27,10 @@ end ...@@ -27,10 +27,10 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,2,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,2,nil,function(g)
if RD.ChangePosition(g)~=0 then if RD.ChangePosition(g,e,tp,REASON_EFFECT)~=0 then
local posfilter=RD.Filter(cm.posfilter,e,tp) local posfilter=RD.Filter(cm.posfilter,e,tp)
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_POSCHANGE,posfilter,tp,LOCATION_MZONE,0,1,1,nil,function(sg) RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_POSCHANGE,posfilter,tp,LOCATION_MZONE,0,1,1,nil,function(sg)
RD.ChangePosition(sg) RD.ChangePosition(sg,e,tp,REASON_EFFECT)
end) end)
end end
end) end)
......
...@@ -46,6 +46,6 @@ end ...@@ -46,6 +46,6 @@ end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp) function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,function(g)
RD.ChangePosition(g) RD.ChangePosition(g,e,tp,REASON_EFFECT)
end) end)
end end
\ No newline at end of file
...@@ -35,7 +35,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -35,7 +35,7 @@ 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)
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil,e,tp) local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil,e,tp)
if g:GetCount()>0 and RD.ChangePosition(g)~=0 then if g:GetCount()>0 and RD.ChangePosition(g,e,tp,REASON_EFFECT)~=0 then
RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,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
...@@ -40,7 +40,7 @@ end ...@@ -40,7 +40,7 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if RD.ChangePosition(g,POS_FACEDOWN_DEFENSE)~=0 and e:GetLabel()==1 then if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)~=0 and e:GetLabel()==1 then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_DESTROY,Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,1,nil,function(sg) RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_DESTROY,Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,1,nil,function(sg)
Duel.Destroy(sg,REASON_EFFECT) Duel.Destroy(sg,REASON_EFFECT)
end) end)
......
...@@ -29,7 +29,7 @@ end ...@@ -29,7 +29,7 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,function(g)
if RD.ChangePosition(g,POS_FACEUP_ATTACK)~=0 then if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_ATTACK)~=0 then
RD.CanDraw(aux.Stringid(m,1),tp,1,true) RD.CanDraw(aux.Stringid(m,1),tp,1,true)
end end
end) end)
......
...@@ -35,7 +35,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -35,7 +35,7 @@ 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)
local tc=eg:GetFirst() local tc=eg:GetFirst()
if tc:IsRelateToEffect(e) and RD.ChangePosition(tc,POS_FACEDOWN_DEFENSE)~=0 then if tc:IsRelateToEffect(e) and RD.ChangePosition(tc,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)~=0 then
RD.CanSelectAndDoAction(aux.Stringid(m,1),aux.Stringid(m,2),cm.upfilter,tp,LOCATION_MZONE,0,1,1,nil,function(g) RD.CanSelectAndDoAction(aux.Stringid(m,1),aux.Stringid(m,2),cm.upfilter,tp,LOCATION_MZONE,0,1,1,nil,function(g)
RD.AttachAtkDef(e,g:GetFirst(),500,500,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachAtkDef(e,g:GetFirst(),500,500,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end) end)
......
...@@ -25,7 +25,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -25,7 +25,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.SelectAndDoAction(aux.Stringid(m,1),filter,tp,LOCATION_MZONE,0,1,1,nil,function(g) RD.SelectAndDoAction(aux.Stringid(m,1),filter,tp,LOCATION_MZONE,0,1,1,nil,function(g)
local tc=g:GetFirst() local tc=g:GetFirst()
if RD.ChangePosition(tc,POS_FACEUP_ATTACK)~=0 and tc:IsType(TYPE_NORMAL) then if RD.ChangePosition(tc,e,tp,REASON_EFFECT,POS_FACEUP_ATTACK)~=0 and tc:IsType(TYPE_NORMAL) then
RD.AttachAtkDef(e,tc,1000,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachAtkDef(e,tc,1000,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end end
end) end)
......
...@@ -29,7 +29,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,7 +29,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.SendToDeckAndExists(g) and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,1,nil) then if RD.SendToDeckAndExists(g) and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,1,nil) then
local filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(sg) RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(sg)
RD.ChangePosition(sg,POS_FACEUP_DEFENSE) RD.ChangePosition(sg,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)
end) end)
end end
end) end)
......
...@@ -31,7 +31,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,7 +31,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if tc:IsType(TYPE_NORMAL) then if tc:IsType(TYPE_NORMAL) then
local filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.CanSelectAndDoAction(aux.Stringid(m,3),HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(sg) RD.CanSelectAndDoAction(aux.Stringid(m,3),HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(sg)
RD.ChangePosition(sg) RD.ChangePosition(sg,e,tp,REASON_EFFECT)
end) end)
end end
end) end)
......
...@@ -40,12 +40,12 @@ end ...@@ -40,12 +40,12 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,LOCATION_MZONE,0,1,3,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,LOCATION_MZONE,0,1,3,nil,function(g)
if RD.ChangePosition(g,POS_FACEUP_DEFENCE)~=0 if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_DEFENCE)~=0
and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,2,nil) then and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,2,nil) then
local posfilter=RD.Filter(cm.posfilter,e,tp) local posfilter=RD.Filter(cm.posfilter,e,tp)
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_POSCHANGE,posfilter,tp,0,LOCATION_MZONE,1,1,nil,function(sg) RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_POSCHANGE,posfilter,tp,0,LOCATION_MZONE,1,1,nil,function(sg)
Duel.BreakEffect() Duel.BreakEffect()
RD.ChangePosition(sg,POS_FACEUP_DEFENCE) RD.ChangePosition(sg,e,tp,REASON_EFFECT,POS_FACEUP_DEFENCE)
end) end)
end end
end) end)
......
...@@ -31,6 +31,6 @@ end ...@@ -31,6 +31,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 filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.ChangePosition(g,POS_FACEDOWN_DEFENSE) RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)
end) end)
end end
\ No newline at end of file
...@@ -32,7 +32,7 @@ end ...@@ -32,7 +32,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if RD.ChangePosition(g,POS_FACEUP_DEFENSE)~=0 then if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)~=0 then
local sg=Duel.GetMatchingGroup(cm.downfilter,tp,0,LOCATION_MZONE,nil) local sg=Duel.GetMatchingGroup(cm.downfilter,tp,0,LOCATION_MZONE,nil)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -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=eg:GetFirst() local tc=eg:GetFirst()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
RD.ChangePosition(tc,POS_FACEUP_DEFENSE) RD.ChangePosition(tc,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)
end end
end end
\ No newline at end of file
...@@ -46,7 +46,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,7 +46,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
and not tc:IsPosition(POS_FACEUP_DEFENSE) and not tc:IsPosition(POS_FACEUP_DEFENSE)
and RD.IsCanChangePosition(tc,e,tp,REASON_EFFECT) and RD.IsCanChangePosition(tc,e,tp,REASON_EFFECT)
and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
RD.ChangePosition(tc,POS_FACEUP_DEFENSE) RD.ChangePosition(tc,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)
end end
end end
end end
\ No newline at end of file
...@@ -20,7 +20,7 @@ function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -20,7 +20,7 @@ function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.operation1(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,e,tp,REASON_EFFECT)~=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)
Duel.BreakEffect() Duel.BreakEffect()
local atk=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)*-800 local atk=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)*-800
......
...@@ -23,7 +23,7 @@ end ...@@ -23,7 +23,7 @@ end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
local g=Duel.GetMatchingGroup(cm.costfilter,tp,LOCATION_MZONE,0,nil,e,tp) local g=Duel.GetMatchingGroup(cm.costfilter,tp,LOCATION_MZONE,0,nil,e,tp)
RD.ChangePosition(g,POS_FACEUP_DEFENSE) RD.ChangePosition(g,e,tp,REASON_COST,POS_FACEUP_DEFENSE)
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,0,LOCATION_HAND)>0 end if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
......
...@@ -34,7 +34,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,7 +34,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,RD.IsCanChangePosition,tp,0,LOCATION_MZONE,1,3,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,RD.IsCanChangePosition,tp,0,LOCATION_MZONE,1,3,nil,function(g)
local sg=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,0,nil) local sg=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,0,nil)
local atk=Duel.GetMatchingGroupCount(cm.atkfilter,tp,LOCATION_GRAVE,0,nil)*100 local atk=Duel.GetMatchingGroupCount(cm.atkfilter,tp,LOCATION_GRAVE,0,nil)*100
if RD.ChangePosition(g)~=0 and sg:GetCount()>0 and atk~=0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if RD.ChangePosition(g,e,tp,REASON_EFFECT)~=0 and sg:GetCount()>0 and atk~=0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect() Duel.BreakEffect()
sg:ForEach(function(tc) sg:ForEach(function(tc)
RD.AttachAtkDef(e,tc,atk,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachAtkDef(e,tc,atk,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
......
...@@ -36,7 +36,7 @@ end ...@@ -36,7 +36,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if RD.ChangePosition(g,POS_FACEUP_DEFENCE)~=0 then if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_DEFENCE)~=0 then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(g) RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
Duel.BreakEffect() Duel.BreakEffect()
RD.SendToHandAndExists(g,1-tp) RD.SendToHandAndExists(g,1-tp)
......
...@@ -32,7 +32,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,7 +32,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
and Duel.IsExistingMatchingCard(cm.exfilter,tp,0,LOCATION_SZONE,1,nil) then and Duel.IsExistingMatchingCard(cm.exfilter,tp,0,LOCATION_SZONE,1,nil) then
local filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.ChangePosition(g,POS_FACEDOWN_DEFENSE) RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)
end) end)
end end
end end
\ No newline at end of file
...@@ -31,6 +31,6 @@ end ...@@ -31,6 +31,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 filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,2,nil,function(g) RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,2,nil,function(g)
RD.ChangePosition(g,POS_FACEDOWN_DEFENSE) RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)
end) end)
end end
\ No newline at end of file
...@@ -38,7 +38,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,7 +38,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.SendtoGrave(g,REASON_EFFECT)~=0 then if Duel.SendtoGrave(g,REASON_EFFECT)~=0 then
local filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_POSCHANGE,filter,tp,LOCATION_MZONE,0,1,2,nil,function(sg) RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_POSCHANGE,filter,tp,LOCATION_MZONE,0,1,2,nil,function(sg)
RD.ChangePosition(sg,POS_FACEUP_DEFENSE) RD.ChangePosition(sg,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)
end) end)
end end
end) end)
......
...@@ -37,7 +37,7 @@ end ...@@ -37,7 +37,7 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,LOCATION_MZONE,0,1,3,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,LOCATION_MZONE,0,1,3,nil,function(g)
if RD.ChangePosition(g,POS_FACEUP_DEFENCE)~=0 then if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_DEFENCE)~=0 then
local def=Duel.GetMatchingGroupCount(cm.deffilter,tp,LOCATION_MZONE,0,nil)*500 local def=Duel.GetMatchingGroupCount(cm.deffilter,tp,LOCATION_MZONE,0,nil)*500
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
if def==0 or g:GetCount()==0 then return end if def==0 or g:GetCount()==0 then return end
......
...@@ -30,7 +30,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -30,7 +30,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.AttachAtkDef(e,c,1500,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachAtkDef(e,c,1500,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
RD.AttachAttackNotChainTrap(e,m,c,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachAttackNotChainTrap(e,m,c,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
else else
RD.ChangePosition(c,POS_FACEUP_DEFENSE) RD.ChangePosition(c,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)
end end
end end
end end
\ No newline at end of file
...@@ -33,6 +33,6 @@ end ...@@ -33,6 +33,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 filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.ChangePosition(g,POS_FACEUP_ATTACK) RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_ATTACK)
end) end)
end end
\ No newline at end of file
...@@ -29,6 +29,6 @@ end ...@@ -29,6 +29,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 filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.ChangePosition(g,POS_FACEDOWN_DEFENSE) RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)
end) end)
end end
\ No newline at end of file
...@@ -33,7 +33,7 @@ end ...@@ -33,7 +33,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if RD.ChangePosition(g,POS_FACEDOWN_DEFENSE)~=0 then if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)~=0 then
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 reset=RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END local reset=RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END
......
...@@ -30,7 +30,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -30,7 +30,7 @@ function cm.operation(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
local filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_POSCHANGE,filter,tp,LOCATION_MZONE,0,1,1,nil,function(g) RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_POSCHANGE,filter,tp,LOCATION_MZONE,0,1,1,nil,function(g)
RD.ChangePosition(g) RD.ChangePosition(g,e,tp,REASON_EFFECT)
end) end)
end end
end end
\ No newline at end of file
...@@ -44,7 +44,7 @@ end ...@@ -44,7 +44,7 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if RD.ChangePosition(g,POS_FACEDOWN_DEFENSE)~=0 if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)~=0
and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,1,nil) then and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,1,nil) then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_RTOHAND,cm.thfilter,tp,0,LOCATION_MZONE,1,1,nil,function(sg) RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_RTOHAND,cm.thfilter,tp,0,LOCATION_MZONE,1,1,nil,function(sg)
RD.SendToOpponentHand(sg) RD.SendToOpponentHand(sg)
......
...@@ -33,7 +33,7 @@ end ...@@ -33,7 +33,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if RD.ChangePosition(g,POS_FACEUP_DEFENSE)~=0 then if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)~=0 then
local atk=g:GetFirst():GetBaseAttack() local atk=g:GetFirst():GetBaseAttack()
if atk~=0 then if atk~=0 then
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -42,6 +42,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,6 +42,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
pos=POS_FACEUP_ATTACK pos=POS_FACEUP_ATTACK
end end
pos=Duel.SelectPosition(tp,tc,pos) pos=Duel.SelectPosition(tp,tc,pos)
RD.ChangePosition(tc,pos) RD.ChangePosition(tc,e,tp,REASON_EFFECT,pos)
end) end)
end end
\ No newline at end of file
...@@ -30,11 +30,11 @@ end ...@@ -30,11 +30,11 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
local g=Duel.GetMatchingGroup(filter,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(filter,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 and RD.ChangePosition(g,POS_FACEDOWN_DEFENSE)~=0 then if g:GetCount()>0 and RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)~=0 then
local exfilter=RD.Filter(cm.exfilter,e,tp) local exfilter=RD.Filter(cm.exfilter,e,tp)
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_POSCHANGE,exfilter,tp,0,LOCATION_MZONE,1,3,nil,function(sg) RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_POSCHANGE,exfilter,tp,0,LOCATION_MZONE,1,3,nil,function(sg)
Duel.BreakEffect() Duel.BreakEffect()
RD.ChangePosition(sg,POS_FACEUP_ATTACK) RD.ChangePosition(sg,e,tp,REASON_EFFECT,POS_FACEUP_ATTACK)
end) end)
end end
end end
\ No newline at end of file
...@@ -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)
end 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=eg:GetFirst() local tc=eg:GetFirst()
if tc:IsRelateToEffect(e) and RD.ChangePosition(tc,POS_FACEDOWN_DEFENSE)~=0 then if tc:IsRelateToEffect(e) and RD.ChangePosition(tc,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)~=0 then
RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,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
...@@ -24,5 +24,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -24,5 +24,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,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)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,RD.IsCanChangePosition,tp,0,LOCATION_MZONE,1,1,nil,RD.ChangePosition) RD.SelectAndDoAction(HINTMSG_POSCHANGE,RD.IsCanChangePosition,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.ChangePosition(g,e,tp,REASON_EFFECT)
end)
end end
\ No newline at end of file
...@@ -38,6 +38,6 @@ end ...@@ -38,6 +38,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 filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.ChangePosition(g,POS_FACEDOWN_DEFENSE) RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)
end) end)
end end
\ No newline at end of file
...@@ -34,7 +34,7 @@ end ...@@ -34,7 +34,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if RD.ChangePosition(g,POS_FACEDOWN_DEFENSE)~=0 then if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)~=0 then
RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,POS_FACEUP,true) RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,POS_FACEUP,true)
end end
end) end)
......
...@@ -43,7 +43,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,7 +43,7 @@ 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_ATTACK)~=0 then if RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP_ATTACK)~=0 then
local filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.CanSelectGroupAndDoAction(aux.Stringid(m,1),HINTMSG_POSCHANGE,filter,cm.poscheck,tp,LOCATION_MZONE,0,1,3,nil,function(g) RD.CanSelectGroupAndDoAction(aux.Stringid(m,1),HINTMSG_POSCHANGE,filter,cm.poscheck,tp,LOCATION_MZONE,0,1,3,nil,function(g)
if RD.ChangePosition(g,POS_FACEUP_DEFENSE)~=0 then if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)~=0 then
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
og:ForEach(function(tc) og:ForEach(function(tc)
if tc:IsPosition(POS_FACEUP_DEFENSE) then if tc:IsPosition(POS_FACEUP_DEFENSE) then
......
...@@ -26,7 +26,7 @@ end ...@@ -26,7 +26,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if RD.ChangePosition(g,POS_FACEUP_DEFENCE)~=0 then if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_DEFENCE)~=0 then
RD.AttachAtkDef(e,g:GetFirst(),0,-2000,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachAtkDef(e,g:GetFirst(),0,-2000,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end end
end) end)
......
...@@ -36,6 +36,6 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,6 +36,6 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
g:AddCard(tc) g:AddCard(tc)
end end
RD.ChangePosition(g,POS_FACEUP_DEFENSE) RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)
end) end)
end end
\ No newline at end of file
...@@ -38,7 +38,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -38,7 +38,7 @@ 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)
local tc=eg:GetFirst() local tc=eg:GetFirst()
if tc:IsRelateToEffect(e) and RD.ChangePosition(tc,POS_FACEDOWN_DEFENSE)~=0 if tc:IsRelateToEffect(e) and RD.ChangePosition(tc,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)~=0
and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,1,nil) then and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,1,nil) then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_TODECK,cm.tdfilter,tp,0,LOCATION_ONFIELD,1,1,nil,function(g) RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_TODECK,cm.tdfilter,tp,0,LOCATION_ONFIELD,1,1,nil,function(g)
RD.SendToOpponentDeckTop(g,tp) RD.SendToOpponentDeckTop(g,tp)
......
...@@ -32,7 +32,7 @@ end ...@@ -32,7 +32,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,RD.IsCanChangePosition,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,RD.IsCanChangePosition,tp,0,LOCATION_MZONE,1,1,nil,function(g)
local c=e:GetHandler() local c=e:GetHandler()
if RD.ChangePosition(g)~=0 and c:IsFaceup() and c:IsRelateToEffect(e) and RD.IsMaximumMode(c) then if RD.ChangePosition(g,e,tp,REASON_EFFECT)~=0 and c:IsFaceup() and c:IsRelateToEffect(e) and RD.IsMaximumMode(c) then
RD.AttachPierce(e,c,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachPierce(e,c,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end end
end) end)
......
...@@ -39,6 +39,6 @@ end ...@@ -39,6 +39,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(cm.filter,tp,0,LOCATION_MZONE,nil,e,tp) local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
RD.ChangePosition(g) RD.ChangePosition(g,e,tp,REASON_EFFECT)
end end
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.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst() local tc=eg:GetFirst()
if tc:IsRelateToEffect(e) and RD.ChangePosition(tc,POS_FACEDOWN_DEFENSE)~=0 then if tc:IsRelateToEffect(e) and RD.ChangePosition(tc,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)~=0 then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(g) RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
Duel.BreakEffect() Duel.BreakEffect()
RD.SendToHandAndExists(g,1-tp) RD.SendToHandAndExists(g,1-tp)
......
...@@ -34,6 +34,6 @@ end ...@@ -34,6 +34,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 filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectGroupAndDoAction(HINTMSG_SET,filter,cm.check,tp,0,LOCATION_MZONE,1,2,nil,function(g) RD.SelectGroupAndDoAction(HINTMSG_SET,filter,cm.check,tp,0,LOCATION_MZONE,1,2,nil,function(g)
RD.ChangePosition(g,POS_FACEDOWN_DEFENSE) RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)
end) end)
end end
\ No newline at end of file
...@@ -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)
local tc=Duel.GetAttackTarget() local tc=Duel.GetAttackTarget()
if Duel.NegateAttack() and tc and RD.IsCanChangePosition(tc,e,tp,REASON_EFFECT) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if Duel.NegateAttack() and tc and RD.IsCanChangePosition(tc,e,tp,REASON_EFFECT) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect() Duel.BreakEffect()
if RD.ChangePosition(tc)~=0 then if RD.ChangePosition(tc,e,tp,REASON_EFFECT)~=0 then
local dam=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)*200 local dam=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)*200
Duel.Damage(1-tp,dam,REASON_EFFECT) Duel.Damage(1-tp,dam,REASON_EFFECT)
end end
......
...@@ -34,6 +34,6 @@ end ...@@ -34,6 +34,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 filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,2,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,2,nil,function(g)
RD.ChangePosition(g,POS_FACEUP_DEFENSE) RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)
end) end)
end end
\ No newline at end of file
...@@ -38,7 +38,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,7 +38,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
and RD.IsOperatedGroupExists(cm.exfilter,1,nil) then and RD.IsOperatedGroupExists(cm.exfilter,1,nil) then
local filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,3,nil,function(sg) RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,3,nil,function(sg)
RD.ChangePosition(sg) RD.ChangePosition(sg,e,tp,REASON_EFFECT)
end) end)
end end
end end
\ No newline at end of file
...@@ -42,7 +42,7 @@ end ...@@ -42,7 +42,7 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if RD.ChangePosition(g,POS_FACEDOWN_DEFENSE)~=0 then if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)~=0 then
RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,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)
......
...@@ -30,7 +30,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -30,7 +30,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_FZONE,0)>0 then if Duel.GetFieldGroupCount(tp,LOCATION_FZONE,0)>0 then
local filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.CanSelectAndDoAction(aux.Stringid(m,3),HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(sg) RD.CanSelectAndDoAction(aux.Stringid(m,3),HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(sg)
RD.ChangePosition(sg) RD.ChangePosition(sg,e,tp,REASON_EFFECT)
end) end)
end end
end end
......
...@@ -46,7 +46,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,7 +46,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and e:GetLabel()==20247016 then if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and e:GetLabel()==20247016 then
local filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(sg) RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(sg)
RD.ChangePosition(sg) RD.ChangePosition(sg,e,tp,REASON_EFFECT)
end) end)
end end
end end
\ No newline at end of file
...@@ -28,7 +28,7 @@ end ...@@ -28,7 +28,7 @@ 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() if tc:IsRelateToBattle() and tc:IsAttackPos()
and RD.ChangePosition(tc,POS_FACEUP_DEFENSE)~=0 and RD.ChangePosition(tc,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)~=0
and Duel.GetLP(tp)<=Duel.GetLP(1-tp) then and Duel.GetLP(tp)<=Duel.GetLP(1-tp) then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_DESTROY,Card.IsAttackPos,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_DESTROY,Card.IsAttackPos,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if Duel.Destroy(g,REASON_EFFECT)~=0 then if Duel.Destroy(g,REASON_EFFECT)~=0 then
......
...@@ -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)
end 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,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)~=0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Damage(1-tp,1000,REASON_EFFECT) Duel.Damage(1-tp,1000,REASON_EFFECT)
end end
......
...@@ -34,7 +34,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,7 +34,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,function(g)
local c=e:GetHandler() local c=e:GetHandler()
if RD.ChangePosition(g,POS_FACEUP_ATTACK)~=0 and c:IsFaceup() and c:IsRelateToEffect(e) then if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_ATTACK)~=0 and c:IsFaceup() and c:IsRelateToEffect(e) then
Duel.BreakEffect() Duel.BreakEffect()
RD.AttachAtkDef(e,c,-1300,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachAtkDef(e,c,-1300,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end end
......
...@@ -43,7 +43,7 @@ end ...@@ -43,7 +43,7 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if RD.ChangePosition(g,POS_FACEDOWN_DEFENSE)~=0 if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)~=0
and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,1,nil) then and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,1,nil) then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_DESTROY,Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,1,nil,function(sg) RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_DESTROY,Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,1,nil,function(sg)
Duel.Destroy(sg,REASON_EFFECT) Duel.Destroy(sg,REASON_EFFECT)
......
...@@ -40,7 +40,7 @@ end ...@@ -40,7 +40,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if RD.ChangePosition(g,POS_FACEUP_ATTACK)~=0 if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_ATTACK)~=0
and Duel.IsExistingMatchingCard(cm.exfilter1,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(cm.exfilter1,tp,LOCATION_MZONE,0,1,nil)
and not Duel.IsExistingMatchingCard(cm.exfilter2,tp,LOCATION_MZONE,0,1,nil) then and not Duel.IsExistingMatchingCard(cm.exfilter2,tp,LOCATION_MZONE,0,1,nil) then
RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP_DEFENSE) RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP_DEFENSE)
......
...@@ -40,7 +40,7 @@ end ...@@ -40,7 +40,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if RD.ChangePosition(g,POS_FACEDOWN_DEFENSE)~=0 if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)~=0
and Duel.IsExistingMatchingCard(cm.exfilter1,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(cm.exfilter1,tp,LOCATION_MZONE,0,1,nil)
and not Duel.IsExistingMatchingCard(cm.exfilter2,tp,LOCATION_MZONE,0,1,nil) then and not Duel.IsExistingMatchingCard(cm.exfilter2,tp,LOCATION_MZONE,0,1,nil) then
RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP_DEFENSE) RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP_DEFENSE)
......
...@@ -29,7 +29,7 @@ end ...@@ -29,7 +29,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if RD.ChangePosition(g,POS_FACEDOWN_DEFENSE)~=0 then if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)~=0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.ConfirmDecktop(1-tp,3) Duel.ConfirmDecktop(1-tp,3)
Duel.SortDecktop(1-tp,1-tp,3) Duel.SortDecktop(1-tp,1-tp,3)
......
...@@ -33,6 +33,6 @@ end ...@@ -33,6 +33,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 filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.ChangePosition(g,POS_FACEDOWN_DEFENSE) RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)
end) end)
end end
\ No newline at end of file
...@@ -38,7 +38,7 @@ end ...@@ -38,7 +38,7 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,LOCATION_MZONE,0,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,LOCATION_MZONE,0,1,1,nil,function(g)
if RD.ChangePosition(g,POS_FACEUP_DEFENSE)~=0 then if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)~=0 then
RD.CanDraw(aux.Stringid(m,2),tp,2,true) RD.CanDraw(aux.Stringid(m,2),tp,2,true)
end end
end) end)
......
...@@ -31,7 +31,7 @@ end ...@@ -31,7 +31,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.SelectAndDoAction(HINTMSG_SET,filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_SET,filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,function(g)
if RD.ChangePosition(g,POS_FACEDOWN_DEFENSE)~=0 then if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)~=0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.ConfirmDecktop(tp,3) Duel.ConfirmDecktop(tp,3)
Duel.ConfirmDecktop(1-tp,3) Duel.ConfirmDecktop(1-tp,3)
......
...@@ -39,7 +39,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,7 +39,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
pos=POS_FACEUP_ATTACK pos=POS_FACEUP_ATTACK
end end
pos=Duel.SelectPosition(tp,tc,pos) pos=Duel.SelectPosition(tp,tc,pos)
if RD.ChangePosition(tc,pos)~=0 then if RD.ChangePosition(tc,e,tp,REASON_EFFECT,pos)~=0 then
RD.CanFusionSummon(aux.Stringid(m,1),nil,cm.spfilter,nil,0,0,nil,RD.FusionToGrave,e,tp,true) RD.CanFusionSummon(aux.Stringid(m,1),nil,cm.spfilter,nil,0,0,nil,RD.FusionToGrave,e,tp,true)
end end
end) end)
......
...@@ -51,6 +51,6 @@ end ...@@ -51,6 +51,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 filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.ChangePosition(g,POS_FACEDOWN_DEFENSE) RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)
end) end)
end end
\ No newline at end of file
...@@ -38,7 +38,7 @@ end ...@@ -38,7 +38,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,function(g)
if RD.ChangePosition(g)~=0 then if RD.ChangePosition(g,e,tp,REASON_EFFECT)~=0 then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(sg) RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(sg)
Duel.BreakEffect() Duel.BreakEffect()
RD.SendToHandAndExists(sg,1-tp) RD.SendToHandAndExists(sg,1-tp)
......
...@@ -38,7 +38,7 @@ end ...@@ -38,7 +38,7 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.ChangePosition(g) RD.ChangePosition(g,e,tp,REASON_EFFECT)
local e1=RD.AttachCannotTrigger(e,g:GetFirst(),aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) local e1=RD.AttachCannotTrigger(e,g:GetFirst(),aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetCondition(function(e) e1:SetCondition(function(e)
return e:GetHandlerPlayer()~=tp return e:GetHandlerPlayer()~=tp
......
...@@ -36,7 +36,7 @@ end ...@@ -36,7 +36,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,RD.IsCanChangePosition,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,RD.IsCanChangePosition,tp,0,LOCATION_MZONE,1,1,nil,function(g)
local c=e:GetHandler() local c=e:GetHandler()
if RD.ChangePosition(g)~=0 and c:IsFaceup() and c:IsRelateToEffect(e) then if RD.ChangePosition(g,e,tp,REASON_EFFECT)~=0 and c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachPierce(e,c,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachPierce(e,c,aux.Stringid(m,1),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
RD.AttachEffectIndes(e,c,cm.indval,aux.Stringid(m,2),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachEffectIndes(e,c,cm.indval,aux.Stringid(m,2),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
......
...@@ -28,7 +28,9 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -28,7 +28,9 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SendToOpponentDeckBottom(g,tp) RD.SendToOpponentDeckBottom(g,tp)
end) end)
elseif res==2 or res==3 or res==12 then elseif res==2 or res==3 or res==12 then
RD.SelectAndDoAction(HINTMSG_POSCHANGE,RD.IsCanChangePosition,tp,LOCATION_MZONE,0,1,1,nil,RD.ChangePosition) RD.SelectAndDoAction(HINTMSG_POSCHANGE,RD.IsCanChangePosition,tp,LOCATION_MZONE,0,1,1,nil,function(g)
RD.ChangePosition(g,e,tp,REASON_EFFECT)
end)
else else
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
......
...@@ -30,6 +30,8 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -30,6 +30,8 @@ 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.Draw()~=0 and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_GRAVE,0,1,nil) then if RD.Draw()~=0 and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_GRAVE,0,1,nil) then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_POSITION,RD.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,RD.ChangePosition) RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_POSITION,RD.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,function(g)
RD.ChangePosition(g,e,tp,REASON_EFFECT)
end)
end end
end end
\ No newline at end of file
...@@ -40,7 +40,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,7 +40,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_SET,filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,2,nil,function(g) RD.SelectAndDoAction(HINTMSG_SET,filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,2,nil,function(g)
local ex=g:IsExists(cm.exfilter,1,nil,tp) local ex=g:IsExists(cm.exfilter,1,nil,tp)
if RD.ChangePosition(g,POS_FACEDOWN_DEFENSE)~=0 and ex then if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)~=0 and ex then
Duel.Recover(tp,1500,REASON_EFFECT) Duel.Recover(tp,1500,REASON_EFFECT)
end end
end) end)
......
...@@ -35,6 +35,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,6 +35,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.CreateCannotActivateTrapBattle(e,aux.Stringid(m,1),tp,0,1) RD.CreateCannotActivateTrapBattle(e,aux.Stringid(m,1),tp,0,1)
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.ChangePosition(c,POS_FACEDOWN_DEFENSE) RD.ChangePosition(c,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)
end end
end end
\ No newline at end of file
...@@ -42,7 +42,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,7 +42,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
pos=POS_FACEUP_DEFENSE pos=POS_FACEUP_DEFENSE
end end
pos=Duel.SelectPosition(tp,tc,pos) pos=Duel.SelectPosition(tp,tc,pos)
RD.ChangePosition(tc,pos) RD.ChangePosition(tc,e,tp,REASON_EFFECT,pos)
end) end)
end) end)
end end
\ No newline at end of file
...@@ -39,7 +39,7 @@ end ...@@ -39,7 +39,7 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if RD.ChangePosition(g,POS_FACEDOWN_DEFENSE)~=0 then if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)~=0 then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_TODECK,aux.NecroValleyFilter(Card.IsAbleToDeck),tp,0,LOCATION_GRAVE,1,1,nil,function(g) RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_TODECK,aux.NecroValleyFilter(Card.IsAbleToDeck),tp,0,LOCATION_GRAVE,1,1,nil,function(g)
Duel.BreakEffect() Duel.BreakEffect()
RD.SendToDeckTopOrBottom(g,tp,aux.Stringid(m,2),aux.Stringid(m,3)) RD.SendToDeckTopOrBottom(g,tp,aux.Stringid(m,2),aux.Stringid(m,3))
......
...@@ -32,7 +32,7 @@ end ...@@ -32,7 +32,7 @@ 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() if tc:IsRelateToBattle() and tc:IsAttackPos()
and RD.ChangePosition(tc,POS_FACEUP_DEFENSE)~=0 and RD.ChangePosition(tc,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)~=0
and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_GRAVE,0,1,nil) then and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_GRAVE,0,1,nil) then
local ct=6-Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) local ct=6-Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
if ct>0 then if ct>0 then
......
...@@ -27,6 +27,6 @@ end ...@@ -27,6 +27,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(cm.filter,tp,0,LOCATION_MZONE,nil,e,tp) local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
RD.ChangePosition(g,POS_FACEDOWN_DEFENSE) RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)
end end
end end
\ No newline at end of file
...@@ -35,7 +35,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,7 +35,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
pos=POS_FACEUP_ATTACK pos=POS_FACEUP_ATTACK
end end
pos=Duel.SelectPosition(tp,tc,pos) pos=Duel.SelectPosition(tp,tc,pos)
RD.ChangePosition(tc,pos) RD.ChangePosition(tc,e,tp,REASON_EFFECT,pos)
end) end)
end end
end end
......
...@@ -33,7 +33,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -33,7 +33,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)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,RD.IsCanChangePosition,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,RD.IsCanChangePosition,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if RD.ChangePosition(g)~=0 and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_GRAVE,0,5,nil) then if RD.ChangePosition(g,e,tp,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_GRAVE,0,5,nil) then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(sg) RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(sg)
RD.SendToHandAndExists(sg,1-tp) RD.SendToHandAndExists(sg,1-tp)
end) end)
......
...@@ -42,7 +42,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,7 +42,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
pos=POS_FACEUP_ATTACK pos=POS_FACEUP_ATTACK
end end
pos=Duel.SelectPosition(tp,tc,pos) pos=Duel.SelectPosition(tp,tc,pos)
if RD.ChangePosition(tc,pos)~=0 then if RD.ChangePosition(tc,e,tp,REASON_EFFECT,pos)~=0 then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(sg) RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(sg)
Duel.BreakEffect() Duel.BreakEffect()
RD.SendToHandAndExists(sg,1-tp) RD.SendToHandAndExists(sg,1-tp)
......
...@@ -36,7 +36,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,7 +36,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
and RD.IsCanChangePosition(c,e,tp,REASON_EFFECT) and c:IsCanTurnSet() and RD.IsCanChangePosition(c,e,tp,REASON_EFFECT) and c:IsCanTurnSet()
and Duel.SelectEffectYesNo(tp,c,aux.Stringid(m,1)) then and Duel.SelectEffectYesNo(tp,c,aux.Stringid(m,1)) then
Duel.BreakEffect() Duel.BreakEffect()
RD.ChangePosition(c,POS_FACEDOWN_DEFENSE) RD.ChangePosition(c,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)
end end
end end
end end
\ No newline at end of file
...@@ -34,7 +34,7 @@ end ...@@ -34,7 +34,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.ChangePosition(g,POS_FACEDOWN_DEFENSE) RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)
end) end)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
......
...@@ -30,7 +30,7 @@ end ...@@ -30,7 +30,7 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.filter,e,tp) local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,3,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,3,nil,function(g)
RD.ChangePosition(g,POS_FACEUP_DEFENSE) RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)
g:ForEach(function(tc) g:ForEach(function(tc)
local e1=RD.AttachCannotTribute(e,tc,cm.sumlimit,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) local e1=RD.AttachCannotTribute(e,tc,cm.sumlimit,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetLabel(tp) e1:SetLabel(tp)
......
...@@ -31,7 +31,7 @@ end ...@@ -31,7 +31,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,RD.IsCanChangePosition,tp,0,LOCATION_MZONE,1,2,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,RD.IsCanChangePosition,tp,0,LOCATION_MZONE,1,2,nil,function(g)
local c=e:GetHandler() local c=e:GetHandler()
if RD.ChangePosition(g)~=0 and c:IsPosition(POS_FACEUP_ATTACK) and c:IsRelateToEffect(e) then if RD.ChangePosition(g,e,tp,REASON_EFFECT)~=0 and c:IsPosition(POS_FACEUP_ATTACK) and c:IsRelateToEffect(e) then
RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP_DEFENSE) RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP_DEFENSE)
end end
end) end)
......
...@@ -33,7 +33,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -33,7 +33,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)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,RD.IsCanChangePosition,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,RD.IsCanChangePosition,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if RD.ChangePosition(g)~=0 then if RD.ChangePosition(g,e,tp,REASON_EFFECT)~=0 then
RD.CanSelectAndSet(aux.Stringid(m,1),aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,true) RD.CanSelectAndSet(aux.Stringid(m,1),aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,true)
end end
end) end)
......
...@@ -47,7 +47,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,7 +47,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
pos=POS_FACEUP_ATTACK pos=POS_FACEUP_ATTACK
end end
pos=Duel.SelectPosition(tp,tc,pos) pos=Duel.SelectPosition(tp,tc,pos)
if RD.ChangePosition(tc,pos)~=0 and cm.excon(e,tp,eg,ep,ev,re,r,rp) then if RD.ChangePosition(tc,e,tp,REASON_EFFECT,pos)~=0 and cm.excon(e,tp,eg,ep,ev,re,r,rp) then
Duel.Draw(tp,2,REASON_EFFECT) Duel.Draw(tp,2,REASON_EFFECT)
Duel.Draw(1-tp,2,REASON_EFFECT) Duel.Draw(1-tp,2,REASON_EFFECT)
end end
......
...@@ -33,7 +33,7 @@ end ...@@ -33,7 +33,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.posfilter,e,tp) local filter=RD.Filter(cm.posfilter,e,tp)
RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if RD.ChangePosition(g,POS_FACEDOWN_DEFENSE)~=0 then if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)~=0 then
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 reset=RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END local reset=RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END
......
...@@ -33,7 +33,7 @@ end ...@@ -33,7 +33,7 @@ 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=eg:GetFirst() local tc=eg:GetFirst()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
RD.ChangePosition(tc,POS_FACEDOWN_DEFENSE) RD.ChangePosition(tc,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)
end end
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if g:GetCount()>2 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if g:GetCount()>2 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
......
...@@ -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)
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.SelectAndDoAction(HINTMSG_POSCHANGE,RD.IsCanChangePosition,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,RD.IsCanChangePosition,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if RD.ChangePosition(g)~=0 then if RD.ChangePosition(g,e,tp,REASON_EFFECT)~=0 then
RD.CanSelectAndDoAction(aux.Stringid(m,1),aux.Stringid(m,2),cm.exfilter,tp,0,LOCATION_MZONE,1,1,nil,function(sg) RD.CanSelectAndDoAction(aux.Stringid(m,1),aux.Stringid(m,2),cm.exfilter,tp,0,LOCATION_MZONE,1,1,nil,function(sg)
Duel.BreakEffect() Duel.BreakEffect()
RD.ChangeRace(e,sg:GetFirst(),RACE_INSECT,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) RD.ChangeRace(e,sg:GetFirst(),RACE_INSECT,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
......
...@@ -35,7 +35,7 @@ end ...@@ -35,7 +35,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,RD.IsCanChangePosition,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_POSCHANGE,RD.IsCanChangePosition,tp,0,LOCATION_MZONE,1,1,nil,function(g)
local c=e:GetHandler() local c=e:GetHandler()
if RD.ChangePosition(g)~=0 and c:IsFaceup() and c:IsRelateToEffect(e) then if RD.ChangePosition(g,e,tp,REASON_EFFECT)~=0 and c:IsFaceup() and c:IsRelateToEffect(e) then
local filter=RD.Filter(cm.filter,c:GetLevel()) local filter=RD.Filter(cm.filter,c:GetLevel())
RD.CanSelectAndDoAction(aux.Stringid(m,2),HINTMSG_DESTROY,filter,tp,0,LOCATION_MZONE,1,1,nil,function(sg) RD.CanSelectAndDoAction(aux.Stringid(m,2),HINTMSG_DESTROY,filter,tp,0,LOCATION_MZONE,1,1,nil,function(sg)
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -32,6 +32,8 @@ end ...@@ -32,6 +32,8 @@ 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(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP_DEFENSE)~=0 then if RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP_DEFENSE)~=0 then
local filter=RD.Filter(cm.exfilter,e,tp) local filter=RD.Filter(cm.exfilter,e,tp)
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_POSITION,filter,tp,LOCATION_MZONE,0,1,1,nil,RD.ChangePosition) RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_POSITION,filter,tp,LOCATION_MZONE,0,1,1,nil,function(g)
RD.ChangePosition(g,e,tp,REASON_EFFECT)
end)
end end
end end
\ No newline at end of file
...@@ -50,6 +50,6 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,6 +50,6 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local check=RD.Check(cm.check,tp) local check=RD.Check(cm.check,tp)
RD.SelectGroupAndDoAction(aux.Stringid(m,1),filter,check,tp,LOCATION_MZONE,LOCATION_MZONE,2,3,nil,function(g) RD.SelectGroupAndDoAction(aux.Stringid(m,1),filter,check,tp,LOCATION_MZONE,LOCATION_MZONE,2,3,nil,function(g)
local sg=g:Filter(Card.IsControler,nil,1-tp) local sg=g:Filter(Card.IsControler,nil,1-tp)
RD.ChangePosition(sg,POS_FACEDOWN_DEFENSE) RD.ChangePosition(sg,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)
end) end)
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