Skip to content

Commit 6efb8ac

Browse files
authored
Update "Tachyon Chaos Hole (Anime)"
Use official setcode instead of unofficial
1 parent e00d46e commit 6efb8ac

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

unofficial/c511002774.lua

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
--時空混沌渦
2-
Duel.LoadScript("c420.lua")
1+
--時空混沌渦 (Anime)
2+
--Tachyon Chaos Hole (Anime)
33
local s,id=GetID()
44
function s.initial_effect(c)
5-
--banish
5+
--When a "Tachyon" monster you control is destroyed by battle: Banish all cards your opponent controls.
66
local e1=Effect.CreateEffect(c)
77
e1:SetDescription(aux.Stringid(59650656,0))
88
e1:SetCategory(CATEGORY_REMOVE)
@@ -17,19 +17,20 @@ function s.initial_effect(c)
1717
e2:SetDescription(aux.Stringid(59650656,1))
1818
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
1919
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
20+
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
2021
e2:SetCode(EVENT_PREDRAW)
2122
e2:SetRange(LOCATION_GRAVE)
22-
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
2323
e2:SetCondition(s.spcon)
2424
e2:SetTarget(s.sptg)
2525
e2:SetOperation(s.spop)
2626
c:RegisterEffect(e2)
2727
end
28-
function s.cfilter(c,tp)
29-
return c:IsTachyon() and c:IsPreviousControler(tp)
28+
s.listed_series={SET_TACHYON}
29+
function s.desfilter(c,tp)
30+
return c:IsMonster() and c:IsSetCard(SET_TACHYON) and c:IsPreviousControler(tp)
3031
end
3132
function s.descon(e,tp,eg,ep,ev,re,r,rp)
32-
return eg:IsExists(s.cfilter,1,nil,tp)
33+
return eg:IsExists(s.desfilter,1,nil,tp)
3334
end
3435
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
3536
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
@@ -41,11 +42,11 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
4142
Duel.Remove(g,POP_FACEUP,REASON_EFFECT)
4243
end
4344
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
44-
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
45+
return Duel.IsTurnPlayer(tp) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
4546
and Duel.GetDrawCount(tp)>0
4647
end
4748
function s.spfilter(c,e,tp)
48-
return c:IsTachyon() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
49+
return c:IsMonster() and c:IsSetCard(SET_TACHYON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
4950
end
5051
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
5152
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end
@@ -74,4 +75,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
7475
if _replace_count<=_replace_max and tc and tc:IsRelateToEffect(e) then
7576
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
7677
end
77-
end
78+
end

0 commit comments

Comments
 (0)