-
Notifications
You must be signed in to change notification settings - Fork 338
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #866 from cazfi/srvup
- Loading branch information
Showing
4 changed files
with
41 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
freeciv/patches/backports/0046-Fix-combat-veterancy-chance.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
From b739562d61054e143e901c16b2e61037f1c44c59 Mon Sep 17 00:00:00 2001 | ||
From: Marko Lindqvist <[email protected]> | ||
Date: Sat, 19 Oct 2024 02:33:02 +0300 | ||
Subject: [PATCH 46/46] Fix combat veterancy chance | ||
|
||
It was always zero (integer math for 0.00 - 0.99) when | ||
it was supposed to be scaled to how challenging the combat was. | ||
|
||
Reported by Moke | ||
|
||
See RM #983 | ||
|
||
Signed-off-by: Marko Lindqvist <[email protected]> | ||
--- | ||
server/unittools.c | 4 ++-- | ||
1 file changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/server/unittools.c b/server/unittools.c | ||
index 6ba61bceda..eab53957fe 100644 | ||
--- a/server/unittools.c | ||
+++ b/server/unittools.c | ||
@@ -321,8 +321,8 @@ bool unit_versus_unit(struct unit *attacker, struct unit *defender, | ||
/* In a combat between equal strength units the values are 50% / 50%. | ||
* -> scaling that to 100% by doubling, to match scale of chances | ||
* in existing rulesets, and in !combat_odds_scaled_veterancy case. */ | ||
- *att_vet = def_strength * 2 / (att_strength + def_strength); | ||
- *def_vet = att_strength * 2 / (att_strength + def_strength); | ||
+ *att_vet = 100 * def_strength * 2 / (att_strength + def_strength); | ||
+ *def_vet = 100 * att_strength * 2 / (att_strength + def_strength); | ||
|
||
if (attackpower == 0) { | ||
*att_hp = 0; | ||
-- | ||
2.45.2 | ||
|
73 changes: 0 additions & 73 deletions
73
freeciv/patches/backports/0048-Handle-CoastStrict-units-correctly-on-city-removal.patch
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters