Skip to content

Commit

Permalink
The Normal World appears
Browse files Browse the repository at this point in the history
- Fruit Juice Secret difficulty layouts
- Cinge difficulties
- Normal World is pretty much 100% done now!
  • Loading branch information
SuperFreaksDev committed Feb 2, 2023
1 parent 9042031 commit f4f93e9
Show file tree
Hide file tree
Showing 5 changed files with 608 additions and 66 deletions.
22 changes: 22 additions & 0 deletions objects/obj_boss_cinge/Create_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ event_inherited();

timer = 0;
counter = 0;
counter_max = 0;
shoot = false;
shoot_speed = 0;
shoot_timer = 0;

speed_h = 0;
speed_v = 0;
Expand All @@ -41,5 +44,24 @@ if (global.boss_phase == 1)
hp = 6;
instance_create_layer(0, 0, "layer_instances", obj_boss_cinge_heat_haze);
}

switch (global.difficulty)
{
case difficulty_levels.easy:
shoot_speed = 3.5;
counter_max = 3;
shoot_timer = 40;
break;
case difficulty_levels.normal:
shoot_speed = 4;
counter_max = 4;
shoot_timer = 32;
break;
case difficulty_levels.hard:
shoot_speed = 6;
counter_max = 6;
shoot_timer = 8;
break;
}

state_next_set(boss_cinge_states.normal);
22 changes: 11 additions & 11 deletions objects/obj_boss_cinge/Other_10.gml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// @description Step

var _fireball, _target, _angle;
var _fireball, _target, _angle, _fireball_speed = shoot_speed;

//enum boss_cinge_states
//{
Expand Down Expand Up @@ -35,9 +35,9 @@ switch (state)
hitbox.shape_x2 = 40;
hitbox.shape_y2 = 80;
}
timer = min(timer + 1, 96);
timer = min(timer + 1, 80);

if (timer == 96)
if (timer == 80)
state_next_set(boss_cinge_states.shoot);
break;
case boss_cinge_states.shoot:
Expand All @@ -54,17 +54,17 @@ switch (state)
switch (sprite_index)
{
case spr_boss_cinge_shoot_prepare:
timer = min(timer + 1, 32);
timer = min(timer + 1, shoot_timer);

if (timer == 32 && floor(image_index + animate_speed) == 3)
if (timer == shoot_timer && floor(image_index + animate_speed) == 3)
{
_target = player_nearest_alive();
if (!is_undefined(_target))
{
_angle = point_direction(x + (76 * face), y + 48, _target.x, _target.y);
_fireball = instance_create_layer(x + (76 * face), y + 48, "layer_instances", obj_enemy_fireball,
{
speed: 4,
speed: _fireball_speed,
direction: _angle,
zone_index: -3
});
Expand All @@ -73,13 +73,13 @@ switch (state)
{
_fireball = instance_create_layer(x + (76 * face), y + 48, "layer_instances", obj_enemy_fireball,
{
speed: 4,
speed: _fireball_speed,
direction: _angle + 5,
zone_index: -3
});
_fireball = instance_create_layer(x + (76 * face), y + 48, "layer_instances", obj_enemy_fireball,
{
speed: 4,
speed: _fireball_speed,
direction: _angle - 5,
zone_index: -3
});
Expand All @@ -94,16 +94,16 @@ switch (state)
case spr_boss_cinge_shoot:
if (floor(image_index + animate_speed) == 3)
{
if (counter >= 4)
if (counter >= counter_max)
sprite_index = spr_boss_cinge_stand;
else
sprite_index = spr_boss_cinge_shoot_prepare;
}
break;
case spr_boss_cinge_stand:
timer = min(timer + 1, 96);
timer = min(timer + 1, 80);

if (timer == 96 && !instance_exists(obj_enemy_fireball))
if (timer == 80 && !instance_exists(obj_enemy_fireball))
state_next_set(boss_cinge_states.fireball);
break;
}
Expand Down
Loading

0 comments on commit f4f93e9

Please sign in to comment.