Commit 28c7d722 authored by Nemo Ma's avatar Nemo Ma

fix

parent 8c6af081
...@@ -115,7 +115,7 @@ function cm.fdtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -115,7 +115,7 @@ function cm.fdtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return cm.Chrono(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m) return (cm.Chrono(c) or c:IsSetCard(0x126)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m)
end end
function cm.fdop(e,tp,eg,ep,ev,re,r,rp) function cm.fdop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
......
...@@ -37,13 +37,13 @@ function cm.initial_effect(c) ...@@ -37,13 +37,13 @@ function cm.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.mfilter(c) function cm.mfilter(c)
return cm.Chrono(c) and c:IsType(TYPE_MONSTER) return (cm.Chrono(c) or c:IsSetCard(0x126)) and c:IsType(TYPE_MONSTER)
end end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp) function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end end
function cm.thfilter(c) function cm.thfilter(c)
return cm.Chrono(c) and c:IsAbleToHand() return (cm.Chrono(c) or c:IsSetCard(0x126)) and c:IsAbleToHand()
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -115,7 +115,7 @@ function cm.fdtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -115,7 +115,7 @@ function cm.fdtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return cm.Chrono(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m) return (cm.Chrono(c) or c:IsSetCard(0x126)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m)
end end
function cm.fdop(e,tp,eg,ep,ev,re,r,rp) function cm.fdop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
......
...@@ -47,7 +47,7 @@ function cm.initial_effect(c) ...@@ -47,7 +47,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.mfilter(c) function cm.mfilter(c)
return cm.Chrono(c) and c:IsType(TYPE_MONSTER) return (cm.Chrono(c) or c:IsSetCard(0x126)) and c:IsType(TYPE_MONSTER)
end end
function cm.tdcon(e,tp,eg,ep,ev,re,r,rp) function cm.tdcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
...@@ -57,10 +57,10 @@ function cm.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -57,10 +57,10 @@ function cm.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
return true return true
end end
function cm.costfilter(c) function cm.costfilter(c)
return cm.Chrono(c) and c:IsAbleToRemoveAsCost() return (cm.Chrono(c) or c:IsSetCard(0x126)) and c:IsAbleToRemoveAsCost()
end end
function cm.setfilter(c,tp) function cm.setfilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and cm.Chrono(c) and not c:IsCode(m) return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and (cm.Chrono(c) or c:IsSetCard(0x126)) and not c:IsCode(m)
and not c:IsForbidden() and c:CheckUniqueOnField(tp) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
...@@ -55,7 +55,7 @@ function cm.initial_effect(c) ...@@ -55,7 +55,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function cm.mfilter(c) function cm.mfilter(c)
return cm.Chrono(c) and c:IsType(TYPE_MONSTER) return (cm.Chrono(c) or c:IsSetCard(0x126)) and c:IsType(TYPE_MONSTER)
end end
function cm.fncon1(e,tp,eg,ep,ev,re,r,rp) function cm.fncon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,40008477) return not Duel.IsPlayerAffectedByEffect(tp,40008477)
...@@ -65,7 +65,7 @@ function cm.fncon2(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,7 +65,7 @@ function cm.fncon2(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.costfilter(c) function cm.costfilter(c)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
and cm.Chrono(c) and (cm.Chrono(c) or c:IsSetCard(0x126))
and c:IsAbleToRemoveAsCost() and c:IsAbleToRemoveAsCost()
end end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -79,7 +79,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -79,7 +79,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 end if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 end
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return cm.Chrono(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return (cm.Chrono(c) or c:IsSetCard(0x126)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=4 then return end if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=4 then return end
......
...@@ -108,7 +108,7 @@ function cm.fdcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -108,7 +108,7 @@ function cm.fdcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsLocation(LOCATION_GRAVE) and r==REASON_FUSION return c:IsLocation(LOCATION_GRAVE) and r==REASON_FUSION
end end
function cm.tffilter(c,tp) function cm.tffilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and cm.Chrono(c) and not c:IsCode(m) return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and (cm.Chrono(c) or c:IsSetCard(0x126)) and not c:IsCode(m)
and not c:IsForbidden() and c:CheckUniqueOnField(tp) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end end
function cm.fdtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.fdtg(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -116,7 +116,7 @@ function cm.fdtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -116,7 +116,7 @@ function cm.fdtg(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsExistingMatchingCard(cm.tffilter,tp,LOCATION_DECK,0,1,nil,tp) end and Duel.IsExistingMatchingCard(cm.tffilter,tp,LOCATION_DECK,0,1,nil,tp) end
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return cm.Chrono(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m) return (cm.Chrono(c) or c:IsSetCard(0x126)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m)
end end
function cm.fdop(e,tp,eg,ep,ev,re,r,rp) function cm.fdop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
......
...@@ -109,14 +109,14 @@ function cm.fdcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -109,14 +109,14 @@ function cm.fdcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsLocation(LOCATION_GRAVE) and r==REASON_FUSION return c:IsLocation(LOCATION_GRAVE) and r==REASON_FUSION
end end
function cm.tffilter(c) function cm.tffilter(c)
return cm.Chrono(c) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(m) return (cm.Chrono(c) or c:IsSetCard(0x126)) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(m)
end end
function cm.fdtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.fdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tffilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.tffilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return cm.Chrono(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m) return (cm.Chrono(c) or c:IsSetCard(0x126)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m)
end end
function cm.fdop(e,tp,eg,ep,ev,re,r,rp) function cm.fdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -43,7 +43,7 @@ function cm.initial_effect(c) ...@@ -43,7 +43,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.mfilter(c) function cm.mfilter(c)
return cm.Chrono(c) and c:IsType(TYPE_MONSTER) return (cm.Chrono(c) or c:IsSetCard(0x126)) and c:IsType(TYPE_MONSTER)
end end
function cm.fncon1(e,tp,eg,ep,ev,re,r,rp) function cm.fncon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,40008477) return not Duel.IsPlayerAffectedByEffect(tp,40008477)
...@@ -58,7 +58,7 @@ function cm.spfilter1(c,e,tp) ...@@ -58,7 +58,7 @@ function cm.spfilter1(c,e,tp)
end end
function cm.spfilter2(c,e,tp,clv) function cm.spfilter2(c,e,tp,clv)
local lv=c:GetLevel() local lv=c:GetLevel()
return lv>0 and cm.Chrono(c) and math.abs(clv-lv)==1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return lv>0 and (cm.Chrono(c) or c:IsSetCard(0x126)) and math.abs(clv-lv)==1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and cm.spfilter1(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and cm.spfilter1(chkc,e,tp) end
......
...@@ -113,7 +113,7 @@ function cm.fdtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -113,7 +113,7 @@ function cm.fdtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3) Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return cm.Chrono(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m) return (cm.Chrono(c) or c:IsSetCard(0x126)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m)
end end
function cm.fdop(e,tp,eg,ep,ev,re,r,rp) function cm.fdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -113,7 +113,7 @@ function cm.fdtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -113,7 +113,7 @@ function cm.fdtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3) Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return cm.Chrono(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m) return (cm.Chrono(c) or c:IsSetCard(0x126)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m)
end end
function cm.fdop(e,tp,eg,ep,ev,re,r,rp) function cm.fdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -108,7 +108,7 @@ function cm.fdcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -108,7 +108,7 @@ function cm.fdcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsLocation(LOCATION_GRAVE) and r==REASON_FUSION return c:IsLocation(LOCATION_GRAVE) and r==REASON_FUSION
end end
function cm.tffilter(c,tp) function cm.tffilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and cm.Chrono(c) and not c:IsCode(m) return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and (cm.Chrono(c) or c:IsSetCard(0x126)) and not c:IsCode(m)
and not c:IsForbidden() and c:CheckUniqueOnField(tp) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end end
function cm.fdtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.fdtg(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -116,7 +116,7 @@ function cm.fdtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -116,7 +116,7 @@ function cm.fdtg(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsExistingMatchingCard(cm.tffilter,tp,LOCATION_GRAVE,0,1,nil,tp) end and Duel.IsExistingMatchingCard(cm.tffilter,tp,LOCATION_GRAVE,0,1,nil,tp) end
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return cm.Chrono(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m) return (cm.Chrono(c) or c:IsSetCard(0x126)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m)
end end
function cm.fdop(e,tp,eg,ep,ev,re,r,rp) function cm.fdop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
......
...@@ -109,7 +109,7 @@ function cm.fdcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -109,7 +109,7 @@ function cm.fdcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsLocation(LOCATION_GRAVE) and r==REASON_FUSION return c:IsLocation(LOCATION_GRAVE) and r==REASON_FUSION
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return cm.Chrono(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m) return (cm.Chrono(c) or c:IsSetCard(0x126)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m)
end end
function cm.fdtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.fdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -34,13 +34,72 @@ function cm.initial_effect(c) ...@@ -34,13 +34,72 @@ function cm.initial_effect(c)
e3:SetCost(cm.cost) e3:SetCost(cm.cost)
e3:SetTarget(cm.target) e3:SetTarget(cm.target)
e3:SetOperation(cm.operation) e3:SetOperation(cm.operation)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,19891131)
e4:SetCondition(cm.spcon1)
e4:SetCost(cm.spcost1)
e4:SetTarget(cm.sptg1)
e4:SetOperation(cm.spop1)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e5:SetRange(LOCATION_SZONE)
e5:SetTargetRange(LOCATION_MZONE,0)
e5:SetTarget(aux.TargetBoolFunction(Card.IsCode,19891131))
e5:SetLabelObject(e4)
c:RegisterEffect(e5)
--remove
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(m,2))
e6:SetCategory(CATEGORY_REMOVE)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetProperty(EFFECT_FLAG_CARD_TARGET)
e6:SetRange(LOCATION_MZONE)
e6:SetCountLimit(1,52083044)
e6:SetCost(cm.rmcost1)
e6:SetTarget(cm.rmtg1)
e6:SetOperation(cm.rmop1)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e7:SetRange(LOCATION_SZONE)
e7:SetTargetRange(LOCATION_MZONE,0)
e7:SetTarget(aux.TargetBoolFunction(Card.IsCode,52083044))
e7:SetLabelObject(e6)
c:RegisterEffect(e7)
--special summon
local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(m,3))
e8:SetCategory(CATEGORY_SPECIAL_SUMMON)
e8:SetType(EFFECT_TYPE_QUICK_O)
e8:SetCode(EVENT_FREE_CHAIN)
e8:SetRange(LOCATION_HAND)
e8:SetCountLimit(1,56308388)
e8:SetCost(cm.spcost2)
e8:SetTarget(cm.sptg2)
e8:SetOperation(cm.spop2)
c:RegisterEffect(e8)
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e9:SetRange(LOCATION_SZONE)
e9:SetTargetRange(LOCATION_HAND,0)
e9:SetTarget(aux.TargetBoolFunction(Card.IsCode,56308388))
e9:SetLabelObject(e8)
c:RegisterEffect(e9)
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
return aux.exccon(e) and e:GetHandler():IsFaceup() return aux.exccon(e) and e:GetHandler():IsFaceup()
end end
function cm.tdfilter(c) function cm.tdfilter(c)
return cm.Chrono(c) and c:IsAbleToDeck() and c:IsFaceup() return (cm.Chrono(c) or c:IsSetCard(0x126)) and c:IsAbleToDeck() and c:IsFaceup()
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -69,4 +128,81 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,4 +128,81 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
end
function cm.spcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==1
end
function cm.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST+REASON_RELEASE)
end
function cm.spfilter1(c,e,tp)
return c:IsSetCard(0x126) and not c:IsCode(19891131) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetMatchingGroup(cm.spfilter1,tp,LOCATION_DECK,0,nil,e,tp)
return Duel.GetMZoneCount(tp,e:GetHandler())>=2 and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and g:GetClassCount(Card.GetCode)>=2
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK)
end
function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
local g=Duel.GetMatchingGroup(cm.spfilter1,tp,LOCATION_DECK,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,2,2)
if sg then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
function cm.rmcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function cm.rmtg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function cm.rmop1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
tc:RegisterFlagEffect(52083044,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(tc)
e1:SetCountLimit(1)
e1:SetCondition(cm.retcon1)
e1:SetOperation(cm.retop1)
Duel.RegisterEffect(e1,tp)
end
end
function cm.retcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():GetFlagEffect(52083044)~=0
end
function cm.retop1(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
function cm.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) end
Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST)
end
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end end
\ No newline at end of file
...@@ -43,7 +43,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -43,7 +43,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.chainop(e,tp,eg,ep,ev,re,r,rp) function cm.chainop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
if cm.Chrono(rc) and re:IsActiveType(TYPE_MONSTER) and ep==tp then if (cm.Chrono(rc) or re:GetHandler():IsSetCard(0x126)) and re:IsActiveType(TYPE_MONSTER) and ep==tp then
Duel.SetChainLimit(cm.chainlm) Duel.SetChainLimit(cm.chainlm)
end end
end end
...@@ -51,10 +51,10 @@ function cm.chainlm(e,rp,tp) ...@@ -51,10 +51,10 @@ function cm.chainlm(e,rp,tp)
return tp==rp return tp==rp
end end
function cm.tdfilter(c) function cm.tdfilter(c)
return cm.Chrono(c) and c:IsAbleToDeck() and c:IsFaceup() return (cm.Chrono(c) or c:IsSetCard(0x126)) and c:IsAbleToDeck() and c:IsFaceup()
end end
function cm.thfilter(c) function cm.thfilter(c)
return cm.Chrono(c) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return (cm.Chrono(c) or c:IsSetCard(0x126)) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_REMOVED,0,nil) local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_REMOVED,0,nil)
......
...@@ -96,10 +96,10 @@ function cm.chainlm(e,rp,tp) ...@@ -96,10 +96,10 @@ function cm.chainlm(e,rp,tp)
return tp==rp return tp==rp
end end
function cm.tdfilter(c) function cm.tdfilter(c)
return cm.Chrono(c) and c:IsAbleToDeck() and c:IsFaceup() return (cm.Chrono(c) or c:IsSetCard(0x126)) and c:IsAbleToDeck() and c:IsFaceup()
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return cm.Chrono(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) return (cm.Chrono(c) or c:IsSetCard(0x126)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_REMOVED,0,nil) local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_REMOVED,0,nil)
......
...@@ -46,7 +46,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -46,7 +46,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_COST) Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_COST)
end end
function cm.target1(e,c) function cm.target1(e,c)
return cm.Chrono(c) return (cm.Chrono(c) or c:IsSetCard(0x126))
end end
function cm.indct(e,re,r,rp) function cm.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then
...@@ -54,7 +54,7 @@ function cm.indct(e,re,r,rp) ...@@ -54,7 +54,7 @@ function cm.indct(e,re,r,rp)
else return 0 end else return 0 end
end end
function cm.tdfilter(c) function cm.tdfilter(c)
return cm.Chrono(c) and c:IsAbleToDeck() and c:IsFaceup() return (cm.Chrono(c) or c:IsSetCard(0x126)) and c:IsAbleToDeck() and c:IsFaceup()
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_REMOVED,0,nil) local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_REMOVED,0,nil)
......
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