View Single Post
Unread 7 Dec 2008, 02:40   #40
newt
Banned
 
newt's Avatar
 
Join Date: May 2002
Location: Blackburn
Posts: 897
newt has much to be proud ofnewt has much to be proud ofnewt has much to be proud ofnewt has much to be proud ofnewt has much to be proud ofnewt has much to be proud ofnewt has much to be proud ofnewt has much to be proud of
Re: re-write the manual for the combat code!

Well, restarted my bcalc yesterday. Thought I'd share my python script for how to work out killing (inits 4->19) - and I know my code isn't the best! For a few reasons... I should be using arrays instead of databases (but my bcalc won't be public, so not arsed about resources/time delays. I find mysql commands much easier to code/read than fkin arrays/dictionaries/etc - if only cos you dont have to mess around with turning things from ints <-> strings). And ofcourse, I daresay my code is probably not as simple as it could be .......

Anyway, just thought it might help bcalc-makers with what to do - especially when and where to have certain for loops.

http://dpaste.com/hold/96697/

Needless to say, it takes care of both problems I've mentioned in this thread above. For issue #2 I've assumed that (for example) the number of clippers and banshees that fire on the mirages are worked out by the ratio of their damages. Not values....

Last edited by newt; 7 Dec 2008 at 03:04.
newt is offline   Reply With Quote