1
1
package overblocks .content ;
2
2
3
3
import arc .graphics .*;
4
- import ent .anno .*;
4
+ import arc .graphics .g2d .*;
5
+ import arc .math .*;
6
+ import arc .math .geom .*;
5
7
import mindustry .content .*;
8
+ import mindustry .entities .*;
6
9
import mindustry .entities .bullet .*;
7
10
import mindustry .gen .*;
8
- import mindustry .gen .MechUnit ;
9
11
import mindustry .graphics .*;
10
12
import mindustry .type .*;
11
13
import mindustry .type .ammo .*;
12
14
import overblocks .gen .*;
13
15
import overblocks .type .*;
14
16
17
+ import static arc .graphics .g2d .Draw .*;
18
+ import static arc .graphics .g2d .Lines .*;
15
19
import static ent .anno .Annotations .EntityDef ;
16
20
17
21
@ SuppressWarnings ("unused" )
@@ -36,7 +40,7 @@ public static void load(){
36
40
health = 100 ;
37
41
ammoType = new PowerAmmoType (1000 );
38
42
39
- weapons .add (new Weapon ("overblocks-relayer -weapon" ){{
43
+ weapons .add (new Weapon (name + " -weapon" ){{
40
44
top = false ;
41
45
shootY = 2f ;
42
46
reload = 36f ;
@@ -47,15 +51,88 @@ public static void load(){
47
51
shootSound = Sounds .lasershoot ;
48
52
49
53
bullet = new LaserBoltBulletType (2.5f , 12 ){{
50
- smokeEffect = Fx .hitLaser ;
51
- hitEffect = Fx .hitLaser ;
52
- despawnEffect = Fx .hitLaser ;
54
+ smokeEffect = Fx .hitLaserColor ;
55
+ hitEffect = Fx .hitLaserColor ;
56
+ despawnEffect = Fx .hitLaserColor ;
53
57
54
58
lifetime = 90f ;
55
- backColor = lightColor = Pal .lancerLaser ;
59
+ backColor = lightColor = hitColor = Pal .lancerLaser ;
56
60
frontColor = Color .white ;
57
61
}};
58
62
}});
59
63
}};
64
+
65
+ announcer = new OBUnitType ("announcer" , DodgeMechUnit .class ){{
66
+ speed = 0.5f ;
67
+ hitSize = 10f ;
68
+ health = 550 ;
69
+ armor = 4f ;
70
+ dodge = 0.25f ;
71
+ ammoType = new ItemAmmoType (Items .graphite );
72
+
73
+ immunities .add (StatusEffects .shocked );
74
+
75
+ weapons .add (new Weapon (name + "-weapon" ){{
76
+ top = false ;
77
+ shootSound = Sounds .bolt ;
78
+ shootY = 2f ;
79
+ reload = 11f ;
80
+ x = 4.5f ;
81
+ recoil = 1f ;
82
+ rotate = true ;
83
+ rotationLimit = 50 ;
84
+ shootCone = 60f ;
85
+ ejectEffect = Fx .none ;
86
+
87
+ bullet = new RailBulletType (){{
88
+ length = 130f ;
89
+ damage = 28 ;
90
+ hitColor = Pal .lancerLaser ;
91
+ hitEffect = endEffect = Fx .hitBulletColor ;
92
+
93
+ smokeEffect = Fx .colorSpark ;
94
+ status = StatusEffects .shocked ;
95
+ statusDuration = 10f ;
96
+
97
+ endEffect = new Effect (14f , e -> {
98
+ color (e .color );
99
+ Drawf .tri (e .x , e .y , e .fout () * 1.5f , 5f , e .rotation );
100
+ });
101
+
102
+ shootEffect = new Effect (10 , e -> {
103
+ color (e .color );
104
+ float w = 1.2f + 7 * e .fout ();
105
+
106
+ Drawf .tri (e .x , e .y , w , 30f * e .fout (), e .rotation );
107
+ color (e .color );
108
+
109
+ for (int i : Mathf .signs ){
110
+ Drawf .tri (e .x , e .y , w * 0.9f , 18f * e .fout (), e .rotation + i * 90f );
111
+ }
112
+
113
+ Drawf .tri (e .x , e .y , w , 4f * e .fout (), e .rotation + 180f );
114
+ });
115
+
116
+ lineEffect = new Effect (20f , e -> {
117
+ if (!(e .data instanceof Vec2 v )) return ;
118
+
119
+ color (e .color );
120
+ stroke (e .fout () * 0.9f + 0.6f );
121
+
122
+ Fx .rand .setSeed (e .id );
123
+ for (int i = 0 ; i < 7 ; i ++){
124
+ Fx .v .trns (e .rotation , Fx .rand .random (8f , v .dst (e .x , e .y ) - 8f ));
125
+ Lines .lineAngleCenter (e .x + Fx .v .x , e .y + Fx .v .y , e .rotation + e .finpow (), e .foutpowdown () * 20f * Fx .rand .random (0.5f , 1f ) + 0.3f );
126
+ }
127
+
128
+ e .scaled (14f , b -> {
129
+ stroke (b .fout () * 1.5f );
130
+ color (e .color );
131
+ Lines .line (e .x , e .y , v .x , v .y );
132
+ });
133
+ });
134
+ }};
135
+ }});
136
+ }};
60
137
}
61
138
}
0 commit comments