v2.5.3: fixed incorrect null check in wand charges per cast

This commit is contained in:
Evan Debenham
2024-09-25 14:15:37 -04:00
parent abc7151349
commit 4db1fd5529
2 changed files with 2 additions and 2 deletions

View File

@@ -201,7 +201,7 @@ public class WandOfFireblast extends DamageWand {
@Override
protected int chargesPerCast() {
if (cursed ||
(charger != null && charger.target == null && charger.target.buff(WildMagic.WildMagicTracker.class) != null)){
(charger != null && charger.target != null && charger.target.buff(WildMagic.WildMagicTracker.class) != null)){
return 1;
}
//consumes 30% of current charges, rounded up, with a min of 1 and a max of 3.

View File

@@ -277,7 +277,7 @@ public class WandOfRegrowth extends Wand {
@Override
protected int chargesPerCast() {
if (cursed ||
(charger != null && charger.target == null && charger.target.buff(WildMagic.WildMagicTracker.class) != null)){
(charger != null && charger.target != null && charger.target.buff(WildMagic.WildMagicTracker.class) != null)){
return 1;
}
//consumes 30% of current charges, rounded up, with a min of 1 and a max of 3.