баланс здоровья и охоты на кроликов
This commit is contained in:
+33
-10
@@ -3,11 +3,13 @@ export type UpgradeId =
|
||||
| 'chopSpeed'
|
||||
| 'logValue'
|
||||
| 'twigValue'
|
||||
| 'meatValue'
|
||||
| 'pickupRadius'
|
||||
| 'coinSpeed'
|
||||
| 'daySpeed'
|
||||
| 'dayLength'
|
||||
| 'maxHealth'
|
||||
| 'attackDamage';
|
||||
| 'attackDamage'
|
||||
| 'healthRegenSpeed';
|
||||
|
||||
export interface UpgradeDef {
|
||||
id: UpgradeId;
|
||||
@@ -16,7 +18,7 @@ export interface UpgradeDef {
|
||||
costGrowth: number;
|
||||
/** The upgrade's stat value at a given level (levels start at 1, unbounded above). */
|
||||
effectAtLevel: (level: number) => number;
|
||||
formatEffect: (value: number) => string;
|
||||
formatEffect: (value: number, level: number) => string;
|
||||
}
|
||||
|
||||
export const UPGRADE_LIST: UpgradeDef[] = [
|
||||
@@ -52,6 +54,14 @@ export const UPGRADE_LIST: UpgradeDef[] = [
|
||||
effectAtLevel: (level) => level * 0.1,
|
||||
formatEffect: (v) => `${v.toFixed(2)} монет/ветка`,
|
||||
},
|
||||
{
|
||||
id: 'meatValue',
|
||||
name: 'Стоимость мяса',
|
||||
baseCost: 9,
|
||||
costGrowth: 1.4,
|
||||
effectAtLevel: (level) => level,
|
||||
formatEffect: (v) => `${v} монет/мясо`,
|
||||
},
|
||||
{
|
||||
id: 'pickupRadius',
|
||||
name: 'Радиус подбора',
|
||||
@@ -68,17 +78,17 @@ export const UPGRADE_LIST: UpgradeDef[] = [
|
||||
// Seconds to convert one unit of a resource into coins — every held resource type converts
|
||||
// on this same cadence at once, so this is the only knob for how fast any of them drain.
|
||||
effectAtLevel: (level) => 1 / Math.pow(1.15, level - 1),
|
||||
formatEffect: (v) => `${v.toFixed(2)} с/ресурс`,
|
||||
formatEffect: (v) => `${v.toFixed(2)} с`,
|
||||
},
|
||||
{
|
||||
id: 'daySpeed',
|
||||
name: 'Скорость времени днём',
|
||||
id: 'dayLength',
|
||||
name: 'Длина дня',
|
||||
baseCost: 6,
|
||||
costGrowth: 1.3,
|
||||
// Game-hours per real second during morning/day/evening (16 game-hours by default spread
|
||||
// over the default 10s day-phase of the 20s day-night cycle) — night has its own fixed speed.
|
||||
effectAtLevel: (level) => 1.6 * Math.pow(1.15, level - 1),
|
||||
formatEffect: (v) => `${v.toFixed(2)} ч/с`,
|
||||
effectAtLevel: (level) => 16 * Math.pow(1.15, level - 1),
|
||||
formatEffect: (v, level) => `${v.toFixed(0)} с`,
|
||||
},
|
||||
{
|
||||
id: 'maxHealth',
|
||||
@@ -93,8 +103,21 @@ export const UPGRADE_LIST: UpgradeDef[] = [
|
||||
name: 'Сила удара по кролику',
|
||||
baseCost: 8,
|
||||
costGrowth: 1.4,
|
||||
effectAtLevel: (level) => level,
|
||||
formatEffect: (v) => `${v} урона/с`,
|
||||
// Damage dealt per hit — the swing cadence itself comes from chopSpeed, shared with
|
||||
// wood-chopping, so this is purely how hard each swing lands. Health is allowed to be
|
||||
// fractional, so this is left unrounded.
|
||||
effectAtLevel: (level) => 0.5 * Math.pow(1.4, level - 1),
|
||||
formatEffect: (v) => `${v.toFixed(1)} здоровья`,
|
||||
},
|
||||
{
|
||||
id: 'healthRegenSpeed',
|
||||
name: 'Скорость регена здоровья',
|
||||
baseCost: 9,
|
||||
costGrowth: 1.35,
|
||||
// Seconds per regenerated hp — starts at 1 hp per 10s and shrinks (faster regen) with level,
|
||||
// same interval-based shape as coinSpeed.
|
||||
effectAtLevel: (level) => 10 / Math.pow(1.15, level - 1),
|
||||
formatEffect: (v) => `${v.toFixed(1)} с/очко`,
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user