Add scripted trainer battle foundation and native move AI
Checks / web (push) Canceled after 0s

This commit is contained in:
Sébastien QUEROL committed 2026-09-24 09:33:33 +02:00
1 parent 6a74f59e46
commit 3e92936cb9
20 files changed
+1417 -32

No files matched your search

+2
View File
@@ -71,6 +71,7 @@ const CHARACTERS: Record<number, string> = {
export interface TextContext {
player: string;
rival: string;
trainer?: string;
mom: string;
/** Native strings stored at the RAM addresses named by text_ram. */
strings: Readonly<Record<number, string>>;
@@ -126,6 +127,7 @@ function character(code: number, context: TextContext): string | undefined {
if (code === 0x5a) return battler(context, context.battle?.turn === 1);
if (code === 0x52 || code === 0x14) return context.player;
if (code === 0x53) return context.rival;
if (code === 0x3f) return context.trainer;
if (code === 0x49) return context.mom;
if (code >= 0x80 && code <= 0x99)
return String.fromCharCode(65 + code - 0x80);