Index: ps/trunk/binaries/data/mods/public/simulation/components/Cost.js
===================================================================
--- ps/trunk/binaries/data/mods/public/simulation/components/Cost.js (revision 18631)
+++ ps/trunk/binaries/data/mods/public/simulation/components/Cost.js (revision 18632)
@@ -1,123 +1,123 @@
function Cost() {}
Cost.prototype.Schema =
"Specifies the construction/training costs of this entity." +
"" +
"1" +
"15" +
"20.0" +
"" +
"50" +
"0" +
"0" +
"25" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
- "" +
- "" +
- "" +
- "" +
+ "" +
+ "" +
+ "" +
+ "" +
"" +
"";
Cost.prototype.Init = function()
{
this.populationCost = +this.template.Population;
this.populationBonus = +this.template.PopulationBonus;
};
Cost.prototype.GetPopCost = function()
{
return this.populationCost;
};
Cost.prototype.GetPopBonus = function()
{
return this.populationBonus;
};
Cost.prototype.GetBuildTime = function()
{
var cmpPlayer = QueryOwnerInterface(this.entity);
var buildTime = (+this.template.BuildTime) * cmpPlayer.cheatTimeMultiplier;
return ApplyValueModificationsToEntity("Cost/BuildTime", buildTime, this.entity);
};
Cost.prototype.GetResourceCosts = function(owner)
{
if (!owner)
{
let cmpOwnership = Engine.QueryInterface(this.entity, IID_Ownership);
if (!cmpOwnership)
- error("GetResourceCost called without valid ownership");
+ error("GetResourceCosts called without valid ownership");
else
owner = cmpOwnership.GetOwner();
}
let cmpTemplateManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_TemplateManager);
let entityTemplateName = cmpTemplateManager.GetCurrentTemplateName(this.entity);
let entityTemplate = cmpTemplateManager.GetTemplate(entityTemplateName);
let costs = {};
for (let r in this.template.Resources)
costs[r] = ApplyValueModificationsToTemplate("Cost/Resources/"+r, +this.template.Resources[r], owner, entityTemplate);
return costs;
};
Cost.prototype.OnOwnershipChanged = function(msg)
{
if (msg.from != -1)
{
let cmpPlayer = QueryPlayerIDInterface(msg.from);
if (cmpPlayer)
cmpPlayer.AddPopulationBonuses(-this.GetPopBonus());
}
if (msg.to != -1)
{
let cmpPlayer = QueryPlayerIDInterface(msg.to);
if (cmpPlayer)
cmpPlayer.AddPopulationBonuses(this.GetPopBonus());
}
};
Cost.prototype.OnValueModification = function(msg)
{
if (msg.component != "Cost")
return;
// foundations shouldn't give a pop bonus and a pop cost
var cmpFoundation = Engine.QueryInterface(this.entity, IID_Foundation);
if (cmpFoundation)
return;
// update the population costs
var newPopCost = Math.round(ApplyValueModificationsToEntity("Cost/Population", +this.template.Population, this.entity));
var popCostDifference = newPopCost - this.populationCost;
this.populationCost = newPopCost;
// update the population bonuses
var newPopBonus = Math.round(ApplyValueModificationsToEntity("Cost/PopulationBonus", +this.template.PopulationBonus, this.entity));
var popDifference = newPopBonus - this.populationBonus;
this.populationBonus = newPopBonus;
var cmpPlayer = QueryOwnerInterface(this.entity);
if (!cmpPlayer)
return;
if (popCostDifference)
cmpPlayer.AddPopulation(popCostDifference);
if (popDifference)
cmpPlayer.AddPopulationBonuses(popDifference);
};
Engine.RegisterComponentType(IID_Cost, "Cost", Cost);
Index: ps/trunk/binaries/data/mods/public/simulation/templates/structures/iber_fortress.xml
===================================================================
--- ps/trunk/binaries/data/mods/public/simulation/templates/structures/iber_fortress.xml (revision 18631)
+++ ps/trunk/binaries/data/mods/public/simulation/templates/structures/iber_fortress.xml (revision 18632)
@@ -1,39 +1,39 @@
15
1.5
- 1.2
+ 1200
6000
iber
Castro
The Castro can be likened to a more strongly fortified town center than that of the common Oppidum which were also fortified places of habitation. As such it was widely and normally constructed upon a height, and almost always had some sort of an acropolis built at the highest point within its towered walls. In the archaeological record of the Iberian Peninsula, the remnants of as many as a thousand fortified places identifiable as Castros can be found in modern day Portugal alone.
units/{civ}_hero_caros
units/{civ}_hero_indibil
units/{civ}_hero_viriato
units/{civ}_champion_infantry
units/{civ}_champion_cavalry
siege_attack
siege_armor
siege_cost_metal
siege_cost_wood
structures/iberians/fortress.xml
Index: ps/trunk/binaries/data/mods/public/simulation/templates/structures/mace_fortress.xml
===================================================================
--- ps/trunk/binaries/data/mods/public/simulation/templates/structures/mace_fortress.xml (revision 18631)
+++ ps/trunk/binaries/data/mods/public/simulation/templates/structures/mace_fortress.xml (revision 18632)
@@ -1,43 +1,43 @@
0.7
- 0.8
+ 800
8.0
mace
TeĆchisma
Train Champions and Heroes. Garrison soldiers inside for stout defense.
The Akropolis was usually a fortified citadel in the upper part of the city. The Athenian Akropolis was renowned for its marvelous temples, among which was the Parthenon, while the Acro-Corinthus was highly prized by the Macedonians for its strategic location and good defenses. Fortresses (also called a "phrourion") were also built to guard passes and atop hills in order to command plains and valleys below.
units/{civ}_hero_philip
units/{civ}_hero_alexander
units/{civ}_hero_demetrius
units/{civ}_champion_infantry_a
units/{civ}_champion_cavalry
-units/{civ}_mechanical_siege_ballista_packed
-units/{civ}_mechanical_siege_scorpio_packed
-units/{civ}_mechanical_siege_oxybeles_packed
-units/{civ}_mechanical_siege_lithobolos_packed
-units/{civ}_mechanical_siege_ram
-units/{civ}_mechanical_siege_tower
successors/upgrade_mace_silvershields
structures/macedonians/fortress_up.xml