frankmorgner / foe-battle-simulator Goto Github PK
View Code? Open in Web Editor NEWBattle Simulator for Forge of Empires
License: GNU General Public License v3.0
Battle Simulator for Forge of Empires
License: GNU General Public License v3.0
Is there an application for opening the created .gp files? Sorry I am new to python.
attack = (attacker.attack + attacker.bonus_attack(defender)) * (100 + boost_attack) / 100
Here you are applying the bonus attack first and then attack boost.
Example Nailstorm attacking artillery at +400% attack bonus:
(650 + 300) * (100 + 400) / 100 = 950 * 500% = 4750
The correct calculation would be to apply attack boost first and then bonus attack:
650 * (100 + 400) / 100 + 300 = 650 * 500% + 300 = 3550
If I understand the code correctly drawing order for all units that do not have rapid deployment or rogues are are random.
In reality drawing order depends on unit type. I have not found the rules yet, but in most cases faster units are drawing first.
If there are armies of the same unit type both side are drawing in alternating order beginning with the attacker
Example 2 vs. 2 Nailstorms:
PlayerNS, CompNS, PlayerNS, CompNS
If a player has more units of the same type those units will draw first.
Example 4 vs. 2 Nailstorms and 2 Rogues:
PlayerNS, PlayerNS, PlayerNS, CompNS, PlayerNS, CompNS, CompRogue, CompRogue
When testing units of the same type the current implementation has more randomization than the actual game would have.
When using armies of mixed units it can have a huge impact for fast units that can hit on turn 1.
Range and movement costs depend on the era of the newest unit on either side. If at least one unit is in ProgressiveEra on newer the higher values are used.
Bronze - Industrial:
Range costs are 1
Movement costs are 2 for plains. Other terrain will have higher costs
ProgressiveEra or newer:
Range costs are 1.5 (values are rounded after dividing by 1.5)
Movement costs are 3 for plains. Other terrain will have higher costs (+50% more than in Bronze-Industrial)
Flying units always have movement costs of 3 (same as plains)
I think the damage values differ a bit from the correct ingame values.
Here is the values I found:
0-0 | 0 | 0,153846154
0-1 Damage | 0,153846154 | 0,251572327
0-2 Damage | 0,25210084 | 0,322580645
1-2 Damage | 0,323529412 | 0,344827586
1-3 Damage | 0,345323741 | 0,454545455
1-4 Damage | 0,455882353 | 0,509803922
2-4 Damage | 0,510204082 | 0,597826087
2-5 Damage | 0,6 | 0,697674419
3-5 Damage | 0,698924731 | 0,798165138
3-6 Damage | 0,8 | 0,921052632
4-6 Damage | 0,922330097 | 1,107142857
4-7 Damage | 1,111111111 | 1,210526316
5-7 Damage | 1,212121212 | 1,612903226
6-7 Damage | 1,621621622 | 1,655172414
6-8 Damage | 1,666666667 | 2,25
7-8 Damage | 2,258064516 | 2,941176471
7-9 Damage | 2,962962963 | 3,346153846
8-9 Damage | 3,392857143 | 5,833333333
9-9 Damage | 6 | 9,090909091
9-10 Damage | 9,111111111 | 18,5
10-10 Damage | 19 | 190
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.