@@ -3,7 +3,13 @@ global.ship_weapons_stats = {
33 range : 300 ,
44 dam : 14 ,
55 facing : " front" ,
6- firing_arc : 12.5
6+ firing_arc : 12.5 ,
7+ img : spr_ground_las,
8+ }
9+ " Plasma Cannon" : {
10+ img : spr_ground_plasma,
11+ draw_scale : 3 ,
12+ bullet_speed : 15 ,
713 }
814 " Nova Cannon" : {
915 range : 1500 ,
@@ -12,6 +18,7 @@ global.ship_weapons_stats = {
1218 minrange : 300 ,
1319 cooldown : 120 ,
1420 minrange : 300 ,
21+ draw_scale: 2 ,
1522 },
1623 " Weapons Battery" : {
1724 facing : " most" ,
@@ -51,6 +58,9 @@ global.ship_weapons_stats = {
5158 dam : 12 ,
5259 range : 450 ,
5360 cooldown : 90 ,
61+ bullet_speed : 10 ,
62+ barrel_count : 4 ,
63+ img:spr_torpedo,
5464 },
5565
5666 " Interceptor Launch Bays" : {
@@ -81,17 +91,21 @@ global.ship_weapons_stats = {
8191 facing : " most" ,
8292 dam : 10 ,
8393 weapon_cooldown : 10 ,
94+ img: spr_ground_las,
8495 },
8596 " Pyro-acid Battery" : {
8697 facing : " most" ,
8798 dam : 8 ,
8899 range : 300 ,
100+ img : spr_glob,
101+ draw_scale : 2 ,
89102 },
90103 " Feeder Tendrils" : {
91104 facing : " most" ,
92105 dam : 8 ,
93106 range : 100 ,
94107 firing_arc : 50 ,
108+ melee : true ,
95109 },
96110 " Bio-Plasma Discharge" :{
97111 range : 200 ,
@@ -103,41 +117,47 @@ global.ship_weapons_stats = {
103117 dam : 20 ,
104118 range : 64 ,
105119 cooldown : 60 ,
120+ melee : true ,
106121 },
107122 " Launch Glands" : {
108123 facing : " special" ,
109124 weapon_range : 9999 ,
110- ammo : 6 ,
125+ ammo : 20 ,
111126 cooldown , 120 ,
112127 },
113128 " Gravitic launcher" : {
114129 dam : 12 ,
115130 range : 400 ,
116131 minrange : 200 ,
117132 cooldown:30 ,
133+ draw_scale:2 ,
118134 },
119135 " Railgun Battery" : {
120136 facing : " most"
121137 dam :12 ,
122138 range : 450 ,
123139 cooldown:30 ,
140+ img : spr_railgun,
124141 },
125142 " Ion Cannons" : {
126143 facing : " most"
127144 dam :8 ,
128145 range : 300 ,
129146 cooldown:15 ,
147+ img : spr_pulse,
130148 },
131149 " Lightning Arc" : {
132150 facing : " most" ,
133- dam : 0 ,
151+ dam : 20 ,
134152 range : 300 ,
135153 cooldown : 15 ,
154+ damage_type:" shields"
136155 },
137156 " Star Pulse Generator" : {
138157 dam : 0 ,
139158 range : 220 ,
140- cooldown : 210
159+ cooldown : 210 ,
160+ img : spr_pulse
141161 },
142162 " Gauss Particle Whip" :{
143163 dam : 30 ,
@@ -146,7 +166,7 @@ global.ship_weapons_stats = {
146166 }
147167}
148168
149- global.ship_defualts = {
169+ global.ship_weapon_defualts = {
150170 range : 600 ,
151171 facing : " front" ,
152172 cooldown : 30 ,
@@ -158,6 +178,10 @@ global.ship_defualts = {
158178 bullet_speed : 20 ,
159179 bullet_obj : obj_en_round,
160180 img : spr_round,
181+ damage_type : " full" ,
182+ draw_scale : 1.5 ,
183+ barrel_count : 1 ,
184+ melee : false ,
161185
162186}
163187function move_data_to_current_scope (struct , overide=true ){
@@ -182,6 +206,9 @@ function facing_weapon_angle(facing){
182206 case " left" :
183207 _direct_-=90 ;
184208 break ;
209+ case " rear" :
210+ _direct_ -= 180 ;
211+ break ;
185212 default :
186213 break ;
187214 }
@@ -194,7 +221,7 @@ function ShipWeapon(weapon_name, overide_data={}) constructor{
194221 move_data_to_current_scope (_wep_data);
195222 }
196223 move_data_to_current_scope (overide_data);
197- move_data_to_current_scope (global.ship_defualts , false );
224+ move_data_to_current_scope (global.ship_weapon_defualts , false );
198225 name = weapon_name;
199226 cooldown_timer = 0 ;
200227
@@ -203,6 +230,47 @@ function ShipWeapon(weapon_name, overide_data={}) constructor{
203230 static find_target = function (){
204231
205232 }
233+ static draw_weapon_firing_arc = function{
234+ var _tangent_direction = 0 ;
235+ var _facing = facing
236+ if (instance_exists (ship)){
237+ with (ship){
238+ _tangent_direction = facing_weapon_angle (_facing);
239+ }
240+ }
241+ var _max_distance = range;
242+
243+ var _left = x - _max_distance;
244+ var _top = y - _max_distance;
245+ var _right = x + _max_distance;
246+ var _bottom = y + _max_distance;
247+
248+ if (facing == " most" ){
249+ firing_arc = 135 ;
250+ }
251+ draw_set_color (38144 );
252+
253+ var _start_x = x + lengthdir_x (_max_distance, _tangent_direction - firing_arc);
254+ var _start_y = y + lengthdir_y (_max_distance, _tangent_direction - firing_arc);
255+ var _end_x = x + lengthdir_x (_max_distance, _tangent_direction + firing_arc);
256+ var _end_y = y + lengthdir_y (_max_distance, _tangent_direction + firing_arc);
257+
258+ draw_arc (_left, _top, _right, _bottom, _start_x, _start_y, _end_x, _end_y);
259+ draw_line (x, y, _start_x, _start_y);
260+ draw_line (x, y, _end_x, _end_y);
261+
262+ if (minrange > 0 ){
263+ draw_set_color (c_red);
264+ var _start_x = x + lengthdir_x (minrange, _tangent_direction - firing_arc);
265+ var _start_y = y + lengthdir_y (minrange, _tangent_direction - firing_arc);
266+ var _end_x = x + lengthdir_x (minrange, _tangent_direction + firing_arc);
267+ var _end_y = y + lengthdir_y (minrange, _tangent_direction + firing_arc);
268+
269+ draw_arc (_left, _top, _right, _bottom, _start_x, _start_y, _end_x, _end_y);
270+ draw_line (x, y, _start_x, _start_y);
271+ draw_line (x, y, _end_x, _end_y);
272+ }
273+ }
206274}
207275
208276function add_weapon_to_ship (weapon_name, overide_data={}){
@@ -506,7 +574,7 @@ function assign_ship_stats(){
506574 capacity=50 ;
507575 carrying=0 ;
508576 add_weapon_to_ship (" Gunz Battery" );
509- add_weapon_to_ship (" Torpedoes" , {range : 300 , cooldown:120 });
577+ add_weapon_to_ship (" Torpedoes" , {range : 300 , cooldown:120 ,barrel_count: 2 });
510578 }
511579 // ** Tau **
512580 if (class ==" Custodian" ){
@@ -783,11 +851,12 @@ function assign_ship_stats(){
783851 capacity=250 ;
784852 carrying=0 ;
785853
786- add_weapon_to_ship (" Lightning Arc" );
854+ add_weapon_to_ship (" Lightning Arc" , {dam : 10 } );
787855
788856 }
789857
790- if (class =" Jackal Class" ){ship_size=2 ;
858+ if (class =" Jackal Class" ){
859+ ship_size=2 ;
791860 sprite_index=spr_ship_jackal;
792861
793862 name=" " ;
@@ -805,11 +874,12 @@ function assign_ship_stats(){
805874 capacity=25 ;
806875 carrying=0 ;
807876
808- add_weapon_to_ship (" Lightning Arc" , range :250 );
877+ add_weapon_to_ship (" Lightning Arc" , {dam : 10 , range :250 } );
809878
810879 }
811880
812- if (class =" Dirge Class" ){ship_size=2 ;
881+ if (class =" Dirge Class" ){
882+ ship_size=2 ;
813883 sprite_index=spr_ship_dirge;
814884
815885 name=" " ;
@@ -827,12 +897,7 @@ function assign_ship_stats(){
827897 capacity=25 ;
828898 carrying=0 ;
829899
830- weapon[1 ]=" Lightning Arc" ;
831- weapon_facing[1 ]=" most" ;
832- weapon_dam[1 ]=0 ;
833- weapon_range[1 ]=250 ;
834- weapon_cooldown[1 ]=15 ;
835-
900+ add_weapon_to_ship (" Lightning Arc" , {dam : 10 ,range :250 });
836901 }
837902
838903
0 commit comments