Commit 63e3db29 authored by Tachibana's avatar Tachibana

ybb

parent 1da28b0f
No preview for this file type
...@@ -21,14 +21,15 @@ function cm.initial_effect(c) ...@@ -21,14 +21,15 @@ function cm.initial_effect(c)
e3:SetCategory(CATEGORY_SUMMON) e3:SetCategory(CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMING_MAIN_END+TIMINGS_CHECK_MONSTER)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m+10000) e3:SetCountLimit(1,m+10000)
e3:SetCost(cm.cost) e3:SetCost(cm.cost)
e3:SetTarget(cm.tg) e3:SetTarget(cm.smtg)
e3:SetOperation(cm.op) e3:SetOperation(cm.op)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
--e1e2
function cm.thfilter(c) function cm.thfilter(c)
return c:IsAbleToHand() and ((rsva.IsSetST(c) and not c:IsType(TYPE_MONSTER)) or (c:IsRace(RACE_CYBERSE) and c:IsLevel(10))) return c:IsAbleToHand() and ((rsva.IsSetST(c) and not c:IsType(TYPE_MONSTER)) or (c:IsRace(RACE_CYBERSE) and c:IsLevel(10)))
end end
...@@ -44,18 +45,18 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,18 +45,18 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
--e3
function cm.smtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.sumfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,0)
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)
if chk==0 then return e:GetHandler():IsAbleToHandAsCost() end if chk==0 then return e:GetHandler():IsAbleToHandAsCost() end
Duel.SendtoHand(e:GetHandler(),nil,REASON_COST) Duel.SendtoHand(e:GetHandler(),nil,REASON_COST)
end end
function cm.sumfilter(c)
return c:IsRace(RACE_CYBERSE) and c:IsSummonable(true,nil)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 and Duel.IsExistingMatchingCard(cm.sumfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function cm.op(e,tp) function cm.op(e,tp)
if Duel.IsExistingMatchingCard(cm.sumfilter,tp,LOCATION_HAND,0,1,nil) then
local c=e:GetHandler() local c=e:GetHandler()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
...@@ -65,10 +66,10 @@ function cm.op(e,tp) ...@@ -65,10 +66,10 @@ function cm.op(e,tp)
e1:SetReset(RESET_PHASE+PHASE_END,1) e1:SetReset(RESET_PHASE+PHASE_END,1)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,cm.sumfilter,tp,LOCATION_HAND,0,1,1,nil) local sg=Duel.SelectMatchingCard(tp,cm.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst() if sg:GetCount()>0 then
if tc then Duel.Summon(tp,sg:GetFirst(),true,nil)
Duel.Summon(tp,tc,true,nil) end
end end
end end
function cm.descon(e,tp,eg,ep,ev,re,r,rp) function cm.descon(e,tp,eg,ep,ev,re,r,rp)
...@@ -76,7 +77,7 @@ function cm.descon(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,7 +77,7 @@ function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return rscon.excard2(rsva.filter_l,LOCATION_MZONE)(e,tp) and loc & LOCATION_MZONE ~=0 return rscon.excard2(rsva.filter_l,LOCATION_MZONE)(e,tp) and loc & LOCATION_MZONE ~=0
end end
function cm.desop(e,tp) function cm.desop(e,tp)
if Duel.GetFlagEffect(tp,m)==0 and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) if Duel.GetFlagEffect(tp,m)==0 and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(cm.sumfilter,tp,LOCATION_HAND,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(33200119,0))
then then
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
......
...@@ -82,7 +82,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -82,7 +82,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local fid=c:GetFieldID() local fid=c:GetFieldID()
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1,fid) tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1,fid)
tc:CompleteProcedure() tc:CompleteProcedure()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
......
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