Commit f89d5a60 authored by nekrozar's avatar nekrozar Committed by mercury233

new (#898)

parent d8e77b4e
--サイバース・コンバーター
function c14505685.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,14505685)
e1:SetCondition(c14505685.sprcon)
c:RegisterEffect(e1)
--race
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(14505685,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(c14505685.rctg)
e2:SetOperation(c14505685.rcop)
c:RegisterEffect(e2)
end
function c14505685.cfilter(c)
return c:IsFacedown() or not c:IsRace(RACE_CYBERS)
end
function c14505685.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0
and not Duel.IsExistingMatchingCard(c14505685.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c14505685.rcfilter(c)
return c:IsFaceup() and not c:IsRace(RACE_CYBERS)
end
function c14505685.rctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c14505685.rcfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c14505685.rcfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c14505685.rcfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c14505685.rcop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetValue(RACE_CYBERS)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
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