Skip to content

Commit

Permalink
Progress 18 jan 2025
Browse files Browse the repository at this point in the history
* Finished Llort Boss Battle, including death animation, speed and reward
* Fixed Llort's Defense and Power
* Fixed Celestial Sign cutscene restarting constantly
* Fixed music not stopping when going to the cutscene room
* Fixed being able to damage enemies that were already in a damage animation
* Fixed Item Drops not flashing before disappearing
* Fixed crash related to two specific dialogue triggers (game couldn't change their position when they don't exist)
* Disabled wand's melee damage if you are using a different spell when Remastered Mode is enabled.
* Added tooltip explaining some features for the Remastered Mode option in the settings menu.
  • Loading branch information
JappaWakka committed Jan 18, 2025
1 parent d1d534c commit 5a06c9c
Show file tree
Hide file tree
Showing 67 changed files with 522 additions and 269 deletions.
Binary file added Planning/References/BossDeath.clip
Binary file not shown.
8 changes: 5 additions & 3 deletions ZeldasAdventure/ZeldasAdventure.yyp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,11 @@ OriginY = y;
speed = global.EnemySpeeds.Still;
image_speed = 0;
EnemyState = EnemyStates.Idle

BossAI_SetPattern(BossIndexes.Llort1)
if Register_Registered("LlortDefeated") = true
{
instance_destroy()
}
else
{
BossAI_SetPattern(BossIndexes.Llort1)
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@ if StartImmuneAnimation = true
DamageOrImmune = "Immune"
StartImmuneAnimation = false
}
if StartDeathAnimation = true
{
AddRubies(250)
DeathAnimationCounter = 2
timerDuration = 4
timerIndex = 1
StartDeathAnimation = false
DamageOrImmune = "Damage"
if instance_number(Entity_Particle_BossDefeat) = 0
{
instance_create_layer(x,y,"Temporary_AbovePlayer",Entity_Particle_BossDefeat)
}

}
switch timerIndex
{
case 1 :
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,34 @@ if IsPlayerOnSameTile_Enemy() = true && global.CameraIsFading = false
visible = true;

//Deal Damage to Player
if collision_circle(x,y,HitRadius_Attack,Entity_Player,true,true)
if collision_circle(x,y,HitRadius_Attack,Entity_Player,true,true) and EnemyState != EnemyStates.Damaged
{
with Entity_Player
if DeathAnimationCounter = -1
{
if DamageDelay = 0
with Entity_Player
{
DecreaseHP(other.Power - GetDefense())
audio_play_sound_relative(SFX_Zelda_Damage,1000,false)

if PlayerDeath_Start() = false // Check if player is dead, if not start damage animation
if DamageDelay = 0
{
DamageDelay = 1 * FrameRate
if timeline_index = -1
DecreaseHP(other.Power - GetDefense())
audio_play_sound_relative(SFX_Zelda_Damage,1000,false)

if PlayerDeath_Start() = false // Check if player is dead, if not start damage animation
{
timeline_index = Damage_Player;
timeline_position = 0;
timeline_running = true;
DamageDelay = 1 * FrameRate
if timeline_index = -1
{
timeline_index = Timeline_Damage_Player;
timeline_position = 0;
timeline_running = true;
}
}

}

}
}
}

if IsInvincible = false
if IsInvincible = false and EnemyState != EnemyStates.Damaged
{
//Receive Damage from Player
//Melee
Expand Down Expand Up @@ -148,21 +151,42 @@ else
image_speed = 0;
}

//Damage Animation
timerDuration -= 1
if timerDuration = 0 and timerIndex > 0
{
timerIndex += 1
if timerIndex = 6
{
timerIndex = 0
EnemyState = EnemyStates.Move
}
timerDuration = 4
}

if EnemyState = EnemyStates.Damaged
{
speed = 0
//Damage Animation
timerDuration -= 1
if timerDuration = 0 and timerIndex > 0
{
timerIndex += 1
if timerIndex = 6
{
if DeathAnimationCounter = -1
{
timerIndex = 0
EnemyState = EnemyStates.Move
}
else
{
if DeathAnimationCounter > 0
{
DeathAnimationCounter -=1
timerIndex = 1
if DeathAnimationCounter = 1 and Register_Registered("LlortDefeated") = false
{
Register_Add("LlortDefeated")
}
}
else
{
instance_destroy();
}
}
}
timerDuration = 4
}

}

//Don't move outside of the current tile
Expand All @@ -187,10 +211,9 @@ if EnemyState = EnemyStates.Damaged
image_speed = 0
}

if HitPoints <= 0
if HitPoints <= 0 and EnemyState != EnemyStates.Damaged
{

instance_create_layer(x,y,"Temporary_AbovePlayer",Entity_Particle_EnemyDefeat)
instance_destroy();
EnemyState = EnemyStates.Damaged
StartDeathAnimation = true

}
129 changes: 79 additions & 50 deletions ZeldasAdventure/objects/Entity_Parent_Enemy_Bouncing/Step_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -26,84 +26,113 @@ if IsPlayerOnSameTile_Enemy() = true && global.CameraIsFading = false
alarm_set(1, round(random_range(0, 3 * FrameRate)));
}
}
//Player Damage
//Melee
if collision_circle(x,y,HitRadius_Defense,Entity_Hitbox_Spell_Wand,true,true)

