Skip to content

Commit

Permalink
modified creatures
Browse files Browse the repository at this point in the history
  • Loading branch information
Shiera committed Aug 27, 2012
1 parent 6a2fe0e commit 60784fc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions main/src/org/ludumdare24/entities/AppleTree.java
Expand Up @@ -18,7 +18,7 @@ public class AppleTree extends SimpleWorldEntity {
private double timeUntilSpawn = 10;
private double spawnInterval = 30;
private FoodType foodType = FoodType.APPLE;
private double energySpawnedAtOnce = foodType.getEnergyInOne() * 1;
private double energySpawnedAtOnce = foodType.getEnergyInOne() * 4.5;

public AppleTree(GameWorld gameWorld) {
this(gameWorld, new Random());
Expand All @@ -28,7 +28,7 @@ public AppleTree(GameWorld gameWorld, Random random) {
super(createImage(random));
this.gameWorld = gameWorld;

timeUntilSpawn = spawnInterval * random.nextDouble();
timeUntilSpawn = spawnInterval*0.60 * random.nextDouble();
}

private static ImageRef createImage(Random random) {
Expand Down
12 changes: 6 additions & 6 deletions main/src/org/ludumdare24/entities/creature/Creature.java
Expand Up @@ -25,9 +25,9 @@
public class Creature extends WorldEntity {

private static final double BASIC_HEALING_PER_SECOND = 3.0;
private static final double BASIC_BABY_DEVELOPMENT_TIME = 20.0;
private static final double BASIC_BABY_DEVELOPMENT_TIME = 15.0;
private static final double BASIC_MOVEMENT_SPEED_PER_SECOND = 800.0;
private static final double BASIC_LIFE_LENGTH_SECONDS = 90.0;
private static final double BASIC_LIFE_LENGTH_SECONDS = 125.0;

private static final double ENERGY_CONSUMPTION_PER_KG_PER_SECOND = 0.02;
private static final double ENERGY_NEEDED_TO_PRODUCE_ONE_KG = 1;
Expand All @@ -43,7 +43,7 @@ public class Creature extends WorldEntity {
private static final double DAMAGE_FROM_OLD_AGE_PER_SECOND = 10.0;
private static final double NO_ENERGY_MOVEMENT_SLOWDOWN = 0.25;
private static final double MATURITY_AGE = 0.2;
private static final double MATING_DISTANCE = 30;
private static final double MATING_DISTANCE = 40;

private final MainGame game;
private final GameWorld gameWorld;
Expand Down Expand Up @@ -85,7 +85,7 @@ public class Creature extends WorldEntity {
private double maxAgeSeconds = 60;
private double babyDevelopmentTime = 20;
private double maxMovementSpeedPerSecond = 1650;
private double energyReleasedOnDeath = maxEnergy * 0.2;
private double energyReleasedOnDeath = maxEnergy * 0.45;

// Mental attributes
private double fearfulReckless = Math.random();
Expand Down Expand Up @@ -257,7 +257,7 @@ private void calculateDerivedAttributes() {
healPerSecond = BASIC_HEALING_PER_SECOND * mix(fastHealing, 0.5, 5);
woundedEnergyUsagePerSecond = mix(fastHealing, 0.25, 10);

pregnantEnergyUsagePerSecond = mix(fastBaby, 5, 0.5);
pregnantEnergyUsagePerSecond = mix(fastBaby,0.5, 5 );
babyDevelopmentTime = BASIC_BABY_DEVELOPMENT_TIME * mix(fastBaby, 5, 0.25);

movementEnergyUsagePerSecond = mix(fastMoving, 0.5, 5);
Expand Down Expand Up @@ -460,7 +460,7 @@ public double getImportance(double timeSinceLastAsked) {
else {
double rageTarget = closestCreature.getRageTargetBoost() * 10.0;
double wrongRegionRage = closestCreature.getGod() != god ? 0.4 : 0; // Other god! They must die!
double basicAttitude = peacefulAngry * 0.5;
double basicAttitude = peacefulAngry * 0.3;
double ods = getHealthStatus() - closestCreature.getHealthStatus();
return rageTarget + (wrongRegionRage + basicAttitude + ods) * getHealthStatus();
}
Expand Down
4 changes: 2 additions & 2 deletions main/src/org/ludumdare24/world/FoodType.java
Expand Up @@ -5,8 +5,8 @@
*/
public enum FoodType {

APPLE(40, "food", "particles/eaten.particle", 1, 40, 0.3),
MEAT(100, "meatFood", "particles/eatenMeat.particle", 1, 20, 1),
APPLE(100, "food", "particles/eaten.particle", 1, 40, 0.3),
MEAT(200, "meatFood", "particles/eatenMeat.particle", 1, 20, 1),
;

private final double energyInOne;
Expand Down
2 changes: 1 addition & 1 deletion main/src/org/ludumdare24/world/GameWorld.java
Expand Up @@ -22,7 +22,7 @@ public class GameWorld {
private static final int MAX_FOOD_ENTITIES_COUNT = 100;
private final int initialPlayerCreatureCount = 5;
private final int initialUngodlyCreatureCount = 7;
private final int initialTreeCount = 16;
private final int initialTreeCount = 20;

private PlayerGod player;

Expand Down

0 comments on commit 60784fc

Please sign in to comment.