Commit Graph

903 Commits

Author SHA1 Message Date
Martin Ambrus 962cbcc19b fix: maximum alliance members update on building demolition
Now saves correct data (was saving maximum for 1 level above the
after-demolition level).
2017-11-04 10:31:45 +01:00
Martin Ambrus 683b692a55 fix: gold can go to negative values
Master builder cannot be used if we only have 2 gold and we chose to
insta-finish everything. In such case, master builder task will be
deleted instead of completed.

Fixes #264
2017-11-04 09:36:55 +01:00
Martin Ambrus 3f612d6e36 fix: alliance cannot be created
This only happens on newer MySQL versions where column type vs inserted
type are being checked (so we cannot insert empty string into an int
column, even if that column has a default value).

Fixes #249
2017-11-04 09:26:45 +01:00
Martin Ambrus c0a9e9411e fix: undefined variable wreaking havoc
Closes: #249, #264
2017-11-03 22:57:08 +01:00
Martin Ambrus fea7b0937f fix: could not train more settlers if we have 1 settler already trained 2017-11-03 22:04:15 +01:00
Martin Ambrus b01d787627 fix: extra space making location header not work 2017-11-03 20:58:33 +01:00
Martin Ambrus 23eed5da53 fix: unable to train settlers if chieftan is present
It is debatable whether or not to allow this, since chieftan would be of
no use once we have 3 settlers and settle a new village. However, if we
accidentally created a chieftan, we can't train settlers until we send
the chieftan to his death.

I think this move could be a predule to a later game mechanics, where
chieftan could fight (talk, actually) against chieftan, if one is
present in village, so taking a village over isn't so easy.
2017-11-03 17:23:29 +01:00
Martin Ambrus 9f8fa45b1f fix: undefined index 2017-11-03 16:53:31 +01:00
Martin Ambrus e51aec68bd fix: path not found erorrs for multiple-automation-lock-files
Closes #244
2017-11-03 13:07:37 +01:00
Martin Ambrus 2859cf1e8e fix: village cannot be conquered if it was also destroyed
Closes #184
2017-11-03 12:56:24 +01:00
Martin Ambrus bebc105e14 fix: invalid gold amount deductions for instant-build, instant-research 2017-11-03 00:32:40 +01:00
Martin Ambrus bfaf97f998 fix: AND instead of second WHERE 2017-11-03 00:01:20 +01:00
Martin Ambrus 90f8982245 fix: hero dying and revival doesn't work correctly with multiple heroes 2017-11-02 23:59:03 +01:00
Martin Ambrus c545304e69 fix: correct rules link
Closes #256
2017-11-02 13:40:40 +01:00
Martin Ambrus f10a47be87 fix: now can use gold for demolition when only job is palace/residence 2017-11-02 13:37:53 +01:00
Martin Ambrus 585edfc356 fix: this error report should not be here 2017-11-02 13:27:38 +01:00
Martin Ambrus 945bb2f8c7 fix: too much gold for instant build & research
Fixes #257
2017-11-02 13:11:19 +01:00
Martin Ambrus 7c67e1e7b9 fix: only 1 hero can exist and is deleted upon new hero training start
Closes #261
2017-11-02 11:05:26 +01:00
Martin Ambrus 3105e0754c fix: Phalanx hero crop revival amounts listed as a second clay 2017-11-02 10:31:19 +01:00
Martin Ambrus df31c578fa fix: undefined index 2017-11-02 00:55:10 +01:00
Martin Ambrus 95438e0fe7 fix: Palace no longer auto-changes capital 2017-11-02 00:50:10 +01:00
Martin Ambrus fe011a5905 fix: undefined index 2017-11-02 00:19:31 +01:00
Martin Ambrus 3432aa92e6 fix: forgotten eviction of the old alliance leader without an Embassy 2017-11-01 23:21:01 +01:00
Martin Ambrus 8a3591a8b0 refactor: alliance and Embassy mechanics refactoring, stage 3 of 3
Battle results logic now accounts for Embassy destruction as per new
alliance and Embassies game mechanics.
2017-11-01 21:37:09 +01:00
Martin Ambrus 041726fbd2 fix: undefined indexes 2017-11-01 21:35:24 +01:00
Martin Ambrus c9038e20b8 refactor: alliance and Embassy mechanics refactoring, stage 2 of 3
Everything is now prepared for the last stage, where the code to handle
Embassy destruction during a battle will be added and tested :)

A few Embassy-demolition-related issues have been ironed-out in this
commit as well.
2017-11-01 00:16:52 +01:00
Martin Ambrus 65485714c3 fix: replacement for mysqli_stmt_get_result() for non-mysqlnd servers
Closes #258
2017-10-30 10:08:23 +01:00
Martin Ambrus 2f769decce fix: "instant-finish" gold decreased 2x when demolition was in progress
Closes #257
2017-10-29 23:10:54 +01:00
Martin Ambrus 5d91de0e14 feat: new Embassy logic for demolitions and alliance quitting 2017-10-29 23:06:25 +01:00
Martin Ambrus b0208730c9 fix: village with palace becomes capital 2017-10-29 13:51:15 +01:00
Martin Ambrus 69da66c410 feat: forum notification message has a user link for one who was posting 2017-10-29 13:14:33 +01:00
Martin Ambrus 85a853533f fix: all requirements now checked before a building something is allowed 2017-10-29 11:22:45 +01:00
Martin Ambrus 5f4ac3bc48 fix: undefined indexes 2017-10-28 21:28:26 +02:00
Martin Ambrus 59af039d8e fix: "finish immediately" PLUS link doesn't decrease gold for demolition 2017-10-28 21:06:19 +02:00
Martin Ambrus 4da72fb9b9 fix: player auto-deletion after a set period of time now works
It only deleted player from the users table. Now, it deletes everything,
so basically clears everything up.
2017-10-28 20:52:15 +02:00
Martin Ambrus 2340c3821c fix: undefined variables 2017-10-28 12:04:28 +02:00
Martin Ambrus 06de01cdd7 fix: upkeep decreases crop usage by real usage value of Roman units 2017-10-28 11:52:55 +02:00
Martin Ambrus 48ed6ec359 fix: undefined variable 2017-10-28 11:52:12 +02:00
Martin Ambrus 6bbeb0c574 fix: session login check for admin 2017-10-28 11:25:50 +02:00
Martin Ambrus 4621c29e05 fix: admin session username stored in session 2017-10-28 09:40:23 +02:00
Martin Ambrus eca2c9105c fix: undefined indexes and variables 2017-10-28 02:18:00 +02:00
Martin Ambrus 6f7c70a0d7 refactor: autoprefixing class includes 2017-10-28 02:17:43 +02:00
Martin Ambrus a9bf045a82 fix: no default means no-future-proof 2017-10-28 01:18:47 +02:00
Martin Ambrus 5bae1cfd54 fix: admin DB prefixes to try and find the unfindable database 2017-10-28 00:49:00 +02:00
Martin Ambrus 5a967055f4 refactor: using indexed temporary table as array works speed wonders :) 2017-10-27 21:04:16 +02:00
Martin Ambrus 3200cf2c3c fix: multi_query doesn't block next queries anymore 2017-10-27 19:34:19 +02:00
Martin Ambrus 1066fff9a2 refactor: installation happens at MySQL side
A lot has happened here. Here's the list:

1. autoloader was added that should prevent various "failed to open
stream" errors when trying to load new classes

2. PHP-based data generation was replaced by MySQL-based one, hopefully
fixing the installation problems when insert payload it too high and the
DB wouldn't populate with some users

3. thanks to step 2, the installation should be really almost
instantenious, instead of waiting a long time for many SQL connections
and queries to populate the world

4. World Data & Oasis generation and population is done in 1 step now
2017-10-27 18:27:03 +02:00
Martin Ambrus 91736e6209 fix: dang, type hinting is only for PHP7... bleee :P 2017-10-26 11:43:08 +02:00
Martin Ambrus b12e4ef2b7 fix: show Natar villages in stats when allowed 2017-10-25 23:41:39 +02:00
Martin Ambrus 7def98f081 feat: Farms generation via Admin must be fair (= random all over map) 2017-10-25 18:42:13 +02:00