Skip to content

Commit fd67294

Browse files
authored
"Straight out of Neo Space!" script updates
1 parent 1d1044b commit fd67294

File tree

1 file changed

+29
-52
lines changed

1 file changed

+29
-52
lines changed

skill/c300308001.lua

Lines changed: 29 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@
33
local s,id=GetID()
44
function s.initial_effect(c)
55
aux.AddSkillProcedure(c,2,false,nil,nil)
6-
--Flip this card over at the start of the Duel
6+
--At the start of the Duel, flip this card over
77
local e1=Effect.CreateEffect(c)
8-
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
98
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
9+
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
1010
e1:SetCode(EVENT_STARTUP)
1111
e1:SetCountLimit(1)
1212
e1:SetRange(0x5f)
13-
e1:SetLabel(0)
1413
e1:SetOperation(s.flipop)
1514
c:RegisterEffect(e1)
1615
end
@@ -20,82 +19,60 @@ function s.flipop(e,tp,eg,ep,ev,re,r,rp)
2019
Duel.Hint(HINT_SKILL_FLIP,tp,id|(1<<32))
2120
Duel.Hint(HINT_CARD,tp,id)
2221
local c=e:GetHandler()
23-
--Special Summon 1 "Elemental HERO Neos" from your hand
22+
--If only your opponent controls a monster, you can Special Summon 1 "Elemental HERO Neos" from your hand, also for the rest of this turn, you cannot Special Summon, except "Elemental HERO" or "Neo-Spacian" monsters
2423
local e1=Effect.CreateEffect(c)
2524
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
2625
e1:SetCode(EVENT_FREE_CHAIN)
27-
e1:SetRange(0x5f)
28-
e1:SetCondition(s.spcon1)
29-
e1:SetOperation(s.spop1)
26+
e1:SetCountLimit(1,{id,0},EFFECT_COUNT_CODE_DUEL)
27+
e1:SetCondition(s.handspcon)
28+
e1:SetOperation(s.handspop)
3029
Duel.RegisterEffect(e1,tp)
31-
--Special Summon 1 "Elemental HERO Neos" from your Deck
30+
--During your End Phase, if a Fusion Monster you control is returned to your Extra Deck, you can Special Summon 1 "Elemental HERO Neos" from your Deck
3231
local e2=Effect.CreateEffect(c)
3332
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
34-
e2:SetCode(EVENT_PHASE+PHASE_END)
35-
e2:SetRange(0x5f)
36-
e2:SetCondition(s.spcon2)
37-
e2:SetOperation(s.spop2)
33+
e2:SetCode(EVENT_TO_DECK)
34+
e2:SetCountLimit(1,{id,1},EFFECT_COUNT_CODE_DUEL)
35+
e2:SetCondition(s.deckspcon)
36+
e2:SetOperation(s.deckspop)
3837
Duel.RegisterEffect(e2,tp)
39-
--Check for Fusion Monsters returning to the Extra Deck
40-
aux.GlobalCheck(s,function()
41-
local ge1=Effect.CreateEffect(e:GetHandler())
42-
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
43-
ge1:SetCode(EVENT_TO_DECK)
44-
ge1:SetCondition(function(_,tp) return Duel.IsTurnPlayer(tp) and Duel.GetCurrentPhase()==PHASE_END end)
45-
ge1:SetOperation(s.checkop)
46-
Duel.RegisterEffect(ge1,0)
47-
local ge2=Effect.CreateEffect(e:GetHandler())
48-
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
49-
ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
50-
ge2:SetCondition(s.resetflagcon)
51-
ge2:SetOperation(function(_,tp) Duel.ResetFlagEffect(tp,id) end)
52-
Duel.RegisterEffect(ge2,0)
53-
end)
5438
end
55-
--Checks for Fusion Monsters to be returned to the Extra Deck
56-
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
57-
if eg:IsExists(Card.IsType,1,nil,TYPE_FUSION) and #eg==1 and eg:GetFirst():IsLocation(LOCATION_EXTRA) then
58-
Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1)
59-
end
60-
end
61-
--Checks for "Elemental HERO Neos" Special Summoned by this Skill
62-
function s.resetflagcon(e,tp,eg,ep,ev,re,r,rp)
63-
return eg:GetFirst():IsOriginalCode(CARD_NEOS) and re and re:GetHandler():IsCode(id)
64-
end
65-
--"Elemental HERO Neos" Special Summon filter
6639
function s.spfilter(c,e,tp)
6740
return c:IsCode(CARD_NEOS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
6841
end
69-
--Special Summon from hand functions
70-
function s.spcon1(e,tp,eg,ep,ev,re,r,rp)
71-
return aux.CanActivateSkill(tp) and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
42+
function s.handspcon(e,tp,eg,ep,ev,re,r,rp)
43+
return aux.CanActivateSkill(tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
44+
and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
45+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
7246
end
73-
function s.spop1(e,tp,eg,ep,ev,re,r,rp)
47+
function s.handspop(e,tp,eg,ep,ev,re,r,rp)
7448
if not Duel.SelectYesNo(tp,aux.Stringid(id,0)) then return end
75-
--Special Summon 1 "Elemental HERO Neos" from your hand
49+
Duel.Hint(HINT_CARD,0,id)
7650
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
7751
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
7852
if #g>0 then
7953
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
8054
end
81-
--Cannot Special Summon, except "Elemental HERO" and "Neo-Spacian" monsters, until the End Phase
55+
--For the rest of this turn, you cannot Special Summon, except "Elemental HERO" or "Neo-Spacian" monsters
8256
local e1=Effect.CreateEffect(e:GetHandler())
83-
e1:SetDescription(aux.Stringid(id,2))
57+
e1:SetDescription(aux.Stringid(id,1))
8458
e1:SetType(EFFECT_TYPE_FIELD)
8559
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
8660
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
8761
e1:SetTargetRange(1,0)
88-
e1:SetTarget(function(_,c) return not (c:IsSetCard(SET_ELEMENTAL_HERO) or c:IsSetCard(SET_NEO_SPACIAN)) end)
62+
e1:SetTarget(function(e,c) return not c:IsSetCard({SET_ELEMENTAL_HERO,SET_NEO_SPACIAN}) end)
8963
e1:SetReset(RESET_PHASE|PHASE_END)
9064
Duel.RegisterEffect(e1,tp)
9165
end
92-
--Special Summon from Deck functions
93-
function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
94-
return Duel.GetFlagEffect(tp,id)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
66+
function s.deckspconfilter(c,tp)
67+
return c:IsFusionMonster() and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsControler(tp)
68+
end
69+
function s.deckspcon(e,tp,eg,ep,ev,re,r,rp)
70+
return Duel.IsEndPhase(tp) and eg:IsExists(s.deckspconfilter,1,nil,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
71+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
9572
end
96-
function s.spop2(e,tp,eg,ep,ev,re,r,rp)
97-
if not Duel.SelectYesNo(tp,aux.Stringid(id,1)) then return end
98-
--Special Summon 1 "Elemental HERO Neos" from your Deck
73+
function s.deckspop(e,tp,eg,ep,ev,re,r,rp)
74+
if not Duel.SelectYesNo(tp,aux.Stringid(id,2)) then return end
75+
Duel.Hint(HINT_CARD,0,id)
9976
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
10077
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
10178
if #g>0 then

0 commit comments

Comments
 (0)