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