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) {
|
for(EntityID id: state.turnOrder) {
|
||||||
Character character = (Character)state.entities.findEntity(id);
|
Character character = (Character)state.entities.findEntity(id);
|
||||||
|
|
||||||
if(character.mp.getValue() > maxMP) {
|
if(character.mp.getMax() > maxMP) {
|
||||||
maxMP = character.mp.getValue();
|
maxMP = character.mp.getMax();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -925,6 +925,11 @@ class GameLogic {
|
|||||||
ArrayList<IntVector2> path = GameLogic.Bresenham4Connected(thanos.getPosition(), picked);
|
ArrayList<IntVector2> path = GameLogic.Bresenham4Connected(thanos.getPosition(), picked);
|
||||||
|
|
||||||
int mp = thanos.mp.getValue();
|
int mp = thanos.mp.getValue();
|
||||||
|
|
||||||
|
if(mp <= 0) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
IntVector2 current = thanos.getPosition();
|
IntVector2 current = thanos.getPosition();
|
||||||
for(IntVector2 pos: path) {
|
for(IntVector2 pos: path) {
|
||||||
if(pos.equals(thanos.getPosition())) {
|
if(pos.equals(thanos.getPosition())) {
|
||||||
|
Loading…
Reference in New Issue
Block a user