Commit db656edf authored by POLYMER's avatar POLYMER

fix

parent fd8caf9c
...@@ -211,23 +211,24 @@ end ...@@ -211,23 +211,24 @@ end
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp) function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipTarget() return e:GetHandler():GetEquipTarget()
end end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,1-tp,LOCATION_ONFIELD)
end
function cm.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsCanRemoveCounter(tp,0x1f35,1,REASON_COST) end if chk==0 then return c:IsCanRemoveCounter(tp,0x1f35,1,REASON_COST) end
c:RemoveCounter(tp,0x1f35,1,REASON_COST) c:RemoveCounter(tp,0x1f35,1,REASON_COST)
Duel.RaiseEvent(e:GetHandler(),EVENT_REMOVE_COUNTER+0x1f35,e,REASON_COST,tp,tp,1) Duel.RaiseEvent(e:GetHandler(),EVENT_REMOVE_COUNTER+0x1f35,e,REASON_COST,tp,tp,1)
end end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsAbleToGrave() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp) function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tp=c:GetControler() if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT) Duel.SendtoGrave(tc,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -57,7 +57,7 @@ function QutryYgzw.SetFilter2(c,e,tp) ...@@ -57,7 +57,7 @@ function QutryYgzw.SetFilter2(c,e,tp)
end end
function QutryYgzw.Set(c,e,tp) function QutryYgzw.Set(c,e,tp)
local op=e:GetHandlerPlayer() local op=e:GetHandlerPlayer()
local res=Duel.MoveToField(c,op,tp,LOCATION_SZONE,POS_FACEDOWN,true) if not Duel.MoveToField(c,op,tp,LOCATION_SZONE,POS_FACEDOWN,true) then return false end
Duel.ConfirmCards(1-tp,c) Duel.ConfirmCards(1-tp,c)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,op,op,0) Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,op,op,0)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
...@@ -67,7 +67,7 @@ function QutryYgzw.Set(c,e,tp) ...@@ -67,7 +67,7 @@ function QutryYgzw.Set(c,e,tp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_TRAP+TYPE_CONTINUOUS) e1:SetValue(TYPE_TRAP+TYPE_CONTINUOUS)
c:RegisterEffect(e1) c:RegisterEffect(e1)
return res return true
end end
function QutryYgzw.Set2(g,e,tp) function QutryYgzw.Set2(g,e,tp)
local op=e:GetHandlerPlayer() local op=e:GetHandlerPlayer()
......
...@@ -51,9 +51,8 @@ function c9910732.somtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -51,9 +51,8 @@ function c9910732.somtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
end end
function c9910732.somop(e,tp,eg,ep,ev,re,r,rp) function c9910732.somop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
QutryYgzw.Set(tc,e,tp) QutryYgzw.Set(tc,e,tp)
end end
end end
......
...@@ -85,9 +85,9 @@ function c9910767.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -85,9 +85,9 @@ function c9910767.setop(e,tp,eg,ep,ev,re,r,rp)
local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c9910767.setfilter),tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil) local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c9910767.setfilter),tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil)
if g2:GetCount()==0 then return end if g2:GetCount()==0 then return end
Duel.HintSelection(g2) Duel.HintSelection(g2)
local res=false
local sc=g2:GetFirst() local sc=g2:GetFirst()
if sc then if sc and not sc:IsImmuneToEffect(e) and Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -95,8 +95,9 @@ function c9910767.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -95,8 +95,9 @@ function c9910767.setop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
sc:RegisterEffect(e1) sc:RegisterEffect(e1)
res=Duel.Draw(1-tp,1,REASON_EFFECT)>0
end end
if Duel.Draw(1-tp,1,REASON_EFFECT)==0 then return end if not res then return end
local g=Group.CreateGroup() local g=Group.CreateGroup()
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -75,7 +75,8 @@ function c9910957.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,7 +75,8 @@ function c9910957.thop(e,tp,eg,ep,ev,re,r,rp)
local b2=c:GetCounter(0x6954)>0 and c:IsAbleToRemove() local b2=c:GetCounter(0x6954)>0 and c:IsAbleToRemove()
local res=false local res=false
if b1 and (not b2 or Duel.SelectOption(tp,aux.Stringid(9910957,1),aux.Stringid(9910957,2))==0) then if b1 and (not b2 or Duel.SelectOption(tp,aux.Stringid(9910957,1),aux.Stringid(9910957,2))==0) then
res=Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEDOWN,true) res=not c:IsImmuneToEffect(e) and Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEDOWN,true)
if not res then return end
Duel.ConfirmCards(1-tp,c) Duel.ConfirmCards(1-tp,c)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0) Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -110,10 +110,8 @@ function c9910975.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -110,10 +110,8 @@ function c9910975.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SelectTarget(tp,c9910975.csfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp) Duel.SelectTarget(tp,c9910975.csfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp)
end end
function c9910975.setop(e,tp,eg,ep,ev,re,r,rp) function c9910975.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) and Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEDOWN,true) then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEDOWN,true)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
Duel.RaiseEvent(tc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0) Duel.RaiseEvent(tc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -62,7 +62,7 @@ end ...@@ -62,7 +62,7 @@ end
function c9911224.csop(e,tp,eg,ep,ev,re,r,rp) function c9911224.csop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local rc=re:GetHandler() local rc=re:GetHandler()
if rc:IsRelateToEffect(re) then if rc:IsRelateToEffect(re) and not rc:IsImmuneToEffect(e) then
Duel.MoveToField(rc,tp,tp,LOCATION_SZONE,POS_FACEDOWN,true) Duel.MoveToField(rc,tp,tp,LOCATION_SZONE,POS_FACEDOWN,true)
Duel.ConfirmCards(1-tp,rc) Duel.ConfirmCards(1-tp,rc)
Duel.RaiseEvent(rc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0) Duel.RaiseEvent(rc,EVENT_SSET,e,REASON_EFFECT,tp,tp,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