//Deal Damage to Player
if collision_circle(x,y,HitRadius_Attack,Entity_Player,true,true) and EnemyState != EnemyStates.Damaged
{
if DamageDelay = 0
with Entity_Player
{
var ReceivedDamage = GetPower() - Defense
if ReceivedDamage > 0
{
///Reduce HitPoints, play damage sound
HitPoints -= ReceivedDamage
audio_play_sound_relative(SFX_Enemy_Damage,1000,false)
EnemyState = EnemyStates.Damaged
StartDamageAnimation = true
HitFromDirection = Entity_Player.Facing
}
else
if DamageDelay = 0
{
audio_play_sound_relative(SFX_Enemy_Immune,1000,false)
EnemyState = EnemyStates.Damaged
StartImmuneAnimation = true
DecreaseHP(other.Power - GetDefense())
audio_play_sound_relative(SFX_Zelda_Damage,1000,false)

if PlayerDeath_Start() = false // Check if player is dead, if not start damage animation
{
DamageDelay = 1 * FrameRate
if timeline_index = -1
{
timeline_index = Timeline_Damage_Player;
timeline_position = 0;
timeline_running = true;
}
}

}
///Reset DamageDelay
DamageDelay = 1 * FrameRate
}
}
//Spell
if instance_number(Entity_Parent_Projectile_Player) > 0

if EnemyState != EnemyStates.Damaged
{
var HitProjectile = -1
for (var i = 0; i < instance_number(Entity_Parent_Projectile_Player); ++i;)
{
if collision_circle(x,y,HitRadius_Defense,Entity_Parent_Projectile_Player,true,true)
{
HitProjectile = instance_find(Entity_Parent_Projectile_Player,i);
}
}
if HitProjectile != -1
//Receive Damage from Player
//Melee
if collision_circle(x,y,HitRadius_Defense,Entity_Hitbox_Spell_Wand,true,true)
{
if DamageDelay = 0
{
///Reduce HitPoints, play damage sound
var ReceivedDamage

if WeakToSpell != -1 and HitProjectile.SpellUsed = WeakToSpell
{
ReceivedDamage = clamp(HitProjectile.Power - Defense,0,HitProjectile.Power) + HitProjectile.BonusDamageIfWeak
}
else
{
ReceivedDamage = clamp(HitProjectile.Power - Defense,0,HitProjectile.Power)
}

var ReceivedDamage = GetPower() - Defense
if ReceivedDamage > 0
{

///Reduce HitPoints, play damage sound
HitPoints -= ReceivedDamage
audio_play_sound_relative(SFX_Enemy_Damage,1000,false)
EnemyState = EnemyStates.Damaged
StartDamageAnimation = true
HitFromDirection = HitProjectile.direction
HitFromDirection = Entity_Player.Facing
}
else
{
audio_play_sound_relative(SFX_Enemy_Immune,1000,false)
EnemyState = EnemyStates.Damaged
StartImmuneAnimation = true
}

if HitProjectile.DestroyOnEnemyImpact = true
{
instance_destroy(HitProjectile)
}
///Reset DamageDelay
DamageDelay = 1 * FrameRate
}
}
//Spell
if instance_number(Entity_Parent_Projectile_Player) > 0
{
var HitProjectile = -1
for (var i = 0; i < instance_number(Entity_Parent_Projectile_Player); ++i;)
{
if collision_circle(x,y,HitRadius_Defense,Entity_Parent_Projectile_Player,true,true)
{
HitProjectile = instance_find(Entity_Parent_Projectile_Player,i);
}
}
if HitProjectile != -1
{
if DamageDelay = 0
{
///Reduce HitPoints, play damage sound
var ReceivedDamage

if WeakToSpell != -1 and HitProjectile.SpellUsed = WeakToSpell
{
ReceivedDamage = clamp(HitProjectile.Power - Defense,0,HitProjectile.Power) + HitProjectile.BonusDamageIfWeak
}
else
{
ReceivedDamage = clamp(HitProjectile.Power - Defense,0,HitProjectile.Power)
}

if ReceivedDamage > 0
{

///Reduce HitPoints, play damage sound
HitPoints -= ReceivedDamage
audio_play_sound_relative(SFX_Enemy_Damage,1000,false)
EnemyState = EnemyStates.Damaged
StartDamageAnimation = true
HitFromDirection = HitProjectile.direction
}
else
{
audio_play_sound_relative(SFX_Enemy_Immune,1000,false)
EnemyState = EnemyStates.Damaged
StartImmuneAnimation = true
}

if HitProjectile.DestroyOnEnemyImpact = true
{
instance_destroy(HitProjectile)
}
///Reset DamageDelay
DamageDelay = 1 * FrameRate
}
}
}
}
}
else
Expand Down
Loading

0 comments on commit 5a06c9c

Please sign in to comment.