A few more manual fixes.
This was SVN commit r3348.
This commit is contained in:
parent
e45a9afaf0
commit
9a7fb2d090
@ -428,7 +428,7 @@ function entityDamage( damage, inflictor )
|
||||
console.write("One of your units has earned " + this.traits.loot.xp + " upgrade points!");
|
||||
|
||||
// If he now has maximum upgrade points for his rank,
|
||||
if (inflictor.traits.xp.curr >= inflictor.traits.xp.req)
|
||||
if (inflictor.traits.promotion.curr >= inflictor.traits.promotion.req)
|
||||
{
|
||||
// Notify the player.
|
||||
if (this.traits.id.specific)
|
||||
@ -437,13 +437,13 @@ function entityDamage( damage, inflictor )
|
||||
console.write("One of your units has gained a promotion!");
|
||||
|
||||
// Reset his upgrade points.
|
||||
inflictor.traits.xp.curr = 0;
|
||||
inflictor.traits.promotion.curr = 0;
|
||||
|
||||
// Upgrade his portrait to the next level.
|
||||
inflictor.traits.id.icon_cell++;
|
||||
|
||||
// Transmogrify him into his next rank.
|
||||
inflictor.template = getEntityTemplate(inflictor.traits.xp.newentity);
|
||||
inflictor.template = getEntityTemplate(inflictor.traits.promotion.newentity);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,14 +72,14 @@
|
||||
<Gather>
|
||||
<Resource>
|
||||
<Food>
|
||||
<Fruit>2</Fruit>
|
||||
<Grain>2</Grain>
|
||||
<Fish>2</Fish>
|
||||
<Milk>2</Milk>
|
||||
<Fruit>20</Fruit>
|
||||
<Grain>20</Grain>
|
||||
<Fish>20</Fish>
|
||||
<Milk>20</Milk>
|
||||
</Food>
|
||||
<Wood>1</Wood>
|
||||
<Stone>1</Stone>
|
||||
<Ore>1</Ore>
|
||||
<Wood>10</Wood>
|
||||
<Stone>10</Stone>
|
||||
<Ore>10</Ore>
|
||||
</Resource>
|
||||
<Range>2.0</Range>
|
||||
<Speed>3000</Speed>
|
||||
|
@ -26,16 +26,15 @@ function addItemsRecursively (container, indent, fontName)
|
||||
else
|
||||
recursiveString += "]";
|
||||
|
||||
if (typeof container[item] == 'object')
|
||||
{
|
||||
// Display the property name, and the value, if any.
|
||||
if (container[item] == true && container[item].toString() != true)
|
||||
recursiveString += indent + " " + item + "\n";
|
||||
addItemsRecursively (container[item], indent + "--", fontName);
|
||||
}
|
||||
else
|
||||
{
|
||||
recursiveString += indent + " " + item + ": " + container[item] + "\n";
|
||||
}
|
||||
|
||||
// Retrieve sub-items.
|
||||
if (typeof container[item] == 'object')
|
||||
addItemsRecursively (container[item], indent + "--", fontName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user