Commit Graph

270 Commits

Author SHA1 Message Date
iopietro 882215cd2a Reports refactor #1
-Removed 29 files from the "Templates/Notice" folder, there were a lot
of duplicated/very similar kinds of report. Now, there are only 6 kinds
of report (9.tpl isn't counted)
+Changed a lot of codes in some .tpl reports, into a foreach

Automation.php:

+Modified report data, for the refactored report system
+Some clean-up

Battle.php:

+Fixed catapults and rams, they weren't able to destroy completely a building
+Fixed a possible division by 0 error
2018-04-19 20:22:01 +02:00
iopietro 9c8637318b Filtered given medals
+Medals are now given only to players with an access < 8
2018-04-17 19:00:23 +02:00
iopietro bf091c2a0c Fixed a bug while reinforcing
+If you've already reinforced the target village, you'll troops will now
be merged with the present troops
2018-04-17 18:52:48 +02:00
iopietro de8859da03 Fixed a bug
+Fixed crannies total capacity while spying gauls
2018-04-16 19:58:57 +02:00
iopietro 6fba48da27 A little forgetfulness 2018-04-16 18:41:10 +02:00
iopietro 6f895f7d54 Fixed some bugs
+Fixed a "division by zero" error, in Battle.php
+Reworked spied informations, now they're shown only if the building is
at least at level 1. Splitted residence/palace information in two
distinct informations. Now the total crannies capacity is displayed
(even if the capacity is 0) instead of the level of the greatest cranny
+Fixed "getFieldLevelInVillage" function in Database.php
-Removed an useless control in Units.php
2018-04-16 18:39:41 +02:00
iopietro bd38ac7fd8 Fixed some bugs
+Fixed a bug that selected the capital village instead of the actual
village
+Medals aren't given to
Support/Nature/Natars/TaskMaster/Multihunteranymore
+Fixed a bug in 1.tpl (dorf3.php) that showed tigers instead of traps
while building traps
+Some clean-up in Technology.php
2018-04-16 14:56:15 +02:00
iopietro 8aac28dbc7 A little forgetfulness 2018-04-12 21:32:22 +02:00
iopietro e0c1b6ae5c Fixed some bugs
+Fixed catapults/rams formula
+Added the trapped troops calculation formula, traps are now distributed
through all troops
2018-04-12 21:31:14 +02:00
iopietro 29faeca811 Starvation Refactor
Refactor part 3 of the starvation function

+Troops will now die equally, according to the crop consumption of the
village

Database.php:
+Modified two functions to work with unit arrays as a parameters
2018-04-12 12:53:24 +02:00
iopietro a906f673b4 A little forgetfulness 2018-04-11 00:18:58 +02:00
iopietro 8b3a387cd5 Starvation refactor
Refactor part 2 of the "Starvation" function:
+Trapped troops in other villages will die of starvation
+Returning troops will die of starvaton

Database.php:
+Added "modifyPrisoners" function
2018-04-11 00:16:39 +02:00
iopietro 01e1df7493 Fixed a bug
Corrected a little forgetfulness
2018-04-09 23:35:45 +02:00
iopietro 21179d346f Fixed some bugs and errors
+Part 1 of the starvation refactor, attacking troops will now be killed
+Fixed some errors in Units.php, Technology.php, Battle.php and some
16_incomming.tpl
-Removed an unused function in Database.php
+Fixed a bug that could have destroyed a village after taking an
artefact even if it had more than 0 pop
2018-04-09 21:31:50 +02:00
iopietro bdca64eed3 Fixed a bug in medals
Medals are now given at the right date
2018-04-08 23:29:36 +02:00
iopietro 72fd81b69b Fixed an artefact bug
+Fixed a bug that prevented the destruction of a village, if it had 0
population with no artefacts inside
+Some clean-up
2018-04-08 22:55:33 +02:00
iopietro 9669b47dc0 Fixed the "Reloading issue"
-Removed some useless redirects
2018-04-08 20:38:29 +02:00
iopietro 9e44c1cd6d Some replacements
+Replaced all $GLOBALS['link'] with $database->dblink
-Removed Templates/links.tpl from build.php (it's already in
Templates/menu.tpl)
2018-04-08 19:55:28 +02:00
iopietro 6ea4430372 Fixed some bugs
+If you conquer a village with an artifact inside, the new owner will be
changed correctly
+Moved plus links under the menu
+Renewed the "debug" function in Logging.php
+Fixed some errors that could have shown in Ranking.php
2018-04-08 18:28:24 +02:00
iopietro 0132af4611 Fixed a lot bugs/security exploits
Profiles can't be hacked anymore, added some security control and
removed those malicious "hidden uid"
Errors now are now shown correctly while editing the profile
The level of the research you're doing in the Blacksmith/Armoury is now
displayed in the research queue
Hugely fixed the battle system, a big thanks to kirilloid for helping me
by providing his formulas :)!
Some general clean-up and bug fixing of little errors
Added some string constants to the language file (en.php)
2018-04-07 22:16:28 +02:00
Pietro 9869abe5ba Fixed two population bugs
Automation.php:
Fixed the attacker population and defender population before a battle, now the account population will be considered instead of the single village population.
Fixed the attacker population and defender population while chiefing a village, now the account population will be considered instead of the single village population.

Database:
Added a function to get the total population of the account.
2018-04-05 21:09:16 +02:00
Pietro c3e2bae50b Fixed some catapults bug
Walls can't be targeted anymore by catapults (if the target was random).
Destroyed buildings of completely destroyed villages are shown properly in the report.
Added the information "There are no buildings to destroy" if only walls are left and the village has more than 0 population.
Some clean up.
2018-04-05 19:41:32 +02:00
Pietro a1fbf9dcfc Fixed some catapult/ram bugs
Battle.php:
Fixed the blacksmith level formula for catapults and rams.

Automation.php:
+Catapults and rams now works better because of a new formula.

Note: this formula isn't 100% accurate with the real Travian formula, i can't find that formula anywhere, so i created an approximate formula.
2018-04-05 17:05:25 +02:00
Pietro aec41019e9 Fixed a bug in the troops training
If the speed of the server is very high and the single troop training time is 0, you can now train troops instantly.
2018-04-05 03:03:49 +02:00
Pietro 3738fd44cc Fixed some bugs and some clean up
Units.php:
Fixed a bug which allows to select invalid buildings or not-hittable building (such as Cranny, Walls, Stonemason's lodge and Trapper) with catapults.
Fixed a bug which allows to select a secondary target with less than 20 catapults.

Removed some unused functions from Automation.php and Database.php.
2018-04-05 00:02:12 +02:00
Pietro bba46a3e6f Added some missing <b></b> 2018-04-04 20:49:17 +02:00
Pietro f41be6dff7 Fixed some bugs
Automation.php: 
Fixed a bug that could happened if two attacks hit two different targets (one with some traps and the other with 0 traps) at the same second.

Building.php: 
Fixed the possibility to build a residence and a palace with the waiting loop (the previous fix wasn't working and $tid was used as a $id and viceversa).
Fixed the possibility to build in the id reserved to walls (id 40).
2018-04-04 20:01:58 +02:00
Pietro fff86538fa Release some memory 2018-04-03 12:56:14 +02:00
Pietro a749d74dfb Fixed an hero bug
The experience was distributed incorrectly if the defender(s)/attacker had more than 1 hero
2018-04-03 01:44:27 +02:00
Pietro ea65319477 Fixed trapped chiefs' behaviour
Trapped chiefs can no longer reduce the village loyalty.
Removed some unused code.
2018-04-01 02:30:46 +02:00
Pietro 057c622c26 Fixed an oasis exploit
With this bug you could have an infinite amount of resources
2018-04-01 01:05:02 +02:00
AL-Kateb 9de7aec692 Fixed redirecting to the rally point issue #479 2018-01-23 12:18:57 +00:00
Alex Stoica 83d22f16e7 Fix typo 2018-01-07 16:49:55 +00:00
Alex Stoica 1a71fdbc60 Add WW win correct date 2018-01-07 16:48:22 +00:00
AL-Kateb a254572a43 Fixed deleting trade routes after village is conquered 2017-12-28 15:21:07 +00:00
AL-Kateb ddc2e62472 Fixed loosing 1 level when there are only few catapults 2017-12-27 14:38:40 +00:00
AL-Kateb be8f683417 Cleanup 2017-12-27 10:59:01 +00:00
AL-Kateb 4d00b4ad1c Fixed units doubling when evasion is active 2017-12-27 10:23:57 +00:00
Martin Ambrus 77cc7b1d16 fix: rally point not destroyed correctly when taking over a village
#427
2017-12-26 20:29:40 +01:00
Martin Ambrus 56680344ec fix: treasuries with artifacts must be destroyable, villages must not
#425
2017-12-26 20:03:28 +01:00
Martin Ambrus 765914d863 fix: villages with artifacts must not be destroyed
#425
2017-12-26 19:58:34 +01:00
Martin Ambrus 33b47f4319 fix: hero attributes incorrectly adjusted on levelling up
#341
2017-12-26 17:38:01 +01:00
Martin Ambrus bdb705c69b fix: 2 catapults destroy a level 20 building
#423
2017-12-26 16:40:50 +01:00
Martin Ambrus fa8a6640e2 fix: demolition could bring building level to negative numbers
Closes #412
2017-12-04 11:10:00 +01:00
Martin Ambrus b261212d12 fix: expansion slots not being cleared up upon village destruction
#400
2017-12-02 16:17:47 +01:00
Martin Ambrus aec7a57ca4 fix: destroyed Embassy evicts player even with another Embassy standing
#399
2017-12-02 16:00:24 +01:00
Martin Ambrus 4b842ae0fa fix: village destroyed text displayed twice for 2-row catapults attack
#393
2017-12-02 15:04:15 +01:00
Martin Ambrus 537a14e4e3 fix: second row of catapults destroys incorrect target
#393
2017-12-02 11:09:14 +01:00
Martin Ambrus 9474a60313 fix: embassy destruction status text on an incorrect line in a report
#393
2017-12-02 10:55:24 +01:00
Martin Ambrus 680386044e fix: 2nd wave of catapults destroys targets and villages incorrectly
#393
2017-12-01 14:47:43 +01:00