Well guys, I play an iOS game called Clash of Clans. In a nutshell, it's one of those medieval-type games where you train units, raid people, build a massive fortress, and try to gain as many resources and trophies as possible.
Well, what sucks about the game is that you have these barracks, and you have to wait for all of your troops to train. Some, like an archer, take like 30 seconds, but a wizard can take 10 minutes. But the time isn't what I came to ask about.
I want to create a calculator that calculates the total price it will take to train all of your troops. As an example, the Barbarian unit costs 25 elixir to train (elixir is the currency used to train troops). However, the game has a laboratory system where you can upgrade units. As they upgrade, the training cost changes. What's worse is that there's no formula for the unit level - unit cost. If anyone wants to help, here's a massive upload of information.
I will state the unit level and then the price.
So I was thinking more of a string kinda thing, where you input the unit name and then it asks how many of each unit you want and then the level. This is going to take a whole ton of variables and IF THEN ELSE statements. I already have a prototype, which is exactly how I described it in the sentence before this.
Problem is, there is a whole other breed of troops, called Dark Troops. Thankfully there are only four kinds of these, and they use a different kind of currency (cheesily called Dark Elixir).
Thanks for absolutely any kind of support or optimization or both! I hope some people with iOS devices start playing this!
PS you can find more troop info at clashofclans.wikia.com
PSS if you decide to play, try to repair your clan castle quickly and then join my clan. PM me if you actually are interested. Sorry if you enterpret this as an advertising plot, but this game really is fun.
The man shuddered as the shadow drew a glistening sword from his back. Creeping closer and closer with his pale eyes burning into the man, the shadow slowly raised his blade and before he could thrust it down, the man heard the shadow hiss something.
"The Shadow Clan's presence must be like a whisper. Always felt, but never seen…"