fix: fix thanos' mp handling
This commit is contained in:
parent
71fc0893a8
commit
9d5484966e
@ -875,8 +875,8 @@ class GameLogic {
|
||||
for(EntityID id: state.turnOrder) {
|
||||
Character character = (Character)state.entities.findEntity(id);
|
||||
|
||||
if(character.mp.getValue() > maxMP) {
|
||||
maxMP = character.mp.getValue();
|
||||
if(character.mp.getMax() > maxMP) {
|
||||
maxMP = character.mp.getMax();
|
||||
}
|
||||
}
|
||||
|
||||
@ -925,6 +925,11 @@ class GameLogic {
|
||||
ArrayList<IntVector2> path = GameLogic.Bresenham4Connected(thanos.getPosition(), picked);
|
||||
|
||||
int mp = thanos.mp.getValue();
|
||||
|
||||
if(mp <= 0) {
|
||||
return result;
|
||||
}
|
||||
|
||||
IntVector2 current = thanos.getPosition();
|
||||
for(IntVector2 pos: path) {
|
||||
if(pos.equals(thanos.getPosition())) {
|
||||
|
Loading…
Reference in New Issue
Block a user