Skip to content

Commit

Permalink
[v0.9.9]
Browse files Browse the repository at this point in the history
  • Loading branch information
RedSparr0w committed Jul 22, 2022
1 parent 3117f73 commit 313c182
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 45 deletions.
50 changes: 25 additions & 25 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
<script src="libs/Sortable.min.js"></script>

<!-- New module-based code from './modules' -->
<script src="scripts/modules.min.js?v=0.9.8"></script>
<script src="scripts/modules.min.js?v=0.9.9"></script>

<!--Minified scripts-->
<script src="scripts/script.min.js?v=0.9.8"></script>
<script src="scripts/script.min.js?v=0.9.9"></script>

<!--Popper.js-->
<script src="libs/popper.min.js"></script>
Expand All @@ -38,7 +38,7 @@
<link href="libs/introjs-modern.css" rel="stylesheet">

<!--Minified styles-->
<link href="styles/styles.min.css?v=0.9.8" rel="stylesheet">
<link href="styles/styles.min.css?v=0.9.9" rel="stylesheet">

<!-- Google Analytics-->
<!-- Global site tag (gtag.js) - Google Analytics -->
Expand Down Expand Up @@ -1746,8 +1746,8 @@ <h5>Welcome to the Battle Frontier!</h5>

<g data-bind="visible: player.subregion == SubRegions.getSubRegion(GameConstants.Region.kanto, 'Kanto').id">
<image width="1600" height="960" data-bind="attr: {
'xlink:href':'assets/images/kanto-kanto.png?v=0.9.8',
href:'assets/images/kanto-kanto.png?v=0.9.8'
'xlink:href':'assets/images/kanto-kanto.png?v=0.9.9',
href:'assets/images/kanto-kanto.png?v=0.9.9'
}"></image>

<!-- ------ -->
Expand Down Expand Up @@ -3717,8 +3717,8 @@ <h5>Welcome to the Battle Frontier!</h5>

<g data-bind="visible: player.subregion == SubRegions.getSubRegion(GameConstants.Region.kanto, 'Sevii Islands 123').id">
<image width="1600" height="960" data-bind="attr: {
'xlink:href':'assets/images/kanto-sevii123.png?v=0.9.8',
href:'assets/images/kanto-sevii123.png?v=0.9.8'
'xlink:href':'assets/images/kanto-sevii123.png?v=0.9.9',
href:'assets/images/kanto-sevii123.png?v=0.9.9'
}"></image>

<!-- ------ -->
Expand Down Expand Up @@ -4060,8 +4060,8 @@ <h5>Welcome to the Battle Frontier!</h5>

<g data-bind='visible: player.region == GameConstants.Region.johto'>
<image width="1600" height="960" data-bind="attr: {
'xlink:href':'assets/images/johto.png?v=0.9.8',
href:'assets/images/johto.png?v=0.9.8'
'xlink:href':'assets/images/johto.png?v=0.9.9',
href:'assets/images/johto.png?v=0.9.9'
}"></image>

<!-- ------ -->
Expand Down Expand Up @@ -6079,8 +6079,8 @@ <h5>Welcome to the Battle Frontier!</h5>

<g data-bind='visible: player.region == GameConstants.Region.hoenn'>
<image width="1600" height="960" data-bind="attr: {
'xlink:href':'assets/images/hoenn.png?v=0.9.8',
href:'assets/images/hoenn.png?v=0.9.8'
'xlink:href':'assets/images/hoenn.png?v=0.9.9',
href:'assets/images/hoenn.png?v=0.9.9'
}"></image>

<!-- ------ -->
Expand Down Expand Up @@ -8684,8 +8684,8 @@ <h5>Welcome to the Battle Frontier!</h5>

<g data-bind='visible: player.region == GameConstants.Region.sinnoh'>
<image width="1600" height="960" data-bind="attr: {
'xlink:href':'assets/images/sinnoh.png?v=0.9.8',
href:'assets/images/sinnoh.png?v=0.9.8'
'xlink:href':'assets/images/sinnoh.png?v=0.9.9',
href:'assets/images/sinnoh.png?v=0.9.9'
}"></image>

<!-- ------ -->
Expand Down Expand Up @@ -11357,8 +11357,8 @@ <h5>Welcome to the Battle Frontier!</h5>

