Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. *Read more...*

Feature #849446 ยป 0001-AI-A-unit-can-t-pay-more-than-MAX_MOVE_FRAGS.patch

Sveinung Kvilhaugsvik, 2019-11-26 05:20 AM

View differences:

ai/default/daieffects.c
break;
case EFT_ACTION_SUCCESS_MOVE_COST:
case EFT_ACTION_SUCCESS_TARGET_MOVE_COST:
/* Someone may put MAX_MOVE_FRAGS in this effect to make sure that all
* movement is gone. */
v -= amount / (adv_want)MAX_MOVE_FRAGS;
{
/* Taking MAX_MOVE_FRAGS takes all the move fragments. */
adv_want move_fragment_cost = MIN(MAX_MOVE_FRAGS, amount);
/* Lose all movement => 1. */
v -= move_fragment_cost / (adv_want)MAX_MOVE_FRAGS;
}
break;
case EFT_COUNT:
log_error("Bad effect type.");
    (1-1/1)