Commit e3a55b28 authored by TanakaKotoha's avatar TanakaKotoha

lua and cdb fix

parent 6d6ae2a5
No preview for this file type
...@@ -17,8 +17,8 @@ function c14801017.initial_effect(c) ...@@ -17,8 +17,8 @@ function c14801017.initial_effect(c)
e2:SetDescription(aux.Stringid(14801017,4)) e2:SetDescription(aux.Stringid(14801017,4))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_DESTROYED) e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCountLimit(1,14801017) e2:SetCountLimit(1,14801017)
e2:SetCondition(c14801017.spcon2) e2:SetCondition(c14801017.spcon2)
e2:SetTarget(c14801017.sptg2) e2:SetTarget(c14801017.sptg2)
......
...@@ -34,8 +34,8 @@ function c14801025.initial_effect(c) ...@@ -34,8 +34,8 @@ function c14801025.initial_effect(c)
e3:SetDescription(aux.Stringid(14801025,1)) e3:SetDescription(aux.Stringid(14801025,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_DESTROYED) e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCountLimit(1,148010251) e3:SetCountLimit(1,148010251)
e3:SetCondition(c14801025.spcon2) e3:SetCondition(c14801025.spcon2)
e3:SetTarget(c14801025.sptg2) e3:SetTarget(c14801025.sptg2)
......
...@@ -42,8 +42,8 @@ function c14801028.initial_effect(c) ...@@ -42,8 +42,8 @@ function c14801028.initial_effect(c)
e4:SetDescription(aux.Stringid(14801028,2)) e4:SetDescription(aux.Stringid(14801028,2))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_DESTROYED) e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCountLimit(1,14801028) e4:SetCountLimit(1,14801028)
e4:SetCondition(c14801028.spcon2) e4:SetCondition(c14801028.spcon2)
e4:SetTarget(c14801028.sptg2) e4:SetTarget(c14801028.sptg2)
......
...@@ -37,8 +37,8 @@ function c14801039.initial_effect(c) ...@@ -37,8 +37,8 @@ function c14801039.initial_effect(c)
e5:SetDescription(aux.Stringid(14801039,1)) e5:SetDescription(aux.Stringid(14801039,1))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON) e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DELAY) e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e5:SetCode(EVENT_DESTROYED) e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetCountLimit(1,14801039) e5:SetCountLimit(1,14801039)
e5:SetCondition(c14801039.spcon2) e5:SetCondition(c14801039.spcon2)
e5:SetTarget(c14801039.sptg2) e5:SetTarget(c14801039.sptg2)
......
...@@ -20,8 +20,8 @@ function c14801052.initial_effect(c) ...@@ -20,8 +20,8 @@ function c14801052.initial_effect(c)
e3:SetDescription(aux.Stringid(14801052,2)) e3:SetDescription(aux.Stringid(14801052,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_DESTROYED) e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCountLimit(1,148010521) e3:SetCountLimit(1,148010521)
e3:SetCondition(c14801052.spcon2) e3:SetCondition(c14801052.spcon2)
e3:SetTarget(c14801052.sptg2) e3:SetTarget(c14801052.sptg2)
......
...@@ -31,8 +31,8 @@ function c14801053.initial_effect(c) ...@@ -31,8 +31,8 @@ function c14801053.initial_effect(c)
e3:SetDescription(aux.Stringid(14801053,2)) e3:SetDescription(aux.Stringid(14801053,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_DESTROYED) e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCountLimit(1,148010531) e3:SetCountLimit(1,148010531)
e3:SetCondition(c14801053.spcon2) e3:SetCondition(c14801053.spcon2)
e3:SetTarget(c14801053.sptg2) e3:SetTarget(c14801053.sptg2)
......
...@@ -25,8 +25,8 @@ function c14801066.initial_effect(c) ...@@ -25,8 +25,8 @@ function c14801066.initial_effect(c)
e3:SetDescription(aux.Stringid(14801066,2)) e3:SetDescription(aux.Stringid(14801066,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_DESTROYED) e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCountLimit(1,14801066) e3:SetCountLimit(1,14801066)
e3:SetCondition(c14801066.spcon2) e3:SetCondition(c14801066.spcon2)
e3:SetTarget(c14801066.sptg2) e3:SetTarget(c14801066.sptg2)
......
...@@ -104,7 +104,7 @@ function c21520067.rhop(e,tp,eg,ep,ev,re,r,rp) ...@@ -104,7 +104,7 @@ function c21520067.rhop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c21520067.rmfilter,tp,LOCATION_DECK,0,nil,LOCATION_DECK,e:GetHandlerPlayer()) local g=Duel.GetMatchingGroup(c21520067.rmfilter,tp,LOCATION_DECK,0,nil,LOCATION_DECK,e:GetHandlerPlayer())
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
local g2=Duel.SelectMatchingCard(tp,c21520067.ormfilter,tp,LOCATION_DECK,0,1,1,nil,sg:GetFirst():GetCode()) local g2=Duel.SelectMatchingCard(tp,c21520067.ormfilter,tp,LOCATION_DECK,0,1,1,nil,sg:GetFirst():GetCode())
sg:Merge(g2) sg:Merge(g2)
......
...@@ -88,7 +88,7 @@ function c33400008.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -88,7 +88,7 @@ function c33400008.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c33400008.mfilter(c) function c33400008.mfilter(c)
return c:IsLinkSetCard(0x3341) return c:IsLinkSetCard(0x341)
end end
function c33400008.afilter(c) function c33400008.afilter(c)
return c:IsSetCard(0x3340) and c:IsType(TYPE_QUICKPLAY) return c:IsSetCard(0x3340) and c:IsType(TYPE_QUICKPLAY)
......
--时崎狂三-暗影之主 --时崎狂三-暗影之主
function c33400009.initial_effect(c) function c33400009.initial_effect(c)
--link summon -link summon
aux.AddLinkProcedure(c,c33400009.mfilter,2) aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x341),2,99,c33400009.lcheck)
c:EnableReviveLimit() c:EnableReviveLimit()
--activate from hand --activate from hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -43,8 +43,8 @@ function c33400009.initial_effect(c) ...@@ -43,8 +43,8 @@ function c33400009.initial_effect(c)
e3:SetOperation(c33400009.desop) e3:SetOperation(c33400009.desop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c33400009.mfilter(c) function c33400009.lcheck(g)
return c:IsLinkSetCard(0x3341) return g:IsExists(Card.IsLinkSetCard,1,nil,0x3341)
end end
function c33400009.afilter(c) function c33400009.afilter(c)
return c:IsSetCard(0x3340) and c:IsType(TYPE_QUICKPLAY) return c:IsSetCard(0x3340) and c:IsType(TYPE_QUICKPLAY)
......
--时崎狂三-梦魇 --时崎狂三-梦魇
function c33400010.initial_effect(c) function c33400010.initial_effect(c)
--link summon --link summon
aux.AddLinkProcedure(c,c33400010.mfilter,2) aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x341),3,99,c33400010.lcheck)
c:EnableReviveLimit() c:EnableReviveLimit()
--activate from hand --activate from hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -59,8 +59,8 @@ function c33400010.initial_effect(c) ...@@ -59,8 +59,8 @@ function c33400010.initial_effect(c)
e5:SetLabelObject(e4) e5:SetLabelObject(e4)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c33400010.mfilter(c) function c33400010.lcheck(g)
return c:IsLinkSetCard(0x3341) return g:IsExists(Card.IsLinkSetCard,1,nil,0x3341)
end end
function c33400010.afilter(c) function c33400010.afilter(c)
return c:IsSetCard(0x3340) and c:IsType(TYPE_QUICKPLAY) return c:IsSetCard(0x3340) and c:IsType(TYPE_QUICKPLAY)
......
...@@ -38,11 +38,14 @@ function c33400014.dacon(e) ...@@ -38,11 +38,14 @@ function c33400014.dacon(e)
return e:GetHandler():GetOverlayCount()>0 return e:GetHandler():GetOverlayCount()>0
end end
function c33400014.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c33400014.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetLabel() local ft=0
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x34f,ct,REASON_COST) and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if e:GetHandler():GetFlagEffect(33401301)>0 then ft=1 end
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x34f,2,REASON_COST) and ((ft==1) or e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.RemoveCounter(tp,1,0,0x34f,ct,REASON_COST) Duel.RemoveCounter(tp,1,0,0x34f,2,REASON_COST)
if ft==0 then
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
end end
function c33400014.imop(e,tp,eg,ep,ev,re,r,rp) function c33400014.imop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -22,7 +22,6 @@ function c33400015.initial_effect(c) ...@@ -22,7 +22,6 @@ function c33400015.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,33400015+10000) e2:SetCountLimit(1,33400015+10000)
e2:SetLabel(2)
e2:SetCost(c33400015.spcost2) e2:SetCost(c33400015.spcost2)
e2:SetTarget(c33400015.sptg2) e2:SetTarget(c33400015.sptg2)
e2:SetOperation(c33400015.spop2) e2:SetOperation(c33400015.spop2)
...@@ -60,11 +59,14 @@ function c33400015.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,11 +59,14 @@ function c33400015.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c33400015.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) function c33400015.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetLabel() local ft=0
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x34f,ct,REASON_COST) and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if e:GetHandler():GetFlagEffect(33401301)>0 then ft=1 end
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x34f,2,REASON_COST) and ((ft==1) or e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.RemoveCounter(tp,1,0,0x34f,ct,REASON_COST) Duel.RemoveCounter(tp,1,0,0x34f,2,REASON_COST)
if ft==0 then
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
end end
function c33400015.spfilter2(c,e,tp) function c33400015.spfilter2(c,e,tp)
return c:IsSetCard(0x3341) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) return c:IsSetCard(0x3341) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
......
...@@ -69,8 +69,12 @@ function c33400207.descon(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,8 +69,12 @@ function c33400207.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x6342) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x6342)
end end
function c33400207.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c33400207.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end local ft=0
if e:GetHandler():GetFlagEffect(33401301)>0 then ft=1 end
if chk==0 then return ((ft==1) or e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)) end
if ft==0 then
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
end end
function c33400207.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c33400207.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
......
...@@ -55,8 +55,12 @@ function c33400208.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,8 +55,12 @@ function c33400208.tgop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c33400208.discost(e,tp,eg,ep,ev,re,r,rp,chk) function c33400208.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end local ft=0
if e:GetHandler():GetFlagEffect(33401301)>0 then ft=1 end
if chk==0 then return ((ft==1) or e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)) end
if ft==0 then
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
end end
function c33400208.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c33400208.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
......
...@@ -47,8 +47,12 @@ function c33400209.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,8 +47,12 @@ function c33400209.thop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c33400209.dmcost(e,tp,eg,ep,ev,re,r,rp,chk) function c33400209.dmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end local ft=0
if e:GetHandler():GetFlagEffect(33401301)>0 then ft=1 end
if chk==0 then return ((ft==1) or e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)) end
if ft==0 then
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
end end
function c33400209.dmop(e,tp,eg,ep,ev,re,r,rp) function c33400209.dmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
......
...@@ -34,8 +34,12 @@ function c33400313.ovfilter(c) ...@@ -34,8 +34,12 @@ function c33400313.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3343) and c:IsType(TYPE_RITUAL) return c:IsFaceup() and c:IsSetCard(0x3343) and c:IsType(TYPE_RITUAL)
end end
function c33400313.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c33400313.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end local ft=0
if e:GetHandler():GetFlagEffect(33401301)>0 then ft=1 end
if chk==0 then return ((ft==1) or e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)) end
if ft==0 then
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
end end
function c33400313.filter(c,e,tp) function c33400313.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
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