Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combat system is broken #12

Open
phxql opened this issue Nov 4, 2017 · 2 comments
Open

Combat system is broken #12

phxql opened this issue Nov 4, 2017 · 2 comments
Labels

Comments

@phxql
Copy link
Owner

phxql commented Nov 4, 2017

10 mostquitos vs 13 mosquitos result in both sides being completely destroyed.

This is due to the fact that one mosquito has firepower to destroy 14. Probably one mosquito should only kill one ship at most. (this problem needs verification)

@phxql
Copy link
Owner Author

phxql commented Nov 4, 2017

Idea from dom:

Combat takes place in rounds. Sum the AP of all ships. Every ship has a chance to hit of 80%. The AP will be distributed randomly on the enemy ships. Every ship has 20% chance of absorbing attacks. Remove the destroyed ships from the list. If both sides have ships left, simulate another round.

@phxql
Copy link
Owner Author

phxql commented Nov 4, 2017

19:10:04.951 [main] DEBUG r.business.fight.FightCalculatorImpl - Fight between Ships(ships=[Ship(type=MOSQUITO, amount=10)]) and Ships(ships=[Ship(type=MOSQUITO, amount=13)])
19:10:04.955 [main] DEBUG r.business.fight.FightCalculatorImpl - Attacker attack points: 140
19:10:04.956 [main] DEBUG r.business.fight.FightCalculatorImpl - Remaining defending ships: Ships(ships=[Ship(type=MOSQUITO, amount=0)])
19:10:04.956 [main] DEBUG r.business.fight.FightCalculatorImpl - Attacker attack points: 182
19:10:04.956 [main] DEBUG r.business.fight.FightCalculatorImpl - Remaining defending ships: Ships(ships=[Ship(type=MOSQUITO, amount=0)])

That shouldn't happen.

@phxql phxql added the bug label Nov 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant