Skip to content

Commit

Permalink
give burned a visual effect.
Browse files Browse the repository at this point in the history
  • Loading branch information
thmsndk committed Jul 27, 2024
1 parent c584e56 commit 97d4e7a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
8 changes: 8 additions & 0 deletions design/animations.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,14 @@
"frames":12,
"alpha":0.4,
},
"burned":{
"file":"/images/sprites/animations/Fire0.png",
"frames":8,
# "alpha":0.8,
"alpha":0.8,
"aspeed":"slow",
"continuous":True,
},
}

try:
Expand Down
11 changes: 11 additions & 0 deletions js/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -4522,6 +4522,17 @@ function effects_logic(sprite)
start_filter(sprite,"bloom");
}

if(sprite.s.burned && !sprite.fx.burned)
{
sprite.fx.burned=true;
start_animation(sprite,"burned")
}
else if(!sprite.s.burned && sprite.fx.burned)
{
delete sprite.fx.burned;
stop_animation(sprite,"burned")
}

if(sprite.type=="monster" && !Object.keys(sprite.fx).length && sprite.real_alpha<1 && !sprite.dead && !(sprite.appearing || sprite.disappearing || sprite.fading_out))
{
sprite.real_alpha=min(1,sprite.real_alpha+0.05);
Expand Down

0 comments on commit 97d4e7a

Please sign in to comment.