Skip to content

Commit

Permalink
Workaround for #71
Browse files Browse the repository at this point in the history
  • Loading branch information
ramidzkh committed Aug 16, 2024
1 parent 4339124 commit 13b66c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/appbot/ae2/ManaHandlerStrategy.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ protected int extractExternal(AEKey what, int amount, Actionable mode) {

if (mode == Actionable.MODULATE) {
var before = handler.getCurrentMana();
handler.receiveMana(-Ints.saturatedCast(amount));
handler.receiveMana(-Math.min(amount, before));
return Math.max(0, before - handler.getCurrentMana());
}

Expand Down

0 comments on commit 13b66c3

Please sign in to comment.