mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
Adventure - minor map updates (#3714)
* Adventure: Minor map correction Removing hidden wall in fort_colorless_2_wizards that prevented access to shards in blue mage's area * Adventure - Log error if mob has bad waypoint set * Update MovementBehavior.java * Adventure - More error logging
This commit is contained in:
@@ -380,7 +380,7 @@ public class EnemySprite extends CharacterSprite implements Steerable<Vector2> {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
//else
|
//else
|
||||||
if (peek.getDuration() == 0 && peek.getNextTargetVector(pos()).dst(pos()) < 2){
|
if (peek.getDuration() == 0 && peek.getNextTargetVector(objectId, pos()).dst(pos()) < 2){
|
||||||
//this is a location based behavior that has been completed. Move on to the next behavior
|
//this is a location based behavior that has been completed. Move on to the next behavior
|
||||||
|
|
||||||
MovementBehavior current = movementBehaviors.pop();
|
MovementBehavior current = movementBehaviors.pop();
|
||||||
@@ -402,8 +402,8 @@ public class EnemySprite extends CharacterSprite implements Steerable<Vector2> {
|
|||||||
return new Vector2(pos());
|
return new Vector2(pos());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (peek.getNextTargetVector(pos()).dst(pos()) > 0.3) {
|
if (peek.getNextTargetVector(objectId, pos()).dst(pos()) > 0.3) {
|
||||||
target = new Vector2(peek.getNextTargetVector(pos()));
|
target = new Vector2(peek.getNextTargetVector(objectId, pos()));
|
||||||
}
|
}
|
||||||
else target = new Vector2(pos());
|
else target = new Vector2(pos());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public class MovementBehavior {
|
|||||||
return duration;
|
return duration;
|
||||||
}
|
}
|
||||||
public Vector2 currentTargetVector;
|
public Vector2 currentTargetVector;
|
||||||
public Vector2 getNextTargetVector(Vector2 currentPosition){
|
public Vector2 getNextTargetVector(int objectID, Vector2 currentPosition){
|
||||||
if (currentTargetVector != null) {
|
if (currentTargetVector != null) {
|
||||||
return currentTargetVector;
|
return currentTargetVector;
|
||||||
}
|
}
|
||||||
@@ -45,9 +45,13 @@ public class MovementBehavior {
|
|||||||
} else if (MapStage.getInstance().waypoints.containsKey(Integer.parseInt(destination))) {
|
} else if (MapStage.getInstance().waypoints.containsKey(Integer.parseInt(destination))) {
|
||||||
currentTargetVector = new Vector2(MapStage.getInstance().waypoints.get(Integer.parseInt(destination)));
|
currentTargetVector = new Vector2(MapStage.getInstance().waypoints.get(Integer.parseInt(destination)));
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
System.err.println("Navigation error for object ID" + objectID + ", waypoint could not be parsed or does not exist: " + destination);
|
||||||
|
destination = "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return currentTargetVector;
|
return currentTargetVector == null? currentPosition: currentTargetVector;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setX(float newVal){
|
public void setX(float newVal){
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
</layer>
|
</layer>
|
||||||
<layer id="6" name="Collision" width="30" height="30">
|
<layer id="6" name="Collision" width="30" height="30">
|
||||||
<data encoding="base64" compression="zlib">
|
<data encoding="base64" compression="zlib">
|
||||||
eJzdl80NwjAMhateSsQFCSF1ATZghl5hiq7DDXHKOMzDCCgHC9d9jvOHhPokq1HU+rPjuE27btvq9+XPTs42zpFWw0uJA+VXwj0PXwt6XpdzZJ7F9d6145LG2zoeyT0NSx8tuHIecUl3h+tL9UD1Q/5zud4tmTRG+wLVDplke/CsZ/lOYlzKRQw0T7xW3IezLdyHehn15szGFgutvSb0DknhxngpbOvdRdxYrq24Ml/kn+ZQTClsWV/ODddZyed1tHONsX/VR5qRX20//xM3pZalXFp73se8PqhuOdzYfpb7GvnX4ijpKUuoh1Nz5so960gm9W+MG3Tp18zcbz/najFZa1tz3pBcxNZUc54cD9ifZa24qDdRj7Y4Qwchbqpq/he2oA9iD2gJ
|
eJzdl1EKwjAMhocvs/giiLALeJW96il2nb2JTz2O5/EI0odgFv80WVtB9kOwFJcvaZqRdd22tTuUPzsG2zhHWg3PEwfKr4R76T+W9Lgu98gii+u1b8clDbfveCT33C99tODKfcQlzQHXl+qB6of8r+XGsGTSGt0LVDtkkh3Bs5HlO4p1KRcx0D7xWnHvwbb0P9TLqDcntrZY6Ow1oXeIh5vjedjWu4u4uVxbcWW+yD/toZg8bFlfzk2/k5LP82TnmmP/qo80I7/aff4nrqeWpVw6e97HvD6obmu4ufss7zXyr8VR0lOWUA97c+ZaO+tIJvVvjitVOmNxrhaTdbY184bkIrammnlyOGJ/lrXiot5EPdpihk5CXK9qvhe2oDeqEmfT
|
||||||
</data>
|
</data>
|
||||||
</layer>
|
</layer>
|
||||||
<layer id="1" name="Background" width="30" height="30">
|
<layer id="1" name="Background" width="30" height="30">
|
||||||
|
|||||||
Reference in New Issue
Block a user