Commit b6eb285a authored by POLYMER's avatar POLYMER

fix

parent 69656496
......@@ -93,7 +93,7 @@ function c24501040.con2(e,tp,eg,ep,ev,re,r,rp)
return c:IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO and c:GetReasonCard():IsRace(RACE_MACHINE)
end
function c24501040.filter2(c)
return c:IsSetCard(0x501) and c:IsAbleToHand() and not c:IsCode(24501040)
return c:IsSetCard(0x501) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(24501040)
end
function c24501040.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24501040.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
......
......@@ -51,8 +51,7 @@ end
function cm.sthop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT)
if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT)~=0 and tg:GetCount()>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
end
......
......@@ -15,8 +15,8 @@ function c9911256.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9911256,2))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CUSTOM+9911256)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_MOVE)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c9911256.mvcon)
......@@ -24,31 +24,6 @@ function c9911256.initial_effect(c)
e2:SetTarget(c9911256.mvtg)
e2:SetOperation(c9911256.mvop)
c:RegisterEffect(e2)
if not c9911256.global_check then
c9911256.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_MOVE)
ge1:SetCondition(c9911256.regcon)
ge1:SetOperation(c9911256.regop)
Duel.RegisterEffect(ge1,0)
end
end
function c9911256.cfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsControler(tp)
and (c:GetPreviousSequence()~=c:GetSequence() or c:GetPreviousControler()~=tp)
end
function c9911256.regcon(e,tp,eg,ep,ev,re,r,rp)
local v=0
if eg:IsExists(c9911256.cfilter,1,nil,0) then v=v+1 end
if eg:IsExists(c9911256.cfilter,1,nil,1) then v=v+2 end
if v==0 then return false end
e:SetLabel(({0,1,PLAYER_ALL})[v])
return true
end
function c9911256.regop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,9911256)
Duel.RaiseEvent(g,EVENT_CUSTOM+9911256,re,r,rp,ep,e:GetLabel())
end
function c9911256.seqfilter(c)
return c:IsFaceup() and c:IsSetCard(0x9956)
......@@ -80,8 +55,12 @@ function c9911256.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
function c9911256.cfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:IsPreviousLocation(LOCATION_MZONE)
and (c:GetPreviousSequence()~=c:GetSequence() or c:GetPreviousControler()~=c:GetControler())
end
function c9911256.mvcon(e,tp,eg,ep,ev,re,r,rp)
return (ev==tp or ev==PLAYER_ALL) and eg:IsContains(e:GetHandler())
return eg:IsExists(c9911256.cfilter,1,nil)
end
function c9911256.mvtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
......
......@@ -14,8 +14,8 @@ function c9911267.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9911267,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CUSTOM+9911267)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_MOVE)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c9911267.mvcon)
......@@ -23,31 +23,6 @@ function c9911267.initial_effect(c)
e2:SetTarget(c9911267.mvtg)
e2:SetOperation(c9911267.mvop)
c:RegisterEffect(e2)
if not c9911267.global_check then
c9911267.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_MOVE)
ge1:SetCondition(c9911267.regcon)
ge1:SetOperation(c9911267.regop)
Duel.RegisterEffect(ge1,0)
end
end
function c9911267.cfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsControler(tp)
and (c:GetPreviousSequence()~=c:GetSequence() or c:GetPreviousControler()~=tp)
end
function c9911267.regcon(e,tp,eg,ep,ev,re,r,rp)
local v=0
if eg:IsExists(c9911267.cfilter,1,nil,0) then v=v+1 end
if eg:IsExists(c9911267.cfilter,1,nil,1) then v=v+2 end
if v==0 then return false end
e:SetLabel(({0,1,PLAYER_ALL})[v])
return true
end
function c9911267.regop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,9911267)
Duel.RaiseEvent(g,EVENT_CUSTOM+9911267,re,r,rp,ep,e:GetLabel())
end
function c9911267.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(aux.AND(Card.IsFaceup,Card.IsSetCard),tp,LOCATION_MZONE,0,1,nil,0x9956)
......@@ -83,8 +58,12 @@ function c9911267.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function c9911267.cfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:IsPreviousLocation(LOCATION_MZONE)
and (c:GetPreviousSequence()~=c:GetSequence() or c:GetPreviousControler()~=c:GetControler())
end
function c9911267.mvcon(e,tp,eg,ep,ev,re,r,rp)
return (ev==tp or ev==PLAYER_ALL) and eg:IsContains(e:GetHandler())
return eg:IsExists(c9911267.cfilter,1,nil)
end
function c9911267.mvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,nil,nil) end
......
......@@ -13,8 +13,8 @@ function c9911268.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9911268,1))
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CUSTOM+9911268)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_MOVE)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c9911268.mvcon)
......@@ -22,31 +22,6 @@ function c9911268.initial_effect(c)
e2:SetTarget(c9911268.mvtg)
e2:SetOperation(c9911268.mvop)
c:RegisterEffect(e2)
if not c9911268.global_check then
c9911268.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_MOVE)
ge1:SetCondition(c9911268.regcon)
ge1:SetOperation(c9911268.regop)
Duel.RegisterEffect(ge1,0)
end
end
function c9911268.cfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsControler(tp)
and (c:GetPreviousSequence()~=c:GetSequence() or c:GetPreviousControler()~=tp)
end
function c9911268.regcon(e,tp,eg,ep,ev,re,r,rp)
local v=0
if eg:IsExists(c9911268.cfilter,1,nil,0) then v=v+1 end
if eg:IsExists(c9911268.cfilter,1,nil,1) then v=v+2 end
if v==0 then return false end
e:SetLabel(({0,1,PLAYER_ALL})[v])
return true
end
function c9911268.regop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,9911268)
Duel.RaiseEvent(g,EVENT_CUSTOM+9911268,re,r,rp,ep,e:GetLabel())
end
function c9911268.thfilter(c)
return c:IsSetCard(0x9956) and c:IsAbleToHand()
......@@ -151,8 +126,12 @@ function c9911268.clearop(e,tp,eg,ep,ev,re,r,rp)
if g then g:DeleteGroup() end
e:Reset()
end
function c9911268.cfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:IsPreviousLocation(LOCATION_MZONE)
and (c:GetPreviousSequence()~=c:GetSequence() or c:GetPreviousControler()~=c:GetControler())
end
function c9911268.mvcon(e,tp,eg,ep,ev,re,r,rp)
return (ev==tp or ev==PLAYER_ALL) and eg:IsContains(e:GetHandler())
return eg:IsExists(c9911268.cfilter,1,nil)
end
function c9911268.mvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -15,8 +15,8 @@ function c9911273.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9911273,0))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CUSTOM+9911273)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_MOVE)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c9911273.mvcon)
......@@ -24,31 +24,6 @@ function c9911273.initial_effect(c)
e2:SetTarget(c9911273.mvtg)
e2:SetOperation(c9911273.mvop)
c:RegisterEffect(e2)
if not c9911273.global_check then
c9911273.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_MOVE)
ge1:SetCondition(c9911273.regcon)
ge1:SetOperation(c9911273.regop)
Duel.RegisterEffect(ge1,0)
end
end
function c9911273.cfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsControler(tp)
and (c:GetPreviousSequence()~=c:GetSequence() or c:GetPreviousControler()~=tp)
end
function c9911273.regcon(e,tp,eg,ep,ev,re,r,rp)
local v=0
if eg:IsExists(c9911273.cfilter,1,nil,0) then v=v+1 end
if eg:IsExists(c9911273.cfilter,1,nil,1) then v=v+2 end
if v==0 then return false end
e:SetLabel(({0,1,PLAYER_ALL})[v])
return true
end
function c9911273.regop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,9911273)
Duel.RaiseEvent(g,EVENT_CUSTOM+9911273,re,r,rp,ep,e:GetLabel())
end
function c9911273.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0x9956) and c:IsControlerCanBeChanged()
......@@ -72,8 +47,12 @@ function c9911273.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.GetControl(tc,1-tp,PHASE_END,1)
end
end
function c9911273.cfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:IsPreviousLocation(LOCATION_MZONE)
and (c:GetPreviousSequence()~=c:GetSequence() or c:GetPreviousControler()~=c:GetControler())
end
function c9911273.mvcon(e,tp,eg,ep,ev,re,r,rp)
return (ev==tp or ev==PLAYER_ALL) and eg:IsContains(e:GetHandler())
return eg:IsExists(c9911273.cfilter,1,nil)
end
function c9911273.tdfilter(c)
return c:IsFaceup() and c:IsSetCard(0x9956) and c:IsAbleToDeck() and not c:IsCode(9911273)
......
......@@ -16,8 +16,8 @@ function c9911274.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9911274,0))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CUSTOM+9911274)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_MOVE)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c9911274.mvcon)
......@@ -25,31 +25,6 @@ function c9911274.initial_effect(c)
e2:SetTarget(c9911274.mvtg)
e2:SetOperation(c9911274.mvop)
c:RegisterEffect(e2)
if not c9911274.global_check then
c9911274.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_MOVE)
ge1:SetCondition(c9911274.regcon)
ge1:SetOperation(c9911274.regop)
Duel.RegisterEffect(ge1,0)
end
end
function c9911274.cfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsControler(tp)
and (c:GetPreviousSequence()~=c:GetSequence() or c:GetPreviousControler()~=tp)
end
function c9911274.regcon(e,tp,eg,ep,ev,re,r,rp)
local v=0
if eg:IsExists(c9911274.cfilter,1,nil,0) then v=v+1 end
if eg:IsExists(c9911274.cfilter,1,nil,1) then v=v+2 end
if v==0 then return false end
e:SetLabel(({0,1,PLAYER_ALL})[v])
return true
end
function c9911274.regop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,9911274)
Duel.RaiseEvent(g,EVENT_CUSTOM+9911274,re,r,rp,ep,e:GetLabel())
end
function c9911274.rmfilter(c)
return c:IsSetCard(0x9956) and c:IsAbleToRemoveAsCost()
......@@ -78,8 +53,12 @@ function c9911274.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end
end
function c9911274.cfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:IsPreviousLocation(LOCATION_MZONE)
and (c:GetPreviousSequence()~=c:GetSequence() or c:GetPreviousControler()~=c:GetControler())
end
function c9911274.mvcon(e,tp,eg,ep,ev,re,r,rp)
return (ev==tp or ev==PLAYER_ALL) and eg:IsContains(e:GetHandler())
return eg:IsExists(c9911274.cfilter,1,nil)
end
function c9911274.mvtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,nil,tp,POS_FACEDOWN)
......
......@@ -20,8 +20,8 @@ function c9911275.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9911275,0))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CUSTOM+9911275)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_MOVE)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c9911275.mvcon)
......@@ -29,31 +29,6 @@ function c9911275.initial_effect(c)
e2:SetTarget(c9911275.mvtg)
e2:SetOperation(c9911275.mvop)
c:RegisterEffect(e2)
if not c9911275.global_check then
c9911275.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_MOVE)
ge1:SetCondition(c9911275.regcon)
ge1:SetOperation(c9911275.regop)
Duel.RegisterEffect(ge1,0)
end
end
function c9911275.cfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsControler(tp)
and (c:GetPreviousSequence()~=c:GetSequence() or c:GetPreviousControler()~=tp)
end
function c9911275.regcon(e,tp,eg,ep,ev,re,r,rp)
local v=0
if eg:IsExists(c9911275.cfilter,1,nil,0) then v=v+1 end
if eg:IsExists(c9911275.cfilter,1,nil,1) then v=v+2 end
if v==0 then return false end
e:SetLabel(({0,1,PLAYER_ALL})[v])
return true
end
function c9911275.regop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,9911275)
Duel.RaiseEvent(g,EVENT_CUSTOM+9911275,re,r,rp,ep,e:GetLabel())
end
function c9911275.efffilter(c,e,tp,eg,ep,ev,re,r,rp)
if not (c:IsSetCard(0x9956) and c:IsType(TYPE_LINK) and c:IsFaceup()) then return false end
......@@ -93,8 +68,12 @@ function c9911275.copyop(e,tp,eg,ep,ev,re,r,rp)
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
function c9911275.cfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:IsPreviousLocation(LOCATION_MZONE)
and (c:GetPreviousSequence()~=c:GetSequence() or c:GetPreviousControler()~=c:GetControler())
end
function c9911275.mvcon(e,tp,eg,ep,ev,re,r,rp)
return (ev==tp or ev==PLAYER_ALL) and eg:IsContains(e:GetHandler())
return eg:IsExists(c9911275.cfilter,1,nil)
end
function c9911275.tgfilter(c)
return c:IsSetCard(0x9956) 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