diff --git a/public/images/items.json b/public/images/items.json index 995c7cd5e..7c2740d5f 100644 --- a/public/images/items.json +++ b/public/images/items.json @@ -4,8 +4,8 @@ "image": "items.png", "format": "RGBA8888", "size": { - "w": 879, - "h": 24 + "w": 988, + "h": 26 }, "scale": 1, "frames": [ @@ -24,8 +24,8 @@ "h": 24 }, "frame": { - "x": 0, - "y": 0, + "x": 1, + "y": 1, "w": 24, "h": 24 } @@ -45,8 +45,8 @@ "h": 24 }, "frame": { - "x": 24, - "y": 0, + "x": 27, + "y": 1, "w": 23, "h": 24 } @@ -66,8 +66,8 @@ "h": 24 }, "frame": { - "x": 47, - "y": 0, + "x": 52, + "y": 1, "w": 23, "h": 24 } @@ -87,8 +87,8 @@ "h": 24 }, "frame": { - "x": 70, - "y": 0, + "x": 77, + "y": 1, "w": 22, "h": 24 } @@ -108,8 +108,8 @@ "h": 24 }, "frame": { - "x": 92, - "y": 0, + "x": 101, + "y": 1, "w": 21, "h": 24 } @@ -129,8 +129,8 @@ "h": 24 }, "frame": { - "x": 113, - "y": 0, + "x": 124, + "y": 1, "w": 18, "h": 24 } @@ -150,8 +150,8 @@ "h": 24 }, "frame": { - "x": 131, - "y": 0, + "x": 144, + "y": 1, "w": 18, "h": 24 } @@ -171,8 +171,8 @@ "h": 24 }, "frame": { - "x": 149, - "y": 0, + "x": 164, + "y": 1, "w": 18, "h": 24 } @@ -192,8 +192,8 @@ "h": 24 }, "frame": { - "x": 167, - "y": 0, + "x": 184, + "y": 1, "w": 18, "h": 24 } @@ -213,8 +213,8 @@ "h": 24 }, "frame": { - "x": 185, - "y": 0, + "x": 204, + "y": 1, "w": 18, "h": 24 } @@ -234,8 +234,8 @@ "h": 24 }, "frame": { - "x": 203, - "y": 0, + "x": 224, + "y": 1, "w": 18, "h": 24 } @@ -255,8 +255,8 @@ "h": 24 }, "frame": { - "x": 221, - "y": 0, + "x": 244, + "y": 1, "w": 16, "h": 24 } @@ -276,8 +276,8 @@ "h": 24 }, "frame": { - "x": 237, - "y": 0, + "x": 262, + "y": 1, "w": 16, "h": 24 } @@ -297,8 +297,8 @@ "h": 24 }, "frame": { - "x": 253, - "y": 0, + "x": 280, + "y": 1, "w": 16, "h": 24 } @@ -318,8 +318,8 @@ "h": 24 }, "frame": { - "x": 269, - "y": 0, + "x": 298, + "y": 1, "w": 16, "h": 24 } @@ -339,8 +339,8 @@ "h": 24 }, "frame": { - "x": 285, - "y": 0, + "x": 316, + "y": 1, "w": 16, "h": 24 } @@ -360,8 +360,8 @@ "h": 24 }, "frame": { - "x": 301, - "y": 0, + "x": 334, + "y": 1, "w": 16, "h": 24 } @@ -381,8 +381,8 @@ "h": 24 }, "frame": { - "x": 317, - "y": 0, + "x": 352, + "y": 1, "w": 16, "h": 24 } @@ -402,8 +402,8 @@ "h": 24 }, "frame": { - "x": 333, - "y": 0, + "x": 370, + "y": 1, "w": 16, "h": 24 } @@ -423,8 +423,8 @@ "h": 23 }, "frame": { - "x": 349, - "y": 0, + "x": 388, + "y": 1, "w": 24, "h": 23 } @@ -444,8 +444,8 @@ "h": 23 }, "frame": { - "x": 373, - "y": 0, + "x": 414, + "y": 1, "w": 24, "h": 23 } @@ -465,8 +465,8 @@ "h": 23 }, "frame": { - "x": 397, - "y": 0, + "x": 440, + "y": 1, "w": 23, "h": 23 } @@ -486,8 +486,8 @@ "h": 23 }, "frame": { - "x": 420, - "y": 0, + "x": 465, + "y": 1, "w": 22, "h": 23 } @@ -507,8 +507,8 @@ "h": 23 }, "frame": { - "x": 442, - "y": 0, + "x": 489, + "y": 1, "w": 22, "h": 23 } @@ -528,8 +528,8 @@ "h": 23 }, "frame": { - "x": 464, - "y": 0, + "x": 513, + "y": 1, "w": 21, "h": 23 } @@ -549,8 +549,8 @@ "h": 23 }, "frame": { - "x": 485, - "y": 0, + "x": 536, + "y": 1, "w": 17, "h": 23 } @@ -570,8 +570,8 @@ "h": 23 }, "frame": { - "x": 502, - "y": 0, + "x": 555, + "y": 1, "w": 17, "h": 23 } @@ -591,8 +591,8 @@ "h": 23 }, "frame": { - "x": 519, - "y": 0, + "x": 574, + "y": 1, "w": 17, "h": 23 } @@ -612,8 +612,8 @@ "h": 23 }, "frame": { - "x": 536, - "y": 0, + "x": 593, + "y": 1, "w": 15, "h": 23 } @@ -633,8 +633,8 @@ "h": 22 }, "frame": { - "x": 551, - "y": 0, + "x": 610, + "y": 1, "w": 24, "h": 22 } @@ -654,8 +654,8 @@ "h": 22 }, "frame": { - "x": 575, - "y": 0, + "x": 636, + "y": 1, "w": 22, "h": 22 } @@ -675,8 +675,8 @@ "h": 22 }, "frame": { - "x": 597, - "y": 0, + "x": 660, + "y": 1, "w": 22, "h": 22 } @@ -696,8 +696,8 @@ "h": 22 }, "frame": { - "x": 619, - "y": 0, + "x": 684, + "y": 1, "w": 22, "h": 22 } @@ -717,8 +717,8 @@ "h": 21 }, "frame": { - "x": 641, - "y": 0, + "x": 708, + "y": 1, "w": 23, "h": 21 } @@ -738,8 +738,8 @@ "h": 21 }, "frame": { - "x": 664, - "y": 0, + "x": 733, + "y": 1, "w": 21, "h": 21 } @@ -759,8 +759,8 @@ "h": 21 }, "frame": { - "x": 685, - "y": 0, + "x": 756, + "y": 1, "w": 21, "h": 21 } @@ -780,8 +780,8 @@ "h": 21 }, "frame": { - "x": 706, - "y": 0, + "x": 779, + "y": 1, "w": 21, "h": 21 } @@ -801,8 +801,8 @@ "h": 20 }, "frame": { - "x": 727, - "y": 0, + "x": 802, + "y": 1, "w": 23, "h": 20 } @@ -822,8 +822,8 @@ "h": 20 }, "frame": { - "x": 750, - "y": 0, + "x": 827, + "y": 1, "w": 20, "h": 20 } @@ -843,8 +843,8 @@ "h": 20 }, "frame": { - "x": 770, - "y": 0, + "x": 849, + "y": 1, "w": 20, "h": 20 } @@ -864,8 +864,8 @@ "h": 20 }, "frame": { - "x": 790, - "y": 0, + "x": 871, + "y": 1, "w": 20, "h": 20 } @@ -885,12 +885,33 @@ "h": 20 }, "frame": { - "x": 810, - "y": 0, + "x": 893, + "y": 1, "w": 20, "h": 20 } }, + { + "filename": "golden_egg", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 6, + "w": 17, + "h": 20 + }, + "frame": { + "x": 915, + "y": 1, + "w": 17, + "h": 20 + } + }, { "filename": "lucky_egg", "rotated": false, @@ -906,8 +927,8 @@ "h": 20 }, "frame": { - "x": 830, - "y": 0, + "x": 934, + "y": 1, "w": 17, "h": 20 } @@ -927,8 +948,8 @@ "h": 17 }, "frame": { - "x": 847, - "y": 0, + "x": 953, + "y": 1, "w": 20, "h": 17 } @@ -948,8 +969,8 @@ "h": 17 }, "frame": { - "x": 867, - "y": 0, + "x": 975, + "y": 1, "w": 12, "h": 17 } @@ -960,6 +981,6 @@ "meta": { "app": "https://www.codeandweb.com/texturepacker", "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:28964995da555870b032480ab159e529:b855123c041dc7a085e186676ad39aba:110e074689c9edd2c54833ce2e4d9270$" + "smartupdate": "$TexturePacker:SmartUpdate:0fbe989299ea54627b5b7d5b405f8567:5048493cee296d650568a53c265436a0:110e074689c9edd2c54833ce2e4d9270$" } } diff --git a/public/images/items.png b/public/images/items.png index 862501ed7..dd55607b7 100644 Binary files a/public/images/items.png and b/public/images/items.png differ diff --git a/public/images/items/golden_egg.png b/public/images/items/golden_egg.png new file mode 100644 index 000000000..bfc517c66 Binary files /dev/null and b/public/images/items/golden_egg.png differ diff --git a/public/images/pb.json b/public/images/pb.json index e796d18ad..2b2b8cf9b 100644 --- a/public/images/pb.json +++ b/public/images/pb.json @@ -4,8 +4,8 @@ "image": "pb.png", "format": "RGBA8888", "size": { - "w": 12, - "h": 172 + "w": 14, + "h": 245 }, "scale": 1, "frames": [ @@ -24,10 +24,31 @@ "h": 16 }, "frame": { + "x": 1, + "y": 1, + "w": 12, + "h": 16 + } + }, + { + "filename": "lb_open", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 12, + "h": 16 + }, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 16 + }, + "frame": { + "x": 1, + "y": 19, + "w": 12, + "h": 16 } }, { @@ -45,8 +66,8 @@ "h": 16 }, "frame": { - "x": 0, - "y": 16, + "x": 1, + "y": 37, "w": 12, "h": 16 } @@ -66,8 +87,8 @@ "h": 16 }, "frame": { - "x": 0, - "y": 32, + "x": 1, + "y": 55, "w": 12, "h": 16 } @@ -87,8 +108,8 @@ "h": 16 }, "frame": { - "x": 0, - "y": 48, + "x": 1, + "y": 73, "w": 12, "h": 16 } @@ -108,8 +129,29 @@ "h": 14 }, "frame": { + "x": 1, + "y": 91, + "w": 12, + "h": 14 + } + }, + { + "filename": "lb_opening", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 12, + "h": 16 + }, + "spriteSourceSize": { "x": 0, - "y": 64, + "y": 2, + "w": 12, + "h": 14 + }, + "frame": { + "x": 1, + "y": 107, "w": 12, "h": 14 } @@ -129,8 +171,8 @@ "h": 14 }, "frame": { - "x": 0, - "y": 78, + "x": 1, + "y": 123, "w": 12, "h": 14 } @@ -150,8 +192,8 @@ "h": 14 }, "frame": { - "x": 0, - "y": 92, + "x": 1, + "y": 139, "w": 12, "h": 14 } @@ -171,8 +213,8 @@ "h": 14 }, "frame": { - "x": 0, - "y": 106, + "x": 1, + "y": 155, "w": 12, "h": 14 } @@ -192,8 +234,29 @@ "h": 13 }, "frame": { + "x": 1, + "y": 171, + "w": 12, + "h": 13 + } + }, + { + "filename": "lb", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 12, + "h": 16 + }, + "spriteSourceSize": { "x": 0, - "y": 120, + "y": 3, + "w": 12, + "h": 13 + }, + "frame": { + "x": 1, + "y": 186, "w": 12, "h": 13 } @@ -213,8 +276,8 @@ "h": 13 }, "frame": { - "x": 0, - "y": 133, + "x": 1, + "y": 201, "w": 12, "h": 13 } @@ -234,8 +297,8 @@ "h": 13 }, "frame": { - "x": 0, - "y": 146, + "x": 1, + "y": 216, "w": 12, "h": 13 } @@ -255,8 +318,8 @@ "h": 13 }, "frame": { - "x": 0, - "y": 159, + "x": 1, + "y": 231, "w": 12, "h": 13 } @@ -267,6 +330,6 @@ "meta": { "app": "https://www.codeandweb.com/texturepacker", "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:13f4d2fa28369d7d5c9bdcf1be38616f:d8e299ca449efacc07bf1284c7d20b01:8bcd206ed4f9371dcc2f2cbe354ed6ed$" + "smartupdate": "$TexturePacker:SmartUpdate:c08fee07b4a02d4a278d0b9e81cafea9:8bb540e5126337d0b85e58b6cfcef619:8bcd206ed4f9371dcc2f2cbe354ed6ed$" } } diff --git a/public/images/pb.png b/public/images/pb.png index f549f13e1..b65be2646 100644 Binary files a/public/images/pb.png and b/public/images/pb.png differ diff --git a/public/images/pokeball/lb.png b/public/images/pokeball/lb.png new file mode 100644 index 000000000..1a5639d48 Binary files /dev/null and b/public/images/pokeball/lb.png differ diff --git a/public/images/pokeball/lb_open.png b/public/images/pokeball/lb_open.png new file mode 100644 index 000000000..fd2b9c719 Binary files /dev/null and b/public/images/pokeball/lb_open.png differ diff --git a/public/images/pokeball/lb_opening.png b/public/images/pokeball/lb_opening.png new file mode 100644 index 000000000..e62517bd6 Binary files /dev/null and b/public/images/pokeball/lb_opening.png differ diff --git a/src/battle-phase.ts b/src/battle-phase.ts index 91737c2c2..3663d5254 100644 --- a/src/battle-phase.ts +++ b/src/battle-phase.ts @@ -6,7 +6,7 @@ import { Mode } from './ui/ui'; import { Command } from "./ui/command-ui-handler"; import { interp } from "./temp_interpreter"; import { Stat } from "./pokemon-stat"; -import { ExpBoosterModifier, getNewModifierType, PokemonBaseStatModifier, PokemonModifierType, regenerateModifierPoolThresholds } from "./modifier"; +import { ExpBoosterModifier, getNewModifierType, ModifierType, PokemonBaseStatModifier, PokemonModifierType, regenerateModifierPoolThresholds } from "./modifier"; import PartyUiHandler from "./ui/party-ui-handler"; import { doPokeballBounceAnim, getPokeballAtlasKey, getPokeballCatchMultiplier, getTintColor as getPokeballTintColor, PokeballType } from "./pokeball"; import { pokemonLevelMoves } from "./pokemon-level-moves"; @@ -757,7 +757,9 @@ export class SelectModifierPhase extends BattlePhase { super.start(); regenerateModifierPoolThresholds(this.scene.getParty()); - const types = [ getNewModifierType(), getNewModifierType(), getNewModifierType() ]; + const types: Array = []; + for (let mt = 0; mt < 3; mt++) + types.push(getNewModifierType(this.scene.waveIndex)); this.scene.ui.setMode(Mode.MODIFIER_SELECT, types, (cursor: integer) => { if (cursor < 0) { diff --git a/src/pokeball.ts b/src/pokeball.ts index 1635c800d..da6052d62 100644 --- a/src/pokeball.ts +++ b/src/pokeball.ts @@ -5,7 +5,8 @@ export enum PokeballType { POKEBALL, GREAT_BALL, ULTRA_BALL, - MASTER_BALL + MASTER_BALL, + LUXURY_BALL }; export function getPokeballAtlasKey(type: PokeballType): string { @@ -18,6 +19,8 @@ export function getPokeballAtlasKey(type: PokeballType): string { return 'ub'; case PokeballType.MASTER_BALL: return 'mb'; + case PokeballType.LUXURY_BALL: + return 'lb'; } } @@ -36,6 +39,9 @@ export function getPokeballName(type: PokeballType): string { case PokeballType.MASTER_BALL: ret = 'Master Ball'; break; + case PokeballType.LUXURY_BALL: + ret = 'Luxury Ball'; + break; } return toPokemonUpperCase(ret); } @@ -50,6 +56,8 @@ export function getPokeballCatchMultiplier(type: PokeballType): number { return 2; case PokeballType.MASTER_BALL: return -1; + case PokeballType.LUXURY_BALL: + return 1; } } @@ -63,6 +71,8 @@ export function getTintColor(type: PokeballType): number { return 0xe6cd31; case PokeballType.MASTER_BALL: return 0xa441bd; + case PokeballType.LUXURY_BALL: + return 0xffde6a; } } diff --git a/src/pokemon.ts b/src/pokemon.ts index 9df267b3a..73b81a311 100644 --- a/src/pokemon.ts +++ b/src/pokemon.ts @@ -454,8 +454,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { // Gen 1-4 formula // return ((this.pokemon.baseExp * this.level) / 7) * (1 / 1) // TODO: Update for exp share - const constantMultiplier = 4; - return Math.floor(((this.species.baseExp * this.level) / 5) * (1 / 1) * constantMultiplier * ((Math.round(Math.sqrt(2 * this.level + 10)) * Math.pow(2 * this.level + 10, 2)) / (Math.round(Math.sqrt(this.level + victorLevel + 10)) * Math.pow(this.level + victorLevel + 10, 2)))) + 1; + return Math.floor(((this.species.baseExp * this.level) / 5) * (1 / 1) * ((Math.round(Math.sqrt(2 * this.level + 10)) * Math.pow(2 * this.level + 10, 2)) / (Math.round(Math.sqrt(this.level + victorLevel + 10)) * Math.pow(this.level + victorLevel + 10, 2)))) + 1; } tint(color: number, alpha?: number, duration?: integer, ease?: string) {