<g data-bind='visible: player.region == GameConstants.Region.unova'>
<image width="1600" height="960" data-bind="attr: {
'xlink:href':'assets/images/unova.png?v=0.9.8',
href:'assets/images/unova.png?v=0.9.8'
'xlink:href':'assets/images/unova.png?v=0.9.9',
href:'assets/images/unova.png?v=0.9.9'
}"></image>

<!-- ------ -->
Expand Down Expand Up @@ -14028,8 +14028,8 @@ <h5>Welcome to the Battle Frontier!</h5>

<g data-bind='visible: player.region == GameConstants.Region.kalos'>
<image width="1600" height="960" data-bind="attr: {
'xlink:href':'assets/images/kalos.png?v=0.9.8',
href:'assets/images/kalos.png?v=0.9.8'
'xlink:href':'assets/images/kalos.png?v=0.9.9',
href:'assets/images/kalos.png?v=0.9.9'
}"></image>

<!-- ------ -->
Expand Down Expand Up @@ -16103,8 +16103,8 @@ <h5>Welcome to the Battle Frontier!</h5>

<g data-bind="visible: player.subregion == SubRegions.getSubRegion(GameConstants.Region.alola, 'Melemele island').id">
<image width="1600" height="960" data-bind="attr: {
'xlink:href':'assets/images/alola-melemele.png?v=0.9.8',
href:'assets/images/alola-melemele.png?v=0.9.8'
'xlink:href':'assets/images/alola-melemele.png?v=0.9.9',
href:'assets/images/alola-melemele.png?v=0.9.9'
}"></image>

<!-- ------ -->
Expand Down Expand Up @@ -19274,8 +19274,8 @@ <h5>Welcome to the Battle Frontier!</h5>

<g data-bind="visible: player.subregion == SubRegions.getSubRegion(GameConstants.Region.alola, 'Akala island').id">
<image width="1600" height="960" data-bind="attr: {
'xlink:href':'assets/images/alola-akala.png?v=0.9.8',
href:'assets/images/alola-akala.png?v=0.9.8'
'xlink:href':'assets/images/alola-akala.png?v=0.9.9',
href:'assets/images/alola-akala.png?v=0.9.9'
}"></image>

<!-- ------ -->
Expand Down Expand Up @@ -21314,8 +21314,8 @@ <h5>Welcome to the Battle Frontier!</h5>

<g data-bind="visible: player.subregion == SubRegions.getSubRegion(GameConstants.Region.alola, 'Ula\'ula & Poni islands').id">
<image width="1600" height="960" data-bind="attr: {
'xlink:href':'assets/images/alola2.png?v=0.9.8',
href:'assets/images/alola2.png?v=0.9.8'
'xlink:href':'assets/images/alola2.png?v=0.9.9',
href:'assets/images/alola2.png?v=0.9.9'
}"></image>

<!-- ------ -->
Expand Down Expand Up @@ -22891,8 +22891,8 @@ <h5>Welcome to the Battle Frontier!</h5>
<g data-bind='visible: player.region == GameConstants.Region.galar'>
<g data-bind="visible: player.subregion == SubRegions.getSubRegion(GameConstants.Region.galar, 'Galar').id">
<image width="1600" height="960" data-bind="attr: {
'xlink:href':'assets/images/galar.png?v=0.9.8',
href:'assets/images/galar.png?v=0.9.8'
'xlink:href':'assets/images/galar.png?v=0.9.9',
href:'assets/images/galar.png?v=0.9.9'
}"></image>

<!-- ------ -->
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pokeclicker",
"version": "0.9.8",
"version": "0.9.9",
"description": "PokéClicker repository",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion docs/scripts/modules.min.js

Large diffs are not rendered by default.

