Skip to content

Commit c1fd942

Browse files
authored
Update "Necro Cycle"
- Should be able to Special Summon "Necro Mannequin" from hand as well as Deck - Added effect to destroy itself - Condition moved to activation as text specifies
1 parent c258259 commit c1fd942

1 file changed

Lines changed: 25 additions & 16 deletions

File tree

unofficial/c511000158.lua

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,56 @@
1+
--ネクリサイクル
12
--Necro Cycle
23
--scripted by UnknownGuest
34
local s,id=GetID()
45
function s.initial_effect(c)
5-
-- activate
6+
--Activate
67
local e1=Effect.CreateEffect(c)
78
e1:SetType(EFFECT_TYPE_ACTIVATE)
89
e1:SetCode(EVENT_FREE_CHAIN)
10+
e2:SetCondition(s.condition)
911
e1:SetHintTiming(0,TIMING_END_PHASE)
1012
c:RegisterEffect(e1)
11-
-- special summon
13+
--Special Summon 1 "Necro Mannquein" from your hand or Deck
1214
local e2=Effect.CreateEffect(c)
1315
e2:SetDescription(aux.Stringid(id,0))
1416
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
1517
e2:SetType(EFFECT_TYPE_QUICK_O)
16-
e2:SetCountLimit(1)
17-
e2:SetRange(LOCATION_SZONE)
1818
e2:SetCode(EVENT_FREE_CHAIN)
19-
e2:SetCondition(s.spcon)
19+
e2:SetRange(LOCATION_SZONE)
20+
e2:SetCountLimit(1)
2021
e2:SetTarget(s.sptg)
2122
e2:SetOperation(s.spop)
2223
c:RegisterEffect(e2)
24+
--Destroy this card if you do not control a "Necro Mannequin"
25+
local e1=Effect.CreateEffect(c)
26+
e1:SetType(EFFECT_TYPE_SINGLE)
27+
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
28+
e1:SetCode(EFFECT_SELF_DESTROY)
29+
e1:SetRange(LOCATION_SZONE)
30+
e1:SetCondition(s.sdcon)
31+
c:RegisterEffect(e1)
2332
end
24-
s.listed_names={511000157}
25-
function s.cfilter(c)
26-
return c:IsFaceup() and c:IsCode(511000157)
27-
end
28-
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
29-
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
33+
s.listed_names={511000157} --"Necro Mannequin"
34+
function s.condition(e,tp,eg,ep,ev,re,r,rp)
35+
return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,511000157),tp,LOCATION_MZONE,0,1,nil)
3036
end
31-
function s.filter(c,e,tp)
37+
function s.spfilter(c,e,tp)
3238
return c:IsCode(511000157) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
3339
end
3440
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
3541
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
36-
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
37-
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
42+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end
43+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK)
3844
end
3945
function s.spop(e,tp,eg,ep,ev,re,r,rp)
4046
if not e:GetHandler():IsRelateToEffect(e) then return end
4147
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
4248
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
43-
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
49+
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp)
4450
if #g>0 then
4551
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
4652
end
47-
end
53+
end
54+
function s.sdcon(e,tp,eg,ep,ev,re,r,rp)
55+
return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,511000157),tp,LOCATION_MZONE,0,1,nil)
56+
end

0 commit comments

Comments
 (0)