mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-29 22:57:16 +00:00
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.
This commit is contained in:
@@ -4115,6 +4115,9 @@ class MYSQLi_DB implements IDbConnection {
|
|||||||
}
|
}
|
||||||
$settlerarray = $this->getMovement(5, $id, 0);
|
$settlerarray = $this->getMovement(5, $id, 0);
|
||||||
if(!empty($settlerarray)) {
|
if(!empty($settlerarray)) {
|
||||||
|
if (!isset($movingunits['u' . ($vtribe * 10)])) {
|
||||||
|
$movingunits['u' . ($vtribe * 10)] = 0;
|
||||||
|
}
|
||||||
$movingunits['u' . ($vtribe * 10)] += 3 * count($settlerarray);
|
$movingunits['u' . ($vtribe * 10)] += 3 * count($settlerarray);
|
||||||
}
|
}
|
||||||
return $movingunits;
|
return $movingunits;
|
||||||
@@ -4558,9 +4561,9 @@ class MYSQLi_DB implements IDbConnection {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// trapped settlers/chiefs calculation required
|
// TODO: trapped settlers/chiefs calculation required
|
||||||
|
|
||||||
$settlerslots = $maxslots * 3 - $settlers - $chiefs * 3;
|
$settlerslots = $maxslots * 3 - $settlers * 3;
|
||||||
$chiefslots = $maxslots - $chiefs - floor(($settlers + 2) / 3);
|
$chiefslots = $maxslots - $chiefs - floor(($settlers + 2) / 3);
|
||||||
|
|
||||||
if(!$technology->getTech(($session->tribe - 1) * 10 + 9)) {
|
if(!$technology->getTech(($session->tribe - 1) * 10 + 9)) {
|
||||||
|
|||||||
@@ -294,7 +294,7 @@ class Technology {
|
|||||||
if (!isset($ownunit['hero'])) {
|
if (!isset($ownunit['hero'])) {
|
||||||
$ownunit['hero'] = 0;
|
$ownunit['hero'] = 0;
|
||||||
}
|
}
|
||||||
$ownunit['hero'] += $movement['hero'];
|
$ownunit['hero'] += (isset($movement['hero']) ? $movement['hero'] : 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $ownunit;
|
return $ownunit;
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
- cannot train settlers in palace if chieftan is in the village (2 villages founded, palace lvl 20, so 3rd should be possible)
|
|
||||||
- can we have / accept invitations from multiple alliances? if so, will first invitation rewrite the next? or when accepting, will all other invitations be deleted?
|
- can we have / accept invitations from multiple alliances? if so, will first invitation rewrite the next? or when accepting, will all other invitations be deleted?
|
||||||
- when you put 2 builds into a loop (queue) and add 3rd to be built with master builder, the last one doesn't take resources and will be finished for free with PLUS immediate finish action
|
- when you put 2 builds into a loop (queue) and add 3rd to be built with master builder, the last one doesn't take resources and will be finished for free with PLUS immediate finish action
|
||||||
- inviting player into alliance who already is in an alliance should not work
|
- inviting player into alliance who already is in an alliance should not work
|
||||||
@@ -49,4 +48,5 @@
|
|||||||
to hold all members in their Embassy, allow to evict last X members / members who were last online / members with least population
|
to hold all members in their Embassy, allow to evict last X members / members who were last online / members with least population
|
||||||
(+ add check for members who have WW or artifacts in their villages) from the alliance and select a leader with closest Embassy level
|
(+ add check for members who have WW or artifacts in their villages) from the alliance and select a leader with closest Embassy level
|
||||||
to hold the rest
|
to hold the rest
|
||||||
- add new PLUS-only alliance setting for reassigning a leader directly without quitting the alliance
|
- add new PLUS-only alliance setting for reassigning a leader directly without quitting the alliance
|
||||||
|
- allow for a game mechanic where if a chieftan exists in a village attacked by another player with a chieftan, there's a chance (random, or based on cultural points of those 2 players?) that the home chieftan would prevent village from conversion (also possibly decrease cultural points on attacks, if this is not done yet)
|
||||||
Reference in New Issue
Block a user