Add friendship system in place of win count
Add friendship system in place of win count; add soothe bell itempull/14/head
parent
8ed7b77868
commit
957b5d0fa7
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
Binary file not shown.
After Width: | Height: | Size: 296 B |
|
@ -5,7 +5,7 @@ import { allMoves, applyMoveAttrs, BypassSleepAttr, ChargeAttr, applyFilteredMov
|
|||
import { Mode } from './ui/ui';
|
||||
import { Command } from "./ui/command-ui-handler";
|
||||
import { Stat } from "./data/pokemon-stat";
|
||||
import { BerryModifier, ContactHeldItemTransferChanceModifier, EnemyAttackStatusEffectChanceModifier, EnemyInstantReviveChanceModifier, EnemyPersistentModifier, EnemyStatusEffectHealChanceModifier, EnemyTurnHealModifier, ExpBalanceModifier, ExpBoosterModifier, ExpShareModifier, ExtraModifierModifier, FlinchChanceModifier, FusePokemonModifier, HealingBoosterModifier, HitHealModifier, LapsingPersistentModifier, MapModifier, Modifier, MultipleParticipantExpBonusModifier, PersistentModifier, PokemonExpBoosterModifier, PokemonHeldItemModifier, PokemonInstantReviveModifier, SwitchEffectTransferModifier, TempBattleStatBoosterModifier, TurnHealModifier, TurnHeldItemTransferModifier, MoneyMultiplierModifier, MoneyInterestModifier, IvScannerModifier } from "./modifier/modifier";
|
||||
import { BerryModifier, ContactHeldItemTransferChanceModifier, EnemyAttackStatusEffectChanceModifier, EnemyInstantReviveChanceModifier, EnemyPersistentModifier, EnemyStatusEffectHealChanceModifier, EnemyTurnHealModifier, ExpBalanceModifier, ExpBoosterModifier, ExpShareModifier, ExtraModifierModifier, FlinchChanceModifier, FusePokemonModifier, HealingBoosterModifier, HitHealModifier, LapsingPersistentModifier, MapModifier, Modifier, MultipleParticipantExpBonusModifier, PersistentModifier, PokemonExpBoosterModifier, PokemonHeldItemModifier, PokemonInstantReviveModifier, SwitchEffectTransferModifier, TempBattleStatBoosterModifier, TurnHealModifier, TurnHeldItemTransferModifier, MoneyMultiplierModifier, MoneyInterestModifier, IvScannerModifier, PokemonFriendshipBoosterModifier } from "./modifier/modifier";
|
||||
import PartyUiHandler, { PartyOption, PartyUiMode } from "./ui/party-ui-handler";
|
||||
import { doPokeballBounceAnim, getPokeballAtlasKey, getPokeballCatchMultiplier, getPokeballTintColor, PokeballType } from "./data/pokeball";
|
||||
import { CommonAnim, CommonBattleAnim, MoveAnim, initMoveAnim, loadMoveAnimAssets } from "./data/battle-anims";
|
||||
|
@ -32,8 +32,6 @@ import { BattleType, BattlerIndex, TurnCommand } from "./battle";
|
|||
import { GameMode } from "./game-mode";
|
||||
import { Species } from "./data/species";
|
||||
import { HealAchv, LevelAchv, MoneyAchv, achvs } from "./system/achv";
|
||||
import { DexEntry } from "./system/game-data";
|
||||
import { pokemonPrevolutions } from "./data/pokemon-evolutions";
|
||||
import { TrainerType, trainerConfigs } from "./data/trainer-type";
|
||||
import { EggHatchPhase } from "./egg-hatch-phase";
|
||||
import { Egg } from "./data/egg";
|
||||
|
@ -2247,6 +2245,8 @@ export class FaintPhase extends PokemonPhase {
|
|||
this.scene.getField().filter(p => p !== pokemon && p?.isActive(true)).forEach(p => p.removeTagsBySourceId(pokemon.id));
|
||||
|
||||
pokemon.faintCry(() => {
|
||||
const friendshipDecrease = new Utils.IntegerHolder(10);
|
||||
pokemon.friendship = Math.max(pokemon.friendship - friendshipDecrease.value, 0);
|
||||
pokemon.hideInfo();
|
||||
this.scene.playSound('faint');
|
||||
this.scene.tweens.add({
|
||||
|
@ -2291,8 +2291,13 @@ export class VictoryPhase extends PokemonPhase {
|
|||
for (let partyMember of expPartyMembers) {
|
||||
const pId = partyMember.id;
|
||||
const participated = participantIds.has(pId);
|
||||
if (participated)
|
||||
partyMember.winCount++;
|
||||
if (participated) {
|
||||
const friendshipIncrease = new Utils.IntegerHolder(2);
|
||||
this.scene.applyModifier(PokemonFriendshipBoosterModifier, true, partyMember, friendshipIncrease);
|
||||
partyMember.friendship = Math.min(partyMember.friendship + friendshipIncrease.value, 255);
|
||||
if (partyMember.friendship === 255)
|
||||
this.scene.validateAchv(achvs.MAX_FRIENDSHIP);
|
||||
}
|
||||
else if (!expShareModifier) {
|
||||
partyMemberExp.push(0);
|
||||
continue;
|
||||
|
|
|
@ -2139,7 +2139,7 @@ export class SolarBeamPowerAttr extends VariablePowerAttr {
|
|||
}
|
||||
}
|
||||
|
||||
export class WinCountPowerAttr extends VariablePowerAttr {
|
||||
export class FriendshipPowerAttr extends VariablePowerAttr {
|
||||
private invert: boolean;
|
||||
|
||||
constructor(invert?: boolean) {
|
||||
|
@ -2152,8 +2152,8 @@ export class WinCountPowerAttr extends VariablePowerAttr {
|
|||
const power = args[0] as Utils.NumberHolder;
|
||||
|
||||
if (user instanceof PlayerPokemon) {
|
||||
const winCount = Math.min(user.winCount, 100);
|
||||
power.value = Math.max(!this.invert ? winCount : 100 - winCount, 1);
|
||||
const friendshipPower = Math.floor(Math.min(user.friendship, 255) / 2.5);
|
||||
power.value = Math.max(!this.invert ? friendshipPower : 102 - friendshipPower, 1);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -3492,11 +3492,11 @@ export function initMoves() {
|
|||
.soundBased()
|
||||
.target(MoveTarget.USER_AND_ALLIES),
|
||||
new AttackMove(Moves.RETURN, "Return", Type.NORMAL, MoveCategory.PHYSICAL, -1, 100, 20, -1, "This full-power attack grows more powerful the more the user likes its Trainer.", -1, 0, 2)
|
||||
.attr(WinCountPowerAttr),
|
||||
.attr(FriendshipPowerAttr),
|
||||
new AttackMove(Moves.PRESENT, "Present (N)", Type.NORMAL, MoveCategory.PHYSICAL, -1, 90, 15, -1, "The user attacks by giving the target a gift with a hidden trap. It restores HP sometimes, however.", -1, 0, 2)
|
||||
.makesContact(false),
|
||||
new AttackMove(Moves.FRUSTRATION, "Frustration", Type.NORMAL, MoveCategory.PHYSICAL, -1, 100, 20, -1, "This full-power attack grows more powerful the less the user likes its Trainer.", -1, 0, 2)
|
||||
.attr(WinCountPowerAttr, true),
|
||||
.attr(FriendshipPowerAttr, true),
|
||||
new StatusMove(Moves.SAFEGUARD, "Safeguard (N)", Type.NORMAL, -1, 25, -1, "The user creates a protective field that prevents status conditions for five turns.", -1, 0, 2)
|
||||
.target(MoveTarget.USER_SIDE),
|
||||
new StatusMove(Moves.PAIN_SPLIT, "Pain Split", Type.NORMAL, -1, 20, -1, "The user adds its HP to the target's HP, then equally shares the combined HP with the target.", -1, 0, 2)
|
||||
|
|
|
@ -1279,9 +1279,9 @@ export const pokemonEvolutions: PokemonEvolutions = {
|
|||
new SpeciesEvolution(Species.STARMIE, 1, EvolutionItem.WATER_STONE, null, SpeciesWildEvolutionDelay.MEDIUM)
|
||||
],
|
||||
[Species.EEVEE]: [
|
||||
new SpeciesEvolution(Species.SYLVEON, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10 && !!p.getMoveset().find(m => m.getMove().type === Type.FAIRY)), SpeciesWildEvolutionDelay.MEDIUM),
|
||||
new SpeciesEvolution(Species.ESPEON, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10 && p.scene.arena.isDaytime()), SpeciesWildEvolutionDelay.MEDIUM),
|
||||
new SpeciesEvolution(Species.UMBREON, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10 && !p.scene.arena.isDaytime()), SpeciesWildEvolutionDelay.MEDIUM),
|
||||
new SpeciesEvolution(Species.SYLVEON, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.friendship >= 160 && !!p.getMoveset().find(m => m.getMove().type === Type.FAIRY)), SpeciesWildEvolutionDelay.MEDIUM),
|
||||
new SpeciesEvolution(Species.ESPEON, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.friendship >= 160 && p.scene.arena.isDaytime()), SpeciesWildEvolutionDelay.MEDIUM),
|
||||
new SpeciesEvolution(Species.UMBREON, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.friendship >= 160 && !p.scene.arena.isDaytime()), SpeciesWildEvolutionDelay.MEDIUM),
|
||||
new SpeciesEvolution(Species.VAPOREON, 1, EvolutionItem.WATER_STONE, null, SpeciesWildEvolutionDelay.MEDIUM),
|
||||
new SpeciesEvolution(Species.JOLTEON, 1, EvolutionItem.THUNDER_STONE, null, SpeciesWildEvolutionDelay.MEDIUM),
|
||||
new SpeciesEvolution(Species.FLAREON, 1, EvolutionItem.FIRE_STONE, null, SpeciesWildEvolutionDelay.MEDIUM),
|
||||
|
@ -1558,64 +1558,64 @@ export const pokemonEvolutions: PokemonEvolutions = {
|
|||
new SpeciesEvolution(Species.ANNIHILAPE, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.moveset.filter(m => m.moveId === Moves.RAGE_FIST).length > 0), SpeciesWildEvolutionDelay.VERY_LONG)
|
||||
],
|
||||
[Species.PICHU]: [
|
||||
new SpeciesEvolution(Species.PIKACHU, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionDelay.SHORT)
|
||||
new SpeciesEvolution(Species.PIKACHU, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.friendship >= 160), SpeciesWildEvolutionDelay.SHORT)
|
||||
],
|
||||
[Species.CLEFFA]: [
|
||||
new SpeciesEvolution(Species.CLEFAIRY, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionDelay.SHORT)
|
||||
new SpeciesEvolution(Species.CLEFAIRY, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.friendship >= 160), SpeciesWildEvolutionDelay.SHORT)
|
||||
],
|
||||
[Species.IGGLYBUFF]: [
|
||||
new SpeciesEvolution(Species.JIGGLYPUFF, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionDelay.SHORT)
|
||||
new SpeciesEvolution(Species.JIGGLYPUFF, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.friendship >= 160), SpeciesWildEvolutionDelay.SHORT)
|
||||
],
|
||||
[Species.GOLBAT]: [
|
||||
new SpeciesEvolution(Species.CROBAT, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionDelay.VERY_LONG)
|
||||
new SpeciesEvolution(Species.CROBAT, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.friendship >= 160), SpeciesWildEvolutionDelay.VERY_LONG)
|
||||
],
|
||||
[Species.CHANSEY]: [
|
||||
new SpeciesEvolution(Species.BLISSEY, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionDelay.MEDIUM)
|
||||
new SpeciesEvolution(Species.BLISSEY, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.friendship >= 160), SpeciesWildEvolutionDelay.MEDIUM)
|
||||
],
|
||||
[Species.MUNCHLAX]: [
|
||||
new SpeciesEvolution(Species.SNORLAX, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionDelay.MEDIUM)
|
||||
new SpeciesEvolution(Species.SNORLAX, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.friendship >= 160), SpeciesWildEvolutionDelay.MEDIUM)
|
||||
],
|
||||
[Species.TOGEPI]: [
|
||||
new SpeciesEvolution(Species.TOGETIC, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionDelay.SHORT)
|
||||
new SpeciesEvolution(Species.TOGETIC, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.friendship >= 160), SpeciesWildEvolutionDelay.SHORT)
|
||||
],
|
||||
[Species.AZURILL]: [
|
||||
new SpeciesEvolution(Species.MARILL, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionDelay.SHORT)
|
||||
new SpeciesEvolution(Species.MARILL, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.friendship >= 160), SpeciesWildEvolutionDelay.SHORT)
|
||||
],
|
||||
[Species.BUDEW]: [
|
||||
new SpeciesEvolution(Species.ROSELIA, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount > 10 && p.scene.arena.isDaytime()), SpeciesWildEvolutionDelay.SHORT)
|
||||
new SpeciesEvolution(Species.ROSELIA, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.friendship >= 160 && p.scene.arena.isDaytime()), SpeciesWildEvolutionDelay.SHORT)
|
||||
],
|
||||
[Species.CHINGLING]: [
|
||||
new SpeciesEvolution(Species.CHIMECHO, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10 && !p.scene.arena.isDaytime()), SpeciesWildEvolutionDelay.MEDIUM)
|
||||
new SpeciesEvolution(Species.CHIMECHO, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.friendship >= 160 && !p.scene.arena.isDaytime()), SpeciesWildEvolutionDelay.MEDIUM)
|
||||
],
|
||||
[Species.BUNEARY]: [
|
||||
new SpeciesEvolution(Species.LOPUNNY, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionDelay.MEDIUM)
|
||||
new SpeciesEvolution(Species.LOPUNNY, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.friendship >= 160), SpeciesWildEvolutionDelay.MEDIUM)
|
||||
],
|
||||
[Species.HAPPINY]: [
|
||||
new SpeciesEvolution(Species.CHANSEY, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionDelay.SHORT)
|
||||
new SpeciesEvolution(Species.CHANSEY, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.friendship >= 160), SpeciesWildEvolutionDelay.SHORT)
|
||||
],
|
||||
[Species.RIOLU]: [
|
||||
new SpeciesEvolution(Species.LUCARIO, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10 && p.scene.arena.isDaytime()), SpeciesWildEvolutionDelay.MEDIUM)
|
||||
new SpeciesEvolution(Species.LUCARIO, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.friendship >= 160 && p.scene.arena.isDaytime()), SpeciesWildEvolutionDelay.MEDIUM)
|
||||
],
|
||||
[Species.WOOBAT]: [
|
||||
new SpeciesEvolution(Species.SWOOBAT, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionDelay.MEDIUM)
|
||||
new SpeciesEvolution(Species.SWOOBAT, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.friendship >= 160), SpeciesWildEvolutionDelay.MEDIUM)
|
||||
],
|
||||
[Species.SWADLOON]: [
|
||||
new SpeciesEvolution(Species.LEAVANNY, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionDelay.LONG)
|
||||
new SpeciesEvolution(Species.LEAVANNY, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.friendship >= 160), SpeciesWildEvolutionDelay.LONG)
|
||||
],
|
||||
[Species.TYPE_NULL]: [
|
||||
new SpeciesEvolution(Species.SILVALLY, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 100), SpeciesWildEvolutionDelay.LONG)
|
||||
new SpeciesEvolution(Species.SILVALLY, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.friendship >= 160), SpeciesWildEvolutionDelay.LONG)
|
||||
],
|
||||
[Species.ALOLA_MEOWTH]: [
|
||||
new SpeciesEvolution(Species.ALOLA_PERSIAN, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionDelay.LONG)
|
||||
new SpeciesEvolution(Species.ALOLA_PERSIAN, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.friendship >= 160), SpeciesWildEvolutionDelay.LONG)
|
||||
],
|
||||
[Species.MILCERY]: [
|
||||
new SpeciesEvolution(Species.ALCREMIE, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionDelay.MEDIUM)
|
||||
new SpeciesEvolution(Species.ALCREMIE, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.friendship >= 160), SpeciesWildEvolutionDelay.MEDIUM)
|
||||
],
|
||||
[Species.SNOM]: [
|
||||
new SpeciesEvolution(Species.FROSMOTH, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10 && !p.scene.arena.isDaytime()), SpeciesWildEvolutionDelay.MEDIUM)
|
||||
new SpeciesEvolution(Species.FROSMOTH, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.friendship >= 160 && !p.scene.arena.isDaytime()), SpeciesWildEvolutionDelay.MEDIUM)
|
||||
],
|
||||
[Species.GIMMIGHOUL]: [
|
||||
new SpeciesEvolution(Species.GHOLDENGO, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 50), SpeciesWildEvolutionDelay.VERY_LONG)
|
||||
new SpeciesEvolution(Species.GHOLDENGO, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.friendship >= 160), SpeciesWildEvolutionDelay.VERY_LONG)
|
||||
],
|
||||
[Species.VENUSAUR]: [
|
||||
new SpeciesFormEvolution(Species.VENUSAUR, '', SpeciesFormKey.MEGA, 1, EvolutionItem.VENUSAURITE, null, SpeciesWildEvolutionDelay.MEGA)
|
||||
|
|
|
@ -404,6 +404,12 @@ export class PokemonExpBoosterModifierType extends PokemonHeldItemModifierType {
|
|||
}
|
||||
}
|
||||
|
||||
export class PokemonFriendshipBoosterModifierType extends PokemonHeldItemModifierType {
|
||||
constructor(name: string, iconImage?: string) {
|
||||
super(name,'Increases friendship gain per victory by 50%', (_type, args) => new Modifiers.PokemonFriendshipBoosterModifier(this, (args[0] as Pokemon).id), iconImage);
|
||||
}
|
||||
}
|
||||
|
||||
export class TmModifierType extends PokemonModifierType {
|
||||
public moveId: Moves;
|
||||
|
||||
|
@ -673,6 +679,8 @@ export const modifierTypes = {
|
|||
LUCKY_EGG: () => new PokemonExpBoosterModifierType('Lucky Egg', 40),
|
||||
GOLDEN_EGG: () => new PokemonExpBoosterModifierType('Golden Egg', 100),
|
||||
|
||||
SOOTHE_BELL: () => new PokemonFriendshipBoosterModifierType('Soothe Bell'),
|
||||
|
||||
AMULET_COIN: () => new ModifierType('Amulet Coin', 'Increases money rewards by 20%', (type, _args) => new Modifiers.MoneyMultiplierModifier(type)),
|
||||
GOLDEN_PUNCH: () => new PokemonHeldItemModifierType('Golden Punch', 'Grants 20% of damage inflicted as money', (type, args) => new Modifiers.DamageMoneyRewardModifier(type, (args[0] as Pokemon).id)),
|
||||
COIN_CASE: () => new ModifierType('Coin Case', 'After every 10th battle, receive 10% of your money in interest', (type, _args) => new Modifiers.MoneyInterestModifier(type)),
|
||||
|
@ -809,6 +817,7 @@ const modifierPool = {
|
|||
new WeightedModifierType(modifierTypes.REVIVER_SEED, 3),
|
||||
new WeightedModifierType(modifierTypes.CANDY_JAR, 3),
|
||||
new WeightedModifierType(modifierTypes.RARER_CANDY, 3),
|
||||
new WeightedModifierType(modifierTypes.SOOTHE_BELL, 3),
|
||||
new WeightedModifierType(modifierTypes.GOLDEN_PUNCH, 2),
|
||||
new WeightedModifierType(modifierTypes.GRIP_CLAW, 2),
|
||||
new WeightedModifierType(modifierTypes.HEALING_CHARM, 1),
|
||||
|
|
|
@ -1198,6 +1198,30 @@ export class ExpBalanceModifier extends PersistentModifier {
|
|||
}
|
||||
}
|
||||
|
||||
export class PokemonFriendshipBoosterModifier extends PokemonHeldItemModifier {
|
||||
constructor(type: ModifierTypes.PokemonFriendshipBoosterModifierType, pokemonId: integer, stackCount?: integer) {
|
||||
super(type, pokemonId, stackCount);
|
||||
}
|
||||
|
||||
matchType(modifier: Modifier): boolean {
|
||||
return modifier instanceof PokemonFriendshipBoosterModifier;
|
||||
}
|
||||
|
||||
clone(): PersistentModifier {
|
||||
return new PokemonFriendshipBoosterModifier(this.type as ModifierTypes.PokemonFriendshipBoosterModifierType, this.pokemonId, this.stackCount);
|
||||
}
|
||||
|
||||
apply(args: any[]): boolean {
|
||||
(args[1] as Utils.IntegerHolder).value *= 1 + 0.5 * this.getStackCount();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
getMaxHeldItemCount(pokemon: Pokemon): integer {
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
|
||||
export class MoneyMultiplierModifier extends PersistentModifier {
|
||||
constructor(type: ModifierType, stackCount?: integer) {
|
||||
super(type, stackCount);
|
||||
|
|
|
@ -64,7 +64,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
public ivs: integer[];
|
||||
public moveset: PokemonMove[];
|
||||
public status: Status;
|
||||
public winCount: integer;
|
||||
public friendship: integer;
|
||||
public pauseEvolutions: boolean;
|
||||
public pokerus: boolean;
|
||||
|
||||
|
@ -122,7 +122,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
this.ivs = dataSource.ivs;
|
||||
this.moveset = dataSource.moveset;
|
||||
this.status = dataSource.status;
|
||||
this.winCount = dataSource.winCount;
|
||||
this.friendship = dataSource.friendship !== undefined ? dataSource.friendship : this.species.baseFriendship;
|
||||
this.pauseEvolutions = dataSource.pauseEvolutions;
|
||||
this.pokerus = !!dataSource.pokerus;
|
||||
this.fusionSpecies = dataSource.fusionSpecies instanceof PokemonSpecies ? dataSource.fusionSpecies : getPokemonSpecies(dataSource.fusionSpecies);
|
||||
|
@ -158,7 +158,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
if (this.shiny === undefined)
|
||||
this.trySetShiny();
|
||||
|
||||
this.winCount = 0;
|
||||
this.friendship = species.baseFriendship;
|
||||
this.pokerus = false;
|
||||
|
||||
if (scene.gameMode === GameMode.SPLICED_ENDLESS)
|
||||
|
@ -455,7 +455,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
ret *= 1.5;
|
||||
if (stat === Stat.SPD && this.status && this.status.effect === StatusEffect.PARALYSIS)
|
||||
ret >>= 2;
|
||||
return ret;
|
||||
return Math.floor(ret);
|
||||
}
|
||||
|
||||
calculateStats(): void {
|
||||
|
|
|
@ -123,6 +123,7 @@ export const achvs = {
|
|||
LV_250: new LevelAchv('Elite', 250, 'rarer_candy', 50).setSecret(true),
|
||||
LV_1000: new LevelAchv('To Go Even Further Beyond', 1000, 'candy_jar', 100).setSecret(true),
|
||||
TRANSFER_MAX_BATTLE_STAT: new Achv('Teamwork', 'Baton pass to another party member with at least one stat maxed out', 'stick', 20),
|
||||
MAX_FRIENDSHIP: new Achv('Friendmaxxing', 'Reach max friendship on a Pokémon', 'soothe_bell', 25),
|
||||
MEGA_EVOLVE: new Achv('Megamorph', 'Mega evolve a Pokémon', 'mega_bracelet', 50),
|
||||
SPLICE: new Achv('Infinite Fusion', 'Splice two Pokémon together with DNA Splicers', 'dna_splicers', 10),
|
||||
MINI_BLACK_HOLE: new ModifierAchv('A Hole Lot of Items', 'Acquire a Mini Black Hole', 'mini_black_hole', 25, modifier => modifier instanceof TurnHeldItemTransferModifier).setSecret(),
|
||||
|
|
|
@ -24,7 +24,7 @@ export default class PokemonData {
|
|||
public ivs: integer[];
|
||||
public moveset: PokemonMove[];
|
||||
public status: Status;
|
||||
public winCount: integer;
|
||||
public friendship: integer;
|
||||
public pauseEvolutions: boolean;
|
||||
public pokerus: boolean;
|
||||
|
||||
|
@ -52,7 +52,7 @@ export default class PokemonData {
|
|||
this.hp = source.hp;
|
||||
this.stats = source.stats;
|
||||
this.ivs = source.ivs;
|
||||
this.winCount = source.winCount;
|
||||
this.friendship = source.friendship !== undefined ? source.friendship : getPokemonSpecies(this.species).baseFriendship;
|
||||
this.pauseEvolutions = !!source.pauseEvolutions;
|
||||
this.pokerus = !!source.pokerus;
|
||||
|
||||
|
|
Loading…
Reference in New Issue