User Tools

Site Tools


heritage

This is an old revision of the document!


In Heritage tab you can acquire more land using HP (Heritage Points). 1 HP can buy 20 land or forest or 10 mountains.

You can also spend HP to unlock research immediately.

These points will be renewed upon abdications and ascensions. The land acquired and research unlocked will be reset as well.

You earn HP through abdications and ascensions at certain populations. Note: It's the actual population which is used, max population is not taken into consideration.

calculateHeritagePoints( removeXP = false ) {
  let peoplePoints = this.resourcesService.getTotalPeople();
  let xp = this.xp;
  let threshold = 20 + (this.heritagePoints * 2);
  let pointsToAward = 0;
  while ( peoplePoints >= threshold ) {
    pointsToAward += 1;
    peoplePoints -= threshold;
    threshold += 2;
  }
  while ( peoplePoints + xp >= threshold ) {
    pointsToAward += 1;
    peoplePoints -= threshold;
    if ( peoplePoints < 0 ) {
      xp += peoplePoints;
    }
    threshold += 2;
  }
  if ( removeXP ) {
    this.xp = xp;
  }
  peoplePoints -= 50;
  if ( peoplePoints < 0 ) {
    peoplePoints = 0;
  }
  return { hp: pointsToAward, xp: peoplePoints };
}
peopleToNextHeritagePoint(): number {
  let peoplePoints = this.resourcesService.getTotalPeople() + this.xp;
  let threshold = 20 + (this.heritagePoints * 2);
  while ( peoplePoints >= threshold ) {
    peoplePoints -= threshold;
    threshold += 2;
  }
  return threshold - peoplePoints;
}

The formula for the population requirement where n is the number of HP earned: 100*2^(n-1)-50

heritage.1568208734.txt.gz · Last modified: 2019/09/11 13:32 by 188.152.123.92