Commit 10af34eb authored by POLYMER's avatar POLYMER

fix

parent c69a6869
......@@ -19,7 +19,6 @@ function cm.initial_effect(c)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e3=e1:Clone()
e3:SetDescription(aux.Stringid(m,0))
e3:SetRange(LOCATION_DECK)
e3:SetCondition(cm.condition)
e3:SetCost(cm.cost)
......@@ -34,7 +33,6 @@ function cm.initial_effect(c)
e4:SetOperation(cm.costop)
c:RegisterEffect(e4)
local e5=e1:Clone()
e5:SetDescription(aux.Stringid(m,0))
e5:SetRange(LOCATION_GRAVE)
e5:SetCost(cm.cost2)
c:RegisterEffect(e5)
......@@ -61,13 +59,13 @@ function cm.initial_effect(c)
local _GetActivateSequence=Effect.GetActivateSequence
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
if e:GetDescription()==aux.Stringid(11451631,5) then
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
function Effect.GetActivateSequence(e)
if e:GetDescription()==aux.Stringid(m,0) then
if e:GetDescription()==aux.Stringid(11451631,5) then
return cm.activate_sequence[e]
end
return _GetActivateSequence(e)
......
......@@ -19,7 +19,6 @@ function cm.initial_effect(c)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e3=e1:Clone()
e3:SetDescription(aux.Stringid(m,0))
e3:SetRange(LOCATION_DECK)
e3:SetCondition(cm.condition)
e3:SetCost(cm.cost)
......@@ -34,7 +33,6 @@ function cm.initial_effect(c)
e4:SetOperation(cm.costop)
c:RegisterEffect(e4)
local e5=e1:Clone()
e5:SetDescription(aux.Stringid(m,0))
e5:SetRange(LOCATION_GRAVE)
e5:SetCost(cm.cost2)
c:RegisterEffect(e5)
......@@ -61,13 +59,13 @@ function cm.initial_effect(c)
local _GetActivateSequence=Effect.GetActivateSequence
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
if e:GetDescription()==aux.Stringid(11451631,5) then
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
function Effect.GetActivateSequence(e)
if e:GetDescription()==aux.Stringid(m,0) then
if e:GetDescription()==aux.Stringid(11451631,5) then
return cm.activate_sequence[e]
end
return _GetActivateSequence(e)
......
......@@ -19,7 +19,6 @@ function cm.initial_effect(c)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e3=e1:Clone()
e3:SetDescription(aux.Stringid(m,0))
e3:SetRange(LOCATION_DECK)
e3:SetCondition(cm.condition)
e3:SetCost(cm.cost)
......@@ -34,7 +33,6 @@ function cm.initial_effect(c)
e4:SetOperation(cm.costop)
c:RegisterEffect(e4)
local e5=e1:Clone()
e5:SetDescription(aux.Stringid(m,0))
e5:SetRange(LOCATION_GRAVE)
e5:SetCost(cm.cost2)
c:RegisterEffect(e5)
......@@ -61,13 +59,13 @@ function cm.initial_effect(c)
local _GetActivateSequence=Effect.GetActivateSequence
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
if e:GetDescription()==aux.Stringid(11451631,5) then
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
function Effect.GetActivateSequence(e)
if e:GetDescription()==aux.Stringid(m,0) then
if e:GetDescription()==aux.Stringid(11451631,5) then
return cm.activate_sequence[e]
end
return _GetActivateSequence(e)
......
......@@ -19,7 +19,6 @@ function cm.initial_effect(c)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e3=e1:Clone()
e3:SetDescription(aux.Stringid(m,0))
e3:SetRange(LOCATION_DECK)
e3:SetCondition(cm.condition)
e3:SetCost(cm.cost)
......@@ -34,7 +33,6 @@ function cm.initial_effect(c)
e4:SetOperation(cm.costop)
c:RegisterEffect(e4)
local e5=e1:Clone()
e5:SetDescription(aux.Stringid(m,0))
e5:SetRange(LOCATION_GRAVE)
e5:SetCost(cm.cost2)
c:RegisterEffect(e5)
......@@ -61,13 +59,13 @@ function cm.initial_effect(c)
local _GetActivateSequence=Effect.GetActivateSequence
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
if e:GetDescription()==aux.Stringid(11451631,5) then
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
function Effect.GetActivateSequence(e)
if e:GetDescription()==aux.Stringid(m,0) then
if e:GetDescription()==aux.Stringid(11451631,5) then
return cm.activate_sequence[e]
end
return _GetActivateSequence(e)
......
......@@ -19,7 +19,6 @@ function cm.initial_effect(c)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e3=e1:Clone()
e3:SetDescription(aux.Stringid(m,0))
e3:SetRange(LOCATION_DECK)
e3:SetCondition(cm.condition)
e3:SetCost(cm.cost)
......@@ -34,7 +33,6 @@ function cm.initial_effect(c)
e4:SetOperation(cm.costop)
c:RegisterEffect(e4)
local e5=e1:Clone()
e5:SetDescription(aux.Stringid(m,0))
e5:SetRange(LOCATION_GRAVE)
e5:SetCost(cm.cost2)
c:RegisterEffect(e5)
......@@ -61,13 +59,13 @@ function cm.initial_effect(c)
local _GetActivateSequence=Effect.GetActivateSequence
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
if e:GetDescription()==aux.Stringid(11451631,5) then
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
function Effect.GetActivateSequence(e)
if e:GetDescription()==aux.Stringid(m,0) then
if e:GetDescription()==aux.Stringid(11451631,5) then
return cm.activate_sequence[e]
end
return _GetActivateSequence(e)
......
......@@ -19,7 +19,6 @@ function cm.initial_effect(c)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e3=e1:Clone()
e3:SetDescription(aux.Stringid(m,0))
e3:SetRange(LOCATION_DECK)
e3:SetCondition(cm.condition)
e3:SetCost(cm.cost)
......@@ -34,7 +33,6 @@ function cm.initial_effect(c)
e4:SetOperation(cm.costop)
c:RegisterEffect(e4)
local e5=e1:Clone()
e5:SetDescription(aux.Stringid(m,0))
e5:SetRange(LOCATION_GRAVE)
e5:SetCost(cm.cost2)
c:RegisterEffect(e5)
......@@ -61,13 +59,13 @@ function cm.initial_effect(c)
local _GetActivateSequence=Effect.GetActivateSequence
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
if e:GetDescription()==aux.Stringid(11451631,5) then
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
function Effect.GetActivateSequence(e)
if e:GetDescription()==aux.Stringid(m,0) then
if e:GetDescription()==aux.Stringid(11451631,5) then
return cm.activate_sequence[e]
end
return _GetActivateSequence(e)
......
......@@ -90,8 +90,12 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local lastc=(#cm.chainout[1-Duel.GetTurnPlayer()]==0 and cm.chainout[c:GetControler()][(#cm.chainout[c:GetControler()])]==c) or (c:GetControler()==1-Duel.GetTurnPlayer() and cm.chainout[c:GetControler()][(#cm.chainout[c:GetControler()])]==c)
if not c:IsHasEffect(m) or e:GetCode()~=EVENT_CHAIN_SOLVING then
--if e:GetCode()~=EVENT_CHAIN_SOLVING then Debug.Message(c:GetSequence()) end
if Duel.Remove(c,0,REASON_EFFECT+REASON_TEMPORARY)~=0 and c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT) then --and c:GetOriginalCode()==m then
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_CUSTOM+m+0xffffff+c:GetFieldID())
e6:SetRange(LOCATION_MZONE)
e6:SetOperation(function()
if Duel.Remove(c,0,REASON_EFFECT+REASON_TEMPORARY)~=0 and c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT) then
if Duel.GetCurrentPhase()==PHASE_STANDBY then
local tid=Duel.GetTurnCount()
local e1=Effect.CreateEffect(e:GetHandler())
......@@ -116,6 +120,9 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
end
end
end)
c:RegisterEffect(e6)
Duel.RaiseEvent(c,EVENT_CUSTOM+m+0xffffff+c:GetFieldID(),re,r,rp,ep,ev)
end
if lastc and e:GetCode()==EVENT_CHAIN_SOLVING then --c~=e:GetLabelObject() and --and (c:IsControler(1-Duel.GetTurnPlayer()) or not Duel.IsExistingMatchingCard(function(c) return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsDisabled() end,Duel.GetTurnPlayer(),0,LOCATION_MZONE,1,nil)) then
--cm.disop(c[c],tp,eg,ep,ev,re,r,rp)
......
......@@ -127,9 +127,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter2),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,3,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
if Duel.IsPlayerCanDraw(tp,1)
and Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==3
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==3 and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.ShuffleDeck(tp)
Duel.Draw(tp,1,REASON_EFFECT)
......
......@@ -72,16 +72,21 @@ function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,e:GetHandler()) end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil)
or Duel.IsPlayerAffectedByEffect(tp,66690330) end
if Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil)
and (not Duel.IsPlayerAffectedByEffect(tp,66690330) or not Duel.SelectYesNo(tp,aux.Stringid(66690330,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
end
function s.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)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local g=Duel.SelectTarget(tp,Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
......@@ -112,6 +117,7 @@ end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end
......
......@@ -75,16 +75,21 @@ function s.rmcon(e,tp,eg,ep,ev,re,r,rp)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,nil)
or Duel.IsPlayerAffectedByEffect(tp,66690330) end
if Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,nil)
and (not Duel.IsPlayerAffectedByEffect(tp,66690330) or not Duel.SelectYesNo(tp,aux.Stringid(66690330,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
......@@ -112,6 +117,7 @@ end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
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