Links
- Current scoring values:
src/common/values/scoring.values.ts
- Target constants file:
src/dailyTasks/consts/taskConstants.ts
- Server task generation:
src/dailyTasks/taskGenerator.service.ts
- UI daily tasks:
src/dailyTasks/uiDailyTasks/uiDailyTasks.ts
- Default predefined tasks:
src/box/dailyTask/defaultPredefinedDailyTasks.ts
- Player battle scoring:
src/rewarder/playerRewarder/points.ts
- Clan battle scoring:
src/rewarder/clanRewarder/points.ts
- Matchmaking battle scoring:
src/matchmaking/matchmaking.service.ts
General description
Centralize all daily task and battle scoring constants in src/dailyTasks/consts/taskConstants.ts.
After all references have been migrated, remove the duplicated src/common/values/scoring.values.ts file.
All currently active daily tasks are considered small:
- Small daily task: +20 points
- Daily task cancellation penalty: −10 points
- Medium and big daily task constants are reserved for future use and remain
0
Battle leaderboard scoring must follow the linked scoring specification:
- Random-pair win: +30 battle points
- Random-pair loss: −20 battle points
- Clan-pair win: +40 battle points
- Clan-pair loss: −25 battle points
The intended structure should be similar to:
export const TASK_CONSTS = {
AMOUNT: {
MIN: 2,
MAX: 20,
},
POINTS: {
DAILY_TASK: {
SMALL: 20,
MEDIUM: 0, // Not in use yet
BIG: 0, // Not in use yet
CANCEL_PENALTY: 10,
},
BATTLE: {
RANDOM_PAIR: {
WIN: 30,
LOSS: -20,
},
CLAN_PAIR: {
WIN: 40,
LOSS: -25,
},
},
},
COINS: {
FACTOR: 0.5,
},
TIME: 1000 * 60,
};
This is a cross-cutting but mostly mechanical change affecting several production and test files. It should preferably be implemented with AI assistance to perform repository-wide reference discovery and consistent replacements, reducing the risk of missed imports, stale values, and inconsistent tests.
All AI-generated changes must still be reviewed and verified using repository-wide searches and the relevant automated test suites.
Things to notice
- This issue should be implemented after all the daily tasks are implemented
- Daily task rewards and battle leaderboard points are separate systems:
- Daily tasks use regular
points.
- Battles use
battlePoints.
- All existing daily tasks must use
TASK_CONSTS.POINTS.DAILY_TASK.SMALL.
MEDIUM and BIG are placeholders for future functionality and must not be used yet.
- The battle-scoring flow must distinguish between random-pair and clan-pair matches.
- Existing lower-bound behavior that prevents battle points from becoming negative must remain unchanged.
- Generated server-task coins are calculated using
points * TASK_CONSTS.COINS.FACTOR. With 20 points and a factor of 0.5, the generated reward is 10 coins.
- The scoring specification contains an outdated
+35 reference for a clan-pair win. The correct and confirmed value is +40.
Expected results over ten matches with a 50% win rate:
- Random pair:
5 × 30 − 5 × 20 = +50
- Clan pair:
5 × 40 − 5 × 25 = +75
Tasks
Links
src/common/values/scoring.values.tssrc/dailyTasks/consts/taskConstants.tssrc/dailyTasks/taskGenerator.service.tssrc/dailyTasks/uiDailyTasks/uiDailyTasks.tssrc/box/dailyTask/defaultPredefinedDailyTasks.tssrc/rewarder/playerRewarder/points.tssrc/rewarder/clanRewarder/points.tssrc/matchmaking/matchmaking.service.tsGeneral description
Centralize all daily task and battle scoring constants in
src/dailyTasks/consts/taskConstants.ts.After all references have been migrated, remove the duplicated
src/common/values/scoring.values.tsfile.All currently active daily tasks are considered small:
0Battle leaderboard scoring must follow the linked scoring specification:
The intended structure should be similar to:
This is a cross-cutting but mostly mechanical change affecting several production and test files. It should preferably be implemented with AI assistance to perform repository-wide reference discovery and consistent replacements, reducing the risk of missed imports, stale values, and inconsistent tests.
All AI-generated changes must still be reviewed and verified using repository-wide searches and the relevant automated test suites.
Things to notice
points.battlePoints.TASK_CONSTS.POINTS.DAILY_TASK.SMALL.MEDIUMandBIGare placeholders for future functionality and must not be used yet.points * TASK_CONSTS.COINS.FACTOR. With 20 points and a factor of0.5, the generated reward is 10 coins.+35reference for a clan-pair win. The correct and confirmed value is +40.Expected results over ten matches with a 50% win rate:
5 × 30 − 5 × 20 = +505 × 40 − 5 × 25 = +75Tasks
TASK_CONSTS.POINTSstructure withDAILY_TASKandBATTLEsections.DAILY_TASK.SMALLwith a value of20.DAILY_TASK.MEDIUMwith a value of0and a comment stating that it is not in use yet.DAILY_TASK.BIGwith a value of0and a comment stating that it is not in use yet.DAILY_TASK.CANCEL_PENALTYwith a value of10.WIN: 30andLOSS: -20.WIN: 40andLOSS: -25.taskGenerator.service.tswithTASK_CONSTS.uiDailyTasks.tswithTASK_CONSTS.defaultPredefinedDailyTasks.tswithTASK_CONSTS.TASK_CONSTS.TASK_CONSTS.scoring.values.ts.DAILY_TASK.SMALL.+30, loss−20.+40, loss−25.src/common/values/scoring.values.tsafter all references have been migrated.Scoreorscoring.values.tsreferences remain.