Add luxury ball and golden egg sprite

This commit is contained in:
Flashfyre 2023-03-29 22:56:43 -04:00
parent 7ab91dda80
commit 7e3cde77be
11 changed files with 216 additions and 121 deletions

View File

@ -4,8 +4,8 @@
"image": "items.png", "image": "items.png",
"format": "RGBA8888", "format": "RGBA8888",
"size": { "size": {
"w": 879, "w": 988,
"h": 24 "h": 26
}, },
"scale": 1, "scale": 1,
"frames": [ "frames": [
@ -24,8 +24,8 @@
"h": 24 "h": 24
}, },
"frame": { "frame": {
"x": 0, "x": 1,
"y": 0, "y": 1,
"w": 24, "w": 24,
"h": 24 "h": 24
} }
@ -45,8 +45,8 @@
"h": 24 "h": 24
}, },
"frame": { "frame": {
"x": 24, "x": 27,
"y": 0, "y": 1,
"w": 23, "w": 23,
"h": 24 "h": 24
} }
@ -66,8 +66,8 @@
"h": 24 "h": 24
}, },
"frame": { "frame": {
"x": 47, "x": 52,
"y": 0, "y": 1,
"w": 23, "w": 23,
"h": 24 "h": 24
} }
@ -87,8 +87,8 @@
"h": 24 "h": 24
}, },
"frame": { "frame": {
"x": 70, "x": 77,
"y": 0, "y": 1,
"w": 22, "w": 22,
"h": 24 "h": 24
} }
@ -108,8 +108,8 @@
"h": 24 "h": 24
}, },
"frame": { "frame": {
"x": 92, "x": 101,
"y": 0, "y": 1,
"w": 21, "w": 21,
"h": 24 "h": 24
} }
@ -129,8 +129,8 @@
"h": 24 "h": 24
}, },
"frame": { "frame": {
"x": 113, "x": 124,
"y": 0, "y": 1,
"w": 18, "w": 18,
"h": 24 "h": 24
} }
@ -150,8 +150,8 @@
"h": 24 "h": 24
}, },
"frame": { "frame": {
"x": 131, "x": 144,
"y": 0, "y": 1,
"w": 18, "w": 18,
"h": 24 "h": 24
} }
@ -171,8 +171,8 @@
"h": 24 "h": 24
}, },
"frame": { "frame": {
"x": 149, "x": 164,
"y": 0, "y": 1,
"w": 18, "w": 18,
"h": 24 "h": 24
} }
@ -192,8 +192,8 @@
"h": 24 "h": 24
}, },
"frame": { "frame": {
"x": 167, "x": 184,
"y": 0, "y": 1,
"w": 18, "w": 18,
"h": 24 "h": 24
} }
@ -213,8 +213,8 @@
"h": 24 "h": 24
}, },
"frame": { "frame": {
"x": 185, "x": 204,
"y": 0, "y": 1,
"w": 18, "w": 18,
"h": 24 "h": 24
} }
@ -234,8 +234,8 @@
"h": 24 "h": 24
}, },
"frame": { "frame": {
"x": 203, "x": 224,
"y": 0, "y": 1,
"w": 18, "w": 18,
"h": 24 "h": 24
} }
@ -255,8 +255,8 @@
"h": 24 "h": 24
}, },
"frame": { "frame": {
"x": 221, "x": 244,
"y": 0, "y": 1,
"w": 16, "w": 16,
"h": 24 "h": 24
} }
@ -276,8 +276,8 @@
"h": 24 "h": 24
}, },
"frame": { "frame": {
"x": 237, "x": 262,
"y": 0, "y": 1,
"w": 16, "w": 16,
"h": 24 "h": 24
} }
@ -297,8 +297,8 @@
"h": 24 "h": 24
}, },
"frame": { "frame": {
"x": 253, "x": 280,
"y": 0, "y": 1,
"w": 16, "w": 16,
"h": 24 "h": 24
} }
@ -318,8 +318,8 @@
"h": 24 "h": 24
}, },
"frame": { "frame": {
"x": 269, "x": 298,
"y": 0, "y": 1,
"w": 16, "w": 16,
"h": 24 "h": 24
} }
@ -339,8 +339,8 @@
"h": 24 "h": 24
}, },
"frame": { "frame": {
"x": 285, "x": 316,
"y": 0, "y": 1,
"w": 16, "w": 16,
"h": 24 "h": 24
} }
@ -360,8 +360,8 @@
"h": 24 "h": 24
}, },
"frame": { "frame": {
"x": 301, "x": 334,
"y": 0, "y": 1,
"w": 16, "w": 16,
"h": 24 "h": 24
} }
@ -381,8 +381,8 @@
"h": 24 "h": 24
}, },
"frame": { "frame": {
"x": 317, "x": 352,
"y": 0, "y": 1,
"w": 16, "w": 16,
"h": 24 "h": 24
} }
@ -402,8 +402,8 @@
"h": 24 "h": 24
}, },
"frame": { "frame": {
"x": 333, "x": 370,
"y": 0, "y": 1,
"w": 16, "w": 16,
"h": 24 "h": 24
} }
@ -423,8 +423,8 @@
"h": 23 "h": 23
}, },
"frame": { "frame": {
"x": 349, "x": 388,
"y": 0, "y": 1,
"w": 24, "w": 24,
"h": 23 "h": 23
} }
@ -444,8 +444,8 @@
"h": 23 "h": 23
}, },
"frame": { "frame": {
"x": 373, "x": 414,
"y": 0, "y": 1,
"w": 24, "w": 24,
"h": 23 "h": 23
} }
@ -465,8 +465,8 @@
"h": 23 "h": 23
}, },
"frame": { "frame": {
"x": 397, "x": 440,
"y": 0, "y": 1,
"w": 23, "w": 23,
"h": 23 "h": 23
} }
@ -486,8 +486,8 @@
"h": 23 "h": 23
}, },
"frame": { "frame": {
"x": 420, "x": 465,
"y": 0, "y": 1,
"w": 22, "w": 22,
"h": 23 "h": 23
} }
@ -507,8 +507,8 @@
"h": 23 "h": 23
}, },
"frame": { "frame": {
"x": 442, "x": 489,
"y": 0, "y": 1,
"w": 22, "w": 22,
"h": 23 "h": 23
} }
@ -528,8 +528,8 @@
"h": 23 "h": 23
}, },
"frame": { "frame": {
"x": 464, "x": 513,
"y": 0, "y": 1,
"w": 21, "w": 21,
"h": 23 "h": 23
} }
@ -549,8 +549,8 @@
"h": 23 "h": 23
}, },
"frame": { "frame": {
"x": 485, "x": 536,
"y": 0, "y": 1,
"w": 17, "w": 17,
"h": 23 "h": 23
} }
@ -570,8 +570,8 @@
"h": 23 "h": 23
}, },
"frame": { "frame": {
"x": 502, "x": 555,
"y": 0, "y": 1,
"w": 17, "w": 17,
"h": 23 "h": 23
} }
@ -591,8 +591,8 @@
"h": 23 "h": 23
}, },
"frame": { "frame": {
"x": 519, "x": 574,
"y": 0, "y": 1,
"w": 17, "w": 17,
"h": 23 "h": 23
} }
@ -612,8 +612,8 @@
"h": 23 "h": 23
}, },
"frame": { "frame": {
"x": 536, "x": 593,
"y": 0, "y": 1,
"w": 15, "w": 15,
"h": 23 "h": 23
} }
@ -633,8 +633,8 @@
"h": 22 "h": 22
}, },
"frame": { "frame": {
"x": 551, "x": 610,
"y": 0, "y": 1,
"w": 24, "w": 24,
"h": 22 "h": 22
} }
@ -654,8 +654,8 @@
"h": 22 "h": 22
}, },
"frame": { "frame": {
"x": 575, "x": 636,
"y": 0, "y": 1,
"w": 22, "w": 22,
"h": 22 "h": 22
} }
@ -675,8 +675,8 @@
"h": 22 "h": 22
}, },
"frame": { "frame": {
"x": 597, "x": 660,
"y": 0, "y": 1,
"w": 22, "w": 22,
"h": 22 "h": 22
} }
@ -696,8 +696,8 @@
"h": 22 "h": 22
}, },
"frame": { "frame": {
"x": 619, "x": 684,
"y": 0, "y": 1,
"w": 22, "w": 22,
"h": 22 "h": 22
} }
@ -717,8 +717,8 @@
"h": 21 "h": 21
}, },
"frame": { "frame": {
"x": 641, "x": 708,
"y": 0, "y": 1,
"w": 23, "w": 23,
"h": 21 "h": 21
} }
@ -738,8 +738,8 @@
"h": 21 "h": 21
}, },
"frame": { "frame": {
"x": 664, "x": 733,
"y": 0, "y": 1,
"w": 21, "w": 21,
"h": 21 "h": 21
} }
@ -759,8 +759,8 @@
"h": 21 "h": 21
}, },
"frame": { "frame": {
"x": 685, "x": 756,
"y": 0, "y": 1,
"w": 21, "w": 21,
"h": 21 "h": 21
} }
@ -780,8 +780,8 @@
"h": 21 "h": 21
}, },
"frame": { "frame": {
"x": 706, "x": 779,
"y": 0, "y": 1,
"w": 21, "w": 21,
"h": 21 "h": 21
} }
@ -801,8 +801,8 @@
"h": 20 "h": 20
}, },
"frame": { "frame": {
"x": 727, "x": 802,
"y": 0, "y": 1,
"w": 23, "w": 23,
"h": 20 "h": 20
} }
@ -822,8 +822,8 @@
"h": 20 "h": 20
}, },
"frame": { "frame": {
"x": 750, "x": 827,
"y": 0, "y": 1,
"w": 20, "w": 20,
"h": 20 "h": 20
} }
@ -843,8 +843,8 @@
"h": 20 "h": 20
}, },
"frame": { "frame": {
"x": 770, "x": 849,
"y": 0, "y": 1,
"w": 20, "w": 20,
"h": 20 "h": 20
} }
@ -864,8 +864,8 @@
"h": 20 "h": 20
}, },
"frame": { "frame": {
"x": 790, "x": 871,
"y": 0, "y": 1,
"w": 20, "w": 20,
"h": 20 "h": 20
} }
@ -885,12 +885,33 @@
"h": 20 "h": 20
}, },
"frame": { "frame": {
"x": 810, "x": 893,
"y": 0, "y": 1,
"w": 20, "w": 20,
"h": 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", "filename": "lucky_egg",
"rotated": false, "rotated": false,
@ -906,8 +927,8 @@
"h": 20 "h": 20
}, },
"frame": { "frame": {
"x": 830, "x": 934,
"y": 0, "y": 1,
"w": 17, "w": 17,
"h": 20 "h": 20
} }
@ -927,8 +948,8 @@
"h": 17 "h": 17
}, },
"frame": { "frame": {
"x": 847, "x": 953,
"y": 0, "y": 1,
"w": 20, "w": 20,
"h": 17 "h": 17
} }
@ -948,8 +969,8 @@
"h": 17 "h": 17
}, },
"frame": { "frame": {
"x": 867, "x": 975,
"y": 0, "y": 1,
"w": 12, "w": 12,
"h": 17 "h": 17
} }
@ -960,6 +981,6 @@
"meta": { "meta": {
"app": "https://www.codeandweb.com/texturepacker", "app": "https://www.codeandweb.com/texturepacker",
"version": "3.0", "version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:28964995da555870b032480ab159e529:b855123c041dc7a085e186676ad39aba:110e074689c9edd2c54833ce2e4d9270$" "smartupdate": "$TexturePacker:SmartUpdate:0fbe989299ea54627b5b7d5b405f8567:5048493cee296d650568a53c265436a0:110e074689c9edd2c54833ce2e4d9270$"
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 390 B

View File

@ -4,8 +4,8 @@
"image": "pb.png", "image": "pb.png",
"format": "RGBA8888", "format": "RGBA8888",
"size": { "size": {
"w": 12, "w": 14,
"h": 172 "h": 245
}, },
"scale": 1, "scale": 1,
"frames": [ "frames": [
@ -24,10 +24,31 @@
"h": 16 "h": 16
}, },
"frame": { "frame": {
"x": 1,
"y": 1,
"w": 12,
"h": 16
}
},
{
"filename": "lb_open",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 12,
"h": 16
},
"spriteSourceSize": {
"x": 0, "x": 0,
"y": 0, "y": 0,
"w": 12, "w": 12,
"h": 16 "h": 16
},
"frame": {
"x": 1,
"y": 19,
"w": 12,
"h": 16
} }
}, },
{ {
@ -45,8 +66,8 @@
"h": 16 "h": 16
}, },
"frame": { "frame": {
"x": 0, "x": 1,
"y": 16, "y": 37,
"w": 12, "w": 12,
"h": 16 "h": 16
} }
@ -66,8 +87,8 @@
"h": 16 "h": 16
}, },
"frame": { "frame": {
"x": 0, "x": 1,
"y": 32, "y": 55,
"w": 12, "w": 12,
"h": 16 "h": 16
} }
@ -87,8 +108,8 @@
"h": 16 "h": 16
}, },
"frame": { "frame": {
"x": 0, "x": 1,
"y": 48, "y": 73,
"w": 12, "w": 12,
"h": 16 "h": 16
} }
@ -108,8 +129,29 @@
"h": 14 "h": 14
}, },
"frame": { "frame": {
"x": 1,
"y": 91,
"w": 12,
"h": 14
}
},
{
"filename": "lb_opening",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 12,
"h": 16
},
"spriteSourceSize": {
"x": 0, "x": 0,
"y": 64, "y": 2,
"w": 12,
"h": 14
},
"frame": {
"x": 1,
"y": 107,
"w": 12, "w": 12,
"h": 14 "h": 14
} }
@ -129,8 +171,8 @@
"h": 14 "h": 14
}, },
"frame": { "frame": {
"x": 0, "x": 1,
"y": 78, "y": 123,
"w": 12, "w": 12,
"h": 14 "h": 14
} }
@ -150,8 +192,8 @@
"h": 14 "h": 14
}, },
"frame": { "frame": {
"x": 0, "x": 1,
"y": 92, "y": 139,
"w": 12, "w": 12,
"h": 14 "h": 14
} }
@ -171,8 +213,8 @@
"h": 14 "h": 14
}, },
"frame": { "frame": {
"x": 0, "x": 1,
"y": 106, "y": 155,
"w": 12, "w": 12,
"h": 14 "h": 14
} }
@ -192,8 +234,29 @@
"h": 13 "h": 13
}, },
"frame": { "frame": {
"x": 1,
"y": 171,
"w": 12,
"h": 13
}
},
{
"filename": "lb",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 12,
"h": 16
},
"spriteSourceSize": {
"x": 0, "x": 0,
"y": 120, "y": 3,
"w": 12,
"h": 13
},
"frame": {
"x": 1,
"y": 186,
"w": 12, "w": 12,
"h": 13 "h": 13
} }
@ -213,8 +276,8 @@
"h": 13 "h": 13
}, },
"frame": { "frame": {
"x": 0, "x": 1,
"y": 133, "y": 201,
"w": 12, "w": 12,
"h": 13 "h": 13
} }
@ -234,8 +297,8 @@
"h": 13 "h": 13
}, },
"frame": { "frame": {
"x": 0, "x": 1,
"y": 146, "y": 216,
"w": 12, "w": 12,
"h": 13 "h": 13
} }
@ -255,8 +318,8 @@
"h": 13 "h": 13
}, },
"frame": { "frame": {
"x": 0, "x": 1,
"y": 159, "y": 231,
"w": 12, "w": 12,
"h": 13 "h": 13
} }
@ -267,6 +330,6 @@
"meta": { "meta": {
"app": "https://www.codeandweb.com/texturepacker", "app": "https://www.codeandweb.com/texturepacker",
"version": "3.0", "version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:13f4d2fa28369d7d5c9bdcf1be38616f:d8e299ca449efacc07bf1284c7d20b01:8bcd206ed4f9371dcc2f2cbe354ed6ed$" "smartupdate": "$TexturePacker:SmartUpdate:c08fee07b4a02d4a278d0b9e81cafea9:8bb540e5126337d0b85e58b6cfcef619:8bcd206ed4f9371dcc2f2cbe354ed6ed$"
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 680 B

After

Width:  |  Height:  |  Size: 946 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

View File

@ -6,7 +6,7 @@ import { Mode } from './ui/ui';
import { Command } from "./ui/command-ui-handler"; import { Command } from "./ui/command-ui-handler";
import { interp } from "./temp_interpreter"; import { interp } from "./temp_interpreter";
import { Stat } from "./pokemon-stat"; 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 PartyUiHandler from "./ui/party-ui-handler";
import { doPokeballBounceAnim, getPokeballAtlasKey, getPokeballCatchMultiplier, getTintColor as getPokeballTintColor, PokeballType } from "./pokeball"; import { doPokeballBounceAnim, getPokeballAtlasKey, getPokeballCatchMultiplier, getTintColor as getPokeballTintColor, PokeballType } from "./pokeball";
import { pokemonLevelMoves } from "./pokemon-level-moves"; import { pokemonLevelMoves } from "./pokemon-level-moves";
@ -757,7 +757,9 @@ export class SelectModifierPhase extends BattlePhase {
super.start(); super.start();
regenerateModifierPoolThresholds(this.scene.getParty()); regenerateModifierPoolThresholds(this.scene.getParty());
const types = [ getNewModifierType(), getNewModifierType(), getNewModifierType() ]; const types: Array<ModifierType> = [];
for (let mt = 0; mt < 3; mt++)
types.push(getNewModifierType(this.scene.waveIndex));
this.scene.ui.setMode(Mode.MODIFIER_SELECT, types, (cursor: integer) => { this.scene.ui.setMode(Mode.MODIFIER_SELECT, types, (cursor: integer) => {
if (cursor < 0) { if (cursor < 0) {

View File

@ -5,7 +5,8 @@ export enum PokeballType {
POKEBALL, POKEBALL,
GREAT_BALL, GREAT_BALL,
ULTRA_BALL, ULTRA_BALL,
MASTER_BALL MASTER_BALL,
LUXURY_BALL
}; };
export function getPokeballAtlasKey(type: PokeballType): string { export function getPokeballAtlasKey(type: PokeballType): string {
@ -18,6 +19,8 @@ export function getPokeballAtlasKey(type: PokeballType): string {
return 'ub'; return 'ub';
case PokeballType.MASTER_BALL: case PokeballType.MASTER_BALL:
return 'mb'; return 'mb';
case PokeballType.LUXURY_BALL:
return 'lb';
} }
} }
@ -36,6 +39,9 @@ export function getPokeballName(type: PokeballType): string {
case PokeballType.MASTER_BALL: case PokeballType.MASTER_BALL:
ret = 'Master Ball'; ret = 'Master Ball';
break; break;
case PokeballType.LUXURY_BALL:
ret = 'Luxury Ball';
break;
} }
return toPokemonUpperCase(ret); return toPokemonUpperCase(ret);
} }
@ -50,6 +56,8 @@ export function getPokeballCatchMultiplier(type: PokeballType): number {
return 2; return 2;
case PokeballType.MASTER_BALL: case PokeballType.MASTER_BALL:
return -1; return -1;
case PokeballType.LUXURY_BALL:
return 1;
} }
} }
@ -63,6 +71,8 @@ export function getTintColor(type: PokeballType): number {
return 0xe6cd31; return 0xe6cd31;
case PokeballType.MASTER_BALL: case PokeballType.MASTER_BALL:
return 0xa441bd; return 0xa441bd;
case PokeballType.LUXURY_BALL:
return 0xffde6a;
} }
} }

View File

@ -454,8 +454,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
// Gen 1-4 formula // Gen 1-4 formula
// return ((this.pokemon.baseExp * this.level) / 7) * (1 / 1) // return ((this.pokemon.baseExp * this.level) / 7) * (1 / 1)
// TODO: Update for exp share // TODO: Update for exp share
const constantMultiplier = 4; 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;
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;
} }
tint(color: number, alpha?: number, duration?: integer, ease?: string) { tint(color: number, alpha?: number, duration?: integer, ease?: string) {