diff --git a/.gitignore b/.gitignore index a547bf36d..d46905312 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,5 @@ dist-ssr *.njsproj *.sln *.sw? + +public/images/trainer/convert/* diff --git a/public/audio/bgm/battle_cynthia.mp3 b/public/audio/bgm/battle_cynthia.mp3 new file mode 100644 index 000000000..e6240c5a0 Binary files /dev/null and b/public/audio/bgm/battle_cynthia.mp3 differ diff --git a/public/audio/bgm/battle_elite.mp3 b/public/audio/bgm/battle_elite.mp3 new file mode 100644 index 000000000..cab27a0de Binary files /dev/null and b/public/audio/bgm/battle_elite.mp3 differ diff --git a/public/audio/bgm/battle_final.mp3 b/public/audio/bgm/battle_final.mp3 new file mode 100644 index 000000000..6f5cb5d12 Binary files /dev/null and b/public/audio/bgm/battle_final.mp3 differ diff --git a/public/audio/bgm/battle_gym.mp3 b/public/audio/bgm/battle_gym.mp3 new file mode 100644 index 000000000..3995e675b Binary files /dev/null and b/public/audio/bgm/battle_gym.mp3 differ diff --git a/public/audio/bgm/battle_legendary.mp3 b/public/audio/bgm/battle_legendary.mp3 new file mode 100644 index 000000000..e4977d5b3 Binary files /dev/null and b/public/audio/bgm/battle_legendary.mp3 differ diff --git a/public/audio/bgm/battle_legendary_k.mp3 b/public/audio/bgm/battle_legendary_k.mp3 new file mode 100644 index 000000000..f2a325d42 Binary files /dev/null and b/public/audio/bgm/battle_legendary_k.mp3 differ diff --git a/public/audio/bgm/battle_legendary_rz.mp3 b/public/audio/bgm/battle_legendary_rz.mp3 new file mode 100644 index 000000000..4df08c10d Binary files /dev/null and b/public/audio/bgm/battle_legendary_rz.mp3 differ diff --git a/public/audio/bgm/battle_rival.mp3 b/public/audio/bgm/battle_rival.mp3 new file mode 100644 index 000000000..3ccf48984 Binary files /dev/null and b/public/audio/bgm/battle_rival.mp3 differ diff --git a/public/audio/bgm/battle_rival_2.mp3 b/public/audio/bgm/battle_rival_2.mp3 new file mode 100644 index 000000000..3f19f990d Binary files /dev/null and b/public/audio/bgm/battle_rival_2.mp3 differ diff --git a/public/audio/bgm/battle_rival_3.mp3 b/public/audio/bgm/battle_rival_3.mp3 new file mode 100644 index 000000000..f6254c24c Binary files /dev/null and b/public/audio/bgm/battle_rival_3.mp3 differ diff --git a/public/audio/bgm/battle_trainer.mp3 b/public/audio/bgm/battle_trainer.mp3 new file mode 100644 index 000000000..1155d72a5 Binary files /dev/null and b/public/audio/bgm/battle_trainer.mp3 differ diff --git a/public/audio/bgm/battle_wild.mp3 b/public/audio/bgm/battle_wild.mp3 new file mode 100644 index 000000000..98f7fe201 Binary files /dev/null and b/public/audio/bgm/battle_wild.mp3 differ diff --git a/public/audio/bgm/battle_wild_strong.mp3 b/public/audio/bgm/battle_wild_strong.mp3 new file mode 100644 index 000000000..166ac3825 Binary files /dev/null and b/public/audio/bgm/battle_wild_strong.mp3 differ diff --git a/public/audio/bgm/bw/evolution.mp3 b/public/audio/bgm/bw/evolution.mp3 new file mode 100644 index 000000000..0d7ae190b Binary files /dev/null and b/public/audio/bgm/bw/evolution.mp3 differ diff --git a/public/audio/bgm/bw/evolution_fanfare.mp3 b/public/audio/bgm/bw/evolution_fanfare.mp3 new file mode 100644 index 000000000..cb394470f Binary files /dev/null and b/public/audio/bgm/bw/evolution_fanfare.mp3 differ diff --git a/public/audio/bgm/bw/level_up_fanfare.mp3 b/public/audio/bgm/bw/level_up_fanfare.mp3 new file mode 100644 index 000000000..3e4bdbdc9 Binary files /dev/null and b/public/audio/bgm/bw/level_up_fanfare.mp3 differ diff --git a/public/audio/bgm/bw/victory.mp3 b/public/audio/bgm/bw/victory.mp3 new file mode 100644 index 000000000..c8ab465a7 Binary files /dev/null and b/public/audio/bgm/bw/victory.mp3 differ diff --git a/public/audio/bgm/encounter_ace_trainer.mp3 b/public/audio/bgm/encounter_ace_trainer.mp3 new file mode 100644 index 000000000..835d7fbb5 Binary files /dev/null and b/public/audio/bgm/encounter_ace_trainer.mp3 differ diff --git a/public/audio/bgm/encounter_backpacker.mp3 b/public/audio/bgm/encounter_backpacker.mp3 new file mode 100644 index 000000000..c1e3d7f0a Binary files /dev/null and b/public/audio/bgm/encounter_backpacker.mp3 differ diff --git a/public/audio/bgm/encounter_clerk.mp3 b/public/audio/bgm/encounter_clerk.mp3 new file mode 100644 index 000000000..8542a641e Binary files /dev/null and b/public/audio/bgm/encounter_clerk.mp3 differ diff --git a/public/audio/bgm/encounter_cyclist.mp3 b/public/audio/bgm/encounter_cyclist.mp3 new file mode 100644 index 000000000..3603947d9 Binary files /dev/null and b/public/audio/bgm/encounter_cyclist.mp3 differ diff --git a/public/audio/bgm/encounter_lass.mp3 b/public/audio/bgm/encounter_lass.mp3 new file mode 100644 index 000000000..2f8be45c5 Binary files /dev/null and b/public/audio/bgm/encounter_lass.mp3 differ diff --git a/public/audio/bgm/encounter_parasol_lady.mp3 b/public/audio/bgm/encounter_parasol_lady.mp3 new file mode 100644 index 000000000..1eb632a40 Binary files /dev/null and b/public/audio/bgm/encounter_parasol_lady.mp3 differ diff --git a/public/audio/bgm/encounter_pokefan.mp3 b/public/audio/bgm/encounter_pokefan.mp3 new file mode 100644 index 000000000..9c8f60aac Binary files /dev/null and b/public/audio/bgm/encounter_pokefan.mp3 differ diff --git a/public/audio/bgm/encounter_psychic.mp3 b/public/audio/bgm/encounter_psychic.mp3 new file mode 100644 index 000000000..75a280856 Binary files /dev/null and b/public/audio/bgm/encounter_psychic.mp3 differ diff --git a/public/audio/bgm/encounter_rich.mp3 b/public/audio/bgm/encounter_rich.mp3 new file mode 100644 index 000000000..cca97e618 Binary files /dev/null and b/public/audio/bgm/encounter_rich.mp3 differ diff --git a/public/audio/bgm/encounter_rival.mp3 b/public/audio/bgm/encounter_rival.mp3 new file mode 100644 index 000000000..613c1b552 Binary files /dev/null and b/public/audio/bgm/encounter_rival.mp3 differ diff --git a/public/audio/bgm/encounter_roughneck.mp3 b/public/audio/bgm/encounter_roughneck.mp3 new file mode 100644 index 000000000..9e2391911 Binary files /dev/null and b/public/audio/bgm/encounter_roughneck.mp3 differ diff --git a/public/audio/bgm/encounter_scientist.mp3 b/public/audio/bgm/encounter_scientist.mp3 new file mode 100644 index 000000000..8cb180cd6 Binary files /dev/null and b/public/audio/bgm/encounter_scientist.mp3 differ diff --git a/public/audio/bgm/encounter_twins.mp3 b/public/audio/bgm/encounter_twins.mp3 new file mode 100644 index 000000000..cb6b0ef8a Binary files /dev/null and b/public/audio/bgm/encounter_twins.mp3 differ diff --git a/public/audio/bgm/encounter_youngster.mp3 b/public/audio/bgm/encounter_youngster.mp3 new file mode 100644 index 000000000..33e900b28 Binary files /dev/null and b/public/audio/bgm/encounter_youngster.mp3 differ diff --git a/public/audio/bgm/heal.mp3 b/public/audio/bgm/heal.mp3 new file mode 100644 index 000000000..22b2d9fb8 Binary files /dev/null and b/public/audio/bgm/heal.mp3 differ diff --git a/public/audio/bgm/evolution.mp3 b/public/audio/bgm/rse/evolution.mp3 similarity index 100% rename from public/audio/bgm/evolution.mp3 rename to public/audio/bgm/rse/evolution.mp3 diff --git a/public/audio/bgm/evolution_fanfare.mp3 b/public/audio/bgm/rse/evolution_fanfare.mp3 similarity index 100% rename from public/audio/bgm/evolution_fanfare.mp3 rename to public/audio/bgm/rse/evolution_fanfare.mp3 diff --git a/public/audio/bgm/level_up_fanfare.mp3 b/public/audio/bgm/rse/level_up_fanfare.mp3 similarity index 100% rename from public/audio/bgm/level_up_fanfare.mp3 rename to public/audio/bgm/rse/level_up_fanfare.mp3 diff --git a/public/audio/bgm/victory.mp3 b/public/audio/bgm/rse/victory.mp3 similarity index 100% rename from public/audio/bgm/victory.mp3 rename to public/audio/bgm/rse/victory.mp3 diff --git a/public/images/trainer/battle_girl.json b/public/images/trainer/black_belt_f.json similarity index 99% rename from public/images/trainer/battle_girl.json rename to public/images/trainer/black_belt_f.json index ca5a9195e..7f46dd60f 100644 --- a/public/images/trainer/battle_girl.json +++ b/public/images/trainer/black_belt_f.json @@ -1,7 +1,7 @@ { "textures": [ { - "image": "battle_girl.png", + "image": "black_belt_f.png", "format": "RGBA8888", "size": { "w": 211, diff --git a/public/images/trainer/battle_girl.png b/public/images/trainer/black_belt_f.png similarity index 100% rename from public/images/trainer/battle_girl.png rename to public/images/trainer/black_belt_f.png diff --git a/public/images/trainer/blackbelt.json b/public/images/trainer/black_belt_m.json similarity index 99% rename from public/images/trainer/blackbelt.json rename to public/images/trainer/black_belt_m.json index fe054a2cb..df6736fdc 100644 --- a/public/images/trainer/blackbelt.json +++ b/public/images/trainer/black_belt_m.json @@ -1,7 +1,7 @@ { "textures": [ { - "image": "blackbelt.png", + "image": "black_belt_m.png", "format": "RGBA8888", "size": { "w": 280, diff --git a/public/images/trainer/blackbelt.png b/public/images/trainer/black_belt_m.png similarity index 100% rename from public/images/trainer/blackbelt.png rename to public/images/trainer/black_belt_m.png diff --git a/public/images/trainer/socialite.json b/public/images/trainer/rich_f.json similarity index 99% rename from public/images/trainer/socialite.json rename to public/images/trainer/rich_f.json index 70b439225..4043f0e5d 100644 --- a/public/images/trainer/socialite.json +++ b/public/images/trainer/rich_f.json @@ -1,7 +1,7 @@ { "textures": [ { - "image": "socialite.png", + "image": "rich_f.png", "format": "RGBA8888", "size": { "w": 216, diff --git a/public/images/trainer/socialite.png b/public/images/trainer/rich_f.png similarity index 100% rename from public/images/trainer/socialite.png rename to public/images/trainer/rich_f.png diff --git a/public/images/trainer/lady.json b/public/images/trainer/rich_kid_f.json similarity index 99% rename from public/images/trainer/lady.json rename to public/images/trainer/rich_kid_f.json index 266007edd..3f8b5757e 100644 --- a/public/images/trainer/lady.json +++ b/public/images/trainer/rich_kid_f.json @@ -1,7 +1,7 @@ { "textures": [ { - "image": "lady.png", + "image": "rich_kid_f.png", "format": "RGBA8888", "size": { "w": 299, diff --git a/public/images/trainer/lady.png b/public/images/trainer/rich_kid_f.png similarity index 100% rename from public/images/trainer/lady.png rename to public/images/trainer/rich_kid_f.png diff --git a/public/images/trainer/rich_boy.json b/public/images/trainer/rich_kid_m.json similarity index 99% rename from public/images/trainer/rich_boy.json rename to public/images/trainer/rich_kid_m.json index 15285e539..009b57320 100644 --- a/public/images/trainer/rich_boy.json +++ b/public/images/trainer/rich_kid_m.json @@ -1,7 +1,7 @@ { "textures": [ { - "image": "rich_boy.png", + "image": "rich_kid_m.png", "format": "RGBA8888", "size": { "w": 152, diff --git a/public/images/trainer/rich_boy.png b/public/images/trainer/rich_kid_m.png similarity index 100% rename from public/images/trainer/rich_boy.png rename to public/images/trainer/rich_kid_m.png diff --git a/public/images/trainer/gentleman.json b/public/images/trainer/rich_m.json similarity index 99% rename from public/images/trainer/gentleman.json rename to public/images/trainer/rich_m.json index cc49d33b9..e05b34e0b 100644 --- a/public/images/trainer/gentleman.json +++ b/public/images/trainer/rich_m.json @@ -1,7 +1,7 @@ { "textures": [ { - "image": "gentleman.png", + "image": "rich_m.png", "format": "RGBA8888", "size": { "w": 308, diff --git a/public/images/trainer/gentleman.png b/public/images/trainer/rich_m.png similarity index 100% rename from public/images/trainer/gentleman.png rename to public/images/trainer/rich_m.png diff --git a/public/images/trainer/rival_f.json b/public/images/trainer/rival_f.json new file mode 100644 index 000000000..c2dd781d3 --- /dev/null +++ b/public/images/trainer/rival_f.json @@ -0,0 +1,1700 @@ +{ + "textures": [ + { + "image": "rival_f.png", + "format": "RGBA8888", + "size": { + "w": 267, + "h": 267 + }, + "scale": 1, + "frames": [ + { + "filename": "0001.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0037.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0038.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0039.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0040.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0041.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0042.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0043.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0044.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0045.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0046.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0047.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0048.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0049.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0050.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0051.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0052.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0053.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0054.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0055.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0056.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0057.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0058.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0059.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0060.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0061.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0062.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0063.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0064.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0065.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0066.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0067.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0068.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0069.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0070.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0071.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0072.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0073.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0074.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0075.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0076.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0077.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0078.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0079.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0080.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 12, + "w": 44, + "h": 68 + }, + "frame": { + "x": 1, + "y": 1, + "w": 44, + "h": 68 + } + }, + { + "filename": "0002.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 26, + "y": 11, + "w": 38, + "h": 69 + }, + "frame": { + "x": 1, + "y": 71, + "w": 38, + "h": 69 + } + }, + { + "filename": "0003.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 26, + "y": 11, + "w": 38, + "h": 69 + }, + "frame": { + "x": 1, + "y": 71, + "w": 38, + "h": 69 + } + }, + { + "filename": "0004.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 26, + "y": 11, + "w": 38, + "h": 69 + }, + "frame": { + "x": 1, + "y": 71, + "w": 38, + "h": 69 + } + }, + { + "filename": "0005.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 26, + "y": 11, + "w": 38, + "h": 69 + }, + "frame": { + "x": 1, + "y": 71, + "w": 38, + "h": 69 + } + }, + { + "filename": "0006.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 26, + "y": 11, + "w": 38, + "h": 69 + }, + "frame": { + "x": 1, + "y": 71, + "w": 38, + "h": 69 + } + }, + { + "filename": "0007.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 26, + "y": 11, + "w": 38, + "h": 69 + }, + "frame": { + "x": 1, + "y": 71, + "w": 38, + "h": 69 + } + }, + { + "filename": "0008.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 26, + "y": 11, + "w": 38, + "h": 69 + }, + "frame": { + "x": 1, + "y": 142, + "w": 38, + "h": 69 + } + }, + { + "filename": "0036.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 12, + "w": 39, + "h": 68 + }, + "frame": { + "x": 47, + "y": 1, + "w": 39, + "h": 68 + } + }, + { + "filename": "0009.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 26, + "y": 11, + "w": 38, + "h": 69 + }, + "frame": { + "x": 41, + "y": 71, + "w": 38, + "h": 69 + } + }, + { + "filename": "0010.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 26, + "y": 12, + "w": 38, + "h": 68 + }, + "frame": { + "x": 88, + "y": 1, + "w": 38, + "h": 68 + } + }, + { + "filename": "0011.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 26, + "y": 12, + "w": 38, + "h": 68 + }, + "frame": { + "x": 88, + "y": 1, + "w": 38, + "h": 68 + } + }, + { + "filename": "0012.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 26, + "y": 12, + "w": 37, + "h": 68 + }, + "frame": { + "x": 41, + "y": 142, + "w": 37, + "h": 68 + } + }, + { + "filename": "0013.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 26, + "y": 12, + "w": 37, + "h": 68 + }, + "frame": { + "x": 41, + "y": 142, + "w": 37, + "h": 68 + } + }, + { + "filename": "0014.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 26, + "y": 12, + "w": 37, + "h": 68 + }, + "frame": { + "x": 41, + "y": 142, + "w": 37, + "h": 68 + } + }, + { + "filename": "0015.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 26, + "y": 12, + "w": 37, + "h": 68 + }, + "frame": { + "x": 41, + "y": 142, + "w": 37, + "h": 68 + } + }, + { + "filename": "0016.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 26, + "y": 12, + "w": 37, + "h": 68 + }, + "frame": { + "x": 41, + "y": 142, + "w": 37, + "h": 68 + } + }, + { + "filename": "0017.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 26, + "y": 12, + "w": 37, + "h": 68 + }, + "frame": { + "x": 41, + "y": 142, + "w": 37, + "h": 68 + } + }, + { + "filename": "0018.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 26, + "y": 12, + "w": 37, + "h": 68 + }, + "frame": { + "x": 81, + "y": 71, + "w": 37, + "h": 68 + } + }, + { + "filename": "0019.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 26, + "y": 12, + "w": 37, + "h": 68 + }, + "frame": { + "x": 81, + "y": 71, + "w": 37, + "h": 68 + } + }, + { + "filename": "0034.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 27, + "y": 12, + "w": 36, + "h": 68 + }, + "frame": { + "x": 128, + "y": 1, + "w": 36, + "h": 68 + } + }, + { + "filename": "0035.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 27, + "y": 12, + "w": 36, + "h": 68 + }, + "frame": { + "x": 128, + "y": 1, + "w": 36, + "h": 68 + } + }, + { + "filename": "0024.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 29, + "y": 12, + "w": 35, + "h": 68 + }, + "frame": { + "x": 120, + "y": 71, + "w": 35, + "h": 68 + } + }, + { + "filename": "0025.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 29, + "y": 12, + "w": 35, + "h": 68 + }, + "frame": { + "x": 166, + "y": 1, + "w": 35, + "h": 68 + } + }, + { + "filename": "0026.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 29, + "y": 12, + "w": 35, + "h": 68 + }, + "frame": { + "x": 157, + "y": 71, + "w": 35, + "h": 68 + } + }, + { + "filename": "0027.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 29, + "y": 12, + "w": 35, + "h": 68 + }, + "frame": { + "x": 157, + "y": 71, + "w": 35, + "h": 68 + } + }, + { + "filename": "0028.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 29, + "y": 12, + "w": 35, + "h": 68 + }, + "frame": { + "x": 203, + "y": 1, + "w": 35, + "h": 68 + } + }, + { + "filename": "0032.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 29, + "y": 12, + "w": 35, + "h": 68 + }, + "frame": { + "x": 194, + "y": 71, + "w": 35, + "h": 68 + } + }, + { + "filename": "0033.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 29, + "y": 12, + "w": 35, + "h": 68 + }, + "frame": { + "x": 231, + "y": 71, + "w": 35, + "h": 68 + } + }, + { + "filename": "0020.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 29, + "y": 13, + "w": 35, + "h": 67 + }, + "frame": { + "x": 80, + "y": 142, + "w": 35, + "h": 67 + } + }, + { + "filename": "0022.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 29, + "y": 14, + "w": 35, + "h": 66 + }, + "frame": { + "x": 117, + "y": 141, + "w": 35, + "h": 66 + } + }, + { + "filename": "0023.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 29, + "y": 14, + "w": 35, + "h": 66 + }, + "frame": { + "x": 117, + "y": 141, + "w": 35, + "h": 66 + } + }, + { + "filename": "0030.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 29, + "y": 14, + "w": 35, + "h": 66 + }, + "frame": { + "x": 154, + "y": 141, + "w": 35, + "h": 66 + } + }, + { + "filename": "0031.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 29, + "y": 14, + "w": 35, + "h": 66 + }, + "frame": { + "x": 154, + "y": 141, + "w": 35, + "h": 66 + } + }, + { + "filename": "0021.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 29, + "y": 15, + "w": 35, + "h": 65 + }, + "frame": { + "x": 191, + "y": 141, + "w": 35, + "h": 65 + } + }, + { + "filename": "0029.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 29, + "y": 15, + "w": 35, + "h": 65 + }, + "frame": { + "x": 228, + "y": 141, + "w": 35, + "h": 65 + } + } + ] + } + ], + "meta": { + "app": "https://www.codeandweb.com/texturepacker", + "version": "3.0", + "smartupdate": "$TexturePacker:SmartUpdate:92bf7ea7e3407455bb34fe6f9d75dfdc:a220b526a6cb6f8c8c59981ba4b5b29d:d775b18721c35a876c0a2336460c5502$" + } +} diff --git a/public/images/trainer/rival_f.png b/public/images/trainer/rival_f.png new file mode 100644 index 000000000..87d35510d Binary files /dev/null and b/public/images/trainer/rival_f.png differ diff --git a/public/images/trainer/rival_m.json b/public/images/trainer/rival_m.json new file mode 100644 index 000000000..7a54d1f00 --- /dev/null +++ b/public/images/trainer/rival_m.json @@ -0,0 +1,1721 @@ +{ + "textures": [ + { + "image": "rival_m.png", + "format": "RGBA8888", + "size": { + "w": 196, + "h": 196 + }, + "scale": 1, + "frames": [ + { + "filename": "0001.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0038.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0039.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0040.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0041.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0042.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0043.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0044.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0045.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0046.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0047.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0048.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0049.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0050.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0051.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0052.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0053.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0054.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0055.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0056.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0057.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0058.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0059.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0060.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0061.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0062.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0063.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0064.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0065.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0066.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0067.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0068.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0069.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0070.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0071.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0072.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0073.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0074.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0075.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0076.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0077.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0078.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0079.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0080.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0081.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 9, + "w": 38, + "h": 71 + }, + "frame": { + "x": 1, + "y": 1, + "w": 38, + "h": 71 + } + }, + { + "filename": "0034.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 19, + "y": 12, + "w": 40, + "h": 68 + }, + "frame": { + "x": 41, + "y": 1, + "w": 40, + "h": 68 + } + }, + { + "filename": "0035.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 19, + "y": 12, + "w": 40, + "h": 68 + }, + "frame": { + "x": 41, + "y": 1, + "w": 40, + "h": 68 + } + }, + { + "filename": "0036.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 10, + "w": 38, + "h": 70 + }, + "frame": { + "x": 1, + "y": 74, + "w": 38, + "h": 70 + } + }, + { + "filename": "0033.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 31, + "w": 37, + "h": 49 + }, + "frame": { + "x": 1, + "y": 146, + "w": 37, + "h": 49 + } + }, + { + "filename": "0037.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 10, + "w": 38, + "h": 70 + }, + "frame": { + "x": 41, + "y": 71, + "w": 38, + "h": 70 + } + }, + { + "filename": "0002.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 19, + "y": 23, + "w": 41, + "h": 57 + }, + "frame": { + "x": 83, + "y": 1, + "w": 41, + "h": 57 + } + }, + { + "filename": "0003.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 19, + "y": 23, + "w": 41, + "h": 57 + }, + "frame": { + "x": 83, + "y": 1, + "w": 41, + "h": 57 + } + }, + { + "filename": "0004.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 19, + "y": 23, + "w": 41, + "h": 57 + }, + "frame": { + "x": 83, + "y": 1, + "w": 41, + "h": 57 + } + }, + { + "filename": "0005.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 19, + "y": 23, + "w": 41, + "h": 57 + }, + "frame": { + "x": 83, + "y": 1, + "w": 41, + "h": 57 + } + }, + { + "filename": "0006.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 19, + "y": 23, + "w": 41, + "h": 57 + }, + "frame": { + "x": 83, + "y": 1, + "w": 41, + "h": 57 + } + }, + { + "filename": "0007.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 19, + "y": 23, + "w": 41, + "h": 57 + }, + "frame": { + "x": 83, + "y": 1, + "w": 41, + "h": 57 + } + }, + { + "filename": "0008.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 19, + "y": 23, + "w": 41, + "h": 57 + }, + "frame": { + "x": 83, + "y": 1, + "w": 41, + "h": 57 + } + }, + { + "filename": "0009.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 19, + "y": 25, + "w": 41, + "h": 55 + }, + "frame": { + "x": 126, + "y": 1, + "w": 41, + "h": 55 + } + }, + { + "filename": "0010.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 20, + "y": 28, + "w": 39, + "h": 52 + }, + "frame": { + "x": 41, + "y": 143, + "w": 39, + "h": 52 + } + }, + { + "filename": "0011.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 20, + "y": 28, + "w": 39, + "h": 52 + }, + "frame": { + "x": 41, + "y": 143, + "w": 39, + "h": 52 + } + }, + { + "filename": "0012.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 20, + "y": 36, + "w": 38, + "h": 44 + }, + "frame": { + "x": 83, + "y": 60, + "w": 38, + "h": 44 + } + }, + { + "filename": "0018.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 20, + "y": 36, + "w": 38, + "h": 44 + }, + "frame": { + "x": 123, + "y": 60, + "w": 38, + "h": 44 + } + }, + { + "filename": "0019.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 20, + "y": 36, + "w": 38, + "h": 44 + }, + "frame": { + "x": 123, + "y": 60, + "w": 38, + "h": 44 + } + }, + { + "filename": "0020.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 20, + "y": 36, + "w": 38, + "h": 44 + }, + "frame": { + "x": 123, + "y": 60, + "w": 38, + "h": 44 + } + }, + { + "filename": "0032.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 20, + "y": 36, + "w": 38, + "h": 44 + }, + "frame": { + "x": 123, + "y": 60, + "w": 38, + "h": 44 + } + }, + { + "filename": "0021.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 20, + "y": 37, + "w": 38, + "h": 43 + }, + "frame": { + "x": 82, + "y": 106, + "w": 38, + "h": 43 + } + }, + { + "filename": "0022.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 20, + "y": 37, + "w": 38, + "h": 43 + }, + "frame": { + "x": 82, + "y": 106, + "w": 38, + "h": 43 + } + }, + { + "filename": "0023.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 20, + "y": 37, + "w": 38, + "h": 43 + }, + "frame": { + "x": 82, + "y": 106, + "w": 38, + "h": 43 + } + }, + { + "filename": "0013.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 20, + "y": 38, + "w": 38, + "h": 42 + }, + "frame": { + "x": 82, + "y": 151, + "w": 38, + "h": 42 + } + }, + { + "filename": "0014.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 20, + "y": 38, + "w": 38, + "h": 42 + }, + "frame": { + "x": 82, + "y": 151, + "w": 38, + "h": 42 + } + }, + { + "filename": "0015.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 20, + "y": 38, + "w": 38, + "h": 42 + }, + "frame": { + "x": 82, + "y": 151, + "w": 38, + "h": 42 + } + }, + { + "filename": "0016.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 20, + "y": 38, + "w": 38, + "h": 42 + }, + "frame": { + "x": 82, + "y": 151, + "w": 38, + "h": 42 + } + }, + { + "filename": "0017.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 20, + "y": 38, + "w": 38, + "h": 42 + }, + "frame": { + "x": 82, + "y": 151, + "w": 38, + "h": 42 + } + }, + { + "filename": "0024.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 20, + "y": 38, + "w": 38, + "h": 42 + }, + "frame": { + "x": 82, + "y": 151, + "w": 38, + "h": 42 + } + }, + { + "filename": "0025.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 20, + "y": 38, + "w": 38, + "h": 42 + }, + "frame": { + "x": 82, + "y": 151, + "w": 38, + "h": 42 + } + }, + { + "filename": "0026.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 20, + "y": 39, + "w": 38, + "h": 41 + }, + "frame": { + "x": 122, + "y": 106, + "w": 38, + "h": 41 + } + }, + { + "filename": "0027.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 20, + "y": 39, + "w": 38, + "h": 41 + }, + "frame": { + "x": 122, + "y": 106, + "w": 38, + "h": 41 + } + }, + { + "filename": "0028.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 20, + "y": 39, + "w": 38, + "h": 41 + }, + "frame": { + "x": 122, + "y": 106, + "w": 38, + "h": 41 + } + }, + { + "filename": "0029.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 20, + "y": 40, + "w": 38, + "h": 40 + }, + "frame": { + "x": 122, + "y": 149, + "w": 38, + "h": 40 + } + }, + { + "filename": "0030.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 20, + "y": 40, + "w": 38, + "h": 40 + }, + "frame": { + "x": 122, + "y": 149, + "w": 38, + "h": 40 + } + }, + { + "filename": "0031.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 20, + "y": 40, + "w": 38, + "h": 40 + }, + "frame": { + "x": 122, + "y": 149, + "w": 38, + "h": 40 + } + } + ] + } + ], + "meta": { + "app": "https://www.codeandweb.com/texturepacker", + "version": "3.0", + "smartupdate": "$TexturePacker:SmartUpdate:8385e0bf69d49cb5e3ad99cf4ef0e225:60b8782eae5473a51463d8d1db7eb054:45390a50848154ae0c2f7992c949cf52$" + } +} diff --git a/public/images/trainer/rival_m.png b/public/images/trainer/rival_m.png new file mode 100644 index 000000000..aebbe7a2d Binary files /dev/null and b/public/images/trainer/rival_m.png differ diff --git a/public/images/trainer/lass.json b/public/images/trainer/youngster_f.json similarity index 99% rename from public/images/trainer/lass.json rename to public/images/trainer/youngster_f.json index 8629dde8b..5a3c515a2 100644 --- a/public/images/trainer/lass.json +++ b/public/images/trainer/youngster_f.json @@ -1,7 +1,7 @@ { "textures": [ { - "image": "lass.png", + "image": "youngster_f.png", "format": "RGBA8888", "size": { "w": 218, diff --git a/public/images/trainer/lass.png b/public/images/trainer/youngster_f.png similarity index 100% rename from public/images/trainer/lass.png rename to public/images/trainer/youngster_f.png diff --git a/public/images/trainer/youngster.json b/public/images/trainer/youngster_m.json similarity index 99% rename from public/images/trainer/youngster.json rename to public/images/trainer/youngster_m.json index 3ad34f523..a2a85c645 100644 --- a/public/images/trainer/youngster.json +++ b/public/images/trainer/youngster_m.json @@ -1,7 +1,7 @@ { "textures": [ { - "image": "youngster.png", + "image": "youngster_m.png", "format": "RGBA8888", "size": { "w": 125, diff --git a/public/images/trainer/youngster.png b/public/images/trainer/youngster_m.png similarity index 100% rename from public/images/trainer/youngster.png rename to public/images/trainer/youngster_m.png diff --git a/src/arena.ts b/src/arena.ts index acba3aa3c..eedd49628 100644 --- a/src/arena.ts +++ b/src/arena.ts @@ -1,6 +1,6 @@ import SoundFade from "phaser3-rex-plugins/plugins/soundfade"; import BattleScene from "./battle-scene"; -import { Biome, BiomePoolTier, BiomeTierPools, biomePools } from "./data/biome"; +import { Biome, BiomePoolTier, BiomeTierPokemonPools, biomePokemonPools } from "./data/biome"; import * as Utils from "./utils"; import PokemonSpecies, { getPokemonSpecies } from "./data/pokemon-species"; import { Species } from "./data/species"; @@ -17,16 +17,16 @@ export class Arena { public biomeType: Biome; public weather: Weather; public tags: ArenaTag[]; - private bgm: string; + public bgm: string; - private pokemonPool: BiomeTierPools; + private pokemonPool: BiomeTierPokemonPools; constructor(scene: BattleScene, biome: Biome, bgm: string) { this.scene = scene; this.biomeType = biome; this.tags = []; this.bgm = bgm; - this.pokemonPool = biomePools[biome]; + this.pokemonPool = biomePokemonPools[biome]; } randomSpecies(waveIndex: integer, level: integer, attempt?: integer): PokemonSpecies { @@ -238,20 +238,6 @@ export class Arena { this.scene.loadBgm(this.bgm); } - playBgm(): void { - this.scene.loadBgm(this.bgm); - this.scene.load.once(Phaser.Loader.Events.COMPLETE, () => this.scene.playBgm(this.bgm, this.getBgmLoopPoint())); - if (!this.scene.load.isLoading()) - this.scene.load.start(); - } - - fadeOutBgm(duration: integer, destroy?: boolean): void { - if (destroy === undefined) - destroy = true; - const bgm = this.scene.sound.get(this.bgm); - SoundFade.fadeOut(this.scene, bgm, duration, destroy); - } - getBgmLoopPoint(): number { switch (this.biomeType) { case Biome.TOWN: diff --git a/src/battle-phases.ts b/src/battle-phases.ts index afed44fc7..55f3a0488 100644 --- a/src/battle-phases.ts +++ b/src/battle-phases.ts @@ -1,7 +1,7 @@ import BattleScene, { startingLevel, startingWave } from "./battle-scene"; import { default as Pokemon, PlayerPokemon, EnemyPokemon, PokemonMove, MoveResult, DamageResult, FieldPosition, HitResult } from "./pokemon"; import * as Utils from './utils'; -import { allMoves, applyMoveAttrs, BypassSleepAttr, ChargeAttr, applyFilteredMoveAttrs, HitsTagAttr, MissEffectAttr, MoveAttr, MoveCategory, MoveEffectAttr, MoveFlags, Moves, MultiHitAttr, OverrideMoveEffectAttr, VariableAccuracyAttr, MoveTarget, OneHitKOAttr, getMoveTargets, MoveTargetSet, MoveEffectTrigger } from "./data/move"; +import { allMoves, applyMoveAttrs, BypassSleepAttr, ChargeAttr, applyFilteredMoveAttrs, HitsTagAttr, MissEffectAttr, MoveAttr, MoveCategory, MoveEffectAttr, MoveFlags, Moves, MultiHitAttr, OverrideMoveEffectAttr, VariableAccuracyAttr, MoveTarget, OneHitKOAttr, getMoveTargets, MoveTargetSet, MoveEffectTrigger, CopyMoveAttr } from "./data/move"; import { Mode } from './ui/ui'; import { Command } from "./ui/command-ui-handler"; import { Stat } from "./data/pokemon-stat"; @@ -72,7 +72,7 @@ export class CheckLoadPhase extends BattlePhase { this.scene.arena.preloadBgm(); this.scene.pushPhase(new SelectStarterPhase(this.scene)); } else - this.scene.arena.playBgm(); + this.scene.playBgm(); const availablePartyMembers = this.scene.getParty().filter(p => !p.isFainted()).length; @@ -116,7 +116,7 @@ export class SelectStarterPhase extends BattlePhase { this.scene.ui.clearText(); this.scene.ui.setMode(Mode.MESSAGE).then(() => { SoundFade.fadeOut(this.scene.sound.get('menu'), 500, true); - this.scene.time.delayedCall(500, () => this.scene.arena.playBgm()); + this.scene.time.delayedCall(500, () => this.scene.playBgm()); this.end(); }); }); @@ -237,7 +237,9 @@ export class EncounterPhase extends BattlePhase { const battle = this.scene.currentBattle; battle.enemyLevels.forEach((level, e) => { - const enemySpecies = this.scene.randomSpecies(battle.waveIndex, level, true); + const enemySpecies = battle.battleType === BattleType.TRAINER + ? this.scene.currentBattle.trainer.genPartyMemberSpecies(level) + : this.scene.randomSpecies(battle.waveIndex, level, null, true); if (!this.loaded) battle.enemyParty[e] = new EnemyPokemon(this.scene, enemySpecies, level); const enemyPokemon = this.scene.getEnemyParty()[e]; @@ -287,6 +289,8 @@ export class EncounterPhase extends BattlePhase { } doEncounter() { + this.scene.playBgm(undefined, true); + if (startingWave > 10) { for (let m = 0; m < Math.min(Math.floor(startingWave / 10), 99); m++) this.scene.addModifier(getPlayerModifierTypeOptionsForWave((m + 1) * 10, 1, this.scene.getParty())[0].type.newModifier()); @@ -360,6 +364,8 @@ export class NextEncounterPhase extends EncounterPhase { } doEncounter(): void { + this.scene.playBgm(undefined, true); + const enemyField = this.scene.getEnemyField(); this.scene.tweens.add({ targets: [ this.scene.arenaEnemy, this.scene.arenaNextEnemy, this.scene.currentBattle.trainer, enemyField ].flat(), @@ -419,7 +425,7 @@ export class SelectBiomePhase extends BattlePhase { start() { super.start(); - this.scene.arena.fadeOutBgm(2000, true); + this.scene.fadeOutBgm(2000, true); const currentBiome = this.scene.arena.biomeType; @@ -481,7 +487,7 @@ export class SwitchBiomePhase extends BattlePhase { this.scene.arenaPlayerTransition.setAlpha(0); this.scene.arenaPlayerTransition.setVisible(true); - this.scene.time.delayedCall(1000, () => this.scene.arena.playBgm()); + this.scene.time.delayedCall(1000, () => this.scene.playBgm()); this.scene.tweens.add({ targets: [ this.scene.arenaPlayer, this.scene.arenaBgTransition, this.scene.arenaPlayerTransition ], @@ -1271,6 +1277,9 @@ export class MovePhase extends BattlePhase { if (!moveQueue.length || !moveQueue.shift().ignorePP) this.move.ppUsed++; + if (!allMoves[this.move.moveId].getAttrs(CopyMoveAttr).length) + this.scene.currentBattle.lastMove = this.move.moveId; + // Assume conditions affecting targets only apply to moves with a single target let success = this.move.getMove().applyConditions(this.pokemon, targets[0], this.move.getMove()); if (success && this.scene.arena.isMoveWeatherCancelled(this.move.getMove())) @@ -1400,12 +1409,12 @@ class MoveEffectPhase extends PokemonPhase { const isProtected = !this.move.getMove().hasFlag(MoveFlags.IGNORE_PROTECT) && target.lapseTag(BattlerTagType.PROTECTED); moveHistoryEntry.result = MoveResult.SUCCESS; + + const hitResult = !isProtected ? target.apply(user, this.move) : HitResult.NO_EFFECT; applyFilteredMoveAttrs((attr: MoveAttr) => attr instanceof MoveEffectAttr && (attr as MoveEffectAttr).trigger === MoveEffectTrigger.PRE_APPLY, user, target, this.move.getMove()); - const hitResult = !isProtected ? target.apply(user, this.move) : HitResult.NO_EFFECT; - if (hitResult !== HitResult.FAIL) { const chargeEffect = !!this.move.getMove().getAttrs(ChargeAttr).find(ca => (ca as ChargeAttr).chargeEffect); // Charge attribute with charge effect takes all effect attributes and applies them to charge stage, so ignore them if this is present diff --git a/src/battle-scene.ts b/src/battle-scene.ts index a2a5819c4..fa2670e2e 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -3,7 +3,7 @@ import { Biome } from './data/biome'; import UI from './ui/ui'; import { EncounterPhase, SummonPhase, NextEncounterPhase, NewBiomeEncounterPhase, SelectBiomePhase, MessagePhase, CheckLoadPhase, TurnInitPhase, ReturnPhase, ToggleDoublePositionPhase, CheckSwitchPhase, LevelCapPhase } from './battle-phases'; import Pokemon, { PlayerPokemon, EnemyPokemon } from './pokemon'; -import PokemonSpecies, { allSpecies, getPokemonSpecies, initSpecies } from './data/pokemon-species'; +import PokemonSpecies, { PokemonSpeciesFilter, allSpecies, getPokemonSpecies, initSpecies } from './data/pokemon-species'; import * as Utils from './utils'; import { Modifier, ModifierBar, ConsumablePokemonModifier, ConsumableModifier, PokemonHpRestoreModifier, HealingBoosterModifier, PersistentModifier, PokemonHeldItemModifier, ModifierPredicate, DoubleBattleChanceBoosterModifier } from './modifier/modifier'; import { PokeballType } from './data/pokeball'; @@ -26,6 +26,8 @@ import PartyExpBar from './ui/party-exp-bar'; import { TrainerType, trainerConfigs } from './data/trainer-type'; import Trainer from './trainer'; import TrainerData from './system/trainer-data'; +import SoundFade from 'phaser3-rex-plugins/plugins/soundfade'; +import { pokemonPrevolutions } from './data/pokemon-evolutions'; const enableAuto = true; const quickStart = false; @@ -289,9 +291,10 @@ export default class BattleScene extends Phaser.Scene { this.loadSe('pb_lock'); this.loadBgm('menu'); - this.loadBgm('level_up_fanfare'); - this.loadBgm('evolution'); - this.loadBgm('evolution_fanfare'); + + this.loadBgm('level_up_fanfare', 'bw/level_up_fanfare.mp3'); + this.loadBgm('evolution', 'bw/evolution.mp3'); + this.loadBgm('evolution_fanfare', 'bw/evolution_fanfare.mp3'); populateAnims(); } @@ -403,7 +406,7 @@ export default class BattleScene extends Phaser.Scene { if (this.quickStart) { for (let s = 0; s < 3; s++) { - const playerSpecies = this.randomSpecies(startingWave, startingLevel, false); + const playerSpecies = this.randomSpecies(startingWave, startingLevel, null, false); const playerPokemon = new PlayerPokemon(this, playerSpecies, startingLevel, 0, 0); playerPokemon.setVisible(false); this.party.push(playerPokemon); @@ -554,10 +557,8 @@ export default class BattleScene extends Phaser.Scene { this.applyModifiers(DoubleBattleChanceBoosterModifier, true, doubleChance); this.getPlayerField().forEach(p => applyAbAttrs(DoubleBattleChanceAbAttr, p, null, doubleChance)); newDouble = !Utils.randInt(doubleChance.value); - } else if (newBattleType === BattleType.TRAINER) { - console.log(newTrainer, newTrainer.config); + } else if (newBattleType === BattleType.TRAINER) newDouble = newTrainer.config.isDouble; - } } else newDouble = !!double; @@ -585,14 +586,11 @@ export default class BattleScene extends Phaser.Scene { if (!this.quickStart) this.pushPhase(new CheckLoadPhase(this)); else { - this.arena.playBgm(); this.pushPhase(new EncounterPhase(this)); this.pushPhase(new SummonPhase(this, 0)); } } - console.log(lastBattle, newDouble) - if ((lastBattle?.double || false) !== newDouble) { const availablePartyMemberCount = this.getParty().filter(p => !p.isFainted()).length; if (newDouble) { @@ -653,10 +651,15 @@ export default class BattleScene extends Phaser.Scene { return Math.min(Math.ceil(baseLevel / 2) * 2 + 2, 10000); } - randomSpecies(waveIndex: integer, level: integer, fromArenaPool?: boolean): PokemonSpecies { - return fromArenaPool - ? this.arena.randomSpecies(waveIndex, level) - : getPokemonSpecies(allSpecies[(Utils.randInt(allSpecies.length)) - 1].getSpeciesForLevel(level)); + randomSpecies(waveIndex: integer, level: integer, speciesFilter?: PokemonSpeciesFilter, fromArenaPool?: boolean): PokemonSpecies { + if (fromArenaPool) + return this.arena.randomSpecies(waveIndex, level); + const filteredSpecies = speciesFilter ? [...new Set(allSpecies.slice(0, -1).filter(speciesFilter).map(s => { + while (pokemonPrevolutions.hasOwnProperty(s.speciesId)) + s = getPokemonSpecies(pokemonPrevolutions[s.speciesId]); + return s; + }))] : allSpecies.slice(0, -1); + return getPokemonSpecies(filteredSpecies[Utils.randInt(filteredSpecies.length)].getSpeciesForLevel(level, true)); } checkInput(): boolean { @@ -718,19 +721,53 @@ export default class BattleScene extends Phaser.Scene { return this.buttonKeys[button].filter(k => k.isDown).length >= 1; } - playBgm(bgmName?: string, loopPoint?: number): void { - if (!bgmName && this.bgm && !this.bgm.pendingRemove) { - this.bgm.play({ - volume: 1 - }); + playBgm(bgmName?: string, fadeOut?: boolean): void { + if (bgmName === undefined) + bgmName = this.currentBattle.getBgmOverride() || this.arena.bgm; + if (this.bgm && bgmName === this.bgm.key) { + if (!this.bgm.isPlaying || this.bgm.pendingRemove) { + this.bgm.play({ + volume: 1 + }); + } return; } - if (this.bgm && !this.bgm.pendingRemove && this.bgm.isPlaying) - this.bgm.stop(); - this.bgm = this.sound.add(bgmName, { loop: true }); - this.bgm.play(); - if (loopPoint) - this.bgm.on('looped', () => this.bgm.play({ seek: loopPoint })); + if (fadeOut && !this.bgm) + fadeOut = false; + this.loadBgm(bgmName); + let loopPoint = 0; + loopPoint = bgmName === this.arena.bgm + ? this.arena.getBgmLoopPoint() + : this.getBgmLoopPoint(bgmName); + let loaded = false; + const playNewBgm = () => { + if (bgmName === null && this.bgm && !this.bgm.pendingRemove) { + this.bgm.play({ + volume: 1 + }); + return; + } + if (this.bgm && !this.bgm.pendingRemove && this.bgm.isPlaying) + this.bgm.stop(); + this.bgm = this.sound.add(bgmName, { loop: true }); + this.bgm.play(); + if (loopPoint) + this.bgm.on('looped', () => this.bgm.play({ seek: loopPoint })); + }; + this.load.once(Phaser.Loader.Events.COMPLETE, () => { + loaded = true; + if (!fadeOut || !this.bgm.isPlaying) + playNewBgm(); + }); + if (fadeOut) { + this.fadeOutBgm(500, true); + this.time.delayedCall(750, () => { + if (loaded && (!this.bgm.isPlaying || this.bgm.pendingRemove)) + playNewBgm(); + }); + } + if (!this.load.isLoading()) + this.load.start(); } pauseBgm(): void { @@ -744,7 +781,14 @@ export default class BattleScene extends Phaser.Scene { } fadeOutBgm(duration?: integer, destroy?: boolean): void { - this.arena.fadeOutBgm(duration || 500, destroy); + if (!this.bgm) + return; + if (!duration) + duration = 500; + if (destroy === undefined) + destroy = true; + const bgm = this.sound.get(this.bgm.key); + SoundFade.fadeOut(this, bgm, duration, destroy); } playSoundWithoutBgm(soundName: string, pauseDuration?: integer): void { @@ -759,6 +803,39 @@ export default class BattleScene extends Phaser.Scene { }); } + getBgmLoopPoint(bgmName: string): number { + switch (bgmName) { + case 'battle_cynthia': + return 12.235; + case 'battle_elite': + return 17.730; + case 'battle_final': + return 16.453; + case 'battle_gym': + return 19.145; + case 'battle_legendary': + return 13.855; + case 'battle_legendary_k': + return 18.314; + case 'battle_legendary_rz': + return 18.329; + case 'battle_rival': + return 13.689; + case 'battle_rival_2': + return 17.714; + case 'battle_rival_3': + return 17.586; + case 'battle_trainer': + return 13.686; + case 'battle_wild': + return 12.703; + case 'battle_wild_strong': + return 13.940; + } + + return 0; + } + getCurrentPhase(): BattlePhase { return this.currentPhase; } diff --git a/src/battle.ts b/src/battle.ts index 9fccd6e0c..430aab953 100644 --- a/src/battle.ts +++ b/src/battle.ts @@ -3,6 +3,9 @@ import { EnemyPokemon, PlayerPokemon, QueuedMove } from "./pokemon"; import { Command } from "./ui/command-ui-handler"; import * as Utils from "./utils"; import Trainer from "./trainer"; +import { Species } from "./data/species"; +import { Moves } from "./data/move"; +import { TrainerType } from "./data/trainer-type"; export enum BattleType { WILD, @@ -40,6 +43,7 @@ export default class Battle { public turnPokeballCounts: PokeballCounts; public playerParticipantIds: Set = new Set(); public escapeAttempts: integer = 0; + public lastMove: Moves; constructor(waveIndex: integer, battleType: BattleType, trainer: Trainer, double: boolean) { this.waveIndex = waveIndex; @@ -82,4 +86,26 @@ export default class Battle { removeFaintedParticipant(playerPokemon: PlayerPokemon): void { this.playerParticipantIds.delete(playerPokemon.id); } + + getBgmOverride(): string { + const battlers = this.enemyParty.slice(0, this.getBattlerCount()); + for (let pokemon of battlers) { + if (this.battleType === BattleType.TRAINER) { + if (this.trainer.config.trainerType === TrainerType.RIVAL) + return 'battle_rival'; + return 'battle_trainer'; + } + if (pokemon.species.speciesId === Species.ETERNATUS) + return 'battle_final'; + if (pokemon.species.legendary) { + if (pokemon.species.speciesId === Species.RESHIRAM || pokemon.species.speciesId === Species.ZEKROM) + return 'battle_legendary_rz'; + if (pokemon.species.speciesId === Species.KYUREM) + return 'battle_legendary_z'; + return 'battle_legendary'; + } + } + + return null; + } } \ No newline at end of file diff --git a/src/data/biome.ts b/src/data/biome.ts index 0500df195..9271de9b2 100644 --- a/src/data/biome.ts +++ b/src/data/biome.ts @@ -4,6 +4,7 @@ import { Type } from './type'; import * as Utils from '../utils'; import beautify from 'json-beautify'; +import { TrainerType } from "./trainer-type"; export enum Biome { TOWN, @@ -101,15 +102,23 @@ export interface SpeciesTree { [key: integer]: Species[] } -export interface BiomeTierPools { +export interface BiomeTierPokemonPools { [key: integer]: Array } -export interface BiomePools { - [key: integer]: BiomeTierPools +export interface BiomePokemonPools { + [key: integer]: BiomeTierPokemonPools } -export const biomePools: BiomePools = { +export interface BiomeTierTrainerPools { + [key: integer]: TrainerType[] +} + +export interface BiomeTrainerPools { + [key: integer]: BiomeTierTrainerPools +} + +export const biomePokemonPools: BiomePokemonPools = { [Biome.TOWN]: { [BiomePoolTier.COMMON]: [ { 1: [ Species.CATERPIE ], 7: [ Species.METAPOD ] }, @@ -357,11 +366,10 @@ export const biomePools: BiomePools = { { 1: [ Species.STARYU ], 20: [ Species.STARMIE ] }, { 1: [ Species.MAGIKARP ], 20: [ Species.GYARADOS ] }, { 1: [ Species.WAILMER ], 40: [ Species.WAILORD ] }, - { 1: [ Species.PANPOUR ], 20: [ Species.SIMIPOUR ] }, - { 1: [ Species.TIRTOUGA ], 37: [ Species.CARRACOSTA ] } + { 1: [ Species.PANPOUR ], 20: [ Species.SIMIPOUR ] } ], [BiomePoolTier.RARE]: [ Species.LAPRAS, { 1: [ Species.PIPLUP ], 16: [ Species.PRINPLUP ], 36: [ Species.EMPOLEON ] } ], - [BiomePoolTier.SUPER_RARE]: [ Species.KINGDRA ], + [BiomePoolTier.SUPER_RARE]: [ Species.KINGDRA, { 1: [ Species.TIRTOUGA ], 37: [ Species.CARRACOSTA ] } ], [BiomePoolTier.ULTRA_RARE]: [], [BiomePoolTier.BOSS]: [ Species.TENTACRUEL, Species.PELIPPER, Species.SHARPEDO, Species.FLOATZEL, Species.LUMINEON, Species.SIMIPOUR ], [BiomePoolTier.BOSS_RARE]: [ Species.KINGDRA, Species.EMPOLEON ], @@ -399,15 +407,14 @@ export const biomePools: BiomePools = { { 1: [ Species.KRABBY ], 28: [ Species.KINGLER ] }, { 1: [ Species.STARYU ], 20: [ Species.STARMIE ] }, { 1: [ Species.CORPHISH ], 30: [ Species.CRAWDAUNT ] }, - { 1: [ Species.DWEBBLE ], 34: [ Species.CRUSTLE ] }, - { 1: [ Species.TIRTOUGA ], 37: [ Species.CARRACOSTA ] } + { 1: [ Species.DWEBBLE ], 34: [ Species.CRUSTLE ] } ], [BiomePoolTier.UNCOMMON]: [ { 1: [ Species.BURMY ], 20: [ Species.WORMADAM ] } ], [BiomePoolTier.RARE]: [], - [BiomePoolTier.SUPER_RARE]: [], + [BiomePoolTier.SUPER_RARE]: [ { 1: [ Species.TIRTOUGA ], 37: [ Species.CARRACOSTA ] } ], [BiomePoolTier.ULTRA_RARE]: [ Species.KELDEO ], - [BiomePoolTier.BOSS]: [ Species.CLOYSTER, Species.KINGLER, Species.STARMIE, Species.CRAWDAUNT, Species.WORMADAM, Species.CRUSTLE, Species.CARRACOSTA ], - [BiomePoolTier.BOSS_RARE]: [], + [BiomePoolTier.BOSS]: [ Species.CLOYSTER, Species.KINGLER, Species.STARMIE, Species.CRAWDAUNT, Species.WORMADAM, Species.CRUSTLE ], + [BiomePoolTier.BOSS_RARE]: [ Species.CARRACOSTA ], [BiomePoolTier.BOSS_SUPER_RARE]: [ Species.KELDEO ], [BiomePoolTier.BOSS_ULTRA_RARE]: [] }, @@ -467,6 +474,7 @@ export const biomePools: BiomePools = { { 1: [ Species.CRANIDOS ], 30: [ Species.RAMPARDOS ] }, { 1: [ Species.SHIELDON ], 30: [ Species.BASTIODON ] }, { 1: [ Species.GIBLE ], 24: [ Species.GABITE ], 48: [ Species.GARCHOMP ] }, + Species.ARCHEOPS, { 1: [ Species.AXEW ], 38: [ Species.FRAXURE ] } ], [BiomePoolTier.ULTRA_RARE]: [ Species.TORNADUS ], @@ -731,6 +739,306 @@ export const biomePools: BiomePools = { } }; +export const biomeTrainerPools: BiomeTrainerPools = { + [Biome.TOWN]: { + [BiomePoolTier.COMMON]: [ TrainerType.YOUNGSTER ], + [BiomePoolTier.UNCOMMON]: [], + [BiomePoolTier.RARE]: [], + [BiomePoolTier.SUPER_RARE]: [], + [BiomePoolTier.ULTRA_RARE]: [], + [BiomePoolTier.BOSS]: [], + [BiomePoolTier.BOSS_RARE]: [], + [BiomePoolTier.BOSS_SUPER_RARE]: [], + [BiomePoolTier.BOSS_ULTRA_RARE]: [] + }, + [Biome.PLAINS]: { + [BiomePoolTier.COMMON]: [ TrainerType.BREEDER, TrainerType.TWINS ], + [BiomePoolTier.UNCOMMON]: [ TrainerType.ACE_TRAINER, TrainerType.CYCLIST ], + [BiomePoolTier.RARE]: [ TrainerType.BLACK_BELT ], + [BiomePoolTier.SUPER_RARE]: [], + [BiomePoolTier.ULTRA_RARE]: [], + [BiomePoolTier.BOSS]: [], + [BiomePoolTier.BOSS_RARE]: [], + [BiomePoolTier.BOSS_SUPER_RARE]: [], + [BiomePoolTier.BOSS_ULTRA_RARE]: [] + }, + [Biome.GRASS]: { + [BiomePoolTier.COMMON]: [ TrainerType.BREEDER ], + [BiomePoolTier.UNCOMMON]: [ TrainerType.ACE_TRAINER ], + [BiomePoolTier.RARE]: [ TrainerType.BLACK_BELT ], + [BiomePoolTier.SUPER_RARE]: [], + [BiomePoolTier.ULTRA_RARE]: [], + [BiomePoolTier.BOSS]: [], + [BiomePoolTier.BOSS_RARE]: [], + [BiomePoolTier.BOSS_SUPER_RARE]: [], + [BiomePoolTier.BOSS_ULTRA_RARE]: [] + }, + [Biome.TALL_GRASS]: { + [BiomePoolTier.COMMON]: [], + [BiomePoolTier.UNCOMMON]: [ TrainerType.ACE_TRAINER, TrainerType.BREEDER, TrainerType.RANGER ], + [BiomePoolTier.RARE]: [], + [BiomePoolTier.SUPER_RARE]: [], + [BiomePoolTier.ULTRA_RARE]: [], + [BiomePoolTier.BOSS]: [], + [BiomePoolTier.BOSS_RARE]: [], + [BiomePoolTier.BOSS_SUPER_RARE]: [], + [BiomePoolTier.BOSS_ULTRA_RARE]: [] + }, + [Biome.CITY]: { + [BiomePoolTier.COMMON]: [ TrainerType.BAKER, TrainerType.OFFICER ], + [BiomePoolTier.UNCOMMON]: [ TrainerType.BREEDER ], + [BiomePoolTier.RARE]: [ TrainerType.ARTIST ], + [BiomePoolTier.SUPER_RARE]: [], + [BiomePoolTier.ULTRA_RARE]: [], + [BiomePoolTier.BOSS]: [], + [BiomePoolTier.BOSS_RARE]: [], + [BiomePoolTier.BOSS_SUPER_RARE]: [], + [BiomePoolTier.BOSS_ULTRA_RARE]: [] + }, + [Biome.FOREST]: { + [BiomePoolTier.COMMON]: [ TrainerType.RANGER ], + [BiomePoolTier.UNCOMMON]: [], + [BiomePoolTier.RARE]: [], + [BiomePoolTier.SUPER_RARE]: [], + [BiomePoolTier.ULTRA_RARE]: [], + [BiomePoolTier.BOSS]: [], + [BiomePoolTier.BOSS_RARE]: [], + [BiomePoolTier.BOSS_SUPER_RARE]: [], + [BiomePoolTier.BOSS_ULTRA_RARE]: [] + }, + [Biome.SEA]: { + [BiomePoolTier.COMMON]: [ TrainerType.SWIMMER ], + [BiomePoolTier.UNCOMMON]: [], + [BiomePoolTier.RARE]: [], + [BiomePoolTier.SUPER_RARE]: [], + [BiomePoolTier.ULTRA_RARE]: [], + [BiomePoolTier.BOSS]: [], + [BiomePoolTier.BOSS_RARE]: [], + [BiomePoolTier.BOSS_SUPER_RARE]: [], + [BiomePoolTier.BOSS_ULTRA_RARE]: [] + }, + [Biome.SWAMP]: { + [BiomePoolTier.COMMON]: [], + [BiomePoolTier.UNCOMMON]: [ TrainerType.ACE_TRAINER ], + [BiomePoolTier.RARE]: [ TrainerType.BLACK_BELT ], + [BiomePoolTier.SUPER_RARE]: [], + [BiomePoolTier.ULTRA_RARE]: [], + [BiomePoolTier.BOSS]: [], + [BiomePoolTier.BOSS_RARE]: [], + [BiomePoolTier.BOSS_SUPER_RARE]: [], + [BiomePoolTier.BOSS_ULTRA_RARE]: [] + }, + [Biome.BEACH]: { + [BiomePoolTier.COMMON]: [ TrainerType.FISHERMAN, TrainerType.PARASOL_LADY ], + [BiomePoolTier.UNCOMMON]: [ TrainerType.ACE_TRAINER, TrainerType.BREEDER ], + [BiomePoolTier.RARE]: [ TrainerType.BLACK_BELT ], + [BiomePoolTier.SUPER_RARE]: [], + [BiomePoolTier.ULTRA_RARE]: [], + [BiomePoolTier.BOSS]: [], + [BiomePoolTier.BOSS_RARE]: [], + [BiomePoolTier.BOSS_SUPER_RARE]: [], + [BiomePoolTier.BOSS_ULTRA_RARE]: [] + }, + [Biome.LAKE]: { + [BiomePoolTier.COMMON]: [ TrainerType.BREEDER, TrainerType.FISHERMAN ], + [BiomePoolTier.UNCOMMON]: [ TrainerType.ACE_TRAINER ], + [BiomePoolTier.RARE]: [ TrainerType.BLACK_BELT ], + [BiomePoolTier.SUPER_RARE]: [], + [BiomePoolTier.ULTRA_RARE]: [], + [BiomePoolTier.BOSS]: [], + [BiomePoolTier.BOSS_RARE]: [], + [BiomePoolTier.BOSS_SUPER_RARE]: [], + [BiomePoolTier.BOSS_ULTRA_RARE]: [] + }, + [Biome.SEABED]: { + [BiomePoolTier.COMMON]: [], + [BiomePoolTier.UNCOMMON]: [], + [BiomePoolTier.RARE]: [], + [BiomePoolTier.SUPER_RARE]: [], + [BiomePoolTier.ULTRA_RARE]: [], + [BiomePoolTier.BOSS]: [], + [BiomePoolTier.BOSS_RARE]: [], + [BiomePoolTier.BOSS_SUPER_RARE]: [], + [BiomePoolTier.BOSS_ULTRA_RARE]: [] + }, + [Biome.MOUNTAIN]: { + [BiomePoolTier.COMMON]: [ TrainerType.BACKPACKER, TrainerType.BLACK_BELT, TrainerType.HIKER ], + [BiomePoolTier.UNCOMMON]: [ TrainerType.ACE_TRAINER ], + [BiomePoolTier.RARE]: [], + [BiomePoolTier.SUPER_RARE]: [], + [BiomePoolTier.ULTRA_RARE]: [], + [BiomePoolTier.BOSS]: [], + [BiomePoolTier.BOSS_RARE]: [], + [BiomePoolTier.BOSS_SUPER_RARE]: [], + [BiomePoolTier.BOSS_ULTRA_RARE]: [] + }, + [Biome.BADLANDS]: { + [BiomePoolTier.COMMON]: [ TrainerType.BACKPACKER, TrainerType.HIKER ], + [BiomePoolTier.UNCOMMON]: [ TrainerType.ACE_TRAINER ], + [BiomePoolTier.RARE]: [], + [BiomePoolTier.SUPER_RARE]: [], + [BiomePoolTier.ULTRA_RARE]: [], + [BiomePoolTier.BOSS]: [], + [BiomePoolTier.BOSS_RARE]: [], + [BiomePoolTier.BOSS_SUPER_RARE]: [], + [BiomePoolTier.BOSS_ULTRA_RARE]: [] + }, + [Biome.CAVE]: { + [BiomePoolTier.COMMON]: [ TrainerType.BACKPACKER, TrainerType.HIKER ], + [BiomePoolTier.UNCOMMON]: [ TrainerType.ACE_TRAINER, TrainerType.BLACK_BELT ], + [BiomePoolTier.RARE]: [], + [BiomePoolTier.SUPER_RARE]: [], + [BiomePoolTier.ULTRA_RARE]: [], + [BiomePoolTier.BOSS]: [], + [BiomePoolTier.BOSS_RARE]: [], + [BiomePoolTier.BOSS_SUPER_RARE]: [], + [BiomePoolTier.BOSS_ULTRA_RARE]: [] + }, + [Biome.DESERT]: { + [BiomePoolTier.COMMON]: [ TrainerType.SCIENTIST ], + [BiomePoolTier.UNCOMMON]: [], + [BiomePoolTier.RARE]: [], + [BiomePoolTier.SUPER_RARE]: [], + [BiomePoolTier.ULTRA_RARE]: [], + [BiomePoolTier.BOSS]: [], + [BiomePoolTier.BOSS_RARE]: [], + [BiomePoolTier.BOSS_SUPER_RARE]: [], + [BiomePoolTier.BOSS_ULTRA_RARE]: [] + }, + [Biome.ICE_CAVE]: { + [BiomePoolTier.COMMON]: [], + [BiomePoolTier.UNCOMMON]: [], + [BiomePoolTier.RARE]: [], + [BiomePoolTier.SUPER_RARE]: [], + [BiomePoolTier.ULTRA_RARE]: [], + [BiomePoolTier.BOSS]: [], + [BiomePoolTier.BOSS_RARE]: [], + [BiomePoolTier.BOSS_SUPER_RARE]: [], + [BiomePoolTier.BOSS_ULTRA_RARE]: [] + }, + [Biome.MEADOW]: { + [BiomePoolTier.COMMON]: [], + [BiomePoolTier.UNCOMMON]: [ TrainerType.ACE_TRAINER, TrainerType.BREEDER ], + [BiomePoolTier.RARE]: [], + [BiomePoolTier.SUPER_RARE]: [], + [BiomePoolTier.ULTRA_RARE]: [], + [BiomePoolTier.BOSS]: [], + [BiomePoolTier.BOSS_RARE]: [], + [BiomePoolTier.BOSS_SUPER_RARE]: [], + [BiomePoolTier.BOSS_ULTRA_RARE]: [] + }, + [Biome.POWER_PLANT]: { + [BiomePoolTier.COMMON]: [], + [BiomePoolTier.UNCOMMON]: [], + [BiomePoolTier.RARE]: [], + [BiomePoolTier.SUPER_RARE]: [], + [BiomePoolTier.ULTRA_RARE]: [], + [BiomePoolTier.BOSS]: [], + [BiomePoolTier.BOSS_RARE]: [], + [BiomePoolTier.BOSS_SUPER_RARE]: [], + [BiomePoolTier.BOSS_ULTRA_RARE]: [] + }, + [Biome.VOLCANO]: { + [BiomePoolTier.COMMON]: [], + [BiomePoolTier.UNCOMMON]: [], + [BiomePoolTier.RARE]: [], + [BiomePoolTier.SUPER_RARE]: [], + [BiomePoolTier.ULTRA_RARE]: [], + [BiomePoolTier.BOSS]: [], + [BiomePoolTier.BOSS_RARE]: [], + [BiomePoolTier.BOSS_SUPER_RARE]: [], + [BiomePoolTier.BOSS_ULTRA_RARE]: [] + }, + [Biome.GRAVEYARD]: { + [BiomePoolTier.COMMON]: [ TrainerType.PSYCHIC ], + [BiomePoolTier.UNCOMMON]: [], + [BiomePoolTier.RARE]: [], + [BiomePoolTier.SUPER_RARE]: [], + [BiomePoolTier.ULTRA_RARE]: [], + [BiomePoolTier.BOSS]: [], + [BiomePoolTier.BOSS_RARE]: [], + [BiomePoolTier.BOSS_SUPER_RARE]: [], + [BiomePoolTier.BOSS_ULTRA_RARE]: [] + }, + [Biome.DOJO]: { + [BiomePoolTier.COMMON]: [ TrainerType.BLACK_BELT ], + [BiomePoolTier.UNCOMMON]: [], + [BiomePoolTier.RARE]: [], + [BiomePoolTier.SUPER_RARE]: [], + [BiomePoolTier.ULTRA_RARE]: [], + [BiomePoolTier.BOSS]: [], + [BiomePoolTier.BOSS_RARE]: [], + [BiomePoolTier.BOSS_SUPER_RARE]: [], + [BiomePoolTier.BOSS_ULTRA_RARE]: [] + }, + [Biome.FACTORY]: { + [BiomePoolTier.COMMON]: [], + [BiomePoolTier.UNCOMMON]: [], + [BiomePoolTier.RARE]: [], + [BiomePoolTier.SUPER_RARE]: [], + [BiomePoolTier.ULTRA_RARE]: [], + [BiomePoolTier.BOSS]: [], + [BiomePoolTier.BOSS_RARE]: [], + [BiomePoolTier.BOSS_SUPER_RARE]: [], + [BiomePoolTier.BOSS_ULTRA_RARE]: [] + }, + [Biome.RUINS]: { + [BiomePoolTier.COMMON]: [ TrainerType.PSYCHIC, TrainerType.SCIENTIST ], + [BiomePoolTier.UNCOMMON]: [ TrainerType.ACE_TRAINER, TrainerType.BLACK_BELT ], + [BiomePoolTier.RARE]: [], + [BiomePoolTier.SUPER_RARE]: [], + [BiomePoolTier.ULTRA_RARE]: [], + [BiomePoolTier.BOSS]: [], + [BiomePoolTier.BOSS_RARE]: [], + [BiomePoolTier.BOSS_SUPER_RARE]: [], + [BiomePoolTier.BOSS_ULTRA_RARE]: [] + }, + [Biome.WASTELAND]: { + [BiomePoolTier.COMMON]: [], + [BiomePoolTier.UNCOMMON]: [], + [BiomePoolTier.RARE]: [], + [BiomePoolTier.SUPER_RARE]: [], + [BiomePoolTier.ULTRA_RARE]: [], + [BiomePoolTier.BOSS]: [], + [BiomePoolTier.BOSS_RARE]: [], + [BiomePoolTier.BOSS_SUPER_RARE]: [], + [BiomePoolTier.BOSS_ULTRA_RARE]: [] + }, + [Biome.ABYSS]: { + [BiomePoolTier.COMMON]: [], + [BiomePoolTier.UNCOMMON]: [ TrainerType.ACE_TRAINER ], + [BiomePoolTier.RARE]: [], + [BiomePoolTier.SUPER_RARE]: [], + [BiomePoolTier.ULTRA_RARE]: [], + [BiomePoolTier.BOSS]: [], + [BiomePoolTier.BOSS_RARE]: [], + [BiomePoolTier.BOSS_SUPER_RARE]: [], + [BiomePoolTier.BOSS_ULTRA_RARE]: [] + }, + [Biome.SPACE]: { + [BiomePoolTier.COMMON]: [], + [BiomePoolTier.UNCOMMON]: [], + [BiomePoolTier.RARE]: [], + [BiomePoolTier.SUPER_RARE]: [], + [BiomePoolTier.ULTRA_RARE]: [], + [BiomePoolTier.BOSS]: [], + [BiomePoolTier.BOSS_RARE]: [], + [BiomePoolTier.BOSS_SUPER_RARE]: [], + [BiomePoolTier.BOSS_ULTRA_RARE]: [] + }, + [Biome.END]: { + [BiomePoolTier.COMMON]: [], + [BiomePoolTier.UNCOMMON]: [], + [BiomePoolTier.RARE]: [], + [BiomePoolTier.SUPER_RARE]: [], + [BiomePoolTier.ULTRA_RARE]: [], + [BiomePoolTier.BOSS]: [], + [BiomePoolTier.BOSS_RARE]: [], + [BiomePoolTier.BOSS_SUPER_RARE]: [], + [BiomePoolTier.BOSS_ULTRA_RARE]: [] + } +}; + { const pokemonBiomes = [ [ Species.BULBASAUR, Type.GRASS, Type.POISON, [ @@ -3422,14 +3730,14 @@ export const biomePools: BiomePools = { ] ], [ Species.TIRTOUGA, Type.WATER, Type.ROCK, [ - [ Biome.BEACH, BiomePoolTier.COMMON ], - [ Biome.SEA, BiomePoolTier.UNCOMMON ] + [ Biome.SEA, BiomePoolTier.SUPER_RARE ], + [ Biome.BEACH, BiomePoolTier.SUPER_RARE ] ] ], [ Species.CARRACOSTA, Type.WATER, Type.ROCK, [ - [ Biome.BEACH, BiomePoolTier.COMMON ], - [ Biome.BEACH, BiomePoolTier.BOSS ], - [ Biome.SEA, BiomePoolTier.UNCOMMON ] + [ Biome.SEA, BiomePoolTier.SUPER_RARE ], + [ Biome.BEACH, BiomePoolTier.SUPER_RARE ], + [ Biome.BEACH, BiomePoolTier.BOSS_RARE ] ] ], [ Species.ARCHEN, Type.ROCK, Type.FLYING, [ @@ -3437,6 +3745,7 @@ export const biomePools: BiomePools = { ] ], [ Species.ARCHEOPS, Type.ROCK, Type.FLYING, [ + [ Biome.MOUNTAIN, BiomePoolTier.SUPER_RARE ], [ Biome.RUINS, BiomePoolTier.SUPER_RARE ], [ Biome.RUINS, BiomePoolTier.BOSS_RARE ] ] @@ -3827,11 +4136,154 @@ export const biomePools: BiomePools = { ] ]; - for (let biome of Utils.getEnumValues(Biome)) { - biomePools[biome] = {}; + const trainerBiomes = [ + [ TrainerType.ACE_TRAINER, [ + [ Biome.PLAINS, BiomePoolTier.UNCOMMON ], + [ Biome.GRASS, BiomePoolTier.UNCOMMON ], + [ Biome.TALL_GRASS, BiomePoolTier.UNCOMMON ], + [ Biome.SWAMP, BiomePoolTier.UNCOMMON ], + [ Biome.BEACH, BiomePoolTier.UNCOMMON ], + [ Biome.LAKE, BiomePoolTier.UNCOMMON ], + [ Biome.MOUNTAIN, BiomePoolTier.UNCOMMON ], + [ Biome.BADLANDS, BiomePoolTier.UNCOMMON ], + [ Biome.CAVE, BiomePoolTier.UNCOMMON ], + [ Biome.MEADOW, BiomePoolTier.UNCOMMON ], + [ Biome.RUINS, BiomePoolTier.UNCOMMON ], + [ Biome.ABYSS, BiomePoolTier.UNCOMMON ] + ] + ], + [ TrainerType.ARTIST, [ + [ Biome.CITY, BiomePoolTier.RARE ] + ] + ], + [ TrainerType.BACKERS, [] ], + [ TrainerType.BACKPACKER, [ + [ Biome.MOUNTAIN, BiomePoolTier.COMMON ], + [ Biome.CAVE, BiomePoolTier.COMMON ], + [ Biome.BADLANDS, BiomePoolTier.COMMON ] + ] + ], + [ TrainerType.BAKER, [ + [ Biome.CITY, BiomePoolTier.COMMON ] + ] + ], + [ TrainerType.BEAUTY, [] ], + [ TrainerType.BIKER, [] ], + [ TrainerType.BLACK_BELT, [ + [ Biome.DOJO, BiomePoolTier.COMMON ], + [ Biome.PLAINS, BiomePoolTier.RARE ], + [ Biome.GRASS, BiomePoolTier.RARE ], + [ Biome.SWAMP, BiomePoolTier.RARE ], + [ Biome.BEACH, BiomePoolTier.RARE ], + [ Biome.LAKE, BiomePoolTier.RARE ], + [ Biome.MOUNTAIN, BiomePoolTier.COMMON ], + [ Biome.CAVE, BiomePoolTier.UNCOMMON ], + [ Biome.RUINS, BiomePoolTier.UNCOMMON ] + ] + ], + [ TrainerType.BREEDER, [ + [ Biome.PLAINS, BiomePoolTier.COMMON ], + [ Biome.GRASS, BiomePoolTier.COMMON ], + [ Biome.TALL_GRASS, BiomePoolTier.UNCOMMON ], + [ Biome.CITY, BiomePoolTier.UNCOMMON ], + [ Biome.BEACH, BiomePoolTier.UNCOMMON ], + [ Biome.LAKE, BiomePoolTier.COMMON ], + [ Biome.MEADOW, BiomePoolTier.UNCOMMON ] + ] + ], + [ TrainerType.CLERK, [] ], + [ TrainerType.CYCLIST, [ + [ Biome.PLAINS, BiomePoolTier.UNCOMMON ] + ] + ], + [ TrainerType.DANCER, [] ], + [ TrainerType.DEPOT_AGENT, [] ], + [ TrainerType.DOCTOR, [] ], + [ TrainerType.FISHERMAN, [ + [ Biome.LAKE, BiomePoolTier.COMMON ], + [ Biome.BEACH, BiomePoolTier.COMMON ] + ] + ], + [ TrainerType.RICH, [] ], + [ TrainerType.GUITARIST, [] ], + [ TrainerType.HARLEQUIN, [] ], + [ TrainerType.HIKER, [ + [ Biome.MOUNTAIN, BiomePoolTier.COMMON ], + [ Biome.CAVE, BiomePoolTier.COMMON ], + [ Biome.BADLANDS, BiomePoolTier.COMMON ] + ] + ], + [ TrainerType.HOOLIGANS, [] ], + [ TrainerType.HOOPSTER, [] ], + [ TrainerType.INFIELDER, [] ], + [ TrainerType.JANITOR, [] ], + [ TrainerType.LINEBACKER, [] ], + [ TrainerType.MAID, [] ], + [ TrainerType.MUSICIAN, [] ], + [ TrainerType.NURSE, [] ], + [ TrainerType.NURSERY_AIDE, [] ], + [ TrainerType.OFFICER, [ + [ Biome.CITY, BiomePoolTier.COMMON ] + ] + ], + [ TrainerType.PARASOL_LADY, [ + [ Biome.BEACH, BiomePoolTier.COMMON ] + ] + ], + [ TrainerType.PILOT, [] ], + [ TrainerType.POKEFAN, [] ], + [ TrainerType.PRESCHOOLER, [] ], + [ TrainerType.PSYCHIC, [ + [ Biome.GRAVEYARD, BiomePoolTier.COMMON ], + [ Biome.RUINS, BiomePoolTier.COMMON ] + ] + ], + [ TrainerType.RANGER, [ + [ Biome.TALL_GRASS, BiomePoolTier.UNCOMMON ], + [ Biome.FOREST, BiomePoolTier.COMMON ] + ] + ], + [ TrainerType.RICH_KID, [] ], + [ TrainerType.ROUGHNECK, [] ], + [ TrainerType.SCIENTIST, [ + [ Biome.DESERT, BiomePoolTier.COMMON ], + [ Biome.RUINS, BiomePoolTier.COMMON ] + ] + ], + [ TrainerType.SMASHER, [] ], + [ TrainerType.SNOW_WORKER, [ + [ Biome.ICE_CAVE ] + ] + ], + [ TrainerType.STRIKER, [] ], + [ TrainerType.STUDENT, [] ], + [ TrainerType.SWIMMER, [ + [ Biome.SEA, BiomePoolTier.COMMON ] + ] + ], + [ TrainerType.TWINS, [ + [ Biome.PLAINS, BiomePoolTier.COMMON ] + ] + ], + [ TrainerType.VETERAN, [] ], + [ TrainerType.WAITER, [] ], + [ TrainerType.WORKER, [] ], + [ TrainerType.YOUNGSTER, [ + [ Biome.TOWN, BiomePoolTier.COMMON ] + ] + ], + [ TrainerType.RIVAL, [] ], + [ TrainerType.CYNTHIA, [] ] + ] - for (let tier of Utils.getEnumValues(BiomePoolTier)) - biomePools[biome][tier] = []; + for (let biome of Utils.getEnumValues(Biome)) { + biomePokemonPools[biome] = {}; + biomeTrainerPools[biome] = {}; + + for (let tier of Utils.getEnumValues(BiomePoolTier)) { + biomePokemonPools[biome][tier] = []; + biomeTrainerPools[biome][tier] = []; + } } for (let pb of pokemonBiomes) { @@ -3846,10 +4298,10 @@ export const biomePools: BiomePools = { const biome = b[0]; const tier = b[1]; - if (!biomePools.hasOwnProperty(biome) || !biomePools[biome].hasOwnProperty(tier)) + if (!biomePokemonPools.hasOwnProperty(biome) || !biomePokemonPools[biome].hasOwnProperty(tier)) continue; - const biomeTierPool = biomePools[biome][tier]; + const biomeTierPool = biomePokemonPools[biome][tier]; let treeIndex = -1; let arrayIndex = 0; @@ -3881,10 +4333,10 @@ export const biomePools: BiomePools = { } } - for (let b of Object.keys(biomePools)) { - for (let t of Object.keys(biomePools[b])) { + for (let b of Object.keys(biomePokemonPools)) { + for (let t of Object.keys(biomePokemonPools[b])) { const tier = parseInt(t) as BiomePoolTier; - const biomeTierPool = biomePools[b][t]; + const biomeTierPool = biomePokemonPools[b][t]; for (let e = 0; e < biomeTierPool.length; e++) { const entry = biomeTierPool[e]; if (entry.length === 1) @@ -3908,20 +4360,39 @@ export const biomePools: BiomePools = { } } - function outputPools() { - const output = {}; + for (let tb of trainerBiomes) { + const trainerType = tb[0] as TrainerType; + const biomeEntries = tb[1] as BiomePoolTier[][]; - for (let b of Object.keys(biomePools)) { + for (let b of biomeEntries) { + const biome = b[0]; + const tier = b[1]; + + if (!biomeTrainerPools.hasOwnProperty(biome) || !biomeTrainerPools[biome].hasOwnProperty(tier)) + continue; + + const biomeTierPool = biomeTrainerPools[biome][tier]; + biomeTierPool.push(trainerType); + } + } + + function outputPools() { + const pokemonOutput = {}; + const trainerOutput = {}; + + for (let b of Object.keys(biomePokemonPools)) { const biome = Biome[b]; - output[biome] = {}; - for (let t of Object.keys(biomePools[b])) { + pokemonOutput[biome] = {}; + trainerOutput[biome] = {}; + + for (let t of Object.keys(biomePokemonPools[b])) { const tier = BiomePoolTier[t]; - output[biome][tier] = []; + pokemonOutput[biome][tier] = []; - for (let f of biomePools[b][t]) { + for (let f of biomePokemonPools[b][t]) { if (typeof f === 'number') - output[biome][tier].push(Species[f]); + pokemonOutput[biome][tier].push(Species[f]); else { const tree = {}; @@ -3929,13 +4400,23 @@ export const biomePools: BiomePools = { tree[l] = f[l].map(s => Species[s]); } - output[biome][tier].push(tree); + pokemonOutput[biome][tier].push(tree); } } } + + for (let t of Object.keys(biomeTrainerPools[b])) { + const tier = BiomePoolTier[t]; + + trainerOutput[biome][tier] = []; + + for (let f of biomeTrainerPools[b][t]) + trainerOutput[biome][tier].push(TrainerType[f]); + } } - console.log(beautify(output, null, 2, 180).replace(/( | (?:\{ "\d+": \[ )?| "(?:.*?)": \[ |, (?:(?:\{ )?"\d+": \[ )?)"(.*?)"/g, '$1Species.$2').replace(/"(\d+)": /g, '$1: ').replace(/( )"(.*?)"/g, '$1[BiomePoolTier.$2]').replace(/( )"(.*?)"/g, '$1[Biome.$2]')); + console.log(beautify(pokemonOutput, null, 2, 180).replace(/( | (?:\{ "\d+": \[ )?| "(?:.*?)": \[ |, (?:(?:\{ )?"\d+": \[ )?)"(.*?)"/g, '$1Species.$2').replace(/"(\d+)": /g, '$1: ').replace(/( )"(.*?)"/g, '$1[BiomePoolTier.$2]').replace(/( )"(.*?)"/g, '$1[Biome.$2]')); + console.log(beautify(trainerOutput, null, 2, 120).replace(/( | (?:\{ "\d+": \[ )?| "(?:.*?)": \[ |, (?:(?:\{ )?"\d+": \[ )?)"(.*?)"/g, '$1TrainerType.$2').replace(/"(\d+)": /g, '$1: ').replace(/( )"(.*?)"/g, '$1[BiomePoolTier.$2]').replace(/( )"(.*?)"/g, '$1[Biome.$2]')); } outputPools(); diff --git a/src/data/move.ts b/src/data/move.ts index c0eb7dc4e..d184f3fa6 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -1990,6 +1990,46 @@ export class RandomMoveAttr extends OverrideMoveEffectAttr { } } +const lastMoveCopiableCondition = (user: Pokemon, target: Pokemon, move: Move) => { + const copiableMove = user.scene.currentBattle.lastMove; + + if (!copiableMove) + return false; + + if (allMoves[copiableMove].getAttrs(ChargeAttr).length) + return false; + + // TODO: Add last turn of Bide + + return true; +}; + +export class CopyMoveAttr extends OverrideMoveEffectAttr { + apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { + const lastMove = user.scene.currentBattle.lastMove; + + const moveTargets = getMoveTargets(user, lastMove); + if (!moveTargets.targets.length) + return false; + + const targets = moveTargets.multiple || moveTargets.targets.length === 1 + ? moveTargets.targets + : moveTargets.targets.indexOf(target.getBattlerIndex()) > -1 + ? [ target.getBattlerIndex() ] + : [ moveTargets.targets[Utils.randInt(moveTargets.targets.length)] ]; + user.getMoveQueue().push({ move: lastMove, targets: targets, ignorePP: true }); + + user.scene.unshiftPhase(new MovePhase(user.scene, user as PlayerPokemon, targets, new PokemonMove(lastMove, 0, 0, true), true)); + + return true; + } + + getCondition(): MoveCondition { + return lastMoveCopiableCondition; + } +} + +// TODO: Review this const targetMoveCopiableCondition = (user: Pokemon, target: Pokemon, move: Move) => { const targetMoves = target.getMoveHistory().filter(m => !m.virtual); if (!targetMoves.length) @@ -2000,7 +2040,7 @@ const targetMoveCopiableCondition = (user: Pokemon, target: Pokemon, move: Move) if (!copiableMove.move) return false; - if (allMoves[copiableMove.move].getAttrs(ChargeAttr) && copiableMove.result === MoveResult.OTHER) + if (allMoves[copiableMove.move].getAttrs(ChargeAttr).length && copiableMove.result === MoveResult.OTHER) return false; // TODO: Add last turn of Bide @@ -2008,35 +2048,6 @@ const targetMoveCopiableCondition = (user: Pokemon, target: Pokemon, move: Move) return true; }; -export class CopyMoveAttr extends OverrideMoveEffectAttr { - apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { - const targetMoves = target.getMoveHistory().filter(m => !m.virtual); - if (!targetMoves.length) - return false; - - const copiedMove = targetMoves[0]; - - const moveTargets = getMoveTargets(user, copiedMove.move); - if (!moveTargets.targets.length) - return false; - - const targets = moveTargets.multiple || moveTargets.targets.length === 1 - ? moveTargets.targets - : moveTargets.targets.indexOf(target.getBattlerIndex()) > -1 - ? [ target.getBattlerIndex() ] - : [ moveTargets.targets[Utils.randInt(moveTargets.targets.length)] ]; - user.getMoveQueue().push({ move: copiedMove.move, targets: targets, ignorePP: true }); - - user.scene.unshiftPhase(new MovePhase(user.scene, user as PlayerPokemon, targets, new PokemonMove(copiedMove.move, 0, 0, true), true)); - - return true; - } - - getCondition(): MoveCondition { - return targetMoveCopiableCondition; - } -} - export class MovesetCopyMoveAttr extends OverrideMoveEffectAttr { apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { const targetMoves = target.getMoveHistory().filter(m => !m.virtual); diff --git a/src/data/pokemon-species.ts b/src/data/pokemon-species.ts index e759f13e9..2454e8bb9 100644 --- a/src/data/pokemon-species.ts +++ b/src/data/pokemon-species.ts @@ -5,6 +5,7 @@ import { SpeciesWildEvolutionDelay, pokemonEvolutions, pokemonPrevolutions } fro import { Species } from './species'; import { Type } from './type'; import * as Utils from '../utils'; +import { TrainerType, trainerConfigs } from './trainer-type'; export function getPokemonSpecies(species: Species): PokemonSpecies { if (species >= Species.XERNEAS) @@ -12,6 +13,8 @@ export function getPokemonSpecies(species: Species): PokemonSpecies { return allSpecies[species - 1]; } +export type PokemonSpeciesFilter = (species: PokemonSpecies) => boolean; + export abstract class PokemonSpeciesForm { public speciesId: Species; public formIndex: integer; @@ -272,7 +275,7 @@ export default class PokemonSpecies extends PokemonSpeciesForm { for (let weight of evolutionPool.keys()) { if (randValue < weight) - return evolutionPool.get(weight); + return getPokemonSpecies(evolutionPool.get(weight)).getSpeciesForLevel(level, true); } return this.speciesId; @@ -344,7 +347,7 @@ class PokemonForm extends PokemonSpeciesForm { } } -export const allSpecies = []; +export const allSpecies: PokemonSpecies[] = []; export function initSpecies() { allSpecies.push( @@ -1102,4 +1105,17 @@ export function initSpecies() { new PokemonSpecies(Species.YVELTAL, "Yveltal", 6, false, true, false, "Destruction Pokémon", Type.DARK, Type.FLYING, 5.8, 203, Abilities.DARK_AURA, Abilities.NONE, Abilities.NONE, 680, 126, 131, 95, 131, 98, 99, 45, 0, 306, GrowthRate.SLOW, "Undiscovered", null, null, 120, false), new PokemonSpecies(Species.ETERNATUS, 'Eternatus', 8, false, true, false, 'Gigantic Pokemon', Type.POISON, Type.DRAGON, 20, 950, Abilities.PRESSURE, Abilities.NONE, Abilities.NONE, 690, 140, 85, 95, 145, 95, 130, 255, 0, 345, GrowthRate.SLOW, "Undiscovered", null, null, 120, false, false) ); -} \ No newline at end of file +} + +// TODO: Remove +/*{ + setTimeout(() => { + for (let tc of Object.keys(trainerConfigs)) { + console.log(TrainerType[tc], !trainerConfigs[tc].speciesFilter ? 'all' : [...new Set(allSpecies.slice(0, -1).filter(trainerConfigs[tc].speciesFilter).map(s => { + while (pokemonPrevolutions.hasOwnProperty(s.speciesId)) + s = getPokemonSpecies(pokemonPrevolutions[s.speciesId]); + return s; + }))].map(s => s.name)); + } + }, 1000); +}*/ \ No newline at end of file diff --git a/src/data/trainer-type.ts b/src/data/trainer-type.ts index 0e848172b..0d33807cc 100644 --- a/src/data/trainer-type.ts +++ b/src/data/trainer-type.ts @@ -1,5 +1,11 @@ import BattleScene from "../battle-scene"; import * as Utils from "../utils"; +import { Moves } from "./move"; +import { pokemonLevelMoves } from "./pokemon-level-moves"; +import { PokemonSpeciesFilter } from "./pokemon-species"; +import { Species } from "./species"; +import { tmSpecies } from "./tms"; +import { Type } from "./type"; export enum TrainerType { ACE_TRAINER = 1, @@ -7,10 +13,9 @@ export enum TrainerType { BACKERS, BACKPACKER, BAKER, - BATTLE_GIRL, BEAUTY, BIKER, - BLACKBELT, + BLACK_BELT, BREEDER, CLERK, CYCLIST, @@ -18,7 +23,6 @@ export enum TrainerType { DEPOT_AGENT, DOCTOR, FISHERMAN, - GENTLEMAN, GUITARIST, HARLEQUIN, HIKER, @@ -26,8 +30,6 @@ export enum TrainerType { HOOPSTER, INFIELDER, JANITOR, - LADY, - LASS, LINEBACKER, MAID, MUSICIAN, @@ -40,12 +42,12 @@ export enum TrainerType { PRESCHOOLER, PSYCHIC, RANGER, - RICH_BOY, + RICH, + RICH_KID, ROUGHNECK, SCIENTIST, SMASHER, SNOW_WORKER, - SOCIALITE, STRIKER, STUDENT, SWIMMER, @@ -54,16 +56,45 @@ export enum TrainerType { WAITER, WORKER, YOUNGSTER, + RIVAL, CYNTHIA } +export enum TrainerPartyType { + DEFAULT, + BALANCED, + REPEATED +} + +export enum TrainerPoolTier { + COMMON, + UNCOMMON, + RARE, + SUPER_RARE, + ULTRA_RARE +}; + +export interface TrainerTierPools { + [key: integer]: Species[] +} + export class TrainerConfig { public trainerType: TrainerType; + public name: string; + public nameFemale: string; public hasGenders: boolean = false; public isDouble: boolean = false; + public partyType: TrainerPartyType = TrainerPartyType.DEFAULT; + public encounterBgm: string; + public femaleEncounterBgm: string; + public speciesPools: TrainerTierPools; + public speciesFilter: PokemonSpeciesFilter; - constructor(trainerType: TrainerType) { + constructor(trainerType: TrainerType, allowLegendaries?: boolean) { this.trainerType = trainerType; + this.name = Utils.toPokemonUpperCase(TrainerType[this.trainerType].toString().replace(/\_/g, ' ')); + this.encounterBgm = this.name.toLowerCase(); + this.speciesFilter = species => allowLegendaries || (!species.legendary && !species.pseudoLegendary && !species.mythical); } public getKey(female?: boolean): string { @@ -73,8 +104,16 @@ export class TrainerConfig { return ret; } - public setHasGenders(): TrainerConfig { + public setName(name: string): TrainerConfig { + this.name = name; + return this; + } + + public setHasGenders(nameFemale?: string, femaleEncounterBgm?: TrainerType | string): TrainerConfig { this.hasGenders = true; + this.nameFemale = nameFemale; + if (femaleEncounterBgm) + this.femaleEncounterBgm = typeof femaleEncounterBgm === 'number' ? TrainerType[femaleEncounterBgm].toString().replace(/\_/g, ' ').toLowerCase() : femaleEncounterBgm; return this; } @@ -83,8 +122,39 @@ export class TrainerConfig { return this; } - public getName(): string { - return Utils.toPokemonUpperCase(TrainerType[this.trainerType].toString().replace(/\_/g, ' ')); + public setEncounterBgm(encounterBgm: TrainerType | string): TrainerConfig { + this.encounterBgm = typeof encounterBgm === 'number' ? TrainerType[encounterBgm].toString().replace(/\_/g, ' ').toLowerCase() : encounterBgm; + return this; + } + + public setPartyType(partyType: TrainerPartyType): TrainerConfig { + this.partyType = partyType; + return this; + } + + public setSpeciesPools(speciesPools: TrainerTierPools | Species[]): TrainerConfig { + this.speciesPools = (Array.isArray(speciesPools) ? speciesPools : { [TrainerPoolTier.COMMON]: speciesPools }) as unknown as TrainerTierPools; + return this; + } + + public setSpeciesFilter(speciesFilter: PokemonSpeciesFilter, allowLegendaries?: boolean): TrainerConfig { + const baseFilter = this.speciesFilter; + this.speciesFilter = allowLegendaries ? speciesFilter : species => speciesFilter(species) && baseFilter(species); + return this; + } + + public getName(female?: boolean): string { + let ret = this.name; + + if (this.hasGenders) { + if (this.nameFemale) { + if (female) + return this.nameFemale; + } else + ret += !female ? '♂' : '♀'; + } + + return ret; } public genPartySize(): integer { @@ -122,58 +192,65 @@ interface TrainerConfigs { [key: integer]: TrainerConfig } -export const trainerConfigs: TrainerConfigs = { - [TrainerType.ACE_TRAINER]: new TrainerConfig(++t).setHasGenders(), - [TrainerType.ARTIST]: new TrainerConfig(++t), - [TrainerType.BACKERS]: new TrainerConfig(++t).setHasGenders().setDouble(), - [TrainerType.BACKPACKER]: new TrainerConfig(++t).setHasGenders(), - [TrainerType.BAKER]: new TrainerConfig(++t), - [TrainerType.BATTLE_GIRL]: new TrainerConfig(++t), - [TrainerType.BEAUTY]: new TrainerConfig(++t), - [TrainerType.BIKER]: new TrainerConfig(++t), - [TrainerType.BLACKBELT]: new TrainerConfig(++t), - [TrainerType.BREEDER]: new TrainerConfig(++t).setHasGenders().setDouble(), +export const trainerConfigs: TrainerConfigs = { + [TrainerType.ACE_TRAINER]: new TrainerConfig(++t).setHasGenders().setPartyType(TrainerPartyType.BALANCED), + [TrainerType.ARTIST]: new TrainerConfig(++t).setEncounterBgm(TrainerType.RICH).setSpeciesPools([ Species.SMEARGLE ]), + [TrainerType.BACKERS]: new TrainerConfig(++t).setHasGenders().setEncounterBgm(TrainerType.CYCLIST).setDouble(), + [TrainerType.BACKPACKER]: new TrainerConfig(++t).setHasGenders().setSpeciesFilter(s => s.isOfType(Type.FLYING) || s.isOfType(Type.ROCK)), + [TrainerType.BAKER]: new TrainerConfig(++t).setEncounterBgm(TrainerType.CLERK).setSpeciesFilter(s => s.isOfType(Type.GRASS) || s.isOfType(Type.FIRE)), + [TrainerType.BEAUTY]: new TrainerConfig(++t).setEncounterBgm(TrainerType.PARASOL_LADY), + [TrainerType.BIKER]: new TrainerConfig(++t).setEncounterBgm(TrainerType.ROUGHNECK).setSpeciesFilter(s => s.isOfType(Type.POISON)), + [TrainerType.BLACK_BELT]: new TrainerConfig(++t).setHasGenders('Battle Girl', TrainerType.PSYCHIC).setEncounterBgm(TrainerType.ROUGHNECK).setSpeciesFilter(s => s.isOfType(Type.FIGHTING)), + [TrainerType.BREEDER]: new TrainerConfig(++t).setHasGenders().setDouble().setEncounterBgm(TrainerType.POKEFAN), [TrainerType.CLERK]: new TrainerConfig(++t).setHasGenders(), - [TrainerType.CYCLIST]: new TrainerConfig(++t).setHasGenders(), - [TrainerType.DANCER]: new TrainerConfig(++t), - [TrainerType.DEPOT_AGENT]: new TrainerConfig(++t), - [TrainerType.DOCTOR]: new TrainerConfig(++t), - [TrainerType.FISHERMAN]: new TrainerConfig(++t), - [TrainerType.GENTLEMAN]: new TrainerConfig(++t), - [TrainerType.GUITARIST]: new TrainerConfig(++t), - [TrainerType.HARLEQUIN]: new TrainerConfig(++t), - [TrainerType.HIKER]: new TrainerConfig(++t), - [TrainerType.HOOLIGANS]: new TrainerConfig(++t).setDouble(), - [TrainerType.HOOPSTER]: new TrainerConfig(++t), - [TrainerType.INFIELDER]: new TrainerConfig(++t), - [TrainerType.JANITOR]: new TrainerConfig(++t), - [TrainerType.LADY]: new TrainerConfig(++t), - [TrainerType.LASS]: new TrainerConfig(++t), - [TrainerType.LINEBACKER]: new TrainerConfig(++t), - [TrainerType.MAID]: new TrainerConfig(++t), - [TrainerType.MUSICIAN]: new TrainerConfig(++t), - [TrainerType.NURSE]: new TrainerConfig(++t), - [TrainerType.NURSERY_AIDE]: new TrainerConfig(++t), - [TrainerType.OFFICER]: new TrainerConfig(++t), - [TrainerType.PARASOL_LADY]: new TrainerConfig(++t), - [TrainerType.PILOT]: new TrainerConfig(++t), + [TrainerType.CYCLIST]: new TrainerConfig(++t).setHasGenders().setSpeciesFilter(s => !!pokemonLevelMoves[s.speciesId].find(plm => plm[1] === Moves.QUICK_ATTACK)), + [TrainerType.DANCER]: new TrainerConfig(++t).setEncounterBgm(TrainerType.CYCLIST), + [TrainerType.DEPOT_AGENT]: new TrainerConfig(++t).setEncounterBgm(TrainerType.CLERK), + [TrainerType.DOCTOR]: new TrainerConfig(++t).setEncounterBgm(TrainerType.CLERK), + [TrainerType.FISHERMAN]: new TrainerConfig(++t).setEncounterBgm(TrainerType.BACKPACKER).setSpeciesPools({ + [TrainerPoolTier.COMMON]: [ Species.TENTACOOL, Species.MAGIKARP, Species.GOLDEEN, Species.STARYU, Species.REMORAID ], + [TrainerPoolTier.UNCOMMON]: [ Species.POLIWAG, Species.SHELLDER, Species.KRABBY, Species.HORSEA, Species.CARVANHA, Species.BARBOACH, Species.CORPHISH, Species.FINNEON, Species.TYMPOLE, Species.BASCULIN, Species.FRILLISH ], + [TrainerPoolTier.RARE]: [ Species.CHINCHOU, Species.CORSOLA, Species.WAILMER, Species.CLAMPERL, Species.LUVDISC, Species.MANTYKE, Species.ALOMOMOLA ], + [TrainerPoolTier.SUPER_RARE]: [ Species.LAPRAS, Species.FEEBAS, Species.RELICANTH ] + }), + [TrainerType.GUITARIST]: new TrainerConfig(++t).setEncounterBgm(TrainerType.ROUGHNECK).setSpeciesFilter(s => s.isOfType(Type.ELECTRIC)), + [TrainerType.HARLEQUIN]: new TrainerConfig(++t).setEncounterBgm(TrainerType.PSYCHIC).setSpeciesFilter(s => tmSpecies[Moves.TRICK_ROOM].indexOf(s.speciesId) > -1), + [TrainerType.HIKER]: new TrainerConfig(++t).setEncounterBgm(TrainerType.BACKPACKER).setSpeciesFilter(s => s.isOfType(Type.GROUND) || s.isOfType(Type.ROCK)), + [TrainerType.HOOLIGANS]: new TrainerConfig(++t).setDouble().setEncounterBgm(TrainerType.ROUGHNECK).setSpeciesFilter(s => s.isOfType(Type.POISON) || s.isOfType(Type.DARK)), + [TrainerType.HOOPSTER]: new TrainerConfig(++t).setEncounterBgm(TrainerType.CYCLIST), + [TrainerType.INFIELDER]: new TrainerConfig(++t).setEncounterBgm(TrainerType.CYCLIST), + [TrainerType.JANITOR]: new TrainerConfig(++t).setEncounterBgm(TrainerType.CLERK), + [TrainerType.LINEBACKER]: new TrainerConfig(++t).setEncounterBgm(TrainerType.CYCLIST), + [TrainerType.MAID]: new TrainerConfig(++t).setEncounterBgm(TrainerType.RICH).setSpeciesFilter(s => s.eggType1 === 'Field' || s.eggType2 === 'Field'), + [TrainerType.MUSICIAN]: new TrainerConfig(++t).setEncounterBgm(TrainerType.ROUGHNECK).setSpeciesFilter(s => !!pokemonLevelMoves[s.speciesId].find(plm => plm[1] === Moves.SING)), + [TrainerType.NURSE]: new TrainerConfig(++t).setEncounterBgm('lass').setSpeciesFilter(s => !!pokemonLevelMoves[s.speciesId].find(plm => plm[1] === Moves.CHARM) || !!pokemonLevelMoves[s.speciesId].find(plm => plm[1] === Moves.HEAL_PULSE)), + [TrainerType.NURSERY_AIDE]: new TrainerConfig(++t).setEncounterBgm('lass'), + [TrainerType.OFFICER]: new TrainerConfig(++t).setEncounterBgm(TrainerType.CLERK).setSpeciesPools([ Species.VULPIX, Species.GROWLITHE, Species.SNUBBULL, Species.HOUNDOUR, Species.POOCHYENA, Species.ELECTRIKE, Species.LILLIPUP ]), + [TrainerType.PARASOL_LADY]: new TrainerConfig(++t).setSpeciesFilter(s => s.isOfType(Type.WATER)), + [TrainerType.PILOT]: new TrainerConfig(++t).setEncounterBgm(TrainerType.CLERK).setSpeciesFilter(s => tmSpecies[Moves.FLY].indexOf(s.speciesId) > -1), [TrainerType.POKEFAN]: new TrainerConfig(++t).setHasGenders(), - [TrainerType.PRESCHOOLER]: new TrainerConfig(++t).setHasGenders(), + [TrainerType.PRESCHOOLER]: new TrainerConfig(++t).setEncounterBgm(TrainerType.YOUNGSTER).setHasGenders(undefined, 'lass'), [TrainerType.PSYCHIC]: new TrainerConfig(++t).setHasGenders(), - [TrainerType.RANGER]: new TrainerConfig(++t).setHasGenders(), - [TrainerType.RICH_BOY]: new TrainerConfig(++t), - [TrainerType.ROUGHNECK]: new TrainerConfig(++t), - [TrainerType.SCIENTIST]: new TrainerConfig(++t).setHasGenders(), - [TrainerType.SMASHER]: new TrainerConfig(++t), - [TrainerType.SNOW_WORKER]: new TrainerConfig(++t), - [TrainerType.SOCIALITE]: new TrainerConfig(++t), - [TrainerType.STRIKER]: new TrainerConfig(++t), + [TrainerType.RANGER]: new TrainerConfig(++t).setEncounterBgm(TrainerType.BACKPACKER).setHasGenders(), + [TrainerType.RICH]: new TrainerConfig(++t).setName('Gentleman').setHasGenders().setSpeciesFilter(s => s.eggType1 === 'Field' || s.eggType2 === 'Field'), + [TrainerType.RICH_KID]: new TrainerConfig(++t).setName('Rich Boy').setHasGenders('Lady').setEncounterBgm(TrainerType.RICH), + [TrainerType.ROUGHNECK]: new TrainerConfig(++t).setSpeciesFilter(s => s.isOfType(Type.DARK)), + [TrainerType.SCIENTIST]: new TrainerConfig(++t).setHasGenders().setSpeciesPools({ + [TrainerPoolTier.COMMON]: [ Species.MAGNEMITE, Species.GRIMER, Species.DROWZEE, Species.VOLTORB, Species.KOFFING ], + [TrainerPoolTier.UNCOMMON]: [ Species.KLINK ], + [TrainerPoolTier.RARE ]: [ Species.ABRA, Species.PORYGON ], + [TrainerPoolTier.SUPER_RARE ]: [ Species.OMANYTE, Species.KABUTO, Species.AERODACTYL, Species.LILEEP, Species.ANORITH, Species.CRANIDOS, Species.SHIELDON, Species.TIRTOUGA, Species.ARCHEN ] + }), + [TrainerType.SMASHER]: new TrainerConfig(++t).setEncounterBgm(TrainerType.CYCLIST), + [TrainerType.SNOW_WORKER]: new TrainerConfig(++t).setName('Worker').setEncounterBgm(TrainerType.CLERK).setSpeciesFilter(s => s.isOfType(Type.ICE) || s.isOfType(Type.STEEL)), + [TrainerType.STRIKER]: new TrainerConfig(++t).setEncounterBgm(TrainerType.CYCLIST), [TrainerType.STUDENT]: new TrainerConfig(++t).setHasGenders(), - [TrainerType.SWIMMER]: new TrainerConfig(++t).setHasGenders(), + [TrainerType.SWIMMER]: new TrainerConfig(++t).setHasGenders().setEncounterBgm(TrainerType.PARASOL_LADY).setSpeciesFilter(s => s.isOfType(Type.WATER)), [TrainerType.TWINS]: new TrainerConfig(++t).setDouble(), - [TrainerType.VETERAN]: new TrainerConfig(++t).setHasGenders(), - [TrainerType.WAITER]: new TrainerConfig(++t).setHasGenders(), - [TrainerType.WORKER]: new TrainerConfig(++t), - [TrainerType.YOUNGSTER]: new TrainerConfig(++t), + [TrainerType.VETERAN]: new TrainerConfig(++t).setHasGenders().setEncounterBgm(TrainerType.RICH), + [TrainerType.WAITER]: new TrainerConfig(++t).setHasGenders().setEncounterBgm(TrainerType.CLERK), + [TrainerType.WORKER]: new TrainerConfig(++t).setEncounterBgm(TrainerType.CLERK).setSpeciesFilter(s => s.isOfType(Type.ROCK) || s.isOfType(Type.STEEL)), + [TrainerType.YOUNGSTER]: new TrainerConfig(++t).setHasGenders('Lass', 'lass').setEncounterBgm(TrainerType.YOUNGSTER), + [TrainerType.RIVAL]: new TrainerConfig(++t).setHasGenders(), [TrainerType.CYNTHIA]: new TrainerConfig(++t), } \ No newline at end of file diff --git a/src/trainer.ts b/src/trainer.ts index 5c8cfe976..c3ba63cec 100644 --- a/src/trainer.ts +++ b/src/trainer.ts @@ -1,5 +1,6 @@ import BattleScene from "./battle-scene"; -import { TrainerConfig, TrainerType, trainerConfigs } from "./data/trainer-type"; +import PokemonSpecies, { getPokemonSpecies } from "./data/pokemon-species"; +import { TrainerConfig, TrainerPartyType, TrainerType, trainerConfigs } from "./data/trainer-type"; import * as Utils from "./utils"; export default class Trainer extends Phaser.GameObjects.Container { @@ -32,7 +33,22 @@ export default class Trainer extends Phaser.GameObjects.Container { } getName(): string { - return this.config.getName(); + return this.config.getName(this.female); + } + + genPartyMemberSpecies(level: integer, attempt?: integer): PokemonSpecies { + const battle = this.scene.currentBattle; + + if (this.config.partyType === TrainerPartyType.REPEATED && battle.enemyParty.length) + return getPokemonSpecies(battle.enemyParty[0].species.getSpeciesForLevel(level)); + const ret = getPokemonSpecies(this.scene.randomSpecies(battle.waveIndex, level, this.config.speciesFilter, true).getSpeciesForLevel(level)); + if (this.config.partyType === TrainerPartyType.BALANCED) { + const partyTypes = this.scene.getEnemyParty().map(p => p.getTypes()).flat(); + if ((attempt || 0) < 10 && (partyTypes.indexOf(ret.type1) > -1 || (ret.type2 !== null && partyTypes.indexOf(ret.type2) > -1))) + return this.genPartyMemberSpecies(level, (attempt || 0) + 1); + } + + return ret; } getNextSummonIndex(): integer {