Add T4 Alliance Bonuses NEW_FUNCTION

Add T4 Alliance Bonuses NEW_FUNCTION
This commit is contained in:
novgorodschi catalin
2026-07-27 14:52:15 +03:00
parent 5c4b377daf
commit 064416826e
58 changed files with 1332 additions and 120 deletions
+25
View File
@@ -143,6 +143,31 @@ define("SPEED", "%SPEED%");
// Defines world size. NOTICE: DO NOT EDIT!!
define("WORLD_MAX", "%MAX%");
// ***** Alliance Bonuses (T4 Port)
// Members donate resources, allowing the alliance to unlock four bonuses, each
// with five levels. The costs, durations, and limits below are based on
// Travian T4; upgrade times and donation limits are scaled by the server speed.
define("NEW_FUNCTIONS_ALLIANCE_BONUSES", %ALLIANCEBONUSES%);
// Total resources required for each level (cumulative for that level).
define("ALLIANCE_BONUS_COSTS", "1200000,5600000,17100000,51200000,153600000");
// Upgrade duration in HOURS for each level (divided by the server speed).
define("ALLIANCE_BONUS_HOURS", "24,48,72,96,120");
// Daily donation limit per player, based on the highest bonus level unlocked
// by the alliance (index 0 = no bonuses unlocked).
define("ALLIANCE_BONUS_DAILY", "300000,300000,400000,550000,750000,1000000");
// Percentage granted by each level. Two sets: "small" bonuses (2% per level:
// Recruitment, Philosophy) and "large" bonuses (4% per level: Metallurgy,
// Commerce), exactly as in T4.
define("ALLIANCE_BONUS_PCT_SMALL", 2);
define("ALLIANCE_BONUS_PCT_LARGE", 4);
// Gold cost to triple a donation.
define("ALLIANCE_BONUS_TRIPLE_GOLD", 3);
// ***** Graphic Pack
//
// SERVER_GP is the pack every player sees by default (chosen at install or in
+3
View File
@@ -81,6 +81,9 @@ class Process {
$findReplace["%MAX%"] = $_POST['wmax'];
// Comutatorul de pachete grafice proprii. Linia era comentata, deci %GP%
// ramanea neinlocuit in config.php si constanta nu se definea deloc.
// Bonusuri de alianta (port T4)
$findReplace["%ALLIANCEBONUSES%"] = (isset($_POST['alliance_bonuses']) && $_POST['alliance_bonuses'] === 'true') ? 'true' : 'false';
$findReplace["%GP%"] = (isset($_POST['gpack']) && $_POST['gpack'] === 'true') ? 'true' : 'false';
$findReplace["%SSERVER%"] = $_POST['sserver'];
$findReplace["%SPORT%"] = $_POST['sport'];
+4
View File
@@ -312,6 +312,10 @@ foreach($mechs as $k => $l){
<div><label>Hero base regeneration (HP/day)</label><input class="input" name="hero_base_regen" id="hero_base_regen" value="10"></div>
<div><label>Silver received per 1 gold</label><input class="input" name="hero_silver_per_gold" id="hero_silver_per_gold" value="10"></div>
<div><label>Silver needed for 1 gold</label><input class="input" name="hero_silver_to_gold" id="hero_silver_to_gold" value="25"></div>
<div><label>Alliance bonuses (T4)</label><select class="input" name="alliance_bonuses">
<option value="false" selected>No</option>
<option value="true">Yes</option>
</select></div>
<div><label>Allow player graphic packs</label><select class="input" name="gpack">
<option value="false" selected>No &ndash; everyone sees the server pack</option>
<option value="true">Yes &ndash; players may pick their own in Profile</option>