From ecee5a1368d544b95bb6338db42f9ca146f224ef Mon Sep 17 00:00:00 2001 From: Wither362 <93864752+Wither362@users.noreply.github.com> Date: Mon, 9 May 2022 15:15:44 +0200 Subject: [PATCH] Poisoned note (#78) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 <97792861+Theoyeah@users.noreply.github.com> Co-authored-by: DEMOLITIONDON96 <87618246+DEMOLITIONDON96@users.noreply.github.com> --- source/PlayState.hx | 16 ++++++++++++++-- source/editors/ChartingState.hx | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index 6a845a3d..56da6978 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -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) { @@ -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) { diff --git a/source/editors/ChartingState.hx b/source/editors/ChartingState.hx index 5bad718a..de88bd99 100644 --- a/source/editors/ChartingState.hx +++ b/source/editors/ChartingState.hx @@ -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 = new Map(); private var noteTypeMap:Map> = new Map>();