refactor: utilize NPCType
This commit is contained in:
@ -785,7 +785,7 @@ class GameLogic {
|
||||
}
|
||||
IntVector2 position = free.get(rand.nextInt(free.size()));
|
||||
|
||||
EntityID goose = new EntityID(EntityType.NPC, 0);
|
||||
EntityID goose = new EntityID(EntityType.NPC, NPCType.Goose.getID());
|
||||
result.add(new EventBuilder(EventType.SpawnEntityEvent)
|
||||
.withEntity(new NPC(goose, position, inventory))
|
||||
.buildEntityEvent());
|
||||
@ -832,7 +832,7 @@ class GameLogic {
|
||||
}
|
||||
IntVector2 spawnPosition = spawnOptions.get(rand.nextInt(spawnOptions.size()));
|
||||
|
||||
EntityID stan = new EntityID(EntityType.NPC, 1);
|
||||
EntityID stan = new EntityID(EntityType.NPC, NPCType.Stan.getID());
|
||||
result.add(new EventBuilder(EventType.SpawnEntityEvent)
|
||||
.withEntity(new NPC(stan, spawnPosition))
|
||||
.buildEntityEvent());
|
||||
@ -880,7 +880,7 @@ class GameLogic {
|
||||
}
|
||||
}
|
||||
|
||||
EntityID thanos = new EntityID(EntityType.NPC, 2);
|
||||
EntityID thanos = new EntityID(EntityType.NPC, NPCType.Thanos.getID());
|
||||
result.add(new EventBuilder(EventType.SpawnEntityEvent)
|
||||
.withEntity(new NPC(thanos, position, maxMP))
|
||||
.buildEntityEvent());
|
||||
@ -1010,7 +1010,7 @@ class GameLogic {
|
||||
|
||||
state.turnNumber++;
|
||||
|
||||
if(state.activeCharacter.type == EntityType.NPC && state.activeCharacter.id == 2) {
|
||||
if(state.activeCharacter.type == EntityType.NPC && state.activeCharacter.id == NPCType.Thanos.getID()) {
|
||||
NPC thanos = (NPC)state.entities.findEntity(state.activeCharacter);
|
||||
|
||||
if(state.roundNumber > state.partyConfig.maxRounds + 1) {
|
||||
|
Reference in New Issue
Block a user