Skip to content

Commit

Permalink
Update "Cyber Network"
Browse files Browse the repository at this point in the history
Removed an incorrect flag that would cause its effect to be considered an effect that targets
  • Loading branch information
NaimSantos committed Nov 20, 2023
1 parent 583f500 commit 3510374
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions official/c12670770.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
--サイバー・ネットワーク
--Cyber Network

local s,id=GetID()
function s.initial_effect(c)
--Activate
Expand All @@ -14,7 +13,7 @@ function s.initial_effect(c)
--Banish 1 LIGHT machine monster from deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
Expand All @@ -36,7 +35,6 @@ function s.initial_effect(c)
c:RegisterEffect(e3)
end
s.listed_names={CARD_CYBER_DRAGON}

function s.filter2(c)
return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToRemove()
end
Expand All @@ -55,22 +53,22 @@ function s.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetCountLimit(1)
e1:SetCondition(s.sdescon)
e1:SetOperation(s.sdesop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,3)
e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,3)
c:RegisterEffect(e1)
c:SetTurnCounter(0)
if Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_CYBER_DRAGON),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_END,0,1)
c:RegisterFlagEffect(0,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,0))
end
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return e:GetHandler():GetFlagEffect(id)==0
and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_END,0,1)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetFlagEffect(id)==0 or not e:GetHandler():IsRelateToEffect(e) then return end
Expand Down Expand Up @@ -105,7 +103,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetCode(EFFECT_CANNOT_BP)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE|PHASE_END)
Duel.RegisterEffect(e1,tp)
aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,3),nil)
end
Expand All @@ -128,7 +126,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
tc:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
Expand Down

0 comments on commit 3510374

Please sign in to comment.