var M={};
M.parent=Game.Objects['Temple'];
M.parent.minigame=M;
M.launch=function()
{
var M=this;
M.name=M.parent.minigameName;
M.init=function(div)
{
//populate div with html and initialize values
M.gods={
'asceticism':{
name:'Holobore, Spirit of Asceticism',
icon:[21,18],
desc1:''+loc("+%1% base CpS.",15)+'',
desc2:''+loc("+%1% base CpS.",10)+'',
desc3:''+loc("+%1% base CpS.",5)+'',
descAfter:''+loc("If a golden cookie is clicked, this spirit is unslotted and all worship swaps will be used up.")+'',
quote:'An immortal life spent focusing on the inner self, away from the distractions of material wealth.',
},
'decadence':{
name:'Vomitrax, Spirit of Decadence',
icon:[22,18],
desc1:''+loc("Golden and wrath cookie effect duration +%1%.",7)+' '+loc("Buildings grant -%1% CpS.",7)+'',
desc2:''+loc("Golden and wrath cookie effect duration +%1%.",5)+' '+loc("Buildings grant -%1% CpS.",5)+'',
desc3:''+loc("Golden and wrath cookie effect duration +%1%.",2)+' '+loc("Buildings grant -%1% CpS.",2)+'',
quote:'This sleazy spirit revels in the lust for quick easy gain and contempt for the value of steady work.',
},
'ruin':{
name:'Godzamok, Spirit of Ruin',
icon:[23,18],
descBefore:''+loc("Selling buildings triggers a buff boosted by how many buildings were sold.")+'',
desc1:''+loc("Buff boosts clicks by +%1% for every building sold for %2 seconds.",[1,10])+'',
desc2:''+loc("Buff boosts clicks by +%1% for every building sold for %2 seconds.",[0.5,10])+'',
desc3:''+loc("Buff boosts clicks by +%1% for every building sold for %2 seconds.",[0.25,10])+'',
quote:'The embodiment of natural disasters. An impenetrable motive drives the devastation caused by this spirit.',
},
'ages':{
name:'Cyclius, Spirit of Ages',
icon:[24,18],
activeDescFunc:function()
{
var godLvl=Game.hasGod('ages');
var mult=1;
if (godLvl==1) mult*=0.15*Math.sin((Date.now()/1000/(60*60*3))*Math.PI*2);
else if (godLvl==2) mult*=0.15*Math.sin((Date.now()/1000/(60*60*12))*Math.PI*2);
else if (godLvl==3) mult*=0.15*Math.sin((Date.now()/1000/(60*60*24))*Math.PI*2);
return loc("Current bonus:")+' '+(mult<0?'-':'+')+Beautify(Math.abs(mult)*100,2)+'%';
},
descBefore:loc("CpS bonus fluctuating between %1 and %2 over time.",['+15%','-15%']),
desc1:loc("Effect cycles over %1 hours.",3),
desc2:loc("Effect cycles over %1 hours.",12),
desc3:loc("Effect cycles over %1 hours.",24),
quote:'This spirit knows about everything you\'ll ever do, and enjoys dispensing a harsh judgment.',
},
'seasons':{
name:'Selebrak, Spirit of Festivities',
icon:[25,18],
descBefore:''+loc("Some seasonal effects are boosted.")+'',
desc1:''+loc("Large boost.")+' '+loc("Switching seasons is %1% pricier.",100)+'',
desc2:''+loc("Medium boost.")+' '+loc("Switching seasons is %1% pricier.",50)+'',
desc3:''+loc("Small boost.")+' '+loc("Switching seasons is %1% pricier.",25)+'',
quote:'This is the spirit of merry getaways and regretful Monday mornings.',
},
'creation':{
name:'Dotjeiess, Spirit of Creation',
icon:[26,18],
desc1:''+loc("All buildings are %1% cheaper.",7)+' '+loc("Heavenly chips have %1% less effect.",30)+'',
desc2:''+loc("All buildings are %1% cheaper.",5)+' '+loc("Heavenly chips have %1% less effect.",20)+'',
desc3:''+loc("All buildings are %1% cheaper.",2)+' '+loc("Heavenly chips have %1% less effect.",10)+'',
quote:'All things that be and ever will be were scripted long ago by this spirit\'s inscrutable tendrils.',
},
'labor':{
name:'Muridal, Spirit of Labor',
icon:[27,18],
desc1:''+loc("Clicking is %1% more powerful.",15)+' '+loc("Buildings produce %1% less.",3)+'',
desc2:''+loc("Clicking is %1% more powerful.",10)+' '+loc("Buildings produce %1% less.",2)+'',
desc3:''+loc("Clicking is %1% more powerful.",5)+' '+loc("Buildings produce %1% less.",1)+'',
quote:'This spirit enjoys a good cheese after a day of hard work.',
},
'industry':{
name:'Jeremy, Spirit of Industry',
icon:[28,18],
desc1:''+loc("Buildings produce %1% more.",10)+' '+loc("Golden and wrath cookies appear %1% less.",10)+'',
desc2:''+loc("Buildings produce %1% more.",6)+' '+loc("Golden and wrath cookies appear %1% less.",6)+'',
desc3:''+loc("Buildings produce %1% more.",3)+' '+loc("Golden and wrath cookies appear %1% less.",3)+'',
quote:'While this spirit has many regrets, helping you rule the world through constant industrialization is not one of them.',
},
'mother':{
name:'Mokalsium, Mother Spirit',
icon:[29,18],
desc1:''+loc("Milk is %1% more powerful.",10)+' '+loc("Golden and wrath cookies appear %1% less.",15)+'',
desc2:''+loc("Milk is %1% more powerful.",5)+' '+loc("Golden and wrath cookies appear %1% less.",10)+'',
desc3:''+loc("Milk is %1% more powerful.",3)+' '+loc("Golden and wrath cookies appear %1% less.",5)+'',
quote:'A caring spirit said to contain itself, inwards infinitely.',
},
'scorn':{
name:'Skruuia, Spirit of Scorn',
icon:[21,19],
descBefore:''+loc("All golden cookies are wrath cookies with a greater chance of a negative effect.")+'',
desc1:''+loc("Wrinklers appear %1% faster and digest %2% more cookies.",[150,15])+'',
desc2:''+loc("Wrinklers appear %1% faster and digest %2% more cookies.",[100,10])+'',
desc3:''+loc("Wrinklers appear %1% faster and digest %2% more cookies.",[50,5])+'',
quote:'This spirit enjoys poking foul beasts and watching them squirm, but has no love for its own family.',
},
'order':{
name:'Rigidel, Spirit of Order',
icon:[22,19],
activeDescFunc:function()
{
if (Game.BuildingsOwned%10==0) return loc("Buildings owned:")+' '+Beautify(Game.BuildingsOwned)+'
'+loc("Effect is active.");
else return loc("Buildings owned:")+' '+Beautify(Game.BuildingsOwned)+'
'+loc("Effect is inactive.");
},
desc1:''+loc("Sugar lumps ripen %1 sooner.",Game.sayTime(60*60*Game.fps))+'',
desc2:''+loc("Sugar lumps ripen %1 sooner.",Game.sayTime(60*40*Game.fps))+'',
desc3:''+loc("Sugar lumps ripen %1 sooner.",Game.sayTime(60*20*Game.fps))+'',
descAfter:''+loc("Effect is only active when your total amount of buildings ends with 0.")+'',
quote:'You will find that life gets just a little bit sweeter if you can motivate this spirit with tidy numbers and properly-filled tax returns.',
},
};
M.godsById=[];var n=0;
for (var i in M.gods){var it=M.gods[i];it.id=n;it.name=loc(FindLocStringByPart('GOD '+(it.id+1)+' NAME'));it.quote=loc(FindLocStringByPart('GOD '+(it.id+1)+' QUOTE'));it.slot=-1;M.godsById[n]=it;n++;}
M.slot=[];
M.slot[0]=-1;//diamond socket
M.slot[1]=-1;//ruby socket
M.slot[2]=-1;//jade socket
M.slotNames=[
'Diamond','Ruby','Jade'
];
M.swaps=3;//swaps left
M.swapT=Date.now();//the last time we swapped
M.lastSwapT=0;//frames since last swap
M.godTooltip=function(id)
{
return function(){
var me=M.godsById[id];
me.icon=me.icon||[0,0];
var str='
'+me.quote+''):'')+ '
'+me.quote+''):'')+ '