Added tooltips to Pantheon #597
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { SimObjects } from '../VariablesAndData';
|
||||
import { SimGod1, SimGod2, SimGod3, SimObjects } from '../VariablesAndData';
|
||||
|
||||
/**
|
||||
* This function checks for the current God level in the sim data
|
||||
@@ -11,10 +11,14 @@ export default function SimHasGod(what) {
|
||||
SimObjects.Temple.minigame = Game.Objects.Temple.minigame;
|
||||
}
|
||||
const god = SimObjects.Temple.minigame.gods[what];
|
||||
for (let i = 0; i < 3; i++) {
|
||||
if (SimObjects.Temple.minigame.slot[i] === god.id) {
|
||||
return i + 1;
|
||||
}
|
||||
if (SimGod1 === god.id) {
|
||||
return 1;
|
||||
}
|
||||
if (SimGod2 === god.id) {
|
||||
return 2;
|
||||
}
|
||||
if (SimGod3 === god.id) {
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -13,6 +13,9 @@ import {
|
||||
SimAchievementsOwned,
|
||||
SimDragonAura,
|
||||
SimDragonAura2,
|
||||
SimGod1,
|
||||
SimGod2,
|
||||
SimGod3,
|
||||
SimHeavenlyPower,
|
||||
SimObjects,
|
||||
SimPledges,
|
||||
@@ -49,6 +52,11 @@ export default function CopyData() {
|
||||
you.basePrice = me.basePrice;
|
||||
you.free = me.free;
|
||||
if (me.minigameLoaded) {
|
||||
if (me.name === 'Temple') {
|
||||
SimGod1 = me.minigame.slot[0];
|
||||
SimGod2 = me.minigame.slot[1];
|
||||
SimGod3 = me.minigame.slot[2];
|
||||
}
|
||||
you.minigameLoaded = me.minigameLoaded;
|
||||
you.minigame = me.minigame;
|
||||
}
|
||||
|
||||
34
src/Sim/SimulationEvents/GodChange.js
Normal file
34
src/Sim/SimulationEvents/GodChange.js
Normal file
@@ -0,0 +1,34 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
import CalculateGains from '../Calculations/CalculateGains';
|
||||
import CheckOtherAchiev from '../Calculations/CheckOtherAchiev';
|
||||
import CopyData from '../SimulationData/CopyData';
|
||||
import {
|
||||
SimAchievementsOwned,
|
||||
SimCookiesPs,
|
||||
SimGod1,
|
||||
SimGod2,
|
||||
SimGod3,
|
||||
} from '../VariablesAndData';
|
||||
|
||||
/**
|
||||
* This functions calculates the cps and cost of changing a Dragon Aura
|
||||
* It is called by CM.Disp.AddAuraInfo()
|
||||
* @param {number} god The number of the slot to be swapped in
|
||||
* * @param {number slot The slot the god will go to
|
||||
* @returns {number} CM.Sim.cookiesPs - Game.cookiesPs The bonus cps and the price of the change
|
||||
*/
|
||||
export default function CalculateChangeGod(god, slot) {
|
||||
CopyData();
|
||||
if (slot === 0) SimGod1 = god;
|
||||
else if (slot === 1) SimGod2 = god;
|
||||
else if (slot === 2) SimGod3 = god;
|
||||
|
||||
const lastAchievementsOwned = SimAchievementsOwned;
|
||||
CalculateGains();
|
||||
|
||||
CheckOtherAchiev();
|
||||
if (lastAchievementsOwned !== SimAchievementsOwned) {
|
||||
CalculateGains();
|
||||
}
|
||||
return SimCookiesPs - Game.cookiesPs;
|
||||
}
|
||||
@@ -12,6 +12,9 @@ export let SimHeavenlyPower;
|
||||
export let SimPrestige;
|
||||
export let SimDragonAura;
|
||||
export let SimDragonAura2;
|
||||
export let SimGod1;
|
||||
export let SimGod2;
|
||||
export let SimGod3;
|
||||
export let SimDoSims;
|
||||
export let SimEffs;
|
||||
export let SimDateCentury = Game.startDate;
|
||||
|
||||
Reference in New Issue
Block a user