55 changes: 38 additions & 17 deletions docs/scripts/script.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class Evolution {
}
// EVs
const evolvedPartyPokemon = App.game.party.getPokemonByName(evolvedPokemon);
evolvedPartyPokemon.effortPoints += App.game.party.gainEffortPoints(evolvedPartyPokemon, shiny, GameConstants.STONE_EP_YIELD);
evolvedPartyPokemon.effortPoints += App.game.party.calculateEffortPoints(evolvedPartyPokemon, shiny, GameConstants.STONE_EP_YIELD);
return shiny;
}
}
Expand Down Expand Up @@ -21998,7 +21998,7 @@ class Battle {
App.game.party.gainPokemonById(enemyPokemon.id, enemyPokemon.shiny);
const partyPokemon = App.game.party.getPokemon(enemyPokemon.id);
const epBonus = App.game.pokeballs.getEPBonus(this.pokeball());
partyPokemon.effortPoints += App.game.party.gainEffortPoints(partyPokemon, enemyPokemon.shiny, enemyPokemon.ep * epBonus);
partyPokemon.effortPoints += App.game.party.calculateEffortPoints(partyPokemon, enemyPokemon.shiny, enemyPokemon.ep * epBonus);
}
static gainItem() {
const p = MapHelper.normalizeRoute(Battle.route, player.region) / 1600 + 0.009375;
Expand Down Expand Up @@ -23444,7 +23444,7 @@ class Update {
constructor() {
this.saveKey = 'update';
// Loaded from package.json
this.version = '0.9.8';
this.version = '0.9.9';
this.saveVersion = '0.0.0';
this.updateSteps = {
'0.4.0': ({ playerData, saveData }) => {
Expand Down Expand Up @@ -24135,20 +24135,21 @@ class Update {
var _a, _b, _c, _d, _e;
// Add names to oak item loadouts
saveData.oakItemLoadouts = ((_a = saveData.oakItemLoadouts) === null || _a === void 0 ? void 0 : _a.map((list, index) => ({ name: `Loadout ${index + 1}`, loadout: list }))) || [];
// Fix pokerus
// Fix pokerus & EVs moved from statistics
saveData.party.caughtPokemon.forEach(p => {
var _a;
// If has pokerus, set to "contagious"
let status = (p[8]) ? 2 : 0;
const requiredForCured = saveData.challenges.list.slowEVs ? 5000 : 500;
if (((_a = saveData.statistics.effortPoints) === null || _a === void 0 ? void 0 : _a[p.id]) >= requiredForCured) {
// Get effort points (0 if not infected), Multiply by 100 for finer control
const effortPoints = status ? ((_a = saveData.statistics.effortPoints) === null || _a === void 0 ? void 0 : _a[p.id]) * 100 || 0 : 0;
// Set to cured if reached required amount of EVs
const requiredForCured = saveData.challenges.list.slowEVs ? 500000 : 50000;
if (effortPoints >= requiredForCured) {
status = 3;
}
// Update status and EVs
p[8] = status;
});
// Moved EVs from statistics
saveData.party.caughtPokemon.forEach(p => {
var _a;
p[9] = ((_a = saveData.statistics.effortPoints) === null || _a === void 0 ? void 0 : _a[p.id]) * 100 || 0;
p[9] = effortPoints;
});
// Give the players Linking Cords in place of Trade Stones
playerData._itemList.Linking_cord = playerData._itemList.Trade_stone || 0;
Expand Down Expand Up @@ -24208,6 +24209,25 @@ class Update {
delete settingsData['notification.dungeon_item_found.desktop'];
}
},
'0.9.9': ({ playerData, saveData }) => {
// Fix pokemon having Pokérus early (key item not unlocked)
if (!saveData.keyItems.Pokerus_virus) {
saveData.party.caughtPokemon.forEach(p => {
// Pokérus State
p[8] = 0;
// Effort Points
p[9] = 0;
});
}
// If Pokémon doesn't have Pokérus yet, it shouldn't have Effort Points
saveData.party.caughtPokemon.forEach(p => {
// Check Pokérus state
if (p[8] == 0) {
// Reset Effort Points
p[9] = 0;
}
});
},
};
const saveData = this.getSaveData();
if (saveData) {
Expand Down Expand Up @@ -35783,7 +35803,7 @@ class Plot {
// Gain Pokemon
App.game.party.gainPokemonById(PokemonHelper.getPokemonByName(wanderPokemon).id, shiny, true);
const partyPokemon = App.game.party.getPokemon(PokemonHelper.getPokemonByName(wanderPokemon).id);
partyPokemon.effortPoints += App.game.party.gainEffortPoints(partyPokemon, shiny, GameConstants.WANDERER_EP_YIELD);
partyPokemon.effortPoints += App.game.party.calculateEffortPoints(partyPokemon, shiny, GameConstants.WANDERER_EP_YIELD);
// Check for Starf berry generation
if (shiny) {
const emptyPlots = App.game.farming.plotList.filter(plot => plot.isUnlocked && plot.isEmpty());
Expand Down Expand Up @@ -39342,7 +39362,7 @@ class PokemonItem extends CaughtIndicatingItem {
const pokemonID = PokemonHelper.getPokemonByName(pokemonName).id;
App.game.party.gainPokemonById(pokemonID, shiny, true);
const partyPokemon = App.game.party.getPokemon(pokemonID);
partyPokemon.effortPoints += App.game.party.gainEffortPoints(partyPokemon, shiny, GameConstants.SHOPMON_EP_YIELD);
partyPokemon.effortPoints += App.game.party.calculateEffortPoints(partyPokemon, shiny, GameConstants.SHOPMON_EP_YIELD);
}
getCaughtStatus() {
return PartyController.getCaughtStatusByName(this.name);
Expand Down Expand Up @@ -39627,11 +39647,11 @@ class Party {
// between 0.2 -> 1 based on highest region
return Math.min(1, Math.max(0.2, 0.1 + (highestRegion / 10)));
}
gainEffortPoints(pokemon, shiny, number = GameConstants.BASE_EP_YIELD) {
let EPNum = number * App.game.multiplier.getBonus('ev');
calculateEffortPoints(pokemon, shiny, number = GameConstants.BASE_EP_YIELD) {
if (pokemon.pokerus < GameConstants.Pokerus.Contagious) {
return 0;
}
let EPNum = number * App.game.multiplier.getBonus('ev');
if (shiny) {
EPNum *= GameConstants.SHINY_EP_MODIFIER;
}
Expand Down Expand Up @@ -39894,13 +39914,14 @@ class PartyPokemon {
return App.game.keyItems.hasKeyItem(KeyItemType.Pokerus_virus);
}
calculatePokerusTypes() {
var _a;
// Egg can't hatch and valid Egg has pokerus
const eggTypes = new Set();
for (let i = 0; i < App.game.breeding.eggList.length; i++) {
if (i > App.game.breeding.hatcheryHelpers.hired().length - 1) {
const egg = App.game.breeding.eggList[i]();
if (!egg.canHatch() && !egg.isNone()) {
const pokerus = App.game.party.getPokemon(pokemonMap[egg.pokemon].id).pokerus;
const pokerus = (_a = App.game.party.getPokemon(pokemonMap[egg.pokemon].id)) === null || _a === void 0 ? void 0 : _a.pokerus;
if (pokerus && pokerus >= GameConstants.Pokerus.Contagious) {
eggTypes.add(PokemonHelper.getPokemonByName(pokemonMap[App.game.breeding.eggList[i]().pokemon].name).type1);
eggTypes.add(PokemonHelper.getPokemonByName(pokemonMap[App.game.breeding.eggList[i]().pokemon].name).type2);
Expand Down Expand Up @@ -43156,7 +43177,7 @@ class SafariBattle {
const pokemonID = PokemonHelper.getPokemonByName(SafariBattle.enemy.name).id;
App.game.party.gainPokemonById(pokemonID, SafariBattle.enemy.shiny);
const partyPokemon = App.game.party.getPokemon(pokemonID);
partyPokemon.effortPoints += App.game.party.gainEffortPoints(partyPokemon, SafariBattle.enemy.shiny, GameConstants.SAFARI_EP_YIELD);
partyPokemon.effortPoints += App.game.party.calculateEffortPoints(partyPokemon, SafariBattle.enemy.shiny, GameConstants.SAFARI_EP_YIELD);
}
static throwBait(baitType) {
if (!SafariBattle.busy()) {
Expand Down
7 changes: 6 additions & 1 deletion src/modules/changelog/ChangelogItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ import ChangelogUpdate from './ChangelogUpdate';
*/
const ChangelogItems = [
// note that month is 0 indexed
// v0.9.9
new ChangelogUpdate('v0.9.9', new Date(2022, 6, 22)),
new Changelog(changelogType.FIXED, 'Hatching new Pokémon causing errors'),
new Changelog(changelogType.FIXED, 'Pokémon gaining Pokérus and EVs early'),

// v0.9.8
new ChangelogUpdate('v0.9.8', new Date(2022, 6, 21)),
new ChangelogUpdate('v0.9.8', new Date(2022, 6, 22)),
new Changelog(changelogType.NEW, 'Ability to name Oak item loadouts'),
new Changelog(changelogType.NEW, 'Shards now appear in Underground'),
new Changelog(changelogType.NEW, 'Shard traders'),
Expand Down

0 comments on commit 313c182

Please sign in to comment.