/*
|--------------------------------------------------------------------------
| FIX List
|--------------------------------------------------------------------------
|
| 1. Hero Attribute Points
| - When adding attribute points to the hero, the page currently refreshes
| after every click on the "+" button.
| - Implement a faster allocation method (AJAX or similar) so multiple
| points can be assigned without a full page refresh.
| - The implementation must remain secure and not be exploitable
| (validate requests server-side, prevent double submissions,
| verify available points, etc.).
|
| 2. Hero Equipment Restrictions (Original Travian Behavior)
| - Prevent equipping or unequipping hero items while the hero is:
| • On an adventure.
| • Attacking (alone or with troops).
| • Away as reinforcements.
|
| 3. Oasis Navigation
| - When opening an oasis (37_land.tpl), the 37_t4nav.tpl navigation
| disappears.
| - Include the navigation menu on the oasis page as well.
|
| 4. Auction House Redesign
| - Redesign 37_auction.tpl to match the Merchant.png mockup.
| - Keep the existing auction functionality exactly as it is.
| - Only improve the UI/UX.
| - You may crop and reuse graphics from Merchant.png.
| - Add Gold ⇄ Silver exchange functionality.
|
| 5. Hero Item Bonuses (Highest Priority)
| - Verify that hero equipment bonuses are applied correctly.
| - Example:
| • Helmet of the Ruler should reduce Barracks training time by 20%.
| • Currently, training time remains unchanged whether the helmet
| is equipped or not.
| - Also verify:
| • Stable training speed bonuses.
| • Boots bonuses.
| • Any other related hero equipment effects.
|
| 6. Adventures Page Redesign
| - Redesign 37_adventures.tpl to match the Adventure.png mockup.
| - Keep the "Expires in" column intact.
|
*/
### Core Architecture Refactor
- Split the `Database.php` class into domain-specific traits under `GameEngine/Database/`.
- Split the `Automation` class into domain-specific traits under `GameEngine/Automation/`.
- Grouped methods by functional domain for improved maintainability and navigation.
- Preserved 100% backward compatibility.
- No logic or behavioral changes.
- Pure structural refactor.
Add (Admin Panel) : Multi-account detection, Push protection, Heatmap, Gold Shop (redem codes), Blacklist user names and Quest Editor + fix some php notice
Fix quest_core for mission 33,36, train 2 units, etc (NEW TRIBE)
There are some temporary bugs that will be fixed in next commit (pagination for new heatmap, quest reward)
1. Spies — real bug, found. In calculateBattle, the block that calculates the attack power of spies had the hardcoded condition if ($i == 4 || $i == 14 || $i == 23 || $i == 44). Scouts of new tribes (52/64/74/82) did not enter the branch → attack power 0, so they all died no matter how many there were. Now the condition is in_array($i, $unitsbytype['scout']). With this, all four lists in Battle (cavalry, catapults, rams, scouts on attack + scouts on defense) are derived from unitsbytype.
2. Defender hero. I rebuilt the report CSV with dummy values and confirmed that the indexes in Notice/1.tpl are correct (272 = hero present, 273 = hero dead) — so the problem was that $deadhero was ending up as 0 in the report, even though deadherodef was 1 in the battle result (that's why the hero actually died in the DB). Now $deadhero is taken directly from the battle result ($battlepart['deadherodef']), with $owndead['hero'] only as a fallback.
3. "Free" healing. The code called modifyResource(..., mode 0) exactly like training, so the resources were low — but at 100x speed and full storage (8M/8M in your captures) the difference is instantly invisible. I did find a real bug in this area though: modifyResource caps at 0 instead of failing, so if you don't have resources you heal for free. Now procHeal checks the stock and, if there are insufficient resources, automatically reduces the quantity to what you can afford (or cancels).
NEW TRIBES ENHANCEMENT (Huns, Egipteans, Spartans & Vikings) #327
Please be advised, is not fully tested so if you activate on install maybe is not fully working