mirror of
https://github.com/DaanVandenBosch/phantasmal-world.git
synced 2025-04-04 22:58:29 +08:00
Added Vol Opt part 2.
This commit is contained in:
parent
821b894a52
commit
050e0ffd57
@ -1,5 +1,4 @@
|
||||
import { readdirSync, readFileSync, statSync, writeFileSync } from "fs";
|
||||
import Logger from "js-logger";
|
||||
import { ASSETS_DIR, RESOURCE_DIR } from ".";
|
||||
import { BufferCursor } from "../src/core/data_formats/cursor/BufferCursor";
|
||||
import { ItemPmt, parse_item_pmt } from "../src/core/data_formats/parsing/itempmt";
|
||||
@ -13,14 +12,15 @@ import { Endianness } from "../src/core/data_formats/Endianness";
|
||||
import { ItemTypeDto } from "../src/core/dto/ItemTypeDto";
|
||||
import { QuestDto } from "../src/hunt_optimizer/dto/QuestDto";
|
||||
import { BoxDropDto, EnemyDropDto } from "../src/hunt_optimizer/dto/drops";
|
||||
import { LogLevel, LogManager } from "../src/core/Logger";
|
||||
|
||||
const logger = Logger.get("assets_generation/update_ephinea_data");
|
||||
const logger = LogManager.get("assets_generation/update_ephinea_data");
|
||||
|
||||
Logger.useDefaults({ defaultLevel: Logger.ERROR });
|
||||
logger.setLevel(Logger.INFO);
|
||||
Logger.get("static/update_drops_ephinea").setLevel(Logger.INFO);
|
||||
Logger.get("core/data_formats/parsing/quest").setLevel(Logger.OFF);
|
||||
Logger.get("core/data_formats/parsing/quest/bin").setLevel(Logger.OFF);
|
||||
LogManager.default_level = LogLevel.Error;
|
||||
logger.level = LogLevel.Info;
|
||||
LogManager.get("static/update_drops_ephinea").level = LogLevel.Info;
|
||||
LogManager.get("core/data_formats/parsing/quest").level = LogLevel.Off;
|
||||
LogManager.get("core/data_formats/parsing/quest/bin").level = LogLevel.Off;
|
||||
|
||||
/**
|
||||
* Used by static data generation scripts.
|
||||
@ -331,7 +331,7 @@ function load_item_pt(): ItemPt {
|
||||
switch (npc) {
|
||||
case NpcType.Dragon:
|
||||
case NpcType.DeRolLe:
|
||||
case NpcType.VolOpt:
|
||||
case NpcType.VolOptPart2:
|
||||
case NpcType.DarkFalz:
|
||||
case NpcType.BarbaRay:
|
||||
case NpcType.GolDragon:
|
||||
@ -739,7 +739,7 @@ function get_enemy_type(episode: Episode, index: number): NpcType | undefined {
|
||||
|
||||
NpcType.Dragon,
|
||||
NpcType.DeRolLe,
|
||||
NpcType.VolOpt,
|
||||
NpcType.VolOptPart2,
|
||||
NpcType.DarkFalz,
|
||||
|
||||
undefined,
|
||||
@ -954,8 +954,10 @@ function npc_type_to_pt_index(type: NpcType): number | undefined {
|
||||
return 29;
|
||||
case NpcType.Dubswitch:
|
||||
return undefined;
|
||||
case NpcType.VolOpt:
|
||||
case NpcType.VolOptPart1:
|
||||
return 46;
|
||||
case NpcType.VolOptPart2:
|
||||
return undefined;
|
||||
|
||||
// Episode I Ruins
|
||||
|
||||
|
@ -8,6 +8,7 @@ export enum LogLevel {
|
||||
Info,
|
||||
Warn,
|
||||
Error,
|
||||
Off,
|
||||
}
|
||||
|
||||
export const LogLevels = enum_values<LogLevel>(LogLevel);
|
||||
|
@ -492,10 +492,10 @@ function get_npc_type(episode: number, { type_id, scale, roaming, area_id }: Dat
|
||||
return NpcType.GalGryphon;
|
||||
case `${0x0c1}, 1`:
|
||||
return NpcType.DeRolLe;
|
||||
// TODO:
|
||||
// case `${0x0C2}, 1`: return NpcType.VolOptPart1;
|
||||
case `${0x0c2}, 1`:
|
||||
return NpcType.VolOptPart1;
|
||||
case `${0x0c5}, 1`:
|
||||
return NpcType.VolOpt;
|
||||
return NpcType.VolOptPart2;
|
||||
case `${0x0c8}, 1`:
|
||||
return NpcType.DarkFalz;
|
||||
case `${0x0ca}, 2`:
|
||||
|
@ -75,7 +75,8 @@ export enum NpcType {
|
||||
Canadine,
|
||||
Canane,
|
||||
Dubswitch,
|
||||
VolOpt,
|
||||
VolOptPart1,
|
||||
VolOptPart2,
|
||||
|
||||
// Episode I Ruins
|
||||
|
||||
@ -976,8 +977,21 @@ define_npc_type_data(
|
||||
true,
|
||||
);
|
||||
define_npc_type_data(
|
||||
NpcType.VolOpt,
|
||||
NpcType.VolOptPart1,
|
||||
"Vol Opt (Part 1)",
|
||||
"Vol Opt",
|
||||
"Vol Opt ver.2",
|
||||
1,
|
||||
true,
|
||||
undefined,
|
||||
[13],
|
||||
0x0c2,
|
||||
0,
|
||||
true,
|
||||
);
|
||||
define_npc_type_data(
|
||||
NpcType.VolOptPart2,
|
||||
"Vol Opt (Part 2)",
|
||||
"Vol Opt",
|
||||
"Vol Opt ver.2",
|
||||
1,
|
||||
|
@ -25,8 +25,11 @@ export class NpcCountsController extends Controller {
|
||||
const npc_counts = new Map<NpcType, number>();
|
||||
|
||||
for (const npc of npcs) {
|
||||
const val = npc_counts.get(npc.type) || 0;
|
||||
npc_counts.set(npc.type, val + 1);
|
||||
// Don't count Vol Opt twice.
|
||||
if (npc.type !== NpcType.VolOptPart2) {
|
||||
const val = npc_counts.get(npc.type) || 0;
|
||||
npc_counts.set(npc.type, val + 1);
|
||||
}
|
||||
}
|
||||
|
||||
const extra_canadines = (npc_counts.get(NpcType.Canane) || 0) * 8;
|
||||
|
Loading…
Reference in New Issue
Block a user