monster #20

Merged
viud3133 merged 39 commits from monster into equipments 2025-10-30 12:05:40 +01:00
2 changed files with 1 additions and 7 deletions
Showing only changes of commit 68080cd15a - Show all commits

View File

@@ -86,7 +86,6 @@ public class Shade extends Monster implements CanMove, CanAttack {
return false; return false;
} }
position = validDestinations.get(random.nextInt(validDestinations.size())); position = validDestinations.get(random.nextInt(validDestinations.size()));
updateDestinations(position, world);
return true; return true;
} }

View File

@@ -91,7 +91,6 @@ public class Troll extends Monster implements CanMove, CanAttack {
return false; return false;
} }
position = validDestinations.get(random.nextInt(validDestinations.size())); position = validDestinations.get(random.nextInt(validDestinations.size()));
updateDestinations(position, world);
return true; return true;
} }
@@ -116,11 +115,7 @@ public class Troll extends Monster implements CanMove, CanAttack {
for (MovementPatterns move : MOVES) { for (MovementPatterns move : MOVES) {
if (move.cost <= energy) { if (move.cost <= energy) {
List<Position> destinations = move.findLegalDestinations(position); List<Position> destinations = move.findLegalDestinations(position);
for (Position destination : destinations) { validDestinations.addAll(destinations);
if (tileHasWrongHabitat(destination, world)) {
validDestinations.add(destination);
}
}
} }
} }
} }