User Tools

Site Tools


heritage

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
heritage [2019/09/04 15:49]
188.152.123.92
heritage [2019/09/11 13:49] (current)
188.152.123.92
Line 5: Line 5:
 These points will be renewed upon [[:​abdication|abdications]] and [[:​ascension|ascensions]]. The land acquired and research unlocked will be reset as well. These points will be renewed upon [[:​abdication|abdications]] and [[:​ascension|ascensions]]. The land acquired and research unlocked will be reset as well.
  
-You earn HP through [[:​abdication|abdications]] and [[:​ascension|ascensions]] at certain populations. Note: You need the population ​listed, max population is not taken into consideration.+You earn HP through [[:​abdication|abdications]] and [[:​ascension|ascensions]] at certain populations. Note: It'​s ​the actual ​population ​which is used, max population is not taken into consideration.
  
-OUTDATED SINCE v1.1.17+Once the village have more than 50 population you will be awarded 1 xp for each additional villager. 
 + 
 +The cost in xp of the next heritage point is 20+2*n with n equal to the total of hp owned. 
 + 
 +hp_cost_in_xp = 20 + 2 * current_hp 
 + 
 +xp_awarded = pop - hp_cost_in_xp_awarded_in_current_run - 50 
 + 
 +  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 The formula for the population requirement where n is the number of HP earned: 100*2^(n-1)-50
  
-<WRAP center 80%> +
-^ Population ​                         ^ Heritage Points ​               ^ +
-|50                                   |1 Point                         | +
-|150                                  |2 Points ​                       | +
-|350                                  |3 Points ​                       | +
-|750                                  |4 Points ​                       | +
-|1550                                 |5 Points ​                       | +
-|3150                                 |6 Points ​                       | +
-|6350                                 |7 Points ​                       | +
-|12750 ​                               |8 Points ​                       | +
-|25550 ​                               |9 Points ​                       | +
-|51150 ​                               |10 Points ​                      | +
-</​WRAP>​+
heritage.1567612157.txt.gz · Last modified: 2019/09/04 15:49 by 188.152.123.92