Commit Graph

329 Commits

Author SHA1 Message Date
Shadow 4c68d8dd39 Update to version 8.3.5
Many Fixes
2022-02-18 13:56:17 +02:00
Shadow 4c116aefea update 2019-05-06 09:18:20 +03:00
Vladyslav e3c2a28d71 Minor bug fixes
WW villages cannot be destroyed. Thank @iopietro for your help.
2018-08-28 01:42:35 +03:00
iopietro f032523e1c Generale fixes
+Fixed a bug that didn't return reinforcements in counquered oasis, if
it was released by the owner, or from the admin panel
+Changed the catapults and rams formulas (still not completed at 100%),
thanks to Kirilloid!
+Changed the Natars' capital default coordinates
2018-07-28 15:07:52 +02:00
iopietro b9a442b423 General fixes
+Fixed a bug that would have killed all troops by starvation, if added
through the admin panel
2018-07-25 17:17:52 +02:00
iopietro 84b00790a6 General fixes
+Fixed a bug that showed "The village has been destroyed" two times, if
an artifact was conquered from Natars (or from a 0 popped village) and
there were catapults in the attack
2018-07-25 02:43:29 +02:00
iopietro 77136a9784 Artifacts update and optimizations
+Added the "Artifacts" section in the Admin Panel, which contains two
options: return a deleted artifact to the Natars and create new
Artifacts, assigned to a specified player
+Return to Natars coded, in the village section of the Admin Panel
+Moved a lot of functions and costants from Automation.php to the "new"
class Artifacts.php
+Optimized a lot the whole Natars creation process, decreased the number
of query of about 600
+Optimized a lot the function which deletes a player's account, it's now
executed almost instantly, even with players with a lot of villages
+Redesigned the map spawn system, using a more Travian-like village
distribution
+Fixed a bug that did show a broken village in the artifact chronology,
if that village was destroyed
+Reduced the amount of redundant code (about 230 lines) for
27_1.tpl/27_2.tpl and 27_3.tpl
+Fixed a bug that permitted to build the Great Granary and the Great
Warehouse in the whole account, with only a village effect artifact
+Fixed a bug in the Admin Panel map that didn't permit to show village
informations, if that village contained single quotes in its name
2018-07-24 03:04:25 +02:00
Vladyslav b13879e619 General fixes
+Changed the issuance of medals. Thanks @iopietro
2018-07-01 00:39:17 +03:00
Vladyslav 963471825a General fixes
+Redesigned set of buildings during the appearance of the WW village

