MSTK said:Wait a sec...does this consider the option of promotions? Because a unit you've attacked until 1 HP with one unit may emerge with 2 HP later...
If I understand you question correctly, you are trying to program your simulator to determine when to attack with the remaining units. Depending on how you've set this up (I'm not a Java programmer), you could break up blitz units in several different "simulated" units based on the number of attacks allowed. Give them all the total HP for the blitz unit. After the first blitz unit attack, readjust the remaining units to the left over hitpoints and stick them back in the stack of eligible attackers. Repeat until all blitz attacks are used up. Most real players would not attack with a 1HP army if there are other, healthy units, but they might attack with it as the last attacker if they were desperate to take the city. The resulting percentage of taking the city would given them an indication of how desparate they are willing to be to attack with their 1HP army at the end of the turn.Offa said:Anyway the thing is blitz attackers will carry on attacking as long as they can. Therefore if an attacker who started with 15 HP goes all the way down to 1HP in the first attack, it will still try to attack again. I don't really like this, as I suspect that nobody really plays like that. It would be simple to institute a rule for blitz attackers only to attack if they have xHP left, and I think this would be better. If anyone has any suggestions I will consider them.
ControlFreak said:If I understand you question correctly, you are trying to program your simulator to determine when to attack with the remaining units. Depending on how you've set this up (I'm not a Java programmer), you could break up blitz units in several different "simulated" units based on the number of attacks allowed. Give them all the total HP for the blitz unit. After the first blitz unit attack, readjust the remaining units to the left over hitpoints and stick them back in the stack of eligible attackers. Repeat until all blitz attacks are used up. Most real players would not attack with a 1HP army if there are other, healthy units, but they might attack with it as the last attacker if they were desperate to take the city. The resulting percentage of taking the city would given them an indication of how desparate they are willing to be to attack with their 1HP army at the end of the turn.
If I'm way off base, sorry. And sorry for digging up the thread, but I just found it thanks to recent references from GOTM.
Tubby Rower said:Is there a way to add a remove unit button? For instance, if I add 6 defenders and should have only added 5. I'd like to remove it without doing it all over again. But it would probably take you longer to code it than it would for the time that it would take me to click clear, and add them back again. So nevermind....![]()