You have 10k mercs with weapons and because you are over your limit 1% of them are deserting each turn. The function that desert them is placed after the function that calculates the stats, so you keep the same stats even when all of them have deserted.
I noticed this while on PPT and I belive that after 1 attack by you or on you the stats will be recalculated, still this can be exploited to hit someone big 1 time without losing troops at all.
Attack/defense bug with merc limit
-
Nostradamus
- Fledgling Forumer
- Posts: 217
- Joined: Sat Oct 22, 2005 4:05 am
- Alliance: Dirty Dozen
- Race: NanoTiMaster
-
Nostradamus
- Fledgling Forumer
- Posts: 217
- Joined: Sat Oct 22, 2005 4:05 am
- Alliance: Dirty Dozen
- Race: NanoTiMaster
You don't get it.
Each attack after your losses are calculated your attack/defense is recalculated. This is a distinct php function.
Every turn how many mercs are deserting it's also calculated. This is another distinct php function.
The problem is that after you lose mercs the desertion function doesn't call the stats calculating function and you stay with the same stats and this can be exploited, but only 1 time because after an attack the stats calculating function is called and it will notice that some mercs are gone.
Each attack after your losses are calculated your attack/defense is recalculated. This is a distinct php function.
Every turn how many mercs are deserting it's also calculated. This is another distinct php function.
The problem is that after you lose mercs the desertion function doesn't call the stats calculating function and you stay with the same stats and this can be exploited, but only 1 time because after an attack the stats calculating function is called and it will notice that some mercs are gone.

