fix Allium specs syntax + implement Changing Level story
- Fix Allium spec syntax: type→value, enum for Status, remove implies chaining - Fix factions.spec: add missing type declarations (Health, Level, Status) - Fix magical-objects.spec: add type declarations, use .value for Health access, remove entity inheritance syntax, remove invalid invariants - Implement Changing Level: add totalDamageTaken + factionsJoined to Character - Add level-up logic in dealDamage() and joinFaction() - Add Level.damageThresholdForLevel() static method - Fix changing-level.spec.ts properties: handle target survival, compute expected level from threshold crossings
This commit is contained in:
@@ -37,6 +37,6 @@ export class Level {
|
||||
* Formula: 1000 * N * (N+1) / 2
|
||||
*/
|
||||
static damageThresholdForLevel(level: number): number {
|
||||
return 1000 * level * (level + 1) / 2;
|
||||
return (1000 * level * (level + 1)) / 2;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user