equipments #22
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user