Commit 51a70fbe authored by POLYMER's avatar POLYMER

fix

parent 5a8bf352
......@@ -73,7 +73,7 @@ function cm.reop1(e,tp,eg,ep,ev,re,r,rp)
Duel.HintSelection(tg)
if tc:IsLocation(LOCATION_MZONE) then
Duel.Hint(HINT_CARD,0,m)
if Duel.Remove(tc,0,REASON_RULE+REASON_TEMPORARY)>0 and not tc:IsReason(REASON_REDIRECT) then
if Duel.Remove(tc,0,REASON_RULE+REASON_TEMPORARY)>0 and tc:IsLocation(LOCATION_REMOVED) and not tc:IsReason(REASON_REDIRECT) then
n1=n1-1
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,0))
......@@ -114,7 +114,7 @@ function cm.reop1(e,tp,eg,ep,ev,re,r,rp)
Duel.HintSelection(tg)
if tc:IsLocation(LOCATION_MZONE) then
Duel.Hint(HINT_CARD,0,m)
if Duel.Remove(tc,0,REASON_RULE+REASON_TEMPORARY)>0 and not tc:IsReason(REASON_REDIRECT) then
if Duel.Remove(tc,0,REASON_RULE+REASON_TEMPORARY)>0 and tc:IsLocation(LOCATION_REMOVED) and not tc:IsReason(REASON_REDIRECT) then
n2=n2-1
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,0))
......@@ -192,7 +192,7 @@ function cm.reop2(e,tp,eg,ep,ev,re,r,rp)
Duel.HintSelection(tg)
for tc in aux.Next(tg) do
if tc:IsLocation(LOCATION_MZONE) then
if Duel.Remove(tc,0,REASON_RULE+REASON_TEMPORARY)>0 then
if Duel.Remove(tc,0,REASON_RULE+REASON_TEMPORARY)>0 and tc:IsLocation(LOCATION_REMOVED) and not tc:IsReason(REASON_REDIRECT) then
n1=n1-1
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,0))
......@@ -233,7 +233,7 @@ function cm.reop2(e,tp,eg,ep,ev,re,r,rp)
Duel.HintSelection(tg)
for tc in aux.Next(tg) do
if tc:IsLocation(LOCATION_MZONE) then
if Duel.Remove(tc,0,REASON_RULE+REASON_TEMPORARY)>0 then
if Duel.Remove(tc,0,REASON_RULE+REASON_TEMPORARY)>0 and tc:IsLocation(LOCATION_REMOVED) and not tc:IsReason(REASON_REDIRECT) then
n2=n2-1
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,0))
......
......@@ -94,7 +94,7 @@ function cm.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(g,tp,2,REASON_EFFECT)
else
Duel.BreakEffect()
if Duel.Remove(c,POS_FACEDOWN,REASON_EFFECT+REASON_TEMPORARY)~=0 and not c:IsReason(REASON_REDIRECT) then
if Duel.Remove(c,POS_FACEDOWN,REASON_EFFECT+REASON_TEMPORARY)~=0 and c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT) then --and c:GetOriginalCode()==m then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
......
......@@ -342,7 +342,7 @@ function cm.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,min,max)
Duel.SetSynchroMaterial(g)
if #g>0 and Duel.Remove(g,POS_FACEUP,REASON_MATERIAL+REASON_SYNCHRO+REASON_TEMPORARY)>0 then
local fid=c:GetFieldID()
local og=Duel.GetOperatedGroup()
local og=Duel.GetOperatedGroup():Filter(cm.rffilter,nil)
for oc in aux.Next(og) do
oc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
end
......
......@@ -216,7 +216,7 @@ function cm.retop(e,tp,eg,ep,ev,re,r,rp)
end
e:Reset()
else
Duel.Remove(c,nil,REASON_EFFECT+REASON_TEMPORARY)
--Duel.Remove(c,nil,REASON_EFFECT+REASON_TEMPORARY)
flag=flag+1
c:ResetFlagEffect(m+4)
local cid=11451859
......
......@@ -90,7 +90,7 @@ function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Remove(c,0,REASON_EFFECT+REASON_TEMPORARY)~=0 and c:GetOriginalCode()==m then
if c:IsRelateToEffect(e) and Duel.Remove(c,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then --and c:GetOriginalCode()==m then
if Duel.GetCurrentPhase()==PHASE_STANDBY then
local tid=Duel.GetTurnCount()
local e1=Effect.CreateEffect(e:GetHandler())
......
......@@ -119,7 +119,7 @@ end
function c11561076.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local tc=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
--battle indestructable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -38,6 +38,9 @@ end
function cm.atfilter(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR)
end
function cm.spfilter(c)
return c:IsRace(RACE_WARRIOR) and c:IsType(TYPE_MONSTER) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -31,7 +31,7 @@ function c28355662.initial_effect(c)
end
function c28355662.excondition(e)
local tp=e:GetHandlerPlayer()
return Duel.GetTurnPlayer()==tp and (Duel.GetLP(tp)<=3000 and Duel.CheckLPCost(tp,2500)) or (Duel.GetLP(tp)>3000 and Duel.CheckLPCost(tp,4000))
return Duel.GetTurnPlayer()==tp and (Duel.GetLP(tp)<=3000 and Duel.CheckLPCost(tp,2500) or Duel.GetLP(tp)>3000 and Duel.CheckLPCost(tp,4000))
end
function c28355662.excost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -23,22 +23,22 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
end
function s.thfilter1(c,tp)
return c:IsSetCard(0xc8) and c:IsLevelAbove(7) and c:IsAbleToHand() and Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK,0,1,c)
return c:IsSetCard(0xc8) and c:IsLevelAbove(7) and c:IsAbleToHand() and Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,c)
end
function s.thfilter2(c)
return c:IsSetCard(0xc8) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK+LOCATION_GRAVE)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=Duel.SelectMatchingCard(tp,s.thfilter1,tp,LOCATION_DECK,0,1,1,nil,tp)
local g1=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter1),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp)
if g1:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,s.thfilter2,tp,LOCATION_DECK,0,1,1,g1:GetFirst())
local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,g1:GetFirst())
g1:Merge(g2)
Duel.SendtoHand(g1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g1)
......
......@@ -53,7 +53,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil,1-tp)
local tc=g:GetFirst()
if tc and Duel.MoveToField(tc,tp,1-tp,LOCATION_SZONE,POS_FACEUP,true) and Duel.IsExistingMatchingCard(s.movefilter,tp,0,LOCATION_MZONE,1,nil,1-tp) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
if tc and Duel.MoveToField(tc,tp,1-tp,LOCATION_SZONE,POS_FACEUP,true) and Duel.IsExistingMatchingCard(s.movefilter,tp,0,LOCATION_MZONE,1,nil,1-tp) then
local mg=Duel.SelectMatchingCard(tp,s.movefilter,tp,0,LOCATION_MZONE,1,1,nil,1-tp)
local seq=mg:GetFirst():GetSequence()
local flag=0
......
......@@ -53,7 +53,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil,1-tp)
local tc=g:GetFirst()
if tc and Duel.MoveToField(tc,tp,1-tp,LOCATION_SZONE,POS_FACEUP,true) and Duel.IsExistingMatchingCard(s.movefilter,tp,0,LOCATION_MZONE,1,nil,1-tp) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
if tc and Duel.MoveToField(tc,tp,1-tp,LOCATION_SZONE,POS_FACEUP,true) and Duel.IsExistingMatchingCard(s.movefilter,tp,0,LOCATION_MZONE,1,nil,1-tp) then
local mg=Duel.SelectMatchingCard(tp,s.movefilter,tp,0,LOCATION_MZONE,1,1,nil,1-tp)
local seq=mg:GetFirst():GetSequence()
local flag=0
......
......@@ -47,7 +47,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_HAND+LOCATION_REMOVED,0,1,1,nil,1-tp)
local tc=g:GetFirst()
if tc and Duel.MoveToField(tc,tp,1-tp,LOCATION_SZONE,POS_FACEUP,true) and Duel.IsExistingMatchingCard(s.movefilter,tp,0,LOCATION_MZONE,1,nil,1-tp) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
if tc and Duel.MoveToField(tc,tp,1-tp,LOCATION_SZONE,POS_FACEUP,true) and Duel.IsExistingMatchingCard(s.movefilter,tp,0,LOCATION_MZONE,1,nil,1-tp) then
local mg=Duel.SelectMatchingCard(tp,s.movefilter,tp,0,LOCATION_MZONE,1,1,nil,1-tp)
local seq=mg:GetFirst():GetSequence()
local flag=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