Adding more enemy types
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
@@ -12,9 +12,13 @@ class Decorative extends Entity {
|
||||
|
||||
// Checks if the Map ID belongs to a standard decoration
|
||||
static bool isDecoration(int objId) {
|
||||
if (objId == 124) return true; // Dead guard
|
||||
// ID 124 is a dead guard in WL1, but an SS guard in WL6.
|
||||
// However, for spawning purposes, if the SS trySpawn fails,
|
||||
// we only want to treat it as a decoration if it's not a live actor.
|
||||
if (objId == 124 || objId == 125) return true;
|
||||
|
||||
if (objId >= 23 && objId <= 70) {
|
||||
// Exclude the collectibles!
|
||||
// Exclude collectibles defined in MapObject
|
||||
if ((objId >= 43 && objId <= 44) || (objId >= 47 && objId <= 56)) {
|
||||
return false;
|
||||
}
|
||||
@@ -23,9 +27,11 @@ class Decorative extends Entity {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Safely calculates the VSWAP sprite index for standard decorations
|
||||
static int getSpriteIndex(int objId) {
|
||||
if (objId == 124) return 95; // Dead guard
|
||||
if (objId == 124) return 95; // Dead guard sprite index
|
||||
if (objId == 125) return 96; // Dead Aardwolf/Other body
|
||||
|
||||
// Standard decorations are typically offset by 21 in the VSWAP
|
||||
return objId - 21;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user