Commit ebfaf1b7 authored by mercury233's avatar mercury233

new cards SD34

parent 758a301a
--マイクロ・コーダー
function c2347477.initial_effect(c)
--hand link
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c2347477.matcon)
e1:SetValue(c2347477.matval)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCondition(c2347477.ctcon)
e2:SetOperation(c2347477.ctop)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(2347477,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCountLimit(1,2347477)
e3:SetCondition(c2347477.thcon)
e3:SetTarget(c2347477.thtg)
e3:SetOperation(c2347477.thop)
c:RegisterEffect(e3)
end
function c2347477.matcon(e)
return Duel.GetFlagEffect(e:GetHandlerPlayer(),2347477)==0
end
function c2347477.mfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:IsRace(RACE_CYBERSE)
end
function c2347477.matval(e,c,mg)
return c:IsSetCard(0x101) and mg:IsExists(c2347477.mfilter,1,nil)
end
function c2347477.ctcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND)
end
function c2347477.ctop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,2347477,RESET_PHASE+PHASE_END,0,1)
end
function c2347477.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
e:SetLabel(0)
if c:IsPreviousLocation(LOCATION_ONFIELD) then e:SetLabel(1) end
return c:IsLocation(LOCATION_GRAVE) and c:IsPreviousLocation(LOCATION_ONFIELD+LOCATION_HAND) and r==REASON_LINK and c:GetReasonCard():IsSetCard(0x101)
end
function c2347477.thfilter(c,chk)
return ((c:IsSetCard(0x118) and c:IsType(TYPE_SPELL+TYPE_TRAP)) or (chk==1 and c:IsRace(RACE_CYBERSE) and c:IsLevel(4))) and c:IsAbleToHand()
end
function c2347477.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c2347477.thfilter,tp,LOCATION_DECK,0,1,nil,e:GetLabel()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c2347477.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c2347477.thfilter,tp,LOCATION_DECK,0,1,1,nil,e:GetLabel())
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--スプール・コード
function c2625939.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c2625939.condition)
e1:SetOperation(c2625939.activate)
c:RegisterEffect(e1)
end
function c2625939.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:GetFirst():IsControler(1-tp) and Duel.GetAttackTarget()==nil
and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_GRAVE,0,3,nil,RACE_CYBERSE)
end
function c2625939.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),3)
if Duel.NegateAttack() and ft>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,2625940,0,0x4011,0,0,1,RACE_CYBERSE,ATTRIBUTE_LIGHT,POS_FACEUP_DEFENSE)
and Duel.SelectYesNo(tp,aux.Stringid(2625939,0)) then
Duel.BreakEffect()
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
repeat
local token=Duel.CreateToken(tp,2625940)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1,true)
ft=ft-1
until ft==0 or not Duel.SelectYesNo(tp,210)
Duel.SpecialSummonComplete()
end
end
--スワップリースト
function c30968774.initial_effect(c)
--reduce atk and draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(30968774,0))
e1:SetCategory(CATEGORY_DRAW+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetCountLimit(1,30968774)
e1:SetCondition(c30968774.drcon)
e1:SetTarget(c30968774.drtg)
e1:SetOperation(c30968774.drop)
c:RegisterEffect(e1)
--reg
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCondition(c30968774.drcon)
e2:SetOperation(c30968774.regop)
c:RegisterEffect(e2)
end
function c30968774.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_LINK
end
function c30968774.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local rc=e:GetHandler():GetReasonCard()
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and rc:IsAttackAbove(500) and rc:GetFlagEffect(30968774)~=0 end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c30968774.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
if not rc:IsAttackAbove(500) or rc:IsImmuneToEffect(e) or rc:GetFlagEffect(30968774)==0 then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1)
if not rc:IsHasEffect(EFFECT_REVERSE_UPDATE) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function c30968774.regop(e,tp,eg,ep,ev,re,r,rp)
local rc=e:GetHandler():GetReasonCard()
rc:RegisterFlagEffect(30968774,RESET_EVENT+RESETS_STANDARD,0,1)
end
--シューティングコード・トーカー
function c33897356.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_CYBERSE),2)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33897356,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c33897356.condition)
e1:SetTarget(c33897356.target)
e1:SetOperation(c33897356.operation)
c:RegisterEffect(e1)
--destroy reg
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetOperation(c33897356.regop)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(c33897356.drtg)
e3:SetOperation(c33897356.drop)
c:RegisterEffect(e3)
end
function c33897356.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c33897356.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetLinkedGroupCount()>0 end
end
function c33897356.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK_MONSTER)
e1:SetValue(e:GetHandler():GetLinkedGroupCount())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE)
c:RegisterEffect(e1)
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:SetCondition(c33897356.atkcon)
e2:SetValue(-400)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
end
end
function c33897356.atkcon(e)
if not Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL then return false end
local tp=e:GetHandlerPlayer()
local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE)
if #g~=1 then return false end
local c=e:GetHandler()
local bc=g:GetFirst()
return (c==Duel.GetAttacker() and bc==Duel.GetAttackTarget()) or (bc==Duel.GetAttacker() and c==Duel.GetAttackTarget())
end
function c33897356.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToBattle() then return end
local ct=c:GetFlagEffectLabel(33897356)
if ct then
c:SetFlagEffectLabel(33897356,ct+1)
else
c:RegisterFlagEffect(33897356,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,1)
end
end
function c33897356.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetHandler():GetFlagEffectLabel(33897356)
if chk==0 then return ct and Duel.IsPlayerCanDraw(tp,ct) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
end
function c33897356.drop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetHandler():GetFlagEffectLabel(33897356)
Duel.Draw(tp,ct,REASON_EFFECT)
end
--サイバネット・オプティマイズ
function c34010534.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(34010534,0))
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,34010534)
e2:SetTarget(c34010534.sumtg)
e2:SetOperation(c34010534.sumop)
c:RegisterEffect(e2)
--actlimit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(0,1)
e3:SetCondition(c34010534.actcon)
e3:SetValue(c34010534.aclimit)
c:RegisterEffect(e3)
end
function c34010534.sumfilter(c)
return c:IsRace(RACE_CYBERSE) and c:IsSummonable(true,nil)
end
function c34010534.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c34010534.sumfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c34010534.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c34010534.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c34010534.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c34010534.splimit(e,c)
return not c:IsRace(RACE_CYBERSE) and c:IsLocation(LOCATION_EXTRA)
end
function c34010534.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x101) and c:IsControler(tp)
end
function c34010534.actcon(e)
local tp=e:GetHandlerPlayer()
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
return (a and c34010534.cfilter(a,tp)) or (d and c34010534.cfilter(d,tp))
end
function c34010534.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
--レイテンシ
function c3560069.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(3560069,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_HAND)
e1:SetCountLimit(1,3560069)
e1:SetCondition(c3560069.spcon)
e1:SetTarget(c3560069.sptg)
e1:SetOperation(c3560069.spop)
c:RegisterEffect(e1)
end
function c3560069.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return bit.band(r,REASON_EFFECT)~=0 and c:IsPreviousLocation(LOCATION_GRAVE) and c:GetPreviousControler()==tp
end
function c3560069.sptg(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 c3560069.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(3560069,1))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetCountLimit(1,3560070)
e1:SetCondition(c3560069.drcon)
e1:SetTarget(c3560069.drtg)
e1:SetOperation(c3560069.drop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_LEAVE-RESET_TOGRAVE)
c:RegisterEffect(e1)
end
end
function c3560069.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_LINK
end
function c3560069.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c3560069.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--プロフィビット・スネーク
function c39732186.initial_effect(c)
--opp to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(39732186,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_START)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,39732186)
e1:SetCondition(c39732186.thcon)
e1:SetCost(c39732186.thcost)
e1:SetTarget(c39732186.thtg)
e1:SetOperation(c39732186.thop)
c:RegisterEffect(e1)
--GY to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(39732186,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYED)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,39732187)
e2:SetCondition(c39732186.thcon2)
e2:SetCost(c39732186.thcost2)
e2:SetTarget(c39732186.thtg2)
e2:SetOperation(c39732186.thop2)
c:RegisterEffect(e2)
end
function c39732186.thcon(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
local bc=Duel.GetAttackTarget()
if not bc then return false end
if tc:IsControler(1-tp) then tc,bc=bc,tc end
e:SetLabelObject(bc)
return tc:IsFaceup() and tc:IsRace(RACE_CYBERSE) and tc:IsType(TYPE_LINK)
end
function c39732186.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c39732186.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetLabelObject()
if chk==0 then return bc:IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,bc,1,0,0)
end
function c39732186.thop(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetLabelObject()
if bc:IsRelateToBattle() and bc:IsControler(1-tp) then
Duel.SendtoHand(bc,nil,REASON_EFFECT)
end
end
function c39732186.thcon2(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
local bc=tc:GetBattleTarget()
return eg:GetCount()==1 and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE)
and bc:IsRelateToBattle() and bc:IsControler(tp) and bc:IsRace(RACE_CYBERSE)
end
function c39732186.cfilter(c,tp)
return c:IsAbleToRemoveAsCost() and Duel.IsExistingTarget(c39732186.thfilter,tp,LOCATION_GRAVE,0,1,c)
end
function c39732186.thfilter(c)
return c:IsLevelBelow(4) and c:IsRace(RACE_CYBERSE) and c:IsAbleToHand()
end
function c39732186.thcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c39732186.cfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c39732186.cfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c39732186.thtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c39732186.thfilter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c39732186.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c39732186.thop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--サイバネット・コーデック
function c60018643.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60018643,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c60018643.thcon)
e2:SetTarget(c60018643.thtg)
e2:SetOperation(c60018643.thop)
c:RegisterEffect(e2)
if not c60018643.global_check then
c60018643.global_check=true
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e3:SetOperation(c60018643.clear)
Duel.RegisterEffect(e3,0)
end
end
c60018643.attlimit=0
function c60018643.clear(e,tp,eg,ep,ev,re,r,rp)
c60018643.attlimit=0
end
function c60018643.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x101) and c:IsControler(tp) and bit.band(c:GetSummonLocation(),LOCATION_EXTRA)~=0
end
function c60018643.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c60018643.cfilter,1,nil,tp)
end
function c60018643.tgfilter(c,tp,eg)
return eg:IsContains(c) and Duel.IsExistingMatchingCard(c60018643.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetAttribute())
end
function c60018643.thfilter(c,att)
local lim=c60018643.attlimit
return c:IsRace(RACE_CYBERSE) and c:IsAttribute(att) and (lim==0 or not c:IsAttribute(lim)) and c:IsAbleToHand()
end
function c60018643.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c60018643.tgfilter(chkc,tp,eg) end
if chk==0 then return Duel.IsExistingTarget(c60018643.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp,eg)
and Duel.GetFlagEffect(tp,60018643)==0 end
Duel.RegisterFlagEffect(tp,60018643,RESET_CHAIN,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c60018643.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,eg)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c60018643.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local att=tc:GetAttribute()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c60018643.thfilter,tp,LOCATION_DECK,0,1,1,nil,att)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
c60018643.attlimit=c60018643.attlimit+att
end
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c60018643.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c60018643.splimit(e,c)
return not c:IsRace(RACE_CYBERSE) and c:IsLocation(LOCATION_EXTRA)
end
--エルフェーズ
function c60292055.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c60292055.mfilter,2)
c:EnableReviveLimit()
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c60292055.atkval)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60292055,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,60292055)
e2:SetCondition(c60292055.spcon)
e2:SetTarget(c60292055.sptg)
e2:SetOperation(c60292055.spop)
c:RegisterEffect(e2)
end
function c60292055.mfilter(c)
return c:IsLevelAbove(3) and c:IsLinkRace(RACE_CYBERSE)
end
function c60292055.atkval(e,c)
return c:GetLinkedGroupCount()*300
end
function c60292055.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_LINK) and c:IsPreviousPosition(POS_FACEUP)
end
function c60292055.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsRace(RACE_CYBERSE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c60292055.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c60292055.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c60292055.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c60292055.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c60292055.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e3:SetValue(1)
tc:RegisterEffect(e3)
Duel.SpecialSummonComplete()
end
end
--サイバネット・コンフリクト
function c7403341.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,7403341+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c7403341.condition)
e1:SetTarget(c7403341.target)
e1:SetOperation(c7403341.activate)
c:RegisterEffect(e1)
end
function c7403341.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x101)
end
function c7403341.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c7403341.cfilter,tp,LOCATION_MZONE,0,1,nil)
and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
end
function c7403341.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsAbleToRemove() end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function c7403341.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
if Duel.NegateActivation(ev) and tc:IsRelateToEffect(re) and Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_REMOVED) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(c7403341.aclimit)
e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
end
function c7403341.aclimit(e,re,tp)
local c=re:GetHandler()
local tc=e:GetLabelObject()
return c:GetOriginalCode()==tc:GetOriginalCode() and not c:IsImmuneToEffect(e)
end
--コード・ラジエーター
--Code Radiator
--Script by nekrozar
function c75130221.initial_effect(c)
--hand link
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c75130221.matcon)
e1:SetValue(c75130221.matval)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCondition(c75130221.ctcon)
e2:SetOperation(c75130221.ctop)
c:RegisterEffect(e2)
--disable
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(75130221,0))
e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCountLimit(1,75130221)
e3:SetCondition(c75130221.discon)
e3:SetTarget(c75130221.distg)
e3:SetOperation(c75130221.disop)
c:RegisterEffect(e3)
end
function c75130221.matcon(e)
return Duel.GetFlagEffect(e:GetHandlerPlayer(),75130221)==0
end
function c75130221.mfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:IsRace(RACE_CYBERSE)
end
function c75130221.matval(e,c,mg)
return c:IsSetCard(0x101) and mg:IsExists(c75130221.mfilter,1,nil)
end
function c75130221.ctcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND)
end
function c75130221.ctop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,75130221,RESET_PHASE+PHASE_END,0,1)
end
function c75130221.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
e:SetLabel(0)
if c:IsPreviousLocation(LOCATION_ONFIELD) then e:SetLabel(1) end
return c:IsLocation(LOCATION_GRAVE) and c:IsPreviousLocation(LOCATION_ONFIELD+LOCATION_HAND) and r==REASON_LINK and c:GetReasonCard():IsSetCard(0x101)
end
function c75130221.disfilter(c)
return c:IsFaceup() and not (c:IsAttack(0) and c:IsDisabled())
end
function c75130221.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c75130221.disfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c75130221.disfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c75130221.disfilter,tp,0,LOCATION_MZONE,1,1+e:GetLabel(),nil)
end
function c75130221.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
for tc in aux.Next(g) do
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
end
end
--デフコンバード
function c76353872.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(76353872,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,76353872)
e1:SetCost(c76353872.spcost)
e1:SetTarget(c76353872.sptg)
e1:SetOperation(c76353872.spop)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(76353872,1))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BE_BATTLE_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c76353872.condition)
e2:SetTarget(c76353872.target)
e2:SetOperation(c76353872.opetation)
c:RegisterEffect(e2)
end
function c76353872.cfilter(c)
return c:IsRace(RACE_CYBERSE) and c:IsDiscardable()
end
function c76353872.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c76353872.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,c76353872.cfilter,1,1,REASON_COST+REASON_DISCARD,e:GetHandler())
end
function c76353872.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c76353872.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c76353872.condition(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttackTarget()
return at and at:IsControler(tp) and at:IsFaceup() and at:IsRace(RACE_CYBERSE)
end
function c76353872.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.GetAttackTarget():CreateEffectRelation(e)
end
function c76353872.opetation(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttackTarget()
if at:IsRelateToEffect(e) and at:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(at:GetBaseAttack()*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE)
at:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
e2:SetValue(at:GetBaseAttack()*2)
at:RegisterEffect(e2)
if at:IsAttackPos() and at:IsCanChangePosition() and Duel.SelectYesNo(tp,aux.Stringid(76353872,2)) then
Duel.BreakEffect()
Duel.ChangePosition(at,POS_FACEUP_DEFENSE)
end
end
end
--トークバック・ランサー
function c96380700.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c96380700.matfilter,1,1)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(96380700,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,96380700)
e1:SetCost(c96380700.spcost)
e1:SetTarget(c96380700.sptg)
e1:SetOperation(c96380700.spop)
c:RegisterEffect(e1)
end
function c96380700.matfilter(c)
return c:IsLevelBelow(2) and c:IsLinkRace(RACE_CYBERSE)
end
function c96380700.cfilter(c,e,tp,zone)
return c:IsRace(RACE_CYBERSE) and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_TOFIELD,zone)>0
and Duel.IsExistingTarget(c96380700.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c:GetOriginalCode())
end
function c96380700.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local zone=c:GetLinkedZone(tp)
if chk==0 then return Duel.CheckReleaseGroup(tp,c96380700.cfilter,1,c,e,tp,zone) end
local g=Duel.SelectReleaseGroup(tp,c96380700.cfilter,1,1,c,e,tp,zone)
Duel.Release(g,REASON_COST)
e:SetLabelObject(g:GetFirst())
end
function c96380700.spfilter(c,e,tp,code)
return c:IsSetCard(0x101) and c:GetOriginalCode()~=code and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c96380700.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local cc=e:GetLabelObject()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp)
and chkc~=cc and c96380700.spfilter(chkc,e,tp,cc:GetOriginalCode()) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c96380700.spfilter,tp,LOCATION_GRAVE,0,1,1,cc,e,tp,cc:GetOriginalCode())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c96380700.spop(e,tp,eg,ep,ev,re,r,rp)
local zone=e:GetHandler():GetLinkedZone(tp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone)
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