import 'package:wolf_3d_dart/wolf_3d_data_types.dart';
import 'package:wolf_3d_dart/wolf_3d_entities.dart';

class DeadGuard extends Decorative {
  /// The sprite index in VSWAP for the final "dead" frame of a Guard.
  static const int deadGuardSprite = 95;

  DeadGuard({required super.x, required super.y})
    : super(
        spriteIndex: deadGuardSprite,
        state: EntityState.staticObj,
        // We set mapId to 124 so we can identify it if needed
        mapId: 124,
      );

  /// This is the self-spawning logic we discussed.
  /// It only claims the ID 124.
  static DeadGuard? trySpawn(
    int objId,
    double x,
    double y,
    Difficulty difficulty, {
    bool isSharewareMode = false,
  }) {
    if (objId == 124) {
      return DeadGuard(x: x, y: y);
    }
    return null;
  }
}
