Skip to content

Commit 5d0ff6f

Browse files
authored
Update c511000296.lua
1 parent 9347cc0 commit 5d0ff6f

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

unofficial/c511000296.lua

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ function s.initial_effect(c)
5454
e6:SetCode(EVENT_PHASE+PHASE_END)
5555
e6:SetRange(LOCATION_MZONE)
5656
e6:SetCountLimit(1)
57-
e6:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) and not Duel.HasFlagEffect(tp,id) end)
57+
e6:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) and not e:GetHandler():HasFlagEffect(id) end)
5858
e6:SetOperation(function(e) Duel.Win(e:GetHandlerPlayer(),WIN_REASON_NUMBER_iC1000) end)
5959
c:RegisterEffect(e6)
6060
--Once per turn, when this card is attacked: You can detach 1 material from this card; negate the attack, then gain LP equal to the attacking monster's ATK
@@ -69,25 +69,17 @@ function s.initial_effect(c)
6969
e7:SetTarget(s.negatktg)
7070
e7:SetOperation(s.negatkop)
7171
c:RegisterEffect(e7)
72-
--Check for attacks performed by the opponent
73-
aux.GlobalCheck(s,function()
74-
local ge1=Effect.CreateEffect(c)
75-
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
76-
ge1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
77-
ge1:SetCode(EVENT_ATTACK_ANNOUNCE)
78-
ge1:SetOperation(s.check)
79-
Duel.RegisterEffect(ge1,0)
80-
local ge2=ge1:Clone()
81-
Duel.RegisterEffect(ge2,1)
82-
end)
72+
--Register a flag on this card whenever it's selected as an attack target
73+
local e8=Effect.CreateEffect(c)
74+
e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
75+
e8:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
76+
e8:SetCode(EVENT_BE_BATTLE_TARGET)
77+
e8:SetOperation(function(e) e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end)
78+
c:RegisterEffect(e8)
8379
end
8480
s.listed_series={SET_NUMBER}
8581
s.listed_names={89477759} --"Number C1000: Numeronious"
8682
s.xyz_number=1000
87-
function s.check(e,tp,eg,ep,ev,re,r,rp)
88-
if Duel.IsTurnPlayer(tp) or Duel.GetFlagEffect(tp,id)>0 then return end
89-
Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1)
90-
end
9183
function s.cfilter(c,e,tp,xyz)
9284
return c:IsCode(89477759) and c:IsPreviousControler(tp) and c:IsReason(REASON_DESTROY)
9385
and c:IsCanBeXyzMaterial(xyz,tp) and (not e or c:IsRelateToEffect(e))

0 commit comments

Comments
 (0)