Commit 68a3de27 authored by mercury233's avatar mercury233

new cards ST19

parent baabcfa4
--デコード・トーカー・エクステンド
function c30822527.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2)
--Change Name
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1861629)
c:RegisterEffect(e1)
--Atk Up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c30822527.atkval)
c:RegisterEffect(e2)
--Double Attack
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BATTLE_DESTROYED)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c30822527.regcon)
e3:SetOperation(c30822527.regop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c30822527.regcon2)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(30822527,0))
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_CUSTOM+30822527)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(c30822527.atkcon)
e5:SetTarget(c30822527.atktg)
e5:SetOperation(c30822527.atkop)
c:RegisterEffect(e5)
end
function c30822527.atkval(e,c)
return c:GetLinkedGroupCount()*500
end
function c30822527.cfilter(c,tp,zone)
local seq=c:GetPreviousSequence()
if c:GetPreviousControler()~=tp then seq=seq+16 end
return c:IsPreviousLocation(LOCATION_MZONE) and bit.extract(zone,seq)~=0
end
function c30822527.regcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c30822527.cfilter,1,nil,tp,e:GetHandler():GetLinkedZone())
end
function c30822527.cfilter2(c,tp,zone)
return not c:IsReason(REASON_BATTLE) and c30822527.cfilter(c,tp,zone)
end
function c30822527.regcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c30822527.cfilter2,1,nil,tp,e:GetHandler():GetLinkedZone())
end
function c30822527.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+30822527,e,0,tp,0,0)
end
function c30822527.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
and Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE
end
function c30822527.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsHasEffect(EFFECT_EXTRA_ATTACK) end
end
function c30822527.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(1)
c:RegisterEffect(e1)
end
--スレッショルド・ボーグ
function c31944175.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c31944175.spcon)
e1:SetOperation(c31944175.spop)
c:RegisterEffect(e1)
--atk down
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetValue(-500)
c:RegisterEffect(e2)
end
function c31944175.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_CYBERSE) and c:IsDiscardable()
end
function c31944175.spcon(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 Duel.IsExistingMatchingCard(c31944175.cfilter,tp,LOCATION_HAND,0,1,c)
end
function c31944175.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c31944175.cfilter,tp,LOCATION_HAND,0,1,1,c)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
--フリップ・フローズン
function c32176662.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(c32176662.postg)
e1:SetOperation(c32176662.posop)
c:RegisterEffect(e1)
end
function c32176662.filter(c)
return c:IsAttackPos() and c:IsCanChangePosition()
end
function c32176662.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c32176662.filter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c32176662.filter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function c32176662.posop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c32176662.filter,tp,0,LOCATION_MZONE,nil)
Duel.ChangePosition(g,POS_FACEUP_DEFENSE)
end
--サイバネット・カスケード
function c4433488.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c4433488.target)
e1:SetOperation(c4433488.activate)
c:RegisterEffect(e1)
end
function c4433488.cfilter(c)
return c:IsType(TYPE_LINK) and c:IsSummonType(SUMMON_TYPE_LINK)
end
function c4433488.spfilter(c,e,tp,g)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and g and g:IsContains(c)
end
function c4433488.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local lc=eg:Filter(c4433488.cfilter,nil):GetFirst()
if chkc then return chkc:IsControler(tp) and c4433488.spfilter(chkc,e,tp,lc:GetMaterial()) end
if chk==0 then return lc and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c4433488.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,lc:GetMaterial()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c4433488.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,lc:GetMaterial())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c4433488.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--リビルディア
function c4550066.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(4550066,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(aux.bdocon)
e1:SetTarget(c4550066.sptg)
e1:SetOperation(c4550066.spop)
c:RegisterEffect(e1)
end
function c4550066.spfilter(c,e,tp)
return c:IsRace(RACE_CYBERSE) and c:IsAttackBelow(1500) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c4550066.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c4550066.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c4550066.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c4550066.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c4550066.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--トラックブラック
function c66226132.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,2)
c:EnableReviveLimit()
--Draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(66226132,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,66226132)
e1:SetTarget(c66226132.target)
e1:SetOperation(c66226132.operation)
c:RegisterEffect(e1)
end
function c66226132.tgfilter(c,lg)
return lg:IsContains(c)
end
function c66226132.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local lg=e:GetHandler():GetLinkedGroup()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c66226132.tgfilter(chkc,lg) end
if chk==0 then return Duel.IsExistingTarget(c66226132.tgfilter,tp,LOCATION_MZONE,0,1,nil,lg) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c66226132.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,lg)
end
function c66226132.operation(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
tc:RegisterFlagEffect(66226132,RESET_EVENT+0x1220000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(66226132,1))
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetLabelObject(tc)
e1:SetCondition(c66226132.drcon)
e1:SetOperation(c66226132.drop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c66226132.drcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return eg:IsContains(tc) and tc:GetFlagEffect(66226132)~=0
end
function c66226132.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,66226132)
Duel.Draw(tp,1,REASON_EFFECT)
end
--サイバネット・クロスワイプ
function c77449773.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(c77449773.cost)
e1:SetTarget(c77449773.target)
e1:SetOperation(c77449773.activate)
c:RegisterEffect(e1)
end
function c77449773.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c77449773.desfilter(c,tc,ec)
return c:GetEquipTarget()~=tc and c~=ec
end
function c77449773.costfilter(c,ec,tp)
return c:IsRace(RACE_CYBERSE) and Duel.IsExistingTarget(c77449773.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,c,ec)
end
function c77449773.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsOnField() end
if chk==0 then
if e:GetLabel()==1 then
e:SetLabel(0)
return Duel.CheckReleaseGroup(tp,c77449773.costfilter,1,c,c,tp)
else
return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
end
end
if e:GetLabel()==1 then
e:SetLabel(0)
local sg=Duel.SelectReleaseGroup(tp,c77449773.costfilter,1,1,c,c,tp)
Duel.Release(sg,REASON_COST)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c77449773.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--ドライブレイブ
function c78161361.initial_effect(c)
--pierce
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetDescription(aux.Stringid(78161361,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c78161361.atkcon)
e1:SetCost(c78161361.atkcost)
e1:SetTarget(c78161361.atktg)
e1:SetOperation(c78161361.atkop)
c:RegisterEffect(e1)
end
function c78161361.atkcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
return a:IsControler(tp) and a:IsRace(RACE_CYBERSE)
end
function c78161361.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsDiscardable()
end
function c78161361.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c78161361.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c78161361.cfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c78161361.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.GetAttacker():CreateEffectRelation(e)
end
function c78161361.atkop(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
if a:IsRelateToEffect(e) and a:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(600)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
a: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