NOTE: To use this change, you must recreate all the WW villages
2018-06-27 15:25:50 +03:00
iopietro c574a71b3a General fixes
+Fixed a bug that didn't delete artifacts when a player deleted his
account
+Added "(artifact)" if a village has an artifact in the village overview
+Added the artifact section in the multihunter panel (return to natars
doesn't work yet)

NOTE: To play this version of the game, you have to run this query first
(where "s1_" is the prefix of your server):

ALTER TABLE `s1_artefacts` ADD `del` TINYINT(1) NULL DEFAULT '0' AFTER
`lastupdate`;
ALTER TABLE `testtravian`.`s1_artefacts` ADD INDEX
`active-owner-conquered-del` (`active`, `owner`, `conquered`, `del`);
2018-06-21 14:43:47 +02:00
iopietro 8861a578e4 General fixes
+Fixed a bug that didn't update the starvation correctly, when
starvation data was updated (for example: troops in training, attacks
completed, etc.)
2018-06-17 01:48:40 +02:00
iopietro d96259afd8 General fixes
+You can no longer build WW if your and your alliance building plans
aren't active yet
+You can no longer remove the WW from the village if you remove it from
the building queue
+Spies from every tribe will now consume crop correctly, when returning
from a scouting attacks
+Spies from every tribe will now be displayed correctly, in the "Troops"
tab of dorf3.php, when returning from a scouting attack
+Building levels will now not be downgraded by 1 level, when conquering
a Natars' village
+Natars' villages with an artifact inside, will now be deleted if the
artifact is conquered (even if the pop isn't 0)
2018-06-09 03:03:01 +02:00
iopietro a8d6b9c357 General fixes
+Fixed a bug that didn't permit to change the name or the Tag of the
alliance individually
+Fixed a bug that didn't count the population growth sometimes
+Fixed a bug that didn't halve the population consumption in WW villages
2018-06-08 19:15:39 +02:00
iopietro b717c0cdf4 General fixes
+Fixed a bug that didn't permit to show to the defender "None of your
soldiers returned." under certain circumnstances
+Fixed a bug that showed a wrong report icon if the defender had 0
defences and all attacker's units were trapped/killed during the battle
+Fixed a bug that counted a wrong percentage bonus for the horse
drinking trough
2018-06-01 16:24:36 +02:00
iopietro b12f4d4497 General fixes
+Fixed a bug that didn't permit to see a defender hero in a spy report
+Fixed a bug that only permitted to revive the last hero on the hero
list
2018-05-31 15:23:48 +02:00
iopietro 11c3d44168 general fixes
+Fixed a bug that didn't permit to counquer an artifact in certain
circumstances with the new automation system
2018-05-25 17:45:05 +02:00
iopietro 8605996533 Fixed some Automation bug
+Fixed the (in)famous "doubling troops bug", this has been the oldest
bug I can remember, it lasted 7 years!!!
+Reworked the whole lock system, it's more maintanable and easy to read
now
+Removed some useless class fields, reworked some methods that depended
on them
2018-05-24 01:28:56 +02:00
iopietro fca22ac98b General fixes
+Fixed a bug that didn't permit to attack with catapults with the new
automation system
+Fixed a warning that could have been displayed in certain cases
2018-05-23 17:36:16 +02:00
iopietro f41666cabc New automation
+Separated Automation.php from the UI and users classes

NOTE: This is only a test, it'll not absolutely be as it is in this commit in the final version.
2018-05-22 23:37:28 +02:00
iopietro edeee02333 Some clean-up 2018-05-22 22:43:01 +02:00
iopietro f0b9f32826 General fixes
+Moved "isWinner()" method from Automation.php to Session.php, it's now
triggered when activating plus function or entering in
plus1.php/build.php
+General clean-up and better indentation
+The tournament square bonus is now displayed correctly
2018-05-22 00:33:09 +02:00
iopietro 628894f478 General fixes
+WWs aren't affected anymore by stronger building artifacts
+Walls damaging/destruction (wall bonus reduction) during a battle, is
now counted
+Added a button for normal acess users, for editing/sticking, etc. their
own topics (instead of directly display the topic "admin menu")
+Fixed some possible warnings
2018-05-21 16:45:54 +02:00
Vladyslav a956abee13 Change the date display
The date display was changed from 'm/d/Y' to 'd.m.Y'
2018-05-19 20:52:33 +03:00
iopietro 0322a0ae49 General fixes
+Fixed a bug that permitted to see troops movement with a 0 level rally
point
+Fixed a bug that permitted to send attacks, enforcements, etc. with a 0
level rally point
+Fixed a bug that counted the moral bonus for attacks against WW
villages
+Fixed a bug that didn't permit to finish all buildings/researches, etc.
without a plus account
+Recoded part of Natars timer for being more generic
+Natars/Artifacts spawn, WW villages spawn, WW building plans spawn are
now based on the start date of the server and not on the installation
date
+Better indentation of some code
2018-05-18 15:46:15 +02:00
iopietro 6909ba4e58 Fixed a medals bug
+First medals will now be given on the next Sunday (at 12 PM) from the
start of the server
2018-05-16 18:44:06 +02:00
iopietro 95cc6180a9 Fixed a catapult bug
+Fixed a bug that didn't recount building time for in waiting loop
buildings
+Fixed a bug that didn't remove a building from the waiting loop, if the
previous was destroyed by catapults
2018-05-15 20:20:38 +02:00
iopietro f92e4d3bb8 General fixes
+Increased the number of "Slight artifact of the fool" from 5 to 10
2018-05-13 22:55:38 +02:00
iopietro 26431b6cea General fixes
+Fixed a bug that didn't halved the catapults force when two buildings
were selected
2018-05-13 16:10:49 +02:00
iopietro bdd896573c General fixes
+Added WW building plans to the "Small artifacts" section of the
treasury
+Fixed a bug that permitted to maintain a building in queue when
destroyed by catapults
+Fixed a bug that didn't count the catapult destruction of a building in
building queue
2018-05-13 15:50:45 +02:00
iopietro 43cbd60f78 General fixes
+Added an image in: Natars/Artifacts spawn message, WW villages spawn
message and WW building plans spawn message
+Fixed a wrong time calculation when removing a building from the
construction queue, if there was present a master builder order
2018-05-13 00:21:07 +02:00
Shadow 77f919e718 FIX 2 2018-05-11 11:31:35 +03:00
Shadow db7ce71dfd WW village message 2018-05-11 11:26:50 +03:00
iopietro 950fc61f8a General fixes
+A method in Building.php is now static
+Fixed timers in the market
+Fixed a bug that did take in account a wrong tournament square when
calculating the returning time of the troops
2018-05-10 20:50:29 +02:00
iopietro 90221cf19f Natars automation system
+Natars will now spawn automatically, you can set how many day should
pass before the spawn of Natars (and artifacts), WW Villages and WW
building plans (Note: WW villages and WW building plans won't spawn
until the creation of the natar account)
+Added 3 timers under the left menu which indicate the spawn of
Natars/Artifacts, WW villages and WW building plans
+Added an option in the installation, to set the resource production of
oasis
+Fixed a bug that didn't permit to add multiple Units, Abtech and tech
rows with one query
+Added a new information to the Artifact of the fool, the next effect
reroll will now be displayed in his informations (in the treasury)
+Fixed a bug that dind't permit the correct timers flow in Dorf3.php
(Warehouse tab), they'll now flow correctly
+Timers and resources percentage of villages with a negative production
of crop will now be marked in red (in the Warehouse tab, Dorf3.php) and
will now be displayed in how much time the granary will be emptied
+Fixed a possible bug that prevented to add raids to farm lists
+Fixed a bug that didn't permit to create WW Villages from the
Multihunter control panel
+Reworked all timers, there will be only one timer field now (in
Session.php)
+Minor bug fixing and optimization

NOTE: To play this version of the game, you need to reinstall the server
OR you can simply add these lines of code into your "config.php" file:

// ***** Natars Spawn Time
define("NATARS_SPAWN_TIME",260);
define("NATARS_WW_SPAWN_TIME",260);
define("NATARS_WW_BUILDING_PLAN_SPAWN_TIME",260);

// ***** Oasis production
define("OASIS_WOOD_MULTIPLIER",40);
define("OASIS_CLAY_MULTIPLIER",40);
define("OASIS_IRON_MULTIPLIER",40);
define("OASIS_CROP_MULTIPLIER",40);
define("OASIS_WOOD_PRODUCTION",OASIS_WOOD_MULTIPLIER*SPEED);
define("OASIS_CLAY_PRODUCTION",OASIS_CLAY_MULTIPLIER*SPEED);
define("OASIS_IRON_PRODUCTION",OASIS_IRON_MULTIPLIER*SPEED);
define("OASIS_CROP_PRODUCTION",OASIS_CROP_MULTIPLIER*SPEED);

P.S: from the next version, the possibility to add manual WWs, WW
building plans and to create the natar account will be REMOVED.
2018-05-10 17:45:27 +02:00
iopietro ec63b04587 General fixes
+Fixed an exploit that permit to maintain the crop level constant if the
page was refreshed every second, with a negative production
2018-05-06 15:20:58 +02:00
iopietro bd033334c4 General fixes
+Fixed a little mistake in the starvation it works properly now
+A reinforced hero is now reassigned if his main village is conquered
+Population will now recount after a conquering
2018-05-06 15:02:38 +02:00
iopietro 89bebaee1f General fixes
+Fixed a bug that didn't permit to destroy the capital if the player had
more than 1 village. The capital is now destroyable (if the player has
more than 1 village)
+Fixed a bug that updated the hero wref wrongly when reinforcing their
own villages
+Fixed a bug that didn't kill the hero if his village was destroyed
while he was sent to another village as a reinforcement
+Better indentation
+General improovements
2018-05-06 00:00:27 +02:00
iopietro f7e05c9802 Optimizations
-Removed the "sort_type" 6 from the movement table, looted resources
will now be saved in the "sort_type" 4 returing attack.
This reduces a lot the spam in the tables "send" and "movement" of the
database
-Removed some useless methods in Database.php and Message.php
+Optimized report loading, own report will be loaded only once (and not
twice at random) and allied reports aren't loaded anymore
+Minor improovements and better indentation
2018-05-05 17:54:34 +02:00
iopietro cf74514451 General fixes
+Fixed an exploit that permitted to starts other players' farm lists
+Fixed an exploit that permitted to save our raids to other players'
farm lists
+Fixed an exploit that permitted to edit other players' farm lists
+Fixed a rounding upkeep bug
+Moved the whole startRaid.tpl to a new method in Units.php
+A lot of clean-up
+Improoved indentation
+In the raid list, the "carry" image will now show to the left of an
attack
+Fixed a bug that displayed the wrong loot to returning troops released
by traps
+General minor bug fixing and improovements
-Deleted a lot of redundant code
2018-05-04 22:12:18 +02:00
iopietro 49bc3c5073 General fixes
+Fixed a bug in the farm list that permitted to attack the same village
troops were sent
+Fixed a bug that permitted to delete others raid lists
+Fixed a bug that permitted to view broken reports
+Fixed a bug that permitted to insert 0 troops in the raid list
+Fixed the broken graphic of the raid/farm list
+Fixed a bug that didn't permit to send more than 2 raids at a time (in
the raid list)
+General improovements and bug fixing
+Some clean-up
2018-05-03 23:07:11 +02:00
iopietro e751a0c01f Fixed some bugs
+Returning troops time will now flow correctly in the rally point
+Resources won't be set to 0 anymore if overflow (this could have
happened in high speed servers)
+Fixed a distorted view of the right part  of the page, while reading a
mass message
2018-05-03 14:35:19 +02:00
iopietro 9e2d2b6842 Fixed trap bugs
+Traps are now repaired (built) in the trapper building, instead of
instantly given after a successful normal attack or a dismiss/releasing
from the rally point
+1/4 of trapped troops are now lost after a successful normal attack
+Traps are now released when troops die from starvation
+If you'll dismiss your trapped troops from the rally point, the gaul
player will be able to only repair 1/3 of the total used traps
+Created a new method to delete some redundant and duplicated code
starvation related
+The effect of WW building plans will be displayed correctly, when
they're active
+Troops related artifacts are now counted when building traps
+Some minor improovements and bug fixing
+Some clean-up
2018-05-02 21:17:20 +02:00
iopietro 0a9fe1125e Fixed a bug while chiefing and catapulting
+Brewery, big parties and moral bonus are now counted correctly towards
the loyalty reduction
+If you have a brewery you'll now forced to attack random buildings
+Some clean-up
2018-05-01 17:03:41 +02:00
iopietro 2fc3e7b7da Fixed trap bugs
+Released troops will now return to their respective villages correctly,
(allied or own villages)
+Fixed "Released X of own troops" and "Released X of friendly troops"
texts, they'll now match the correct amount of own/friendly released
troops.
+Fixed a bug that didn't permit to release troops in the first attack or
if in the attacked village there were prisoners from more than one
village
+Corrected a wrong stolen resources calculation
+Minor improovements and bug fixing
2018-05-01 00:09:58 +02:00
iopietro 0fac64b23a Fixed a bug while conquering
+Expansion slots are now cleared/assigned correctly (following the
official Travian rules)
+Some minor improovements and bug fixing
-Removed redundant code
2018-04-30 13:53:52 +02:00
iopietro 6443d2d490 Fixed a bug while destroying a village
+If a village is destroyed, all oasis of it, will return to the Nature
+If a village is destroyed all trade routes from and to it, will be
deleted
2018-04-29 21:29:14 +02:00
iopietro c599838dc8 Fixed a spy bug
+Attacking spies will now die if they're detected and the enemy has
spies in reinforcement
2018-04-29 12:49:45 +02:00
iopietro a40accc101 Distance calculation optimization and bug fixing
-Removed a lot of redundant code and put into a function
+Fixed a bug that permitted to found a new village in already founded
village
+Fixed a bug that permitted to found in an oasis
+Fixed a bug that permitted to hack the time you need to found a new
village
+Fixed a bug that permitted to found a new village to an inexistent one
2018-04-29 00:49:24 +02:00
iopietro 56e280f436 Artifacts fixes part 4
Completely fixed the artifact of the fool and fixed all kind of
artifact:

+Deleted some useless .tpl files and merged into one (Stable)
+The artifact of the fool effect won't be displayed if not active
+Fixed a bug that permitted to have a great and a unique artefacts
active at the same moment
+Big reductions of code in a lot of files
+Created some new methods to support artifacts
+Fixed a bug that prevented the effect of the "Rivals confusion" to work
correctly
+Fixed a bug that prevented "The eagles eyes" artifact to work correctly
for the attacker
+Fixed the artifact of the fool of every kind, now it's calculated with
a new method
+Fixed the cranny capacity when a "Rivals confusion" artifact is active
+Some minor bug fixing , improovements and optimization
2018-04-26 20:37:47 +02:00
iopietro 8e731dd7d0 Artifacts fixes part 3
+Fixed the artifact of the fool, it will now work and reduce/increase
troops speed
+Optimized some templates file and deleted some useless files
+Added a method to Database.php which permits to calculate things
related to artifacts (it's not general yet, it only works for troops
speed)
-Removed artifact of the fool "Account" type, because it shouldn't exist
2018-04-25 22:58:18 +02:00