Commit 8867367a authored by POLYMER's avatar POLYMER

fix

parent 325c3952
......@@ -19,6 +19,7 @@ function cm.initial_effect(c)
cm.hand_effect[c]=e1
--limit
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11451416,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY)
......@@ -33,6 +34,8 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
end
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.smfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,e:GetHandler()) end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function cm.smfilter(c,ec)
......@@ -61,7 +64,7 @@ function cm.cpfilter(c)
end
function cm.fselect(g,tp)
local dg=g:Filter(Card.IsFacedown,nil)
return g:GetClassCount(Card.GetPosition)==2 and (#dg>0 or not (g-dg):IsExists(function(c) return c:IsFaceup() and not c:IsCanTurnSet() end,1,nil))
return g:GetClassCount(Card.GetPosition)==2 and (#dg==0 or not (g-dg):IsExists(function(c) return c:IsFaceup() and not c:IsCanTurnSet() end,1,nil))
end
function cm.ttcon(e,c,minc)
if c==nil then return true end
......@@ -117,6 +120,8 @@ function cm.cacon(e,tp,eg,ep,ev,re,r,rp)
end
function cm.catg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local seq=e:GetHandler():GetPreviousSequence()
if e:GetHandler():GetPreviousControler()==1-tp then seq=4-seq end
e:SetLabel(seq)
......
......@@ -19,6 +19,7 @@ function cm.initial_effect(c)
cm.hand_effect[c]=e1
--shuffle
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11451416,1))
e2:SetCategory(CATEGORY_POSITION+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
......@@ -37,6 +38,8 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
end
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.smfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,e:GetHandler()) end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function cm.smfilter(c,ec)
......@@ -118,6 +121,8 @@ function cm.shtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,0,nil)
if chk==0 then return #g>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local seq=e:GetHandler():GetPreviousSequence()
if e:GetHandler():GetPreviousControler()==1-tp then seq=4-seq end
e:SetLabel(seq)
......
......@@ -19,6 +19,7 @@ function cm.initial_effect(c)
cm.hand_effect[c]=e1
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11451416,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
......@@ -54,6 +55,8 @@ function cm.regop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.smfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,e:GetHandler()) end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function cm.smfilter(c,ec)
......@@ -220,6 +223,8 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
else
sg=Duel.SelectTarget(tp,cm.tgfilter,tp,LOCATION_GRAVE,0,1,1,nil,e)
end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,#sg,0,0)
end
function cm.clfilter(c,tp,seq)
......
......@@ -19,6 +19,7 @@ function cm.initial_effect(c)
cm.hand_effect[c]=e1
--position
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11451416,1))
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
......@@ -40,6 +41,8 @@ function cm.actfilter(c,p,seq)
end
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.smfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,e:GetHandler()) end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function cm.smfilter(c,ec)
......@@ -125,6 +128,8 @@ end
function cm.pttg(e,tp,eg,ep,ev,re,r,rp,chk)
local cg=Duel.GetMatchingGroup(Card.IsCanChangePosition,tp,LOCATION_MZONE,0,nil)
if chk==0 then return #cg>0 end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local seq=e:GetHandler():GetPreviousSequence()
if e:GetHandler():GetPreviousControler()==1-tp then seq=4-seq end
e:SetLabel(seq)
......
......@@ -19,6 +19,7 @@ function cm.initial_effect(c)
cm.hand_effect[c]=e1
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11451416,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
......@@ -39,6 +40,8 @@ function cm.filter(c,tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and not Duel.IsPlayerAffectedByEffect(tp,59822133) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)) or (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil,tp)) end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
......@@ -86,6 +89,8 @@ function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g1=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,0,nil)
local g2=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
if chk==0 then return #g1>0 and #g2>0 end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0)
end
......
......@@ -24,6 +24,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e4)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11451416,1))
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
......@@ -49,6 +50,8 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(cm.filter11,nil)
if chk==0 then return c:IsAbleToDeck() and g:IsExists(cm.setfilter,1,nil,c,tp) end
g=g:Filter(cm.setfilter,nil,c,tp)
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,LOCATION_HAND)
......@@ -77,7 +80,7 @@ function cm.filter1(c)
return c:IsFaceup() and c:IsAbleToRemove() and c:IsCanBeFusionMaterial()
end
function cm.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false,POS_FACEDOWN_DEFENSE) and c:CheckFusionMaterial(m,nil,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and c:CheckFusionMaterial(m,nil,chkf)
end
function cm.filter3(c,e)
return c:IsOnField() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
......@@ -86,7 +89,7 @@ function cm.filter4(c,e)
return c:IsFaceup() and c:IsAbleToRemove() and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end
function cm.filter5(c,e,tp,m,f,chkf)
return (c:IsType(TYPE_FUSION) or c.IsFusionSpellTrap) and (not f or f(c)) and (c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false,POS_FACEDOWN_DEFENSE) or c:IsSSetable()) and c:CheckFusionMaterial(m,nil,chkf)
return (c:IsType(TYPE_FUSION) or c.IsFusionSpellTrap) and (not f or f(c)) and (c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) or c:IsSSetable()) and c:CheckFusionMaterial(m,nil,chkf)
end
function cm.filter6(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
......@@ -113,6 +116,8 @@ function cm.fstg(e,tp,eg,ep,ev,re,r,rp,chk)
end
return res
end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_GRAVE)
end
function cm.fsop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -10,6 +10,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
--e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
......@@ -92,7 +93,6 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SwapSequence(sg:GetFirst(),sg:GetNext())
end
if #sg<=2 then
Duel.ConfirmCards(1-tp,sg)
Duel.SendtoGrave(g,REASON_EFFECT+REASON_REVEAL)
return
end
......
......@@ -55,6 +55,8 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
end
end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
if e:GetLabel()==1 then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
else
......@@ -99,6 +101,8 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(cm.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and #g>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
......
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