22-- Elemental HERO Divine Neos
33local s ,id = GetID ()
44function s .initial_effect (c )
5- -- fusion material
65 c :EnableReviveLimit ()
6+ -- Must be Fusion Summoned
7+ c :AddMustBeFusionSummoned ()
8+ -- Fusion Summon materials: 5 "Neos", "Neo Space", "Neo-Spacian", or "HERO" monsters
9+ -- including at least 1 "Neos" or "Neo Space" monster, 1 "Neo-Spacian" monster, and 1 "HERO" monster
710 Fusion .AddProcMixRep (c ,true ,true ,s .ffilter ,2 ,2 ,aux .FilterBoolFunctionEx (Card .IsSetCard ,SET_NEOS ),aux .FilterBoolFunctionEx (Card .IsSetCard ,SET_NEO_SPACIAN ),aux .FilterBoolFunctionEx (Card .IsSetCard ,SET_HERO ))
8- -- copy
9- local e2 = Effect .CreateEffect (c )
10- e2 :SetDescription (aux .Stringid (id ,0 ))
11- e2 :SetCategory (CATEGORY_ATKCHANGE )
12- e2 :SetType (EFFECT_TYPE_IGNITION )
13- e2 :SetRange (LOCATION_MZONE )
14- e2 :SetCountLimit (1 )
15- e2 :SetTarget (s .copytg )
16- e2 :SetOperation (s .copyop )
17- c :RegisterEffect (e2 )
18- -- spsummon condition
19- local e3 = Effect .CreateEffect (c )
20- e3 :SetType (EFFECT_TYPE_SINGLE )
21- e3 :SetProperty (EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE )
22- e3 :SetCode (EFFECT_SPSUMMON_CONDITION )
23- e3 :SetValue (aux .fuslimit )
24- c :RegisterEffect (e3 )
11+ -- Gains 500 ATK and the banished monster's effects
12+ local e1 = Effect .CreateEffect (c )
13+ e1 :SetDescription (aux .Stringid (id ,0 ))
14+ e1 :SetCategory (CATEGORY_ATKCHANGE )
15+ e1 :SetType (EFFECT_TYPE_IGNITION )
16+ e1 :SetRange (LOCATION_MZONE )
17+ e1 :SetCountLimit (1 )
18+ e1 :SetCost (s .copycost )
19+ e1 :SetOperation (s .copyop )
20+ c :RegisterEffect (e1 )
2521end
2622s .listed_series = {SET_NEOS ,SET_NEO_SPACIAN ,SET_HERO }
2723s .material_setcode = {SET_HERO ,SET_NEOS ,SET_NEO_SPACIAN }
2824function s .ffilter (c ,fc ,sumtype ,tp )
2925 return c :IsSetCard (SET_HERO ,fc ,sumtype ,tp ) or c :IsSetCard (SET_NEOS ,fc ,sumtype ,tp ) or c :IsSetCard (SET_NEO_SPACIAN ,fc ,sumtype ,tp )
3026end
31- function s .filter (c )
32- return ( c :IsSetCard (SET_NEOS ) or c : IsSetCard ( SET_NEO_SPACIAN ) or c : IsSetCard ( SET_HERO ) ) and c :IsMonster ()
33- and not c : IsForbidden () and c : IsAbleToRemove () and aux .SpElimFilter (c ,true )
27+ function s .costfilter (c )
28+ return c :IsSetCard ({ SET_NEOS , SET_NEO_SPACIAN , SET_HERO } ) and c :IsMonster ()
29+ and c : IsAbleToRemoveAsCost () and aux .SpElimFilter (c ,true )
3430end
35- function s .copytg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk ,chkc )
36- if chkc then return chkc :IsLocation (LOCATION_MZONE |LOCATION_GRAVE ) and chkc :IsControler (tp ) and s .filter (chkc ) end
37- if chk == 0 then return Duel .IsExistingTarget (s .filter ,tp ,LOCATION_MZONE |LOCATION_GRAVE ,0 ,1 ,nil ) end
31+ function s .copycost (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
32+ if chk == 0 then return Duel .IsExistingMatchingCard (s .costfilter ,tp ,LOCATION_MZONE |LOCATION_GRAVE ,0 ,1 ,nil ) end
3833 Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_REMOVE )
39- local g = Duel .SelectTarget (tp ,s .filter ,tp ,LOCATION_MZONE |LOCATION_GRAVE ,0 ,1 ,1 ,nil )
40- Duel .SetOperationInfo (0 ,CATEGORY_REMOVE ,g ,1 ,0 ,0 )
34+ local tc = Duel .SelectMatchingCard (tp ,s .costfilter ,tp ,LOCATION_MZONE |LOCATION_GRAVE ,0 ,1 ,1 ,nil ):GetFirst ()
35+ Duel .Remove (tc ,POS_FACEUP ,REASON_COST )
36+ Duel .SetTargetParam (tc :GetOriginalCode ())
4137end
4238function s .copyop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
4339 local c = e :GetHandler ()
44- local tc = Duel .GetFirstTarget ()
45- if c :IsRelateToEffect (e ) and c :IsFaceup () and tc and tc :IsRelateToEffect (e ) then
46- if Duel .Remove (tc ,POS_FACEUP ,REASON_EFFECT )~= 1 then return end
47- local code = tc :GetOriginalCode ()
48- local cid = c :CopyEffect (code ,RESETS_STANDARD_PHASE_END ,1 )
40+ local code = Duel .GetChainInfo (0 ,CHAININFO_TARGET_PARAM )
41+ if c :IsRelateToEffect (e ) and c :IsFaceup () and code ~= 0 then
42+ -- Gains 500 ATK
4943 local e1 = Effect .CreateEffect (c )
5044 e1 :SetType (EFFECT_TYPE_SINGLE )
5145 e1 :SetProperty (EFFECT_FLAG_COPY_INHERIT )
5246 e1 :SetCode (EFFECT_UPDATE_ATTACK )
5347 e1 :SetValue (500 )
5448 e1 :SetReset (RESET_EVENT |RESETS_STANDARD_DISABLE )
5549 c :RegisterEffect (e1 )
50+ -- Gains the banished monster's effects
51+ local cid = c :CopyEffect (code ,RESETS_STANDARD_PHASE_END ,1 )
52+ -- Reset the copied effect(s) manually
5653 local e2 = Effect .CreateEffect (c )
5754 e2 :SetDescription (aux .Stringid (id ,1 ))
5855 e2 :SetType (EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS )
5956 e2 :SetCode (EVENT_PHASE + PHASE_END )
6057 e2 :SetProperty (EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE )
61- e2 :SetCountLimit (1 )
6258 e2 :SetRange (LOCATION_MZONE )
6359 e2 :SetReset (RESETS_STANDARD_PHASE_END )
60+ e2 :SetCountLimit (1 )
6461 e2 :SetLabel (cid )
65- e2 :SetOperation (s .rstop )
62+ -- e2:SetLabelObject(e1)
63+ e2 :SetOperation (s .resettop )
6664 c :RegisterEffect (e2 )
6765 end
6866end
69- function s .rstop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
67+ function s .resettop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
7068 local c = e :GetHandler ()
7169 local cid = e :GetLabel ()
7270 c :ResetEffect (cid ,RESET_COPY )
71+ c :ResetEffect (RESET_DISABLE ,RESET_EVENT )
7372 Duel .HintSelection (Group .FromCards (c ))
7473 Duel .Hint (HINT_OPSELECTED ,1 - tp ,e :GetDescription ())
7574end
0 commit comments