Skip to content

Commit

Permalink
Deduct mana cost from player
Browse files Browse the repository at this point in the history
  • Loading branch information
tonihele committed Jul 17, 2024
1 parent 9e7a525 commit a174965
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -990,6 +990,8 @@ public void castKeeperSpell(short keeperSpellId, EntityId target, Point tile, Ve
}
}

// Deduct the mana
playerControllers.get(playerId).getManaControl().updateMana(0, keeperSpell.getManaCost());

// Cast the spell
Shot shot = kwdFile.getShotById(keeperSpell.getShotTypeId());
Expand All @@ -1004,7 +1006,7 @@ public void castKeeperSpell(short keeperSpellId, EntityId target, Point tile, Ve
}
default ->
logger.log(Level.WARNING, "Shot type {0} not implemented", shot.getProcessType());
}
}
}

@Override
Expand Down

0 comments on commit a174965

Please sign in to comment.