20 reputation
7
bio website
location
age
visits member for 1 year, 11 months
seen yesterday

Fighting my way through code


Sep
24
awarded  Autobiographer
May
28
asked How to calculate production when player is offline
Dec
8
awarded  Popular Question
Jun
17
comment Drawing line from sprite with a touch
hello,well beside adding the 2 sprites on the layer not much. I have read about the CCDrawLine method but I can't connect to how I can use it with the thing I need. A wild guess would be to keep track on the startpoint and updating the endpoint and draw method as long as you keep the touch but I don't know if that's the right way.
Jun
17
asked Drawing line from sprite with a touch
Feb
12
awarded  Commentator
Feb
12
awarded  Scholar
Feb
12
awarded  Supporter
Feb
12
comment Calculate combat result between 2 units
Thanks for your time Philipp. I know what to do now
Feb
12
comment Calculate combat result between 2 units
Thanks guys with the tips and code. I see it cleared and can go my way now. Thanks !!
Feb
12
accepted Calculate combat result between 2 units
Feb
12
comment Calculate combat result between 2 units
That's what I need, the right formula to get the result :)
Feb
12
comment Calculate combat result between 2 units
so should it be like this ? Result = (AmountDefenderHealth + AmountDefenderDefense) - (AmountAttacker*AP)*Factor
Feb
12
comment Calculate combat result between 2 units
yes indeed. But how to calculate it against the defender and see what outcome it is and how many units survived/killed
Feb
12
comment Calculate combat result between 2 units
Trooper = unit so a unit has HP/AP/Defense :)
Feb
12
comment Calculate combat result between 2 units
to put it simple: there are multiple players. You can attack them by sending troops out to them. When they arrive your troops should fight his troops and an outcome is decided (win/lose). A report is needed afterwards with how many troops were killed. It hasnt to be 2 complexed like attack a defender with low health and stuff.
Feb
12
revised Calculate combat result between 2 units
added 10 characters in body
Feb
12
awarded  Editor
Feb
12
comment Calculate combat result between 2 units
thanks Joetjah. But now we are talking about 1vs1 unit. Isn't it going to be taking to long when there are 100000vs100000 units ?
Feb
12
comment Calculate combat result between 2 units
Hey Jon, thanks for replying. I edited my question a bit to make it more clear. With your calculation I cannot see how many units are survived and how many where destroyed.