The first adventure now guarantees one tier-1 Riding Horse (item ID 70), replacing the random item reward.
Behavior:
The horse is added to the player’s inventory and included in the adventure report.
Experience, silver, and resource rewards remain unchanged.
Subsequent adventures use the existing random item rewards.
Eligibility is based on the player’s completed adventure history. Selling the horse or retraining the hero does not reset eligibility.
If the hero dies on the first adventure, all loot is forfeited, including the horse. The next adventure does not receive the guaranteed reward.
This change is not retroactive for players with completed adventures.
The admin panel now supports viewing and editing alliance bonus levels for Recruitment, Philosophy, Metallurgy, and Commerce.
Changes:
The alliance overview displays each bonus’s level, percentage, accumulated resources, and upgrade status.
The edit page allows administrators to select individual bonuses and set their levels from 0 to 5.
Changing a bonus level cancels its current upgrade while preserving accumulated resources. Setting level 5 clears the remaining resources.
Submitted levels are validated on the server, and bonus updates are recorded in the admin log.
Administrator identity is taken from the authenticated session.
Alliances without members can now be displayed.
Battle Resolution Fix Report
The reported issue affected attacks involving more than 2,000 troops. The supplied error log identifies an invalid defender tribe value as the immediate cause of the crash, but does not establish why it occurred with that troop count.
The invalid tribe produced unit names from u-9 to u0, causing undefined array key warnings followed by an invalid SQL query in modifyUnit().
The updated AutomationBattleResolution.php includes:
Tribe validation before combat: Invalid attacker, defender, or reinforcement tribe data leaves the attack pending and logs the issue before evasion or combat changes occur.
Earlier deleted-village handling: The existing troop return logic runs before resolving the deleted village’s owner, tribe, walls, or units.
Defensive casualty checks: Invalid tribes cannot generate negative unit column names. Missing defender unit rows return a zero-loss structure without submitting an empty update.
Reinforcement validation: Invalid player tribe data is no longer automatically treated as Nature. Only reinforcement rows explicitly originating from 0 use tribe 4.
Consistent hero reporting: Reinforcement hero losses use the validated tribe.
Code comments: Changes are documented in the file.
Validation: The complete file passed a PHP 8.3 grammar check using a parser. All 33 original methods were retained; three methods were modified and three validation helpers were added.