-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(common): getDefaultPlayerStat takes PlayerStat
- Loading branch information
Showing
3 changed files
with
30 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
packages/isaacscript-common/src/maps/defaultPlayerStatMap.ts
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
packages/isaacscript-common/src/objects/defaultPlayerStats.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { PlayerStat } from "../enums/PlayerStat"; | ||
import { getTearsStat } from "../functions/tears"; | ||
|
||
const DEFAULT_MAX_FIRE_DELAY = 10; | ||
|
||
/** The default fire delay is represented in the tear stat, not the `MaxFireDelay` value. */ | ||
export const DEFAULT_PLAYER_STATS = { | ||
[PlayerStat.DAMAGE]: 3.5, // 1 << 0 | ||
|
||
// The default tears stat is 2.73. | ||
[PlayerStat.FIRE_DELAY]: getTearsStat(DEFAULT_MAX_FIRE_DELAY), // 1 << 1 | ||
|
||
[PlayerStat.SHOT_SPEED]: 1, // 1 << 2 | ||
[PlayerStat.TEAR_RANGE]: 6.5, // 1 << 3 | ||
[PlayerStat.MOVE_SPEED]: 1, // 1 << 4 | ||
[PlayerStat.LUCK]: 0, // 1 << 10 | ||
} as const; |