I saw this piece of code while doing research for an idle game I am making:
var minions = new Object;
minions = {
0: {
name: "Mole",
description: "...",
price: 10,
priceModifier: 1.5,
attributes: {
goldPerSec: 1
}
},
1: {
name: "Bulldog",
description: "...",
price: 1e3,
priceModifier: 1.5,
attributes: {
goldPerSec: 70,
diamondsPerSec: .5
}
},
2: {
name: "Giant Ant",
description: "...",
price: 1e5,
priceModifier: 1.5,
attributes: {
goldPerSec: 700,
diamondsPerSec: 3
}
},
3: {
name: "A.W.E.S.O.M.-O 2000",
description: "...",
price: 1e6,
priceModifier: 1.3,
attributes: {
goldPerSec: 5e3,
diamondsPerSec: 20
}
},
4: {
name: "Caterpillar",
description: "...",
price: 8e7,
priceModifier: 1.3,
attributes: {
goldPerSec: 3e4,
diamondsPerSec: 100
}
},
5: {
name: "Pterodactyl",
description: "...",
price: 19e8,
priceModifier: 1.3,
attributes: {
goldPerSec: 85e3,
diamondsPerSec: 400
}
},
6: {
name: "Miner Spaceship",
description: "...",
price: 29e9,
priceModifier: 1.3,
attributes: {
goldPerSec: 5e5,
diamondsPerSec: 2700
}
},
7: {
name: "The dwarf King",
description: "...",
price: 3e11,
priceModifier: 1.3,
attributes: {
goldPerSec: 3e6,
diamondsPerSec: 16e3
}
},
8: {
name: "Spirit Golem",
description: "...",
price: 5e13,
priceModifier: 1.3,
attributes: {
goldPerSec: 25e6,
diamondsPerSec: 98e3
}
}
};
And I have a small idea of what is being done here but my question is how would this code be handled or triggered.
Really all I need is the name for what this is, and I can take it from there :)