Commit 40eaeda7 authored by Tachibana's avatar Tachibana

ndyd

parent 100a840d
Pipeline #5041 passed with stages
in 20 minutes and 22 seconds
No preview for this file type
......@@ -7,23 +7,13 @@ function cm.initial_effect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SYNCHRO_LEVEL)
e1:SetRange(LOCATION_FZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(cm.tgtg)
e1:SetValue(cm.xyzlv)
c:RegisterEffect(e1)
local e2=e1:Clone()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_ONFIELD,0)
e2:SetCode(EFFECT_NONTUNER)
e2:SetValue(cm.tnval)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_ADD_TYPE)
e3:SetValue(TYPE_TUNER)
e3:SetTarget(cm.tg)
c:RegisterEffect(e3)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,2))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
......@@ -35,22 +25,20 @@ function cm.initial_effect(c)
e5:SetTarget(cm.atktg1)
e5:SetOperation(cm.atkop1)
c:RegisterEffect(e5)
end
function cm.tgtg(e,c)
return c:IsRace(RACE_CYBERSE)
end
function cm.xyzlv(e,c,rc)
local mc=e:GetHandler()
local lv=mc:GetLevel()
if mc:IsType(TYPE_LINK) then
lv=mc:GetLink()*2
end
return lv*65536+e:GetHandler():GetLevel()
--setcard
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetRange(LOCATION_FZONE)
e6:SetTargetRange(LOCATION_ONFIELD,0)
e6:SetCode(EFFECT_ADD_TYPE)
e6:SetValue(TYPE_TUNER)
e6:SetTarget(aux.TargetBoolFunction(cm.tg))
c:RegisterEffect(e6)
end
function cm.tnval(e,c)
return e:GetHandler():IsControler(c:GetControler())
return c:IsControler(e:GetHandler():GetControler())
end
function cm.tg(e,c)
function cm.tg(c)
return c:IsRace(RACE_CYBERSE) and c:IsLevelBelow(12)
end
......@@ -59,7 +47,7 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0):Filter(cm.cfilter,nil)
return g:GetCount()>0
end
function cm.cfilter(e)
function cm.cfilter(c)
return c:IsRace(RACE_CYBERSE) and c:IsType(TYPE_LINK)
end
function cm.spfilter1(c,e,tp)
......
......@@ -28,15 +28,17 @@ function cm.initial_effect(c)
c:RegisterEffect(e5)
end
function cm.tgtg(e,c)
return c:IsRace(RACE_CYBERSE)
return c:IsRace(RACE_CYBERSE) and c:IsType(TYPE_LINK)
end
function cm.xyzlv(e,c,rc)
local mc=e:GetHandler()
local mc=c
local lv=mc:GetLevel()
if mc:IsType(TYPE_LINK) then
lv=mc:GetLink()*2
return lv*65536
else
return c:GetLevel()
end
return lv*65536+e:GetHandler():GetLevel()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
......@@ -44,7 +46,7 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0):Filter(cm.cfilter,nil)
return g:GetCount()>0
end
function cm.cfilter(e)
function cm.cfilter(c)
return c:IsRace(RACE_CYBERSE) and c:IsType(TYPE_LINK)
end
function cm.spfilter1(c,e,tp)
......@@ -53,7 +55,7 @@ function cm.spfilter1(c,e,tp)
return c:IsRace(RACE_CYBERSE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(cm.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,mg,e,tp)
end
function cm.xyzfilter(c,mg,e,tp)
return c:IsType(TYPE_XYZ) and c:IsXyzSummonable(mg)
return c:IsType(TYPE_XYZ) and c:IsXyzSummonable(mg,1,mg:GetCount())
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end
function cm.atktg1(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -73,6 +75,6 @@ function cm.atkop1(e,tp,eg,ep,ev,re,r,rp)
if hg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=hg:Select(tp,1,1,nil)
Duel.XyzSummon(tp,sg:GetFirst(),mg)
Duel.XyzSummon(tp,sg:GetFirst(),mg,1,mg:GetCount())
end
end
\ No newline at end of file
......@@ -123,9 +123,9 @@ function c71400023.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_BANISH)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_BANISH)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0)
......
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