diff --git a/index.html b/index.html index 68e5618..8cb8e94 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@
- + diff --git a/src/i18n/en-us.js b/src/i18n/en-us.js index a1e8ab8..b404532 100644 --- a/src/i18n/en-us.js +++ b/src/i18n/en-us.js @@ -31,7 +31,7 @@ export default { UI_Thanks: 'Thx', UI_Achievement: 'Achv', UI_Cyber_Theme_Art_Design: 'UI Design by 晰晰', - UI_Banner: '作者的新作《纸上谈亲》已上线小程序\n微信/抖音搜索“纸上谈亲”即可游玩~', + UI_Banner: ' ', UI_Title_Talent: 'Talent Draw', UI_Talent_Draw: '!10 Pulls!', diff --git a/src/i18n/zh-cn.js b/src/i18n/zh-cn.js index d2cd2ad..528b68c 100644 --- a/src/i18n/zh-cn.js +++ b/src/i18n/zh-cn.js @@ -33,7 +33,7 @@ export default { UI_Thanks: '感谢', UI_Achievement: '成就', UI_Cyber_Theme_Art_Design: 'UI 设计 by 晰晰', - UI_Banner: '作者的新作《纸上谈亲》已上线小程序\n微信/抖音搜索“纸上谈亲”即可游玩~', + UI_Banner: ' ', UI_Title_Talent: '天赋抽卡', UI_Talent_Draw: '10连抽!', diff --git a/src/index.js b/src/index.js index 9a22adc..dbbd006 100644 --- a/src/index.js +++ b/src/index.js @@ -52,6 +52,7 @@ location.search }) core.config({ + celebrityLimit: 10, defaultPropertyPoints: 20, // default number of points for a property talentSelectLimit: 3, // max number of talents that can be selected propertyAllocateLimit: [0, 10], // scoop of properties that can be allocated, diff --git a/src/modules/life.js b/src/modules/life.js index cbfc934..af66274 100644 --- a/src/modules/life.js +++ b/src/modules/life.js @@ -35,6 +35,7 @@ class Life { #achievement #character #triggerTalents + #celebrityLimit #defaultPropertyPoints #talentSelectLimit #propertyAllocateLimit @@ -63,6 +64,7 @@ class Life { } config({ + celebrityLimit = 10, // limit of celebrity defaultPropertyPoints = 20, // default number of points for a property talentSelectLimit = 3, // max number of talents that can be selected propertyAllocateLimit = [0, 10], // scoop of properties that can be allocated @@ -71,6 +73,7 @@ class Life { propertyConfig, // config for property characterConfig, // config for character } = {}) { + this.#celebrityLimit = celebrityLimit this.#defaultPropertyPoints = defaultPropertyPoints this.#talentSelectLimit = talentSelectLimit this.#propertyAllocateLimit = propertyAllocateLimit @@ -347,6 +350,7 @@ class Life { ) } + get celebrityLimit() { return this.times < this.#celebrityLimit } get PropertyTypes() { return this.#property.TYPES } get AchievementOpportunity() { return this.#achievement.Opportunity } get talentSelectLimit() { return this.#talentSelectLimit } diff --git a/src/ui/themes/cyber/main.js b/src/ui/themes/cyber/main.js index d326bd5..18c58e4 100644 --- a/src/ui/themes/cyber/main.js +++ b/src/ui/themes/cyber/main.js @@ -1,7 +1,7 @@ export default class CyberMain extends ui.view.CyberTheme.CyberMainUI { constructor() { super() - this.btnRemake.on(Laya.Event.CLICK, this, () => $ui.switchView(UI.pages.MODE)) + this.btnRemake.on(Laya.Event.CLICK, this, () => this.remake()) this.btnAchievement.on(Laya.Event.CLICK, this, () => $ui.switchView(UI.pages.ACHIEVEMENT)) this.btnThanks.on(Laya.Event.CLICK, this, () => $ui.switchView(UI.pages.THANKS)) this.btnGithub.on(Laya.Event.CLICK, this, goto, ['github']) @@ -40,4 +40,8 @@ export default class CyberMain extends ui.view.CyberTheme.CyberMainUI { this.btnGithub.visible = !disabled.github this.btnSaveLoad.visible = !disabled.saveload } + + remake() { + $ui.switchView(core.celebrityLimit ? UI.pages.TALENT : UI.pages.MODE) + } } diff --git a/src/ui/themes/default/main.js b/src/ui/themes/default/main.js index 1549d5c..15db80c 100644 --- a/src/ui/themes/default/main.js +++ b/src/ui/themes/default/main.js @@ -1,7 +1,7 @@ export default class Main extends ui.view.DefaultTheme.MainUI { constructor() { super() - this.btnRemake.on(Laya.Event.CLICK, this, () => $ui.switchView(UI.pages.MODE)) + this.btnRemake.on(Laya.Event.CLICK, this, () => this.remake()) this.btnAchievement.on(Laya.Event.CLICK, this, () => $ui.switchView(UI.pages.ACHIEVEMENT)) this.btnThanks.on(Laya.Event.CLICK, this, () => $ui.switchView(UI.pages.THANKS)) this.btnGithub.on(Laya.Event.CLICK, this, goto, ['github']) @@ -20,13 +20,17 @@ export default class Main extends ui.view.DefaultTheme.MainUI { this.labSubTitle.text = text const leastOnce = !!core.times - this.banner.visible = leastOnce this.btnAchievement.visible = leastOnce this.btnThanks.visible = leastOnce const disabled = globalThis.$channel?.disabled || {} + this.banner.visible = leastOnce && !disabled.banner this.btnDiscord.visible = leastOnce && !disabled.discord this.btnGithub.visible = !disabled.github this.btnSaveLoad.visible = !disabled.saveload } + + remake() { + $ui.switchView(core.celebrityLimit ? UI.pages.TALENT : UI.pages.MODE) + } }