Commit bdc67333 authored by POLYMER's avatar POLYMER

fix

parent 7365c05e
...@@ -19,7 +19,8 @@ function cm.initial_effect(c) ...@@ -19,7 +19,8 @@ function cm.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m+1,0)) e1:SetDescription(aux.Stringid(m+1,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_MOVE) e1:SetCode(EVENT_LEAVE_DECK)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_FZONE) e1:SetRange(LOCATION_FZONE)
e1:SetCondition(cm.condition1) e1:SetCondition(cm.condition1)
e1:SetOperation(cm.operation1) e1:SetOperation(cm.operation1)
...@@ -29,6 +30,7 @@ function cm.initial_effect(c) ...@@ -29,6 +30,7 @@ function cm.initial_effect(c)
e2:SetDescription(aux.Stringid(m+2,0)) e2:SetDescription(aux.Stringid(m+2,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_MOVE) e2:SetCode(EVENT_MOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetCondition(cm.condition2) e2:SetCondition(cm.condition2)
e2:SetOperation(cm.operation2) e2:SetOperation(cm.operation2)
...@@ -38,6 +40,7 @@ function cm.initial_effect(c) ...@@ -38,6 +40,7 @@ function cm.initial_effect(c)
e3:SetDescription(aux.Stringid(m+3,0)) e3:SetDescription(aux.Stringid(m+3,0))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_LEAVE_FIELD) e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_FZONE) e3:SetRange(LOCATION_FZONE)
e3:SetCondition(cm.condition3) e3:SetCondition(cm.condition3)
e3:SetOperation(cm.operation3) e3:SetOperation(cm.operation3)
...@@ -47,6 +50,7 @@ function cm.initial_effect(c) ...@@ -47,6 +50,7 @@ function cm.initial_effect(c)
e4:SetDescription(aux.Stringid(m+4,0)) e4:SetDescription(aux.Stringid(m+4,0))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_LEAVE_FIELD) e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetRange(LOCATION_FZONE) e4:SetRange(LOCATION_FZONE)
e4:SetCondition(cm.condition4) e4:SetCondition(cm.condition4)
e4:SetOperation(cm.operation4) e4:SetOperation(cm.operation4)
...@@ -56,6 +60,7 @@ function cm.initial_effect(c) ...@@ -56,6 +60,7 @@ function cm.initial_effect(c)
e5:SetDescription(aux.Stringid(m+5,0)) e5:SetDescription(aux.Stringid(m+5,0))
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_LEAVE_GRAVE) e5:SetCode(EVENT_LEAVE_GRAVE)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetRange(LOCATION_FZONE) e5:SetRange(LOCATION_FZONE)
e5:SetCondition(cm.condition5) e5:SetCondition(cm.condition5)
e5:SetOperation(cm.operation5) e5:SetOperation(cm.operation5)
...@@ -64,7 +69,8 @@ function cm.initial_effect(c) ...@@ -64,7 +69,8 @@ function cm.initial_effect(c)
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(m+6,0)) e6:SetDescription(aux.Stringid(m+6,0))
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_MOVE) e6:SetCode(EVENT_LEAVE_DECK)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetRange(LOCATION_FZONE) e6:SetRange(LOCATION_FZONE)
e6:SetCondition(cm.condition6) e6:SetCondition(cm.condition6)
e6:SetOperation(cm.operation6) e6:SetOperation(cm.operation6)
...@@ -164,7 +170,7 @@ function cm.operation2(e,tp,eg,ep,ev,re,r,rp) ...@@ -164,7 +170,7 @@ function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(e:GetHandler(),11451676,e,0,tp,tp,Duel.GetCurrentChain()) Duel.RaiseEvent(e:GetHandler(),11451676,e,0,tp,tp,Duel.GetCurrentChain())
end end
function cm.cfilter3(c,tp) function cm.cfilter3(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) return c:IsPreviousLocation(LOCATION_MZONE) --and c:IsPreviousControler(tp)
end end
function cm.condition3(e,tp,eg,ep,ev,re,r,rp) function cm.condition3(e,tp,eg,ep,ev,re,r,rp)
return cm.flag(e,tp,m+3) and eg:IsExists(cm.cfilter3,1,nil,1-tp) return cm.flag(e,tp,m+3) and eg:IsExists(cm.cfilter3,1,nil,1-tp)
...@@ -204,11 +210,11 @@ function cm.resop(e,tp,eg,ep,ev,re,r,rp) ...@@ -204,11 +210,11 @@ function cm.resop(e,tp,eg,ep,ev,re,r,rp)
Duel.IsChainNegatable=_IsChainNegatable Duel.IsChainNegatable=_IsChainNegatable
e:Reset() e:Reset()
end end
function cm.cfilter4(c,tp) function cm.cfilter4(c,e,tp)
return c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousSequence()<5 --and c:IsPreviousControler(tp) return c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousSequence()<5 and c:GetReasonEffect()~=e --and c:IsPreviousControler(tp)
end end
function cm.condition4(e,tp,eg,ep,ev,re,r,rp) function cm.condition4(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(cm.cfilter4,nil,1-tp) local g=eg:Filter(cm.cfilter4,nil,e,1-tp)
if not cm.flag(e,tp,m+4) or #g==0 then return false end if not cm.flag(e,tp,m+4) or #g==0 then return false end
local lab=0 local lab=0
for tc in aux.Next(g) do for tc in aux.Next(g) do
......
...@@ -24,8 +24,9 @@ function c22020910.initial_effect(c) ...@@ -24,8 +24,9 @@ function c22020910.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c22020910.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c22020910.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end local c=e:GetHandler()
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,c) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,c)
end end
function c22020910.spfilter(c,e,tp,check) function c22020910.spfilter(c,e,tp,check)
return c:IsSetCard(0x2ff1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) return c:IsSetCard(0x2ff1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
......
...@@ -53,7 +53,7 @@ function c22021910.cecondition(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,7 +53,7 @@ function c22021910.cecondition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsExistingMatchingCard(Card.IsFaceup,0,LOCATION_FZONE,LOCATION_FZONE,1,nil) return ep~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsExistingMatchingCard(Card.IsFaceup,0,LOCATION_FZONE,LOCATION_FZONE,1,nil)
end end
function c22021910.thfilter(c) function c22021910.thfilter(c)
return c:IsType(TYPE_MONSTER)) return c:IsType(TYPE_MONSTER)
end end
function c22021910.cetarget(e,tp,eg,ep,ev,re,r,rp,chk) function c22021910.cetarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22021910.thfilter,rp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c22021910.thfilter,rp,0,LOCATION_MZONE,1,nil) end
......
...@@ -9,18 +9,11 @@ function cm.initial_effect(c) ...@@ -9,18 +9,11 @@ function cm.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.con)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x9344)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.refilter(c) function cm.refilter(c)
return ((c:IsType(TYPE_EFFECT) and c:IsDisabled()) or c:IsType(TYPE_NORMAL) or c:IsType(TYPE_TOKEN)) and c:IsReleasable() return ((c:IsType(TYPE_EFFECT) and c:IsDisabled()) or c:IsType(TYPE_NORMAL) or c:IsType(TYPE_TOKEN)) and c:IsReleasable()
end end
......
...@@ -53,7 +53,7 @@ function s.cfilter(c,lg) ...@@ -53,7 +53,7 @@ function s.cfilter(c,lg)
end end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp) function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetHandler():GetLinkedGroup() local lg=e:GetHandler():GetLinkedGroup()
return eg:IsExists(s.cfilter,1,nil,lg) return eg:IsExists(s.cfilter,1,nil,lg) and not eg:IsContains(e:GetHandler())
end end
function s.tgfilter(c) function s.tgfilter(c)
return c:IsSetCard(0x116) and c:IsAbleToGrave() return c:IsSetCard(0x116) and c:IsAbleToGrave()
......
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