Commit 9b588a8e authored by Nemo Ma's avatar Nemo Ma

fix

parent e6f1e8a3
......@@ -31,10 +31,10 @@ function cm.thfilter(c)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and #g>0 end
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,0,1,nil) and #g>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -138,7 +138,9 @@ function cm.lcheck(g)
return g:IsExists(Card.IsRace,1,nil,RACE_BEASTWARRIOR)
end
function cm.tgfilter(c,e,tp)
local zone=1<<aux.GetColumn(c,tp)
local line=aux.GetColumn(c,tp)
if line==nil then return end
local zone=1<<line
return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,zone)
end
function cm.spfilter(c,e,tp,zone)
......@@ -163,7 +165,7 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
end
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_ONFIELD)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetCondition(cm.econ)
......
......@@ -84,18 +84,20 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if g1:GetCount()>0 and g1:IsExists(cm.rfilter1,1,nil,code) and ((g2:GetCount()==0 and g3:GetCount()==0) or Duel.SelectYesNo(tp,aux.Stringid(m,2))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg1=g1:FilterSelect(tp,cm.rfilter1,1,1,nil,code)
if code==0 then code=sg1:GetFirst():GetCode() end
Duel.HintSelection(sg1)
sg:Merge(sg1)
end
if g2:GetCount()>0 and g2:IsExists(cm.rfilter1,1,nil,code) and ((sg:GetCount()==0 and g3:GetCount()==0) or Duel.SelectYesNo(tp,aux.Stringid(m,3))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg2=g2:FilterSelect(tp,cm.rfilter1,1,1,nil,code)
if code==0 then code=sg1:GetFirst():GetCode() end
Duel.HintSelection(sg2)
sg:Merge(sg2)
end
if g3:GetCount()>0 and g3:IsExists(cm.rfilter1,1,nil,code) and (sg:GetCount()==0 or Duel.SelectYesNo(tp,aux.Stringid(m,4))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg3=g2:FilterSelect(tp,cm.rfilter1,1,1,nil,code)
local sg3=g3:FilterSelect(tp,cm.rfilter1,1,1,nil,code)
Duel.HintSelection(sg3)
sg:Merge(sg3)
end
......
......@@ -30,7 +30,7 @@ function c40009546.cfilter(c)
return c:IsFacedown() or not c:IsSetCard(0x137)
end
function c40009546.condition(e,c)
return not Duel.IsExistingMatchingCard(c40009546.cfilter,tp,LOCATION_MZONE,0,1,nil)
return not Duel.IsExistingMatchingCard(c40009546.cfilter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c40009546.sfilter(c)
return c:IsFaceup() and c:IsCode(40009423)
......
......@@ -133,17 +133,20 @@ end
function cm.posac(g,e,tp)
local ac,og=0,Group.CreateGroup()
for tc in aux.Next(g) do
if tc:IsFaceup() and tc:IsCanTurnSet() then
if tc:IsFaceup() and tc:IsCanTurnSet() and not tc:IsLocation(LOCATION_PZONE) then
if tc:IsLocation(LOCATION_MZONE) then
local pos1=Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
local pos1=Duel.GetOperatedGroup():GetCount()
ac=ac+pos1
else
local pos2=Duel.ChangePosition(tc,POS_FACEDOWN)
Duel.ChangePosition(tc,POS_FACEDOWN)
local pos2=Duel.GetOperatedGroup():GetCount()
Duel.RaiseEvent(tc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
ac=ac+pos2
end
else
local tg=Duel.SendtoGrave(tc,REASON_EFFECT)
Duel.SendtoGrave(tc,REASON_EFFECT)
local tg=Duel.GetOperatedGroup():GetCount()
ac=ac+tg
end
if ac>0 then og:AddCard(tc) end
......
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