1+ -- ザ☆バトルバンプ
2+ -- The Battle Bump
3+ -- scripted by YoshiDuels
4+ local s ,id = GetID ()
5+ function s .initial_effect (c )
6+ -- equip
7+ aux .AddEquipProcedure (c ,0 ,s .eqfilter ,s .eqlimit )
8+ -- atk up
9+ local e1 = Effect .CreateEffect (c )
10+ e1 :SetType (EFFECT_TYPE_EQUIP )
11+ e1 :SetCode (EFFECT_UPDATE_ATTACK )
12+ e1 :SetValue (200 )
13+ c :RegisterEffect (e1 )
14+ -- Opponent cannot activate
15+ local e2 = Effect .CreateEffect (c )
16+ e2 :SetType (EFFECT_TYPE_FIELD )
17+ e2 :SetCode (EFFECT_CANNOT_ACTIVATE )
18+ e2 :SetProperty (EFFECT_FLAG_PLAYER_TARGET )
19+ e2 :SetRange (LOCATION_SZONE )
20+ e2 :SetTargetRange (0 ,1 )
21+ e2 :SetValue (s .aclimit )
22+ c :RegisterEffect (e2 )
23+ -- gain LP
24+ local e3 = Effect .CreateEffect (c )
25+ e3 :SetDescription (aux .Stringid (id ,0 ))
26+ e3 :SetCategory (CATEGORY_POSITION )
27+ e3 :SetType (EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS )
28+ e3 :SetCode (EVENT_DAMAGE_STEP_END )
29+ e3 :SetRange (LOCATION_SZONE )
30+ e3 :SetCondition (s .condition )
31+ e3 :SetOperation (s .operation )
32+ c :RegisterEffect (e3 )
33+ end
34+ function s .eqfilter (c )
35+ return c :IsFaceup () and not c :IsMaximumModeSide ()
36+ end
37+ function s .eqlimit (e ,c )
38+ return c :IsFaceup ()
39+ end
40+ function s .aclimit (e ,re ,tp )
41+ local c = re :GetHandler ()
42+ return re :IsHasType (EFFECT_TYPE_ACTIVATE ) and c :IsEquipSpell ()
43+ end
44+ function s .condition (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
45+ local ec = e :GetHandler ():GetEquipTarget ()
46+ local dt = nil
47+ if ec == Duel .GetAttacker () then dt = Duel .GetAttackTarget ()
48+ elseif ec == Duel .GetAttackTarget () then dt = Duel .GetAttacker () end
49+ e :SetLabelObject (dt )
50+ return dt and dt :IsRelateToBattle ()
51+ end
52+ function s .operation (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
53+ local dt = e :GetLabelObject ()
54+ if dt :IsRelateToBattle () and dt :IsDefensePos () then
55+ Duel .ChangePosition (dt ,0 ,0 ,POS_FACEUP_ATTACK ,POS_FACEUP_ATTACK )
56+ end
57+ end
0 commit comments