Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Economy #5

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/BM2/SiteBundle/Controller/ActionsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -943,8 +943,8 @@ public function assignedAction(Request $request) {
if ($soldier->getCharacter() && $soldier->getCharacter()->isInBattle()) continue;
if ($soldier->getCharacter() && $soldier->getCharacter()->isDoingAction('military.regroup')) continue;
// FIXME: can't recall from your own estates or characters, but there should also be a message:
if ($soldier->getCharacter() && $soldier->getCharacter()->getUser() == $character->getUser()) continue;
if ($soldier->getBase() && $soldier->getBase()->getOwner() && $soldier->getBase()->getOwner()->getUser() == $character->getUser()) continue;
// if ($soldier->getCharacter() && $soldier->getCharacter()->getUser() == $character->getUser()) continue;
// if ($soldier->getBase() && $soldier->getBase()->getOwner() && $soldier->getBase()->getOwner()->getUser() == $character->getUser()) continue;

if ($soldier->getAssignedSince() == -1) {
$days = 0;
Expand Down
8 changes: 4 additions & 4 deletions src/BM2/SiteBundle/DataFixtures/ORM/LoadEquipmentData.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ class LoadEquipmentData extends AbstractFixture implements OrderedFixtureInterfa
private $equipment = array(
'axe' => array('type' => 'weapon', 'ranged' => 0, 'melee' => 10, 'defense' => 0, 'train' => 20, 'resupply' => 20, 'provider' => 'Blacksmith', 'trainer' => 'Training Ground', 'icon' => 'items/streitaxt2.png'),
'spear' => array('type' => 'weapon', 'ranged' => 0, 'melee' => 20, 'defense' => 0, 'train' => 30, 'resupply' => 30, 'provider' => 'Blacksmith', 'trainer' => 'Training Ground', 'icon' => 'items/spear2.png'),
'pike' => array('type' => 'weapon', 'ranged' => 0, 'melee' => 30, 'defense' => 0, 'train' => 50, 'resupply' => 60, 'provider' => 'Weaponsmith', 'trainer' => 'Guardhouse', 'icon' => 'items/hellebarde2.png'),
'mace' => array('type' => 'weapon', 'ranged' => 0, 'melee' => 35, 'defense' => 0, 'train' => 60, 'resupply' =>100, 'provider' => 'Weaponsmith', 'trainer' => 'Barracks', 'icon' => 'items/hellebarde2.png'),
'sword' => array('type' => 'weapon', 'ranged' => 0, 'melee' => 45, 'defense' => 0, 'train' => 80, 'resupply' =>250, 'provider' => 'Bladesmith', 'trainer' => 'Barracks', 'icon' => 'items/schwert2.png'),
'broadsword' => array('type' => 'weapon', 'ranged' => 0, 'melee' => 50, 'defense' => 0, 'train' => 90, 'resupply' =>350, 'provider' => 'Bladesmith', 'trainer' => 'Garrison', 'icon' => 'items/claymore2.png'),
'pike' => array('type' => 'weapon', 'ranged' => 0, 'melee' => 40, 'defense' => 0, 'train' => 50, 'resupply' => 60, 'provider' => 'Weaponsmith', 'trainer' => 'Guardhouse', 'icon' => 'items/hellebarde2.png'),
'mace' => array('type' => 'weapon', 'ranged' => 0, 'melee' => 65, 'defense' => 0, 'train' => 60, 'resupply' =>100, 'provider' => 'Weaponsmith', 'trainer' => 'Barracks', 'icon' => 'items/hellebarde2.png'),
'sword' => array('type' => 'weapon', 'ranged' => 0, 'melee' => 75, 'defense' => 0, 'train' => 80, 'resupply' =>250, 'provider' => 'Bladesmith', 'trainer' => 'Barracks', 'icon' => 'items/schwert2.png'),
'broadsword' => array('type' => 'weapon', 'ranged' => 0, 'melee' => 90, 'defense' => 0, 'train' => 90, 'resupply' =>350, 'provider' => 'Bladesmith', 'trainer' => 'Garrison', 'icon' => 'items/claymore2.png'),

'shortbow' => array('type' => 'weapon', 'ranged' => 40, 'melee' => 0, 'defense' => 0, 'train' => 50, 'resupply' => 50, 'provider' => 'Bowyer', 'trainer' => 'Archery Range', 'icon' => 'items/shortbow2.png'),
'crossbow' => array('type' => 'weapon', 'ranged' => 60, 'melee' => 0, 'defense' => 0, 'train' => 60, 'resupply' => 75, 'provider' => 'Bowyer', 'trainer' => 'Archery Range', 'icon' => 'items/armbrust2.png'),
Expand Down
3 changes: 2 additions & 1 deletion src/BM2/SiteBundle/Entity/Soldier.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ public function getVisualSize() {
case 'light cavalry':
case 'heavy cavalry': return 4;
case 'mounted archer': return 3;
case 'archer': return 2;
case 'armoured archer': return 3;
case 'archer': return 2;
case 'heavy infantry': return 3;
case 'medium infantry': return 2;
case 'light infantry':
Expand Down
6 changes: 3 additions & 3 deletions src/BM2/SiteBundle/Service/Economy.php
Original file line number Diff line number Diff line change
Expand Up @@ -556,10 +556,10 @@ public function ResourceProduction(Settlement $settlement, ResourceType $resourc
if ($force_recalc) {
list($building_resource, $building_bonus) = $this->ResourceFromBuildings($settlement, $resource, $baseresource);
$georesource->setBuildingsBase($building_resource);
$georesource->setBuildingsBonus(round($building_bonus*100));
$georesource->setBuildingsBonus(round($building_bonus*50));
} else {
$building_resource = $georesource->getBuildingsBase();
$building_bonus = $georesource->getBuildingsBonus()/100;
$building_bonus = $georesource->getBuildingsBonus()/50;
}
}
$baseresource += $building_resource;
Expand Down Expand Up @@ -627,7 +627,7 @@ public function ResourceFromBuildings(Settlement $settlement, ResourceType $reso
$base += $result->getProvidesOperation();
$bonus+= $result->getProvidesOperationBonus();
}
return array($base, 1.0+($bonus/100));
return array($base, 1.0+($bonus/50));
}

public function ResourceDemand(Settlement $settlement, ResourceType $resource, $split_results=false) {
Expand Down