Skip to content

Commit

Permalink
Fixed bakery wrng calculation Issue #408
Browse files Browse the repository at this point in the history
  • Loading branch information
AL-Kateb committed Jan 3, 2018
1 parent 1f2186c commit f5a3bf8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 31 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ GameEngine/config.php
GameEngine/Prevention/*
GameEngine/Notes/*

# Ignore Templates/text.tpl because it is dynamically generated
Templates/text.tpl

# Install instalation_done marker left by install script
/.buildpath
/.project
Expand Down
5 changes: 4 additions & 1 deletion GameEngine/Village.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,13 @@ private function getCropProd() {
for ( $i = 0; $i <= count( $cropholder ) - 1; $i ++ ) {
$basecrop += $bid4[ $this->resarray[ $cropholder[ $i ] ] ]['prod'];
}
$bonus = 0.25 * $this->ocounter[3];
$crop = $basecrop + $basecrop * 0.25 * $this->ocounter[3];

if($grainmill >= 1 || $bakery >= 1) {
$crop += $basecrop /100 * (isset($bid8[$grainmill]['attri']) ? $bid8[$grainmill]['attri'] : 0) + (isset($bid9[$bakery]['attri']) ? $bid9[$bakery]['attri'] : 0);
$crop += $basecrop /100 * ((isset($bid8[$grainmill]['attri']) ? $bid8[$grainmill]['attri'] : 0) + (isset($bid9[$bakery]['attri']) ? $bid9[$bakery]['attri'] : 0));
}

if($session->bonus4 == 1) {
$crop *= 1.25;
}
Expand Down
31 changes: 1 addition & 30 deletions Templates/text.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,36 +10,7 @@
#################################################################################


$txt="Construction plans



Countless days have passed since the first battles upon the walls of the cursed villages of the Dread Natars, many armies of both the free ones and the Natarian empire struggled and died before the walls of the many strongholds from which the Natars had once ruled all creation. Now with the dust settled and a relative calm having settled in, armies began to count their losses and collect their dead, the stench of combat still lingering in the night air, a smell of a slaughter unforgettable in its extent and brutality yet soon to be dwarfed by yet others. The largest armies of the free ones and the Dread Natars were marshalling for yet another renewed assault upon the coveted former strongholds of the Natarian Empire.

Soon scouts arrived telling of a most awesome sight and a chilling reminder, a dread army of an unfathomable size had been spotted marshalling at the end of the world, the Natarian capital, a force so great and unstoppable that the dust from their march would choke off all light, a force so brutal and ruthless that it would crush all hope. The free people knew that they had to race now, race against time and the endless hordes of the Natarian Empire to raise a Wonder of the World to restore the world to peace and vanquish the Natarian threat.

But to raise such a great Wonder would be no easy task, one would need construction plans created in the distant past, plans of such an arcane nature that even the very wisest of sages knew not their contents or locations.

Tens of thousands of scouts roamed across all existence searching in vain for these mystical plans, looking in all places but the dreaded Natarian Capital, yet could not find them. Today however, they return bearing good news, they return baring the locations of the plans, hidden by the armies of the Natars inside secret strongholds constructed to be hidden from the eyes of man.

Now begins the final stretch, when the greatest armies of the Free people and the Natars will clash across the world for the fate of all that lies under heaven. This is the war that will echo across the eons, this is your war, and here you shall etch your name across history, here you shall become legend.


Facts:
To steal one, the following things must happen:
You must attack the village (NO Raid!)
WIN the Attack
Destroy the treasury
An empty treasury lvl 10 MUST be in the village where that attack came from
Have a hero in an attack

If not, the next attack on that village, winning with a hero and empty treasury will take the building plan.

To build a WW, you must own a plan yourself (you = the WW village owner) from lvl 0 to 50, from 51 to 100 you need an additional plan in your alliance! Two plans in the WW village account would not work!

The construction plans are conquerable immediately when they appear to the server.

There will be a countdown in game, showing the exact time of the release, 5 days prior to the launch. ";
$txt="Test";

//bbcode = html code
$txt = preg_replace("/\[b\]/is",'<b>', $txt);
Expand Down

0 comments on commit f5a3bf8

Please sign in to comment.