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

2021/11/18 修复bug

parent 95ef6b46
Pipeline #6904 passed with stages
in 4 minutes and 5 seconds
...@@ -13,17 +13,20 @@ function cm.initial_effect(c) ...@@ -13,17 +13,20 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Position --Position
function cm.posfilter(c) function cm.filter(c)
return c:IsCanChangePosition() and RushDuel.IsHasDefense(c) return c:IsCanChangePosition() and RushDuel.IsHasDefense(c)
end end
function cm.posfilter(c)
return c:IsFaceup() and c:IsCanChangePosition() and RushDuel.IsHasDefense(c)
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.IsExistingMatchingCard(cm.posfilter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.posfilter,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil)
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)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,cm.posfilter,tp,0,LOCATION_MZONE,1,2,nil) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,0,LOCATION_MZONE,1,2,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
if Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)~=0 if Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)~=0
......
...@@ -13,17 +13,20 @@ function cm.initial_effect(c) ...@@ -13,17 +13,20 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Position --Position
function cm.posfilter(c) function cm.filter(c)
return c:IsCanChangePosition() and RushDuel.IsHasDefense(c) return c:IsCanChangePosition() and RushDuel.IsHasDefense(c)
end end
function cm.posfilter(c)
return c:IsFaceup() and c:IsCanChangePosition() and RushDuel.IsHasDefense(c)
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.IsExistingMatchingCard(cm.posfilter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.posfilter,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil)
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)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,cm.posfilter,tp,0,LOCATION_MZONE,1,2,nil) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,0,LOCATION_MZONE,1,2,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
if Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)~=0 if Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)~=0
......
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