[Freeciv-Dev] Re: (PR#12997) [PATCH] Generic no sink deep loss effect
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12997 >
Vasco Alexandre da Silva Costa wrote:
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=12997 >
>
> This patch makes the no sink deep effect generic. Instead of hardcoding
> to check the F_TRIREME flag in the C code, it uses effects to do the check.
How does this work with modified sink percentages?
> There are only two lingering F_TRIREME checks left. One is a unit type
> check and the other for the, as usual, annoyingly harcoded help.
Put the helptext into the ruleset itself.
> - if ((likely_ocean(ptile, pplayer) < 50) ||
> - is_likely_coastline(ptile, pplayer) ||
> - get_unit_bonus(punit, EFT_NO_SINK_DEEP) > 0) {
> + if (get_unit_bonus(punit, EFT_NO_SINK_DEEP) > 0 ||
> + likely_ocean(ptile, pplayer) < 50 ||
> + is_likely_coastline(ptile, pplayer)) {
Bad style.
-jason
|
|