mirror of
https://github.com/rileyjshaw/terra.git
synced 2024-11-21 04:54:23 +00:00
:s/metabolism/efficiency, combine speed & vision into actionRadius
This commit is contained in:
parent
39940355f0
commit
dafbee771e
@ -8,10 +8,9 @@ var creatureFactory = (function () {
|
|||||||
|
|
||||||
baseCreature.prototype.initialEnergy = 50;
|
baseCreature.prototype.initialEnergy = 50;
|
||||||
baseCreature.prototype.maxEnergy = 100;
|
baseCreature.prototype.maxEnergy = 100;
|
||||||
baseCreature.prototype.metabolism = 0.7;
|
baseCreature.prototype.efficiency = 0.7;
|
||||||
baseCreature.prototype.size = 50;
|
baseCreature.prototype.size = 50;
|
||||||
baseCreature.prototype.speed = 1;
|
baseCreature.prototype.actionRadius = 1;
|
||||||
baseCreature.prototype.vision = 1;
|
|
||||||
baseCreature.prototype.sustainability = 2;
|
baseCreature.prototype.sustainability = 2;
|
||||||
// used as percentages of maxEnergy
|
// used as percentages of maxEnergy
|
||||||
baseCreature.prototype.reproduceLv = 0.70;
|
baseCreature.prototype.reproduceLv = 0.70;
|
||||||
@ -75,7 +74,7 @@ var creatureFactory = (function () {
|
|||||||
var coords = step.coords;
|
var coords = step.coords;
|
||||||
|
|
||||||
var successFn = (function () {
|
var successFn = (function () {
|
||||||
var foodEnergy = step.creature.energy * this.metabolism;
|
var foodEnergy = step.creature.energy * this.efficiency;
|
||||||
this.energy = this.energy + (foodEnergy || -10);
|
this.energy = this.energy + (foodEnergy || -10);
|
||||||
// clear the original location
|
// clear the original location
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user