Skip to content

Commit 7fbf8fc

Browse files
committed
Max HP update for PlayState
1 parent 5350cf8 commit 7fbf8fc

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

source/archipelago/APItem.hx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,9 @@ class APItem {
203203
maxHPUp++;
204204
trace("Max HP increased! Current max HP: " + maxHPUp);
205205
popup('Current Max HP: +$maxHPUp', "You got a max HP up!");
206+
if (APPlayState.APInstance() != null) {
207+
APPlayState.APInstance().MaxHP += 0.5;
208+
}
206209
}, true, true);
207210
case "Tutorial Trap":
208211
return new APItem(name, ConditionHelper.PlayState(), function() {

source/archipelago/APPlayState.hx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2010,9 +2010,11 @@ class APPlayState extends PlayState {
20102010
resyncVocals();
20112011
}
20122012

2013-
public function APInstance()
2013+
public static function APInstance()
20142014
{
2015-
return instance;
2015+
if (instance != null)
2016+
return instance;
2017+
return null;
20162018
}
20172019

20182020
override public function endSong():Bool

0 commit comments

Comments
 (0)