I have created a fight simulator. The algorithm is on python. I maid it so that people can use it easily without understanding the code (which is quite long as a result). To use it you just have to know everything about the units (stats) and how you want to make them figth (ie musk Attack pike 1st and then lb).
To use this, you need to have python, then just run the code, enter play_1() on the shell and follow the instructions.
I put some pictures to show how it works and the code in attachments.
Thx for @Kaiserklein for giving me the idea a long time ago, @Diarouga for giving me the motivation to do it and @Gendarme for allowing me to put a python file in attachment^^
Note : The code isn't perfect and let me now if you want me to add smthg
A few think that isn't implemented yet :
-change unit from range to hand Attack when attacking another unit (may come later)
-splash dammages (not idea how to do this)
-lb and other unit animation
-range consideration (I considere every units fight from the start which is wrong, I may change that)
EDIT : There was a misstake in my code for the bonus, I have correct it now
a figth simulator
a figth simulator
- Attachments
-
- fight_2.py
- (4.88 KiB) Downloaded 31 times
-
-
-
Who is online
Users browsing this forum: No registered users and 1 guest