1+ -- 天帝使-エニグマ
12-- Enigma the Creator
23local s ,id = GetID ()
34function s .initial_effect (c )
@@ -7,23 +8,21 @@ function s.initial_effect(c)
78 e1 :SetCategory (CATEGORY_SPECIAL_SUMMON + CATEGORY_TOKEN )
89 e1 :SetType (EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F )
910 e1 :SetCode (EVENT_BATTLE_DESTROYED )
10- e1 :SetCondition (s . condition )
11+ e1 :SetCondition (function ( e ) return e : GetHandler (): IsLocation ( LOCATION_GRAVE ) end )
1112 e1 :SetTarget (s .target )
1213 e1 :SetOperation (s .operation )
1314 c :RegisterEffect (e1 )
1415end
15- function s .condition (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
16- return e :GetHandler ():IsLocation (LOCATION_GRAVE )
17- end
16+ s .listed_names = {id + 1 } -- "Enigma Token"
1817function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
1918 if chk == 0 then return true end
2019 Duel .SetOperationInfo (0 ,CATEGORY_TOKEN ,nil ,1 ,0 ,0 )
2120 Duel .SetOperationInfo (0 ,CATEGORY_SPECIAL_SUMMON ,nil ,1 ,tp ,0 )
2221end
2322function s .operation (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
2423 if Duel .GetLocationCount (tp ,LOCATION_MZONE )> 0
25- and Duel .IsPlayerCanSpecialSummonMonster (tp ,id + 1 ,0 ,TYPES_TOKEN ,1200 , 1200 , 4 , RACE_WARRIOR , ATTRIBUTE_DARK ) then
24+ and Duel .IsPlayerCanSpecialSummonMonster (tp ,id + 1 ,0 ,TYPES_TOKEN ,0 , 0 , 1 , RACE_FAIRY , ATTRIBUTE_LIGHT ) then
2625 local token = Duel .CreateToken (tp ,id + 1 )
2726 Duel .SpecialSummon (token ,0 ,tp ,tp ,false ,false ,POS_FACEUP )
2827 end
29- end
28+ end
0 commit comments