Skip to content
This repository has been archived by the owner on Jul 9, 2023. It is now read-only.

Commit

Permalink
Poisoned note (#78)
Browse files Browse the repository at this point in the history
* Maybe?

* What am I doing?

Please, what is “healthDrain”, and also “health”?

* let see if it works

* Better now

* Update ChartingState.hx

* Update ChartingState.hx

* Here, the actual code the poison notes needs

Co-authored-by: Theoyeah <[email protected]>
Co-authored-by: DEMOLITIONDON96 <[email protected]>
  • Loading branch information
3 people authored May 9, 2022
1 parent 1b10167 commit ecee5a1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
16 changes: 14 additions & 2 deletions source/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2574,6 +2574,15 @@ class PlayState extends MusicBeatState
iconP2.x = healthBar.x + (healthBar.width * (FlxMath.remapToRange(healthBar.percent, 0, 100, 100, 0) * 0.01)) - (iconP2.width - iconOffset);
}
}
if (healthDrain > 0 && health > 0.1)
{
if (health < 0.1)
{
health = 0.1;
}
health -= 0.001;
healthDrain -= 0.0001;
}

if(ClientPrefs.winningIcon)
{
Expand Down Expand Up @@ -4143,8 +4152,11 @@ class PlayState extends MusicBeatState
lime.app.Application.current.window.alert( 'Annoying fact:\nYou pressed a window note !');

case 'Poisoned Note':
healthDrain = 0.20;
health -= 0;
new FlxTimer().start(2.3, function(tmr:FlxTimer) //i dont know how this works
{
health -= 0.1;
});
healthDrain = 0.20; // what does this means?

case 'Hurt Note': //Hurt note
if(boyfriend.animation.getByName('hurt') != null) {
Expand Down
2 changes: 1 addition & 1 deletion source/editors/ChartingState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ class ChartingState extends MusicBeatState
'Instakill Note',
'Window Note',
'Warning Note',
'Poisoned Note',
'Crash Note', //so we can actually test it EDIT: Wait, that released right ?
'GF Sing',
'No Animation',
'Poisoned Note'
];
private var noteTypeIntMap:Map<Int, String> = new Map<Int, String>();
private var noteTypeMap:Map<String, Null<Int>> = new Map<String, Null<Int>>();
Expand Down

0 comments on commit ecee5a1

Please sign in to comment.