From c94e9e7433da6eb0e581d3cf49022b74aea4d29f Mon Sep 17 00:00:00 2001 From: Vick Scarlet Date: Thu, 11 Nov 2021 21:37:45 +0800 Subject: [PATCH] update daily --- .vscode/launch.json | 2 +- laya/pages/view/CyberTheme/CyberSummary.ui | 107 ++++++++++++++--- src/functions/addition.js | 41 ------- src/functions/summary.js | 89 -------------- src/functions/util.js | 20 +++- src/i18n/en-us.js | 40 +++++++ src/i18n/zh-cn.js | 40 +++++++ src/index.js | 132 +++++++++++++++++++- src/modules/achievement.js | 3 +- src/modules/event.js | 3 +- src/modules/life.js | 133 +++++++++++---------- src/modules/property.js | 57 ++++++++- src/modules/talent.js | 46 ++++--- src/ui/layaUI.max.all.js | 13 +- src/ui/themes/cyber/cyberAchievement.js | 5 + src/ui/themes/cyber/cyberMain.js | 5 + src/ui/themes/cyber/cyberSummary.js | 79 ++++++++++++ src/ui/themes/cyber/cyberTrajectory.js | 3 +- 18 files changed, 574 insertions(+), 244 deletions(-) delete mode 100644 src/functions/addition.js delete mode 100644 src/functions/summary.js diff --git a/.vscode/launch.json b/.vscode/launch.json index dfcb1fc..64d191a 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -8,7 +8,7 @@ "name": "Launch Chrome", "request": "launch", "type": "pwa-chrome", - "url": "http://172.27.192.1:8000/public/index.html", + "url": "http://127.0.0.1:8000/public/index.html", "webRoot": "${workspaceFolder}" }, { diff --git a/laya/pages/view/CyberTheme/CyberSummary.ui b/laya/pages/view/CyberTheme/CyberSummary.ui index 75b8829..6bf7df5 100644 --- a/laya/pages/view/CyberTheme/CyberSummary.ui +++ b/laya/pages/view/CyberTheme/CyberSummary.ui @@ -1,8 +1,8 @@ { "x":0, "type":"View", - "selectedBox":16, - "selecteID":77, + "selectedBox":10, + "selecteID":150, "props":{"width":1125,"sceneColor":"#000000","sceneBg":"laya/views/view/CyberTheme/CyberSummary.png","runtime":"ViewBase","height":2436}, "nodeParent":-1, "label":"View", @@ -403,14 +403,13 @@ "props":{"width":120,"left":0,"height":120,"centerY":0}, "nodeParent":17, "label":"Box", - "isOpen":true, + "isOpen":false, "isDirectory":true, "isAniNode":true, "hasChild":true, "compId":18, "child":[ { - "x":75, "type":"Image", "props":{"skin":"images/icons/icon_chr@3x.png","scaleY":1.1,"scaleX":1.1,"centerY":0,"centerX":0}, "nodeParent":18, @@ -439,9 +438,9 @@ { "x":60, "type":"Box", - "props":{"top":20,"runtime":"ColorFilterItem","right":240,"left":255,"bottom":20}, + "props":{"var":"boxCharmGrade","top":20,"runtime":"ColorFilterItem","right":240,"name":"boxCharmGrade","left":255,"bottom":20}, "nodeParent":17, - "label":"Box", + "label":"Box(boxCharmGrade)", "isOpen":true, "isDirectory":true, "isAniNode":true, @@ -460,6 +459,19 @@ "compId":199, "child":[ ] + }, + { + "x":75, + "type":"Label", + "props":{"var":"labCharm","text":"100","strokeColor":"#323232","stroke":8,"name":"labCharm","fontSize":50,"font":"方正像素12","color":"#ffffff","centerY":0,"centerX":0,"anchorY":0.5,"anchorX":0.5,"align":"center"}, + "nodeParent":200, + "label":"Label(labCharm)", + "isDirectory":false, + "isAniNode":true, + "hasChild":false, + "compId":251, + "child":[ + ] }] }, { @@ -530,9 +542,9 @@ { "x":60, "type":"Box", - "props":{"top":20,"runtime":"ColorFilterItem","right":240,"left":255,"bottom":20}, + "props":{"var":"boxIntelligenceGrade","top":20,"runtime":"ColorFilterItem","right":240,"name":"boxIntelligenceGrade","left":255,"bottom":20}, "nodeParent":47, - "label":"Box", + "label":"Box(boxIntelligenceGrade)", "isOpen":true, "isDirectory":true, "isAniNode":true, @@ -551,6 +563,19 @@ "compId":212, "child":[ ] + }, + { + "x":75, + "type":"Label", + "props":{"var":"labIntelligence","text":"100","strokeColor":"#323232","stroke":8,"name":"labIntelligence","fontSize":50,"font":"方正像素12","color":"#ffffff","centerY":0,"centerX":0,"anchorY":0.5,"anchorX":0.5,"align":"center"}, + "nodeParent":211, + "label":"Label(labIntelligence)", + "isDirectory":false, + "isAniNode":true, + "hasChild":false, + "compId":249, + "child":[ + ] }] }, { @@ -621,9 +646,9 @@ { "x":60, "type":"Box", - "props":{"top":20,"runtime":"ColorFilterItem","right":240,"left":255,"bottom":20}, + "props":{"var":"boxStrengthGrade","top":20,"runtime":"ColorFilterItem","right":240,"name":"boxStrengthGrade","left":255,"bottom":20}, "nodeParent":77, - "label":"Box", + "label":"Box(boxStrengthGrade)", "isOpen":true, "isDirectory":true, "isAniNode":true, @@ -642,6 +667,19 @@ "compId":214, "child":[ ] + }, + { + "x":75, + "type":"Label", + "props":{"var":"labStrength","text":"100","strokeColor":"#323232","stroke":8,"name":"labStrength","fontSize":50,"font":"方正像素12","color":"#ffffff","centerY":0,"centerX":0,"anchorY":0.5,"anchorX":0.5,"align":"center"}, + "nodeParent":213, + "label":"Label(labStrength)", + "isDirectory":false, + "isAniNode":true, + "hasChild":false, + "compId":246, + "child":[ + ] }] }, { @@ -712,9 +750,9 @@ { "x":60, "type":"Box", - "props":{"top":20,"runtime":"ColorFilterItem","right":240,"left":255,"bottom":20}, + "props":{"var":"boxMoneyGrade","top":20,"runtime":"ColorFilterItem","right":240,"name":"boxMoneyGrade","left":255,"bottom":20}, "nodeParent":107, - "label":"Box", + "label":"Box(boxMoneyGrade)", "isOpen":true, "isDirectory":true, "isAniNode":true, @@ -733,6 +771,19 @@ "compId":216, "child":[ ] + }, + { + "x":75, + "type":"Label", + "props":{"var":"labMoney","text":"100","strokeColor":"#323232","stroke":8,"name":"labMoney","fontSize":50,"font":"方正像素12","color":"#ffffff","centerY":0,"centerX":0,"anchorY":0.5,"anchorX":0.5,"align":"center"}, + "nodeParent":215, + "label":"Label(labMoney)", + "isDirectory":false, + "isAniNode":true, + "hasChild":false, + "compId":250, + "child":[ + ] }] }, { @@ -803,9 +854,9 @@ { "x":60, "type":"Box", - "props":{"top":20,"runtime":"ColorFilterItem","right":240,"left":255,"bottom":20}, + "props":{"var":"boxSpiritGrade","top":20,"runtime":"ColorFilterItem","right":240,"name":"boxSpiritGrade","left":255,"bottom":20}, "nodeParent":195, - "label":"Box", + "label":"Box(boxSpiritGrade)", "isOpen":true, "isDirectory":true, "isAniNode":true, @@ -824,6 +875,19 @@ "compId":218, "child":[ ] + }, + { + "x":75, + "type":"Label", + "props":{"var":"labSpirit","text":"100","strokeColor":"#323232","stroke":8,"name":"labSpirit","fontSize":50,"font":"方正像素12","color":"#ffffff","centerY":0,"centerX":0,"anchorY":0.5,"anchorX":0.5,"align":"center"}, + "nodeParent":217, + "label":"Label(labSpirit)", + "isDirectory":false, + "isAniNode":true, + "hasChild":false, + "compId":252, + "child":[ + ] }] }, { @@ -1009,17 +1073,18 @@ "props":{"x":10,"width":1000,"name":"buttonGroup","height":200,"centerX":0,"bottom":70}, "nodeParent":1, "label":"Box(buttonGroup)", - "isOpen":false, + "isOpen":true, "isDirectory":true, "isAniNode":true, "hasChild":true, "compId":10, "child":[ { + "x":30, "type":"Button", - "props":{"y":100,"x":250,"width":500,"skin":"images/button/button_main@3x.png","name":"btnRandomAllocate","label":"UI_Remake_Again","centerY":0,"centerX":0}, + "props":{"y":100,"x":250,"width":500,"var":"btnAgain","skin":"images/button/button_main@3x.png","name":"btnAgain","label":"UI_Remake_Again","centerY":0,"centerX":0}, "nodeParent":10, - "label":"Button(btnRandomAllocate)", + "label":"Button(btnAgain)", "isOpen":true, "isDirectory":true, "isAniNode":true, @@ -1027,6 +1092,7 @@ "compId":150, "child":[ { + "x":45, "type":"Box", "props":{}, "nodeParent":150, @@ -1207,6 +1273,7 @@ }] }, { + "x":45, "type":"Box", "props":{}, "nodeParent":150, @@ -1286,13 +1353,14 @@ "props":{"visible":false,"name":"colorBox"}, "nodeParent":1, "label":"VBox(colorBox)", - "isOpen":false, + "isOpen":true, "isDirectory":true, "isAniNode":true, "hasChild":true, "compId":210, "child":[ { + "x":30, "type":"Label", "props":{"y":0,"var":"colorGrade0","text":"#ccccccff","fontSize":40,"font":"方正像素12","color":"#cccccc"}, "nodeParent":210, @@ -1305,6 +1373,7 @@ ] }, { + "x":30, "type":"Label", "props":{"y":10,"var":"colorGrade1","text":"#55fffeff","fontSize":40,"font":"方正像素12","color":"#55fffe"}, "nodeParent":210, @@ -1317,6 +1386,7 @@ ] }, { + "x":30, "type":"Label", "props":{"y":20,"var":"colorGrade2","text":"#b17cffff","fontSize":40,"font":"方正像素12","color":"#b17cff"}, "nodeParent":210, @@ -1329,6 +1399,7 @@ ] }, { + "x":30, "type":"Label", "props":{"y":30,"var":"colorGrade3","text":"#ffce45ff","fontSize":40,"font":"方正像素12","color":"#ffce45"}, "nodeParent":210, diff --git a/src/functions/addition.js b/src/functions/addition.js deleted file mode 100644 index 112857b..0000000 --- a/src/functions/addition.js +++ /dev/null @@ -1,41 +0,0 @@ -export function getRate(type, value) { - switch(type) { - case 'times': - if(value >= 100) return {2:6}; - if(value >= 70) return {2:5}; - if(value >= 50) return {2:4}; - if(value >= 30) return {2:3}; - if(value >= 10) return {2:2}; - return {2: 1}; - case 'achievement': - if(value >= 100) return {3:6}; - if(value >= 70) return {3:5}; - if(value >= 50) return {3:4}; - if(value >= 30) return {3:3}; - if(value >= 10) return {3:2}; - return {3:1}; - default: return {}; - } -} - -export function getGrade(type, value) { - switch(type) { - case 'times': - case 'achievement': - if(value >= 100) return 3; - if(value >= 50) return 2; - if(value >= 10) return 1; - return 0; - case 'talentRate': - if(value >= 0.9) return 3; - if(value >= 0.6) return 2; - if(value >= 0.3) return 1; - return 0; - case 'eventRate': - if(value >= 0.6) return 3; - if(value >= 0.4) return 2; - if(value >= 0.2) return 1; - return 0; - default: return 0; - } -} \ No newline at end of file diff --git a/src/functions/summary.js b/src/functions/summary.js deleted file mode 100644 index bf17255..0000000 --- a/src/functions/summary.js +++ /dev/null @@ -1,89 +0,0 @@ -const data = { - "CHR": [ - {"judge": "地狱", "grade": 0}, - {"min":1, "judge": "折磨", "grade": 0}, - {"min":2, "judge": "不佳", "grade": 0}, - {"min":4, "judge": "普通", "grade": 0}, - {"min":7, "judge": "优秀", "grade": 1}, - {"min":9, "judge": "罕见", "grade": 2}, - {"min":11, "judge": "逆天", "grade": 3}, - ], - "MNY": [ - {"judge": "地狱", "grade": 0}, - {"min":1, "judge": "折磨", "grade": 0}, - {"min":2, "judge": "不佳", "grade": 0}, - {"min":4, "judge": "普通", "grade": 0}, - {"min":7, "judge": "优秀", "grade": 1}, - {"min":9, "judge": "罕见", "grade": 2}, - {"min":11, "judge": "逆天", "grade": 3}, - ], - "SPR": [ - {"judge": "地狱", "grade": 0}, - {"min":1, "judge": "折磨", "grade": 0}, - {"min":2, "judge": "不幸", "grade": 0}, - {"min":4, "judge": "普通", "grade": 0}, - {"min":7, "judge": "幸福", "grade": 1}, - {"min":9, "judge": "极乐", "grade": 2}, - {"min":11, "judge": "天命", "grade": 3}, - ], - "INT": [ - {"judge": "地狱", "grade": 0}, - {"min":1, "judge": "折磨", "grade": 0}, - {"min":2, "judge": "不佳", "grade": 0}, - {"min":4, "judge": "普通", "grade": 0}, - {"min":7, "judge": "优秀", "grade": 1}, - {"min":9, "judge": "罕见", "grade": 2}, - {"min":11, "judge": "逆天", "grade": 3}, - {"min":21, "judge": "识海", "grade": 3}, - {"min":131, "judge": "元神", "grade": 3}, - {"min":501, "judge": "仙魂", "grade": 3}, - ], - "STR": [ - {"judge": "地狱", "grade": 0}, - {"min":1, "judge": "折磨", "grade": 0}, - {"min":2, "judge": "不佳", "grade": 0}, - {"min":4, "judge": "普通", "grade": 0}, - {"min":7, "judge": "优秀", "grade": 1}, - {"min":9, "judge": "罕见", "grade": 2}, - {"min":11, "judge": "逆天", "grade": 3}, - {"min":21, "judge": "凝气", "grade": 3}, - {"min":101, "judge": "筑基", "grade": 3}, - {"min":401, "judge": "金丹", "grade": 3}, - {"min":1001, "judge": "元婴", "grade": 3}, - {"min":2001, "judge": "仙体", "grade": 3}, - ], - "AGE": [ - {"judge": "胎死腹中", "grade": 0}, - {"min":1, "judge": "早夭", "grade": 0}, - {"min":10, "judge": "少年", "grade": 0}, - {"min":18, "judge": "盛年", "grade": 0}, - {"min":40, "judge": "中年", "grade": 0}, - {"min":60, "judge": "花甲", "grade": 1}, - {"min":70, "judge": "古稀", "grade": 1}, - {"min":80, "judge": "杖朝", "grade": 2}, - {"min":90, "judge": "南山", "grade": 2}, - {"min":95, "judge": "不老", "grade": 3}, - {"min":100, "judge": "修仙", "grade": 3}, - {"min":500, "judge": "仙寿", "grade": 3}, - ], - "SUM": [ - {"judge": "地狱", "grade": 0}, - {"min":41, "judge": "折磨", "grade": 0}, - {"min":50, "judge": "不佳", "grade": 0}, - {"min":60, "judge": "普通", "grade": 0}, - {"min":80, "judge": "优秀", "grade": 1}, - {"min":100, "judge": "罕见", "grade": 2}, - {"min":110, "judge": "逆天", "grade": 3}, - {"min":120, "judge": "传说", "grade": 3}, - ] -} - -function summary(type, value) { - let length = data[type].length; - while(length--) { - const {min, judge, grade} = data[type][length]; - if(min==void 0 || value >= min) return {judge, grade}; - } -} - -export { summary }; \ No newline at end of file diff --git a/src/functions/util.js b/src/functions/util.js index 810ac18..c8dc38a 100644 --- a/src/functions/util.js +++ b/src/functions/util.js @@ -44,4 +44,22 @@ function listRandom(list) { return list[Math.floor(Math.random() * list.length)]; } -export { clone, max, min, sum, average, weightRandom, listRandom }; \ No newline at end of file +function getListValuesMap(list, fn) { + const map = {}; + list.forEach(key=>map[key] = fn(key)); + return map; +} + +function mapConvert(map, fn) { + for(const key in map) + map[key] = fn(key, map[key]); +} + +function getConvertedMap(map, fn) { + const newMap = {}; + for(const key in map) + newMap[key] = fn(key, map[key]); + return newMap; +} + +export { clone, max, min, sum, average, weightRandom, listRandom, getListValuesMap, mapConvert, getConvertedMap }; \ No newline at end of file diff --git a/src/i18n/en-us.js b/src/i18n/en-us.js index 9b50dd2..3bf751f 100644 --- a/src/i18n/en-us.js +++ b/src/i18n/en-us.js @@ -47,4 +47,44 @@ export default ({ UI_Final_Age: 'Age', UI_Total_Judge: 'Judge', + + 'UI_Judge_Level_0': '地狱', + 'UI_Judge_Level_1': '折磨', + 'UI_Judge_Level_2': '不佳', + 'UI_Judge_Level_3': '普通', + 'UI_Judge_Level_4': '优秀', + 'UI_Judge_Level_5': '罕见', + 'UI_Judge_Level_6': '逆天', + 'UI_Judge_Level_7': '传说', + + 'UI_Spirit_Judge_Level_0': '地狱', + 'UI_Spirit_Judge_Level_1': '折磨', + 'UI_Spirit_Judge_Level_2': '不幸', + 'UI_Spirit_Judge_Level_3': '普通', + 'UI_Spirit_Judge_Level_4': '幸福', + 'UI_Spirit_Judge_Level_5': '极乐', + 'UI_Spirit_Judge_Level_6': '天命', + + 'UI_AGE_Judge_Level_0': '胎死腹中', + 'UI_AGE_Judge_Level_1': '早夭', + 'UI_AGE_Judge_Level_2': '少年', + 'UI_AGE_Judge_Level_3': '盛年', + 'UI_AGE_Judge_Level_4': '中年', + 'UI_AGE_Judge_Level_5': '花甲', + 'UI_AGE_Judge_Level_6': '古稀', + 'UI_AGE_Judge_Level_7': '杖朝', + 'UI_AGE_Judge_Level_8': '南山', + 'UI_AGE_Judge_Level_9': '不老', + 'UI_AGE_Judge_Level_10': '修仙', + 'UI_AGE_Judge_Level_11': '仙寿', + + 'UI_Intelligence_Judge_Level_7': '识海', + 'UI_Intelligence_Judge_Level_8': '元神', + 'UI_Intelligence_Judge_Level_9': '仙魂', + + 'UI_Strength_Judge_Level_7': '凝气', + 'UI_Strength_Judge_Level_8': '筑基', + 'UI_Strength_Judge_Level_9': '金丹', + 'UI_Strength_Judge_Level_10': '元婴', + 'UI_Strength_Judge_Level_11': '仙体', }); \ No newline at end of file diff --git a/src/i18n/zh-cn.js b/src/i18n/zh-cn.js index dc91f9e..5290733 100644 --- a/src/i18n/zh-cn.js +++ b/src/i18n/zh-cn.js @@ -46,4 +46,44 @@ export default ({ UI_Final_Age: '享年', UI_Total_Judge: '总评', + + 'UI_Judge_Level_0': '地狱', + 'UI_Judge_Level_1': '折磨', + 'UI_Judge_Level_2': '不佳', + 'UI_Judge_Level_3': '普通', + 'UI_Judge_Level_4': '优秀', + 'UI_Judge_Level_5': '罕见', + 'UI_Judge_Level_6': '逆天', + 'UI_Judge_Level_7': '传说', + + 'UI_Spirit_Judge_Level_0': '地狱', + 'UI_Spirit_Judge_Level_1': '折磨', + 'UI_Spirit_Judge_Level_2': '不幸', + 'UI_Spirit_Judge_Level_3': '普通', + 'UI_Spirit_Judge_Level_4': '幸福', + 'UI_Spirit_Judge_Level_5': '极乐', + 'UI_Spirit_Judge_Level_6': '天命', + + 'UI_AGE_Judge_Level_0': '胎死腹中', + 'UI_AGE_Judge_Level_1': '早夭', + 'UI_AGE_Judge_Level_2': '少年', + 'UI_AGE_Judge_Level_3': '盛年', + 'UI_AGE_Judge_Level_4': '中年', + 'UI_AGE_Judge_Level_5': '花甲', + 'UI_AGE_Judge_Level_6': '古稀', + 'UI_AGE_Judge_Level_7': '杖朝', + 'UI_AGE_Judge_Level_8': '南山', + 'UI_AGE_Judge_Level_9': '不老', + 'UI_AGE_Judge_Level_10': '修仙', + 'UI_AGE_Judge_Level_11': '仙寿', + + 'UI_Intelligence_Judge_Level_7': '识海', + 'UI_Intelligence_Judge_Level_8': '元神', + 'UI_Intelligence_Judge_Level_9': '仙魂', + + 'UI_Strength_Judge_Level_7': '凝气', + 'UI_Strength_Judge_Level_8': '筑基', + 'UI_Strength_Judge_Level_9': '金丹', + 'UI_Strength_Judge_Level_10': '元婴', + 'UI_Strength_Judge_Level_11': '仙体', }); \ No newline at end of file diff --git a/src/index.js b/src/index.js index 5cd707d..fe40d69 100644 --- a/src/index.js +++ b/src/index.js @@ -33,13 +33,137 @@ location.search.substr(1).split('&').forEach(item => { core.config({ 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 + propertyAllocateLimit: [0, 10], // scoop of properties that can be allocated, + defaultPropertys: { SPR: 5 }, // default properties talentConfig: { // config for talent talentPullCount: 10, // number of talents to pull from the talent pool talentRate: { 1:100, 2:10, 3:1, total: 1000 }, // rate of talent pull + additions: { + TMS: [ + [ 10, { 2: 1 }], + [ 30, { 2: 2 }], + [ 50, { 2: 3 }], + [ 70, { 2: 4 }], + [100, { 2: 5 }], + ], + CACHV: [ + [ 10, { 2: 1 }], + [ 30, { 2: 2 }], + [ 50, { 2: 3 }], + [ 70, { 2: 4 }], + [100, { 2: 5 }], + ] + }, + }, + propertyConfig: { // config for property + judge: { + // type: [min, grade, judge] + RTLT: [ + [ 0, 0], + [ 0.3, 1], + [ 0.6, 2], + [ 0.9, 3], + ], + REVT: [ + [ 0, 0], + [ 0.2, 1], + [ 0.4, 2], + [ 0.6, 3], + ], + TMS: [ + [ 0, 0, 'UI_Remake_Times_Judge_Level_0'], + [ 10, 1, 'UI_Remake_Times_Judge_Level_1'], + [ 30, 1, 'UI_Remake_Times_Judge_Level_2'], + [ 50, 2, 'UI_Remake_Times_Judge_Level_3'], + [ 70, 2, 'UI_Remake_Times_Judge_Level_4'], + [ 100, 3, 'UI_Remake_Times_Judge_Level_5'], + ], + CACHV: [ + [ 0, 0, 'UI_Achievement_Count_Judge_Level_0'], + [ 10, 1, 'UI_Achievement_Count_Judge_Level_1'], + [ 30, 1, 'UI_Achievement_Count_Judge_Level_2'], + [ 50, 2, 'UI_Achievement_Count_Judge_Level_3'], + [ 70, 2, 'UI_Achievement_Count_Judge_Level_4'], + [ 100, 3, 'UI_Achievement_Count_Judge_Level_5'], + ], + HCHR: [ + [ 0, 0, 'UI_Judge_Level_0'], + [ 1, 0, 'UI_Judge_Level_1'], + [ 2, 0, 'UI_Judge_Level_2'], + [ 4, 0, 'UI_Judge_Level_3'], + [ 7, 1, 'UI_Judge_Level_4'], + [ 9, 2, 'UI_Judge_Level_5'], + [ 11, 3, 'UI_Judge_Level_6'], + ], + HMNY: [ + [ 0, 0, 'UI_Judge_Level_0'], + [ 1, 0, 'UI_Judge_Level_1'], + [ 2, 0, 'UI_Judge_Level_2'], + [ 4, 0, 'UI_Judge_Level_3'], + [ 7, 1, 'UI_Judge_Level_4'], + [ 9, 2, 'UI_Judge_Level_5'], + [ 11, 3, 'UI_Judge_Level_6'], + ], + HSPR: [ + [ 0, 0, 'UI_Spirit_Judge_Level_0'], + [ 1, 0, 'UI_Spirit_Judge_Level_1'], + [ 2, 0, 'UI_Spirit_Judge_Level_2'], + [ 4, 0, 'UI_Spirit_Judge_Level_3'], + [ 7, 1, 'UI_Spirit_Judge_Level_4'], + [ 9, 2, 'UI_Spirit_Judge_Level_5'], + [ 11, 3, 'UI_Spirit_Judge_Level_6'], + ], + HINT: [ + [ 0, 0, 'UI_Judge_Level_0'], + [ 1, 0, 'UI_Judge_Level_1'], + [ 2, 0, 'UI_Judge_Level_2'], + [ 4, 0, 'UI_Judge_Level_3'], + [ 7, 1, 'UI_Judge_Level_4'], + [ 9, 2, 'UI_Judge_Level_5'], + [ 11, 3, 'UI_Judge_Level_6'], + [ 21, 3, 'UI_Intelligence_Judge_Level_7'], + [ 131, 3, 'UI_Intelligence_Judge_Level_8'], + [ 501, 3, 'UI_Intelligence_Judge_Level_9'], + ], + HSTR: [ + [ 0, 0, 'UI_Judge_Level_0'], + [ 1, 0, 'UI_Judge_Level_1'], + [ 2, 0, 'UI_Judge_Level_2'], + [ 4, 0, 'UI_Judge_Level_3'], + [ 7, 1, 'UI_Judge_Level_4'], + [ 9, 2, 'UI_Judge_Level_5'], + [ 11, 3, 'UI_Judge_Level_6'], + [ 21, 3, 'UI_Strength_Judge_Level_7'], + [ 101, 3, 'UI_Strength_Judge_Level_8'], + [ 401, 3, 'UI_Strength_Judge_Level_9'], + [1001, 3, 'UI_Strength_Judge_Level_10'], + [2001, 3, 'UI_Strength_Judge_Level_11'], + ], + HAGE: [ + [ 0, 0, 'UI_AGE_Judge_Level_0'], + [ 1, 0, 'UI_AGE_Judge_Level_1'], + [ 10, 0, 'UI_AGE_Judge_Level_2'], + [ 18, 0, 'UI_AGE_Judge_Level_3'], + [ 40, 0, 'UI_AGE_Judge_Level_4'], + [ 60, 1, 'UI_AGE_Judge_Level_5'], + [ 70, 1, 'UI_AGE_Judge_Level_6'], + [ 80, 2, 'UI_AGE_Judge_Level_7'], + [ 90, 2, 'UI_AGE_Judge_Level_8'], + [ 95, 3, 'UI_AGE_Judge_Level_9'], + [ 100, 3, 'UI_AGE_Judge_Level_10'], + [ 500, 3, 'UI_AGE_Judge_Level_11'], + ], + SUM: [ + [ 0, 0, 'UI_Judge_Level_0'], + [ 41, 0, 'UI_Judge_Level_1'], + [ 50, 0, 'UI_Judge_Level_2'], + [ 60, 0, 'UI_Judge_Level_3'], + [ 80, 1, 'UI_Judge_Level_4'], + [ 100, 2, 'UI_Judge_Level_5'], + [ 110, 3, 'UI_Judge_Level_6'], + [ 120, 3, 'UI_Judge_Level_7'], + ], + }, }, - defaultPropertys: { - SPR: 5, - } }) game.start(query); diff --git a/src/modules/achievement.js b/src/modules/achievement.js index 0de893c..85f2921 100644 --- a/src/modules/achievement.js +++ b/src/modules/achievement.js @@ -16,9 +16,10 @@ class Achievement { initial({achievements}) { this.#achievements = achievements; + return this.count; } - count() { + get count() { return Object.keys(this.#achievements).length; } diff --git a/src/modules/event.js b/src/modules/event.js index 6bc4e9a..1ccd069 100644 --- a/src/modules/event.js +++ b/src/modules/event.js @@ -17,9 +17,10 @@ class Event { return b; }); } + return this.count; } - count() { + get count() { return Object.keys(this.#events).length; } diff --git a/src/modules/life.js b/src/modules/life.js index 43a363b..cfd6897 100644 --- a/src/modules/life.js +++ b/src/modules/life.js @@ -1,4 +1,4 @@ -import { clone, weightRandom } from '../functions/util.js' +import { clone, weightRandom, getListValuesMap, getConvertedMap } from '../functions/util.js' import Property from './property.js'; import Event from './event.js'; import Talent from './talent.js'; @@ -29,10 +29,14 @@ class Life { loadJSON('events'), loadJSON('achievement'), ]); - this.#property.initial({age}); - this.#talent.initial({talents}); - this.#event.initial({events}); - this.#achievement.initial({achievements}); + + const total = { + [this.PropertyTypes.TACEV]: this.#achievement.initial({achievements}), + [this.PropertyTypes.TEVT]: this.#event.initial({events}), + [this.PropertyTypes.TTLT]: this.#talent.initial({talents}), + }; + + this.#property.initial({age, total}); } config({ @@ -41,12 +45,14 @@ class Life { propertyAllocateLimit = [0, 10], // scoop of properties that can be allocated defaultPropertys = {}, // default propertys talentConfig, // config for talent + propertyConfig, // config for property } = {}) { this.#defaultPropertyPoints = defaultPropertyPoints; this.#talentSelectLimit = talentSelectLimit; this.#propertyAllocateLimit = propertyAllocateLimit; this.#defaultPropertys = defaultPropertys; this.#talent.config(talentConfig); + this.#property.config(propertyConfig); } restart(allocation) { @@ -60,7 +66,7 @@ class Life { this.doTalent() this.#property.restartLastStep(); this.#achievement.achieve( - this.#achievement.Opportunity.START, + this.AchievementOpportunity.START, this.#property ) return contents; @@ -84,7 +90,7 @@ class Life { const content = [talentContent, eventContent].flat(); this.#achievement.achieve( - this.#achievement.Opportunity.TRAJECTORY, + this.AchievementOpportunity.TRAJECTORY, this.#property ) return { age, content, isEnd }; @@ -106,8 +112,8 @@ class Life { } doTalent(talents) { - if(talents) this.#property.change(this.#property.TYPES.TLT, talents); - talents = this.#property.get(this.#property.TYPES.TLT) + if(talents) this.#property.change(this.PropertyTypes.TLT, talents); + talents = this.#property.get(this.PropertyTypes.TLT) .filter(talentId => this.getTalentCurrentTriggerCount(talentId) < this.#talent.get(talentId).max_triggers); const contents = []; @@ -117,7 +123,7 @@ class Life { this.#triggerTalents[talentId] = this.getTalentCurrentTriggerCount(talentId) + 1; const { effect, name, description, grade } = result; contents.push({ - type: this.#property.TYPES.TLT, + type: this.PropertyTypes.TLT, name, grade, description, @@ -130,10 +136,10 @@ class Life { doEvent(eventId) { const { effect, next, description, postEvent } = this.#event.do(eventId, this.#property); - this.#property.change(this.#property.TYPES.EVT, eventId); + this.#property.change(this.PropertyTypes.EVT, eventId); this.#property.effect(effect); const content = { - type: this.#property.TYPES.EVT, + type: this.PropertyTypes.EVT, description, postEvent, } @@ -150,47 +156,60 @@ class Life { } talentRandom() { - const times = this.#property.get(this.#property.TYPES.TMS); - const achievement = this.#property.get(this.#property.TYPES.CACHV); - return this.#talent.talentRandom(this.getLastExtendTalent(), { times, achievement }); + return this.#talent.talentRandom( + this.lastExtendTalent, + this.#getPropertys( + this.PropertyTypes.TMS, + this.PropertyTypes.CACHV, + ) + ); } talentExtend(talentId) { - this.#property.set(this.#property.TYPES.EXT, talentId); - } - - getLastExtendTalent() { - return this.#property.get(this.#property.TYPES.EXT); - } - - getSummary() { - this.#achievement.achieve( - this.#achievement.Opportunity.SUMMARY, - this.#property - ) - return { - AGE: this.#property.get(this.#property.TYPES.HAGE), - CHR: this.#property.get(this.#property.TYPES.HCHR), - INT: this.#property.get(this.#property.TYPES.HINT), - STR: this.#property.get(this.#property.TYPES.HSTR), - MNY: this.#property.get(this.#property.TYPES.HMNY), - SPR: this.#property.get(this.#property.TYPES.HSPR), - SUM: this.#property.get(this.#property.TYPES.SUM), - }; - } - - getLastRecord() { - return this.#property.getLastRecord(); + this.#property.set(this.PropertyTypes.EXT, talentId); } exclusive(talents, exclusive) { return this.#talent.exclusive(talents, exclusive); } - getAchievements() { + #getJudges(...types) { + return getListValuesMap(types.flat(), key => this.#property.judge(key)); + } + + #getPropertys(...types) { + return getListValuesMap(types.flat(), key => this.#property.get(key)); + } + + get lastExtendTalent() { + return this.#property.get(this.PropertyTypes.EXT); + } + + get summary() { + this.#achievement.achieve( + this.AchievementOpportunity.SUMMARY, + this.#property + ) + + const pt = this.PropertyTypes; + + return this.#getJudges(pt.SUM, + pt.HAGE, pt.HCHR, pt.HINT, + pt.HSTR, pt.HMNY, pt.HSPR, + ); + } + + get status() { + const pt = this.PropertyTypes; + + return this.#getJudges( pt.TMS, + pt.CACHV, pt.RTLT, pt.REVT, + ); + } + get achievements() { const ticks = {}; this.#property - .get(this.#property.TYPES.ACHV) + .get(this.PropertyTypes.ACHV) .forEach(([id, tick]) => ticks[id] = tick); return this .#achievement @@ -213,38 +232,20 @@ class Life { }); } - getTotal() { - const TMS = this.#property.get(this.#property.TYPES.TMS); - const CACHV = this.#property.get(this.#property.TYPES.CACHV); - const CTLT = this.#property.get(this.#property.TYPES.CTLT); - const CEVT = this.#property.get(this.#property.TYPES.CEVT); - - const totalTalent = this.#talent.count(); - const totalEvent = this.#event.count(); - - return { - times: TMS, - achievement: CACHV, - talentRate: CTLT / totalTalent, - eventRate: CEVT / totalEvent, - } - } - - get PropertyTypes() { return clone(this.#property.TYPES); } - + get PropertyTypes() { return this.#property.TYPES; } + get AchievementOpportunity() { return this.#achievement.Opportunity; } get talentSelectLimit() { return this.#talentSelectLimit; } get propertyAllocateLimit() { return clone(this.#propertyAllocateLimit); } get propertys() { return this.#property.getPropertys(); } - get times() { return this.#property?.get(this.#property.TYPES.TMS) || 0; } + get times() { return this.#property.get(this.PropertyTypes.TMS) || 0; } set times(v) { - this.#property?.set(this.#property.TYPES.TMS, v) || 0; + this.#property.set(this.PropertyTypes.TMS, v); this.#achievement.achieve( - this.#achievement.Opportunity.END, + this.AchievementOpportunity.END, this.#property ) } } -export default Life; - +export default Life; \ No newline at end of file diff --git a/src/modules/property.js b/src/modules/property.js index 5f5ebde..975553a 100644 --- a/src/modules/property.js +++ b/src/modules/property.js @@ -40,10 +40,20 @@ class Property { AEVT: "AEVT", // 触发过的事件 Achieve Event ACHV: "ACHV", // 达成的成就 Achievement - CTLT: "RTLT", // 天赋选择数 Count Talent - CEVT: "REVT", // 事件收集数 Count Event + CTLT: "CTLT", // 天赋选择数 Count Talent + CEVT: "CEVT", // 事件收集数 Count Event CACHV: "CACHV", // 成就达成数 Count Achievement + // 总数 + TTLT: "TTLT", // 总天赋数 Total Talent + TEVT: "TEVT", // 总事件数 Total Event + TACHV: "TACHV", // 总成就数 Total Achievement + + // 比率 + REVT: "REVT", // 事件收集率 Rate Event + RTLT: "RTLT", // 天赋选择率 Rate Talent + RACHV: "RACHV", // 成就达成率 Rate Achievement + // SPECIAL RDM: 'RDM', // 随机属性 random RDM @@ -62,9 +72,10 @@ class Property { #ageData; #data = {}; + #total; + #judge; - initial({age}) { - + initial({age, total}) { this.#ageData = age; for(const a in age) { let { event, talent } = age[a]; @@ -84,6 +95,11 @@ class Property { age[a] = { event, talent }; } + this.#total = total; + } + + config({judge = {}}) { + this.#judge = judge; } restart(data) { @@ -188,6 +204,15 @@ class Property { return this.get( this.fallback(prop) ).length; + case this.TYPES.TTLT: + case this.TYPES.TEVT: + case this.TYPES.TACHV: + return this.#total[prop]; + case this.TYPES.RTLT: + case this.TYPES.REVT: + case this.TYPES.RACHV: + const fb = this.fallback(prop); + return this.get(fb[0]) / this.get(fb[1]); default: return 0; } } @@ -209,6 +234,10 @@ class Property { case this.TYPES.CTLT: return this.TYPES.ATLT; case this.TYPES.CEVT: return this.TYPES.AEVT; case this.TYPES.CACHV: return this.TYPES.ACHV; + case this.TYPES.LIF: return this.TYPES.LIF; + case this.TYPES.RTLT: return [this.TYPES.CTLT, this.TYPES.TTLT]; + case this.TYPES.REVT: return [this.TYPES.CEVT, this.TYPES.TEVT]; + case this.TYPES.RACHV: return [this.TYPES.CACHV, this.TYPES.TACHV]; default: return; } } @@ -299,6 +328,26 @@ class Property { ); } + judge(prop) { + const value = this.get(prop); + + const d = this.#judge[prop]; + let length = d.length; + const p = 1/length; + + const progress = () => { + const min = d[length][0] || 0; + const max = d[length+1]?.[0] || value; + if(max == min) return 1; + return p * (length + (value - min) / (max - min)); + } + + while(length--) { + const [min, grade, judge] = d[length]; + if(min==void 0 || value >= min) return {prop, value, judge, grade, progress: progress()}; + } + } + isEnd() { return this.get(this.TYPES.LIF) < 1; } diff --git a/src/modules/talent.js b/src/modules/talent.js index d12e6f1..822c772 100644 --- a/src/modules/talent.js +++ b/src/modules/talent.js @@ -1,6 +1,5 @@ import { clone, weightRandom } from '../functions/util.js'; import { checkCondition, extractMaxTriggers } from '../functions/condition.js'; -import { getRate } from '../functions/addition.js'; class Talent { constructor() {} @@ -8,7 +7,7 @@ class Talent { #talents; #talentPullCount; #talentRate; - #rateAddition; + #additions; initial({talents}) { this.#talents = talents; @@ -28,19 +27,23 @@ class Talent { } } } + return this.count; + } + + get count() { + return Object.keys(this.#talents).length; } config({ talentPullCount = 10, // number of talents to pull from the talent pool talentRate = { 1:100, 2:10, 3:1, total: 1000 }, // rate of talent pull + additions = {}, // additional additions } = {}) { this.#talentPullCount = talentPullCount; this.#talentRate = talentRate; + this.#additions = additions; } - count() { - return Object.keys(this.#talents).length; - } check(talentId, property) { const { condition } = this.get(talentId); @@ -69,20 +72,32 @@ class Talent { return null; } - talentRandom(include, {times = 0, achievement = 0} = {}) { + getAddition(type, value) { + if(!this.#additions[type]) return {}; + for(const [min, addition] of this.#additions[type]) { + if(value >= min) return addition; + } + return {}; + } + + getRate(additionValues = {}) { const rate = clone(this.#talentRate); - const rateAddition = { 1:1, 2:1, 3:1, }; - const timesRate = getRate('times', times); - const achievementRate = getRate('achievement', achievement); + const addition = { 1:1, 2:1, 3:1, }; - for(const grade in timesRate) - rateAddition[grade] += timesRate[grade] - 1; + Object.keys(additionValues).forEach(key => { + const addi = this.getAddition(key, additionValues[key]) + for(const grade in addi) + addition[grade] += addi[grade]; + }); - for(const grade in achievementRate) - rateAddition[grade] += achievementRate[grade] - 1; + for(const grade in addition) + rate[grade] *= addition[grade]; - for(const grade in rateAddition) - rate[grade] *= rateAddition[grade]; + return rate; + } + + talentRandom(include, additionValues) { + const rate = this.getRate(additionValues); const randomGrade = () => { let randomNumber = Math.floor(Math.random() * rate.total); @@ -92,7 +107,6 @@ class Talent { return 0; } - // 1000, 100, 10, 1 const talentList = {}; for(const talentId in this.#talents) { const { id, grade, name, description } = this.#talents[talentId]; diff --git a/src/ui/layaUI.max.all.js b/src/ui/layaUI.max.all.js index 66c818f..08f6565 100644 --- a/src/ui/layaUI.max.all.js +++ b/src/ui/layaUI.max.all.js @@ -103,17 +103,28 @@ var CyberSummaryUI=(function(_super){ this.labAgeJudge=null; this.labTotal=null; this.labTotalJudge=null; + this.boxCharmGrade=null; this.prgCharm=null; + this.labCharm=null; this.labCharmJudge=null; + this.boxIntelligenceGrade=null; this.prgIntelligence=null; + this.labIntelligence=null; this.labIntelligenceJudge=null; + this.boxStrengthGrade=null; this.prgStrength=null; + this.labStrength=null; this.labStrengthJudge=null; + this.boxMoneyGrade=null; this.prgMoney=null; + this.labMoney=null; this.labMoneyJudge=null; + this.boxSpiritGrade=null; this.prgSpirit=null; + this.labSpirit=null; this.labSpiritJudge=null; this.listSelectedTalents=null; + this.btnAgain=null; this.colorGrade0=null; this.colorGrade1=null; this.colorGrade2=null; @@ -134,7 +145,7 @@ var CyberSummaryUI=(function(_super){ } - CyberSummaryUI.uiView={"type":"View","props":{"width":1125,"runtime":"ViewBase","height":2436},"child":[{"type":"Sprite","props":{},"child":[{"type":"Rect","props":{"width":1125,"lineWidth":1,"height":2436,"fillColor":"#04131f"}}]},{"type":"Box","props":{"top":40,"right":0,"name":"title","left":0},"child":[{"type":"Image","props":{"skin":"images/accessories/titlebar@3x.png"}},{"type":"HBox","props":{"y":160,"x":563,"space":30,"height":70,"centerX":0,"anchorY":0.5,"anchorX":0.5},"child":[{"type":"Image","props":{"y":10,"x":1,"skin":"images/accessories/title_left@3x.png","name":"left"}},{"type":"Label","props":{"y":0,"x":2,"text":"UI_Title_Summary","fontSize":60,"font":"方正像素12","color":"#ffffff"}},{"type":"Image","props":{"y":10,"x":3,"skin":"images/accessories/title_right@3x.png","name":"right"}}]}]},{"type":"Box","props":{"y":10,"x":10,"top":340,"right":40,"name":"propertyAllocate","left":40,"height":870},"child":[{"type":"Image","props":{"top":-15,"skin":"images/border/border_2@3x.png","right":-15,"left":-15,"bottom":-15,"sizeGrid":"75,155,75,155"}},{"type":"Box","props":{"top":60,"right":50,"left":50,"height":220},"child":[{"type":"Box","props":{"width":220,"left":20,"height":220,"centerY":0}},{"type":"Box","props":{"top":0,"right":0,"left":250,"height":100},"child":[{"type":"Box","props":{"width":320,"top":5,"left":5,"bottom":5},"child":[{"type":"Image","props":{"top":0,"skin":"images/border/property@3x.png","right":0,"left":0,"bottom":0,"sizeGrid":"15,15,15,15"}},{"type":"HBox","props":{"left":20,"centerY":0},"child":[{"type":"Label","props":{"x":0,"text":"UI_Final_Age","fontSize":50,"font":"方正像素12","color":"#ffffff","centerY":0,"align":"center"}},{"type":"Label","props":{"x":1,"text":"UI_Colon","fontSize":50,"font":"方正像素12","color":"#ffffff","centerY":0,"align":"center"}}]},{"type":"Label","props":{"var":"labAge","text":"0","right":40,"name":"labAge","fontSize":50,"font":"方正像素12","color":"#5cc8dc","centerY":0,"align":"center"}}]},{"type":"Label","props":{"width":220,"var":"labAgeJudge","text":"Judge","right":0,"name":"labAgeJudge","fontSize":50,"font":"方正像素12","color":"#5cc8dc","centerY":0,"anchorY":0.5,"anchorX":0.5,"align":"center"}}]},{"type":"Box","props":{"right":0,"left":250,"height":100,"bottom":0},"child":[{"type":"Box","props":{"width":320,"top":5,"left":5,"bottom":5},"child":[{"type":"Image","props":{"top":0,"skin":"images/border/property@3x.png","right":0,"left":0,"bottom":0,"sizeGrid":"15,15,15,15"}},{"type":"HBox","props":{"left":20,"centerY":0},"child":[{"type":"Label","props":{"x":0,"text":"UI_Total_Judge","fontSize":50,"font":"方正像素12","color":"#ffffff","centerY":0,"align":"center"}},{"type":"Label","props":{"x":1,"text":"UI_Colon","fontSize":50,"font":"方正像素12","color":"#ffffff","centerY":0,"align":"center"}}]},{"type":"Label","props":{"var":"labTotal","text":"0","right":40,"name":"labTotal","fontSize":50,"font":"方正像素12","color":"#5cc8dc","centerY":0,"align":"center"}}]},{"type":"Label","props":{"width":220,"var":"labTotalJudge","text":"Judge","right":0,"name":"labTotalJudge","fontSize":50,"font":"方正像素12","color":"#5cc8dc","centerY":0,"anchorY":0.5,"anchorX":0.5,"align":"center"}}]}]},{"type":"VBox","props":{"top":340,"space":5,"right":50,"left":50},"child":[{"type":"Box","props":{"y":0,"right":0,"name":"boxCharm","left":0,"height":90},"child":[{"type":"Box","props":{"width":120,"left":0,"height":120,"centerY":0},"child":[{"type":"Image","props":{"skin":"images/icons/icon_chr@3x.png","scaleY":1.1,"scaleX":1.1,"centerY":0,"centerX":0}}]},{"type":"Label","props":{"x":170,"text":"UI_Property_Charm","fontSize":50,"font":"方正像素12","color":"#ffffff","centerY":0,"anchorY":0.5,"anchorX":0.5}},{"type":"Box","props":{"top":20,"runtime":"ColorFilterItem","right":240,"left":255,"bottom":20},"child":[{"type":"ProgressBar","props":{"var":"prgCharm","value":0.91,"top":0,"skin":"images/progress/progress_2.png","right":0,"name":"prgCharm","left":0,"bottom":0}}]},{"type":"Label","props":{"width":220,"var":"labCharmJudge","text":"Judge","right":0,"name":"labCharmJudge","fontSize":50,"font":"方正像素12","color":"#5cc8dc","centerY":0,"anchorY":0.5,"anchorX":0.5,"align":"center"}}]},{"type":"Box","props":{"y":1,"right":0,"name":"boxIntelligence","left":0,"height":90},"child":[{"type":"Box","props":{"width":120,"left":0,"height":120,"centerY":0},"child":[{"type":"Image","props":{"skin":"images/icons/icon_int@3x.png","scaleY":1.1,"scaleX":1.1,"centerY":0,"centerX":0}}]},{"type":"Label","props":{"x":170,"text":"UI_Property_Intelligence","fontSize":50,"font":"方正像素12","color":"#ffffff","centerY":0,"anchorY":0.5,"anchorX":0.5}},{"type":"Box","props":{"top":20,"runtime":"ColorFilterItem","right":240,"left":255,"bottom":20},"child":[{"type":"ProgressBar","props":{"var":"prgIntelligence","value":0.57,"top":0,"skin":"images/progress/progress_2.png","right":0,"name":"prgIntelligence","left":0,"bottom":0}}]},{"type":"Label","props":{"width":220,"var":"labIntelligenceJudge","text":"Judge","right":0,"name":"labIntelligenceJudge","fontSize":50,"font":"方正像素12","color":"#5cc8dc","centerY":0,"anchorY":0.5,"anchorX":0.5,"align":"center"}}]},{"type":"Box","props":{"y":2,"right":0,"name":"boxStrength","left":0,"height":90},"child":[{"type":"Box","props":{"width":120,"left":0,"height":120,"centerY":0},"child":[{"type":"Image","props":{"skin":"images/icons/icon_str@3x.png","scaleY":1.1,"scaleX":1.1,"centerY":0,"centerX":0}}]},{"type":"Label","props":{"x":170,"text":"UI_Property_Strength","fontSize":50,"font":"方正像素12","color":"#ffffff","centerY":0,"anchorY":0.5,"anchorX":0.5}},{"type":"Box","props":{"top":20,"runtime":"ColorFilterItem","right":240,"left":255,"bottom":20},"child":[{"type":"ProgressBar","props":{"var":"prgStrength","value":0.235,"top":0,"skin":"images/progress/progress_2.png","right":0,"name":"prgStrength","left":0,"bottom":0}}]},{"type":"Label","props":{"width":220,"var":"labStrengthJudge","text":"Judge","right":0,"name":"labStrengthJudge","fontSize":50,"font":"方正像素12","color":"#5cc8dc","centerY":0,"anchorY":0.5,"anchorX":0.5,"align":"center"}}]},{"type":"Box","props":{"y":3,"right":0,"name":"boxMoney","left":0,"height":90},"child":[{"type":"Box","props":{"width":120,"left":0,"height":120,"centerY":0},"child":[{"type":"Image","props":{"skin":"images/icons/icon_mny@3x.png","scaleY":1.1,"scaleX":1.1,"centerY":0,"centerX":0}}]},{"type":"Label","props":{"x":170,"text":"UI_Property_Money","fontSize":50,"font":"方正像素12","color":"#ffffff","centerY":0,"anchorY":0.5,"anchorX":0.5}},{"type":"Box","props":{"top":20,"runtime":"ColorFilterItem","right":240,"left":255,"bottom":20},"child":[{"type":"ProgressBar","props":{"var":"prgMoney","value":0.8,"top":0,"skin":"images/progress/progress_2.png","right":0,"name":"prgMoney","left":0,"bottom":0}}]},{"type":"Label","props":{"width":220,"var":"labMoneyJudge","text":"Judge","right":0,"name":"labMoneyJudge","fontSize":50,"font":"方正像素12","color":"#5cc8dc","centerY":0,"anchorY":0.5,"anchorX":0.5,"align":"center"}}]},{"type":"Box","props":{"y":4,"right":0,"name":"boxSpirit","left":0,"height":90},"child":[{"type":"Box","props":{"width":120,"left":0,"height":120,"centerY":0},"child":[{"type":"Image","props":{"skin":"images/icons/icon_spr@3x.png","scaleY":1.1,"scaleX":1.1,"centerY":0,"centerX":0}}]},{"type":"Label","props":{"x":170,"text":"UI_Property_Spirit","fontSize":50,"font":"方正像素12","color":"#ffffff","centerY":0,"anchorY":0.5,"anchorX":0.5}},{"type":"Box","props":{"top":20,"runtime":"ColorFilterItem","right":240,"left":255,"bottom":20},"child":[{"type":"ProgressBar","props":{"var":"prgSpirit","value":0.37,"top":0,"skin":"images/progress/progress_2.png","right":0,"name":"prgSpirit","left":0,"bottom":0}}]},{"type":"Label","props":{"width":220,"var":"labSpiritJudge","text":"Judge","right":0,"name":"labSpiritJudge","fontSize":50,"font":"方正像素12","color":"#5cc8dc","centerY":0,"anchorY":0.5,"anchorX":0.5,"align":"center"}}]}]}]},{"type":"Box","props":{"right":40,"name":"selectedTalents","left":40,"height":700,"bottom":410},"child":[{"type":"Label","props":{"top":20,"text":"UI_Talent_Extend","left":20,"fontSize":50,"font":"方正像素12","color":"#ffffff"}},{"type":"List","props":{"var":"listSelectedTalents","vScrollBarSkin":" ","top":110,"spaceY":30,"right":10,"repeatY":3,"name":"listSelectedTalents","left":10,"bottom":10},"child":[{"type":"Box","props":{"y":20,"width":1010,"renderType":"render","height":160,"centerX":0},"child":[{"type":"Image","props":{"top":0,"skin":"images/border/up@3x.png","right":0,"left":0,"bottom":0,"sizeGrid":"4,4,4,4"}},{"type":"Box","props":{"width":15,"name":"grade1","height":160},"child":[{"type":"Rect","props":{"width":15,"lineWidth":1,"height":160,"fillColor":"#55fffe"}}]},{"type":"Box","props":{"width":15,"name":"grade2","height":160},"child":[{"type":"Rect","props":{"width":15,"lineWidth":1,"height":160,"fillColor":"#b17cff"}}]},{"type":"Box","props":{"width":15,"name":"grade3","height":160},"child":[{"type":"Rect","props":{"width":15,"lineWidth":1,"height":160,"fillColor":"#ffce45"}}]},{"type":"Label","props":{"text":"Title","name":"labTitle","left":52,"fontSize":55,"font":"方正像素12","color":"#ffffff","centerY":0}},{"type":"Label","props":{"y":10,"text":"descriptipn","right":33,"name":"labDescription","fontSize":44,"font":"方正像素12","color":"#76979d","centerY":0}}]}]}]},{"type":"Box","props":{"x":10,"width":1000,"name":"buttonGroup","height":200,"centerX":0,"bottom":70},"child":[{"type":"Button","props":{"y":100,"x":250,"width":500,"skin":"images/button/button_main@3x.png","name":"btnRandomAllocate","label":"UI_Remake_Again","centerY":0,"centerX":0,"stateNum":1,"anchorX":0.5,"anchorY":0.5,"sizeGrid":"45,200,45,200","labelFont":"方正像素12","labelColors":"#00fffc,#00fffc,#00fffc","labelSize":50,"runtime":"ScaleButton"},"child":[{"type":"Box","props":{},"child":[{"type":"Animation","props":{"y":96,"x":250,"width":0,"source":"view/CyberTheme/animation/circleFlash.ani","scaleX":4,"height":0,"blendMode":"lighter","autoPlay":true}},{"type":"Box","props":{"renderType":"mask"},"child":[{"type":"Rect","props":{"y":37,"x":25,"width":7,"lineWidth":1,"height":116,"fillColor":"#ff0000"}},{"type":"Rect","props":{"y":37,"x":470,"width":7,"lineWidth":1,"height":116,"fillColor":"#ff0000"}},{"type":"Rect","props":{"y":21,"x":44,"width":414,"lineWidth":1,"height":6,"fillColor":"#ff0000"}},{"type":"Rect","props":{"y":150,"x":171,"width":160,"lineWidth":1,"height":6,"fillColor":"#ff0000"}},{"type":"Rect","props":{"y":163,"x":44,"width":121,"lineWidth":1,"height":6,"fillColor":"#ff0000"}},{"type":"Rect","props":{"y":163,"x":337,"width":121,"lineWidth":1,"height":6,"fillColor":"#ff0000"}},{"type":"Rect","props":{"y":148,"x":29,"width":25,"rotation":40,"lineWidth":1,"height":6,"fillColor":"#ff0000"}},{"type":"Rect","props":{"y":150,"x":331,"width":19,"rotation":55,"lineWidth":1,"height":6,"fillColor":"#ff0000"}},{"type":"Rect","props":{"y":166,"x":160,"width":19,"rotation":-55,"lineWidth":1,"height":6,"fillColor":"#ff0000"}},{"type":"Rect","props":{"y":21,"x":458,"width":25,"rotation":40,"lineWidth":1,"height":6,"fillColor":"#ff0000"}},{"type":"Rect","props":{"y":26,"x":48,"width":25,"rotation":140,"lineWidth":1,"height":6,"fillColor":"#ff0000"}},{"type":"Rect","props":{"y":153,"x":477,"width":25,"rotation":140,"lineWidth":1,"height":6,"fillColor":"#ff0000"}}]}]},{"type":"Box","props":{},"child":[{"type":"Box","props":{"renderType":"mask"},"child":[{"type":"Poly","props":{"y":41,"x":35,"points":"0,0,8,-6,8,113,0,107","lineWidth":1,"lineColor":"#ff0000","fillColor":"#00ffff"}},{"type":"Poly","props":{"y":41,"x":464,"points":"0,0,-8,-6,-8,113,0,107","lineWidth":1,"lineColor":"#ff0000","fillColor":"#00ffff"}},{"type":"Poly","props":{"y":160,"x":177,"points":"0,0,147,0,153,10,-6,10","lineWidth":1,"lineColor":"#ff0000","fillColor":"#00ffff"}}]},{"type":"Animation","props":{"y":172,"x":520,"source":"view/CyberTheme/animation/bottomBreath.ani","scaleX":6,"blendMode":"lighter","autoPlay":true}}]}]}]},{"type":"VBox","props":{"visible":false,"name":"colorBox"},"child":[{"type":"Label","props":{"y":0,"var":"colorGrade0","text":"#ccccccff","fontSize":40,"font":"方正像素12","color":"#cccccc"}},{"type":"Label","props":{"y":10,"var":"colorGrade1","text":"#55fffeff","fontSize":40,"font":"方正像素12","color":"#55fffe"}},{"type":"Label","props":{"y":20,"var":"colorGrade2","text":"#b17cffff","fontSize":40,"font":"方正像素12","color":"#b17cff"}},{"type":"Label","props":{"y":30,"var":"colorGrade3","text":"#ffce45ff","fontSize":40,"font":"方正像素12","color":"#ffce45"}}]}]}; + CyberSummaryUI.uiView={"type":"View","props":{"width":1125,"runtime":"ViewBase","height":2436},"child":[{"type":"Sprite","props":{},"child":[{"type":"Rect","props":{"width":1125,"lineWidth":1,"height":2436,"fillColor":"#04131f"}}]},{"type":"Box","props":{"top":40,"right":0,"name":"title","left":0},"child":[{"type":"Image","props":{"skin":"images/accessories/titlebar@3x.png"}},{"type":"HBox","props":{"y":160,"x":563,"space":30,"height":70,"centerX":0,"anchorY":0.5,"anchorX":0.5},"child":[{"type":"Image","props":{"y":10,"x":1,"skin":"images/accessories/title_left@3x.png","name":"left"}},{"type":"Label","props":{"y":0,"x":2,"text":"UI_Title_Summary","fontSize":60,"font":"方正像素12","color":"#ffffff"}},{"type":"Image","props":{"y":10,"x":3,"skin":"images/accessories/title_right@3x.png","name":"right"}}]}]},{"type":"Box","props":{"y":10,"x":10,"top":340,"right":40,"name":"propertyAllocate","left":40,"height":870},"child":[{"type":"Image","props":{"top":-15,"skin":"images/border/border_2@3x.png","right":-15,"left":-15,"bottom":-15,"sizeGrid":"75,155,75,155"}},{"type":"Box","props":{"top":60,"right":50,"left":50,"height":220},"child":[{"type":"Box","props":{"width":220,"left":20,"height":220,"centerY":0}},{"type":"Box","props":{"top":0,"right":0,"left":250,"height":100},"child":[{"type":"Box","props":{"width":320,"top":5,"left":5,"bottom":5},"child":[{"type":"Image","props":{"top":0,"skin":"images/border/property@3x.png","right":0,"left":0,"bottom":0,"sizeGrid":"15,15,15,15"}},{"type":"HBox","props":{"left":20,"centerY":0},"child":[{"type":"Label","props":{"x":0,"text":"UI_Final_Age","fontSize":50,"font":"方正像素12","color":"#ffffff","centerY":0,"align":"center"}},{"type":"Label","props":{"x":1,"text":"UI_Colon","fontSize":50,"font":"方正像素12","color":"#ffffff","centerY":0,"align":"center"}}]},{"type":"Label","props":{"var":"labAge","text":"0","right":40,"name":"labAge","fontSize":50,"font":"方正像素12","color":"#5cc8dc","centerY":0,"align":"center"}}]},{"type":"Label","props":{"width":220,"var":"labAgeJudge","text":"Judge","right":0,"name":"labAgeJudge","fontSize":50,"font":"方正像素12","color":"#5cc8dc","centerY":0,"anchorY":0.5,"anchorX":0.5,"align":"center"}}]},{"type":"Box","props":{"right":0,"left":250,"height":100,"bottom":0},"child":[{"type":"Box","props":{"width":320,"top":5,"left":5,"bottom":5},"child":[{"type":"Image","props":{"top":0,"skin":"images/border/property@3x.png","right":0,"left":0,"bottom":0,"sizeGrid":"15,15,15,15"}},{"type":"HBox","props":{"left":20,"centerY":0},"child":[{"type":"Label","props":{"x":0,"text":"UI_Total_Judge","fontSize":50,"font":"方正像素12","color":"#ffffff","centerY":0,"align":"center"}},{"type":"Label","props":{"x":1,"text":"UI_Colon","fontSize":50,"font":"方正像素12","color":"#ffffff","centerY":0,"align":"center"}}]},{"type":"Label","props":{"var":"labTotal","text":"0","right":40,"name":"labTotal","fontSize":50,"font":"方正像素12","color":"#5cc8dc","centerY":0,"align":"center"}}]},{"type":"Label","props":{"width":220,"var":"labTotalJudge","text":"Judge","right":0,"name":"labTotalJudge","fontSize":50,"font":"方正像素12","color":"#5cc8dc","centerY":0,"anchorY":0.5,"anchorX":0.5,"align":"center"}}]}]},{"type":"VBox","props":{"top":340,"space":5,"right":50,"left":50},"child":[{"type":"Box","props":{"y":0,"right":0,"name":"boxCharm","left":0,"height":90},"child":[{"type":"Box","props":{"width":120,"left":0,"height":120,"centerY":0},"child":[{"type":"Image","props":{"skin":"images/icons/icon_chr@3x.png","scaleY":1.1,"scaleX":1.1,"centerY":0,"centerX":0}}]},{"type":"Label","props":{"x":170,"text":"UI_Property_Charm","fontSize":50,"font":"方正像素12","color":"#ffffff","centerY":0,"anchorY":0.5,"anchorX":0.5}},{"type":"Box","props":{"var":"boxCharmGrade","top":20,"runtime":"ColorFilterItem","right":240,"name":"boxCharmGrade","left":255,"bottom":20},"child":[{"type":"ProgressBar","props":{"var":"prgCharm","value":0.91,"top":0,"skin":"images/progress/progress_2.png","right":0,"name":"prgCharm","left":0,"bottom":0}},{"type":"Label","props":{"var":"labCharm","text":"100","strokeColor":"#323232","stroke":8,"name":"labCharm","fontSize":50,"font":"方正像素12","color":"#ffffff","centerY":0,"centerX":0,"anchorY":0.5,"anchorX":0.5,"align":"center"}}]},{"type":"Label","props":{"width":220,"var":"labCharmJudge","text":"Judge","right":0,"name":"labCharmJudge","fontSize":50,"font":"方正像素12","color":"#5cc8dc","centerY":0,"anchorY":0.5,"anchorX":0.5,"align":"center"}}]},{"type":"Box","props":{"y":1,"right":0,"name":"boxIntelligence","left":0,"height":90},"child":[{"type":"Box","props":{"width":120,"left":0,"height":120,"centerY":0},"child":[{"type":"Image","props":{"skin":"images/icons/icon_int@3x.png","scaleY":1.1,"scaleX":1.1,"centerY":0,"centerX":0}}]},{"type":"Label","props":{"x":170,"text":"UI_Property_Intelligence","fontSize":50,"font":"方正像素12","color":"#ffffff","centerY":0,"anchorY":0.5,"anchorX":0.5}},{"type":"Box","props":{"var":"boxIntelligenceGrade","top":20,"runtime":"ColorFilterItem","right":240,"name":"boxIntelligenceGrade","left":255,"bottom":20},"child":[{"type":"ProgressBar","props":{"var":"prgIntelligence","value":0.57,"top":0,"skin":"images/progress/progress_2.png","right":0,"name":"prgIntelligence","left":0,"bottom":0}},{"type":"Label","props":{"var":"labIntelligence","text":"100","strokeColor":"#323232","stroke":8,"name":"labIntelligence","fontSize":50,"font":"方正像素12","color":"#ffffff","centerY":0,"centerX":0,"anchorY":0.5,"anchorX":0.5,"align":"center"}}]},{"type":"Label","props":{"width":220,"var":"labIntelligenceJudge","text":"Judge","right":0,"name":"labIntelligenceJudge","fontSize":50,"font":"方正像素12","color":"#5cc8dc","centerY":0,"anchorY":0.5,"anchorX":0.5,"align":"center"}}]},{"type":"Box","props":{"y":2,"right":0,"name":"boxStrength","left":0,"height":90},"child":[{"type":"Box","props":{"width":120,"left":0,"height":120,"centerY":0},"child":[{"type":"Image","props":{"skin":"images/icons/icon_str@3x.png","scaleY":1.1,"scaleX":1.1,"centerY":0,"centerX":0}}]},{"type":"Label","props":{"x":170,"text":"UI_Property_Strength","fontSize":50,"font":"方正像素12","color":"#ffffff","centerY":0,"anchorY":0.5,"anchorX":0.5}},{"type":"Box","props":{"var":"boxStrengthGrade","top":20,"runtime":"ColorFilterItem","right":240,"name":"boxStrengthGrade","left":255,"bottom":20},"child":[{"type":"ProgressBar","props":{"var":"prgStrength","value":0.235,"top":0,"skin":"images/progress/progress_2.png","right":0,"name":"prgStrength","left":0,"bottom":0}},{"type":"Label","props":{"var":"labStrength","text":"100","strokeColor":"#323232","stroke":8,"name":"labStrength","fontSize":50,"font":"方正像素12","color":"#ffffff","centerY":0,"centerX":0,"anchorY":0.5,"anchorX":0.5,"align":"center"}}]},{"type":"Label","props":{"width":220,"var":"labStrengthJudge","text":"Judge","right":0,"name":"labStrengthJudge","fontSize":50,"font":"方正像素12","color":"#5cc8dc","centerY":0,"anchorY":0.5,"anchorX":0.5,"align":"center"}}]},{"type":"Box","props":{"y":3,"right":0,"name":"boxMoney","left":0,"height":90},"child":[{"type":"Box","props":{"width":120,"left":0,"height":120,"centerY":0},"child":[{"type":"Image","props":{"skin":"images/icons/icon_mny@3x.png","scaleY":1.1,"scaleX":1.1,"centerY":0,"centerX":0}}]},{"type":"Label","props":{"x":170,"text":"UI_Property_Money","fontSize":50,"font":"方正像素12","color":"#ffffff","centerY":0,"anchorY":0.5,"anchorX":0.5}},{"type":"Box","props":{"var":"boxMoneyGrade","top":20,"runtime":"ColorFilterItem","right":240,"name":"boxMoneyGrade","left":255,"bottom":20},"child":[{"type":"ProgressBar","props":{"var":"prgMoney","value":0.8,"top":0,"skin":"images/progress/progress_2.png","right":0,"name":"prgMoney","left":0,"bottom":0}},{"type":"Label","props":{"var":"labMoney","text":"100","strokeColor":"#323232","stroke":8,"name":"labMoney","fontSize":50,"font":"方正像素12","color":"#ffffff","centerY":0,"centerX":0,"anchorY":0.5,"anchorX":0.5,"align":"center"}}]},{"type":"Label","props":{"width":220,"var":"labMoneyJudge","text":"Judge","right":0,"name":"labMoneyJudge","fontSize":50,"font":"方正像素12","color":"#5cc8dc","centerY":0,"anchorY":0.5,"anchorX":0.5,"align":"center"}}]},{"type":"Box","props":{"y":4,"right":0,"name":"boxSpirit","left":0,"height":90},"child":[{"type":"Box","props":{"width":120,"left":0,"height":120,"centerY":0},"child":[{"type":"Image","props":{"skin":"images/icons/icon_spr@3x.png","scaleY":1.1,"scaleX":1.1,"centerY":0,"centerX":0}}]},{"type":"Label","props":{"x":170,"text":"UI_Property_Spirit","fontSize":50,"font":"方正像素12","color":"#ffffff","centerY":0,"anchorY":0.5,"anchorX":0.5}},{"type":"Box","props":{"var":"boxSpiritGrade","top":20,"runtime":"ColorFilterItem","right":240,"name":"boxSpiritGrade","left":255,"bottom":20},"child":[{"type":"ProgressBar","props":{"var":"prgSpirit","value":0.37,"top":0,"skin":"images/progress/progress_2.png","right":0,"name":"prgSpirit","left":0,"bottom":0}},{"type":"Label","props":{"var":"labSpirit","text":"100","strokeColor":"#323232","stroke":8,"name":"labSpirit","fontSize":50,"font":"方正像素12","color":"#ffffff","centerY":0,"centerX":0,"anchorY":0.5,"anchorX":0.5,"align":"center"}}]},{"type":"Label","props":{"width":220,"var":"labSpiritJudge","text":"Judge","right":0,"name":"labSpiritJudge","fontSize":50,"font":"方正像素12","color":"#5cc8dc","centerY":0,"anchorY":0.5,"anchorX":0.5,"align":"center"}}]}]}]},{"type":"Box","props":{"right":40,"name":"selectedTalents","left":40,"height":700,"bottom":410},"child":[{"type":"Label","props":{"top":20,"text":"UI_Talent_Extend","left":20,"fontSize":50,"font":"方正像素12","color":"#ffffff"}},{"type":"List","props":{"var":"listSelectedTalents","vScrollBarSkin":" ","top":110,"spaceY":30,"right":10,"repeatY":3,"name":"listSelectedTalents","left":10,"bottom":10},"child":[{"type":"Box","props":{"y":20,"width":1010,"renderType":"render","height":160,"centerX":0},"child":[{"type":"Image","props":{"top":0,"skin":"images/border/up@3x.png","right":0,"left":0,"bottom":0,"sizeGrid":"4,4,4,4"}},{"type":"Box","props":{"width":15,"name":"grade1","height":160},"child":[{"type":"Rect","props":{"width":15,"lineWidth":1,"height":160,"fillColor":"#55fffe"}}]},{"type":"Box","props":{"width":15,"name":"grade2","height":160},"child":[{"type":"Rect","props":{"width":15,"lineWidth":1,"height":160,"fillColor":"#b17cff"}}]},{"type":"Box","props":{"width":15,"name":"grade3","height":160},"child":[{"type":"Rect","props":{"width":15,"lineWidth":1,"height":160,"fillColor":"#ffce45"}}]},{"type":"Label","props":{"text":"Title","name":"labTitle","left":52,"fontSize":55,"font":"方正像素12","color":"#ffffff","centerY":0}},{"type":"Label","props":{"y":10,"text":"descriptipn","right":33,"name":"labDescription","fontSize":44,"font":"方正像素12","color":"#76979d","centerY":0}}]}]}]},{"type":"Box","props":{"x":10,"width":1000,"name":"buttonGroup","height":200,"centerX":0,"bottom":70},"child":[{"type":"Button","props":{"y":100,"x":250,"width":500,"var":"btnAgain","skin":"images/button/button_main@3x.png","name":"btnAgain","label":"UI_Remake_Again","centerY":0,"centerX":0,"stateNum":1,"anchorX":0.5,"anchorY":0.5,"sizeGrid":"45,200,45,200","labelFont":"方正像素12","labelColors":"#00fffc,#00fffc,#00fffc","labelSize":50,"runtime":"ScaleButton"},"child":[{"type":"Box","props":{},"child":[{"type":"Animation","props":{"y":96,"x":250,"width":0,"source":"view/CyberTheme/animation/circleFlash.ani","scaleX":4,"height":0,"blendMode":"lighter","autoPlay":true}},{"type":"Box","props":{"renderType":"mask"},"child":[{"type":"Rect","props":{"y":37,"x":25,"width":7,"lineWidth":1,"height":116,"fillColor":"#ff0000"}},{"type":"Rect","props":{"y":37,"x":470,"width":7,"lineWidth":1,"height":116,"fillColor":"#ff0000"}},{"type":"Rect","props":{"y":21,"x":44,"width":414,"lineWidth":1,"height":6,"fillColor":"#ff0000"}},{"type":"Rect","props":{"y":150,"x":171,"width":160,"lineWidth":1,"height":6,"fillColor":"#ff0000"}},{"type":"Rect","props":{"y":163,"x":44,"width":121,"lineWidth":1,"height":6,"fillColor":"#ff0000"}},{"type":"Rect","props":{"y":163,"x":337,"width":121,"lineWidth":1,"height":6,"fillColor":"#ff0000"}},{"type":"Rect","props":{"y":148,"x":29,"width":25,"rotation":40,"lineWidth":1,"height":6,"fillColor":"#ff0000"}},{"type":"Rect","props":{"y":150,"x":331,"width":19,"rotation":55,"lineWidth":1,"height":6,"fillColor":"#ff0000"}},{"type":"Rect","props":{"y":166,"x":160,"width":19,"rotation":-55,"lineWidth":1,"height":6,"fillColor":"#ff0000"}},{"type":"Rect","props":{"y":21,"x":458,"width":25,"rotation":40,"lineWidth":1,"height":6,"fillColor":"#ff0000"}},{"type":"Rect","props":{"y":26,"x":48,"width":25,"rotation":140,"lineWidth":1,"height":6,"fillColor":"#ff0000"}},{"type":"Rect","props":{"y":153,"x":477,"width":25,"rotation":140,"lineWidth":1,"height":6,"fillColor":"#ff0000"}}]}]},{"type":"Box","props":{},"child":[{"type":"Box","props":{"renderType":"mask"},"child":[{"type":"Poly","props":{"y":41,"x":35,"points":"0,0,8,-6,8,113,0,107","lineWidth":1,"lineColor":"#ff0000","fillColor":"#00ffff"}},{"type":"Poly","props":{"y":41,"x":464,"points":"0,0,-8,-6,-8,113,0,107","lineWidth":1,"lineColor":"#ff0000","fillColor":"#00ffff"}},{"type":"Poly","props":{"y":160,"x":177,"points":"0,0,147,0,153,10,-6,10","lineWidth":1,"lineColor":"#ff0000","fillColor":"#00ffff"}}]},{"type":"Animation","props":{"y":172,"x":520,"source":"view/CyberTheme/animation/bottomBreath.ani","scaleX":6,"blendMode":"lighter","autoPlay":true}}]}]}]},{"type":"VBox","props":{"visible":false,"name":"colorBox"},"child":[{"type":"Label","props":{"y":0,"var":"colorGrade0","text":"#ccccccff","fontSize":40,"font":"方正像素12","color":"#cccccc"}},{"type":"Label","props":{"y":10,"var":"colorGrade1","text":"#55fffeff","fontSize":40,"font":"方正像素12","color":"#55fffe"}},{"type":"Label","props":{"y":20,"var":"colorGrade2","text":"#b17cffff","fontSize":40,"font":"方正像素12","color":"#b17cff"}},{"type":"Label","props":{"y":30,"var":"colorGrade3","text":"#ffce45ff","fontSize":40,"font":"方正像素12","color":"#ffce45"}}]}]}; return CyberSummaryUI; })(View); var CyberTalentUI=(function(_super){ diff --git a/src/ui/themes/cyber/cyberAchievement.js b/src/ui/themes/cyber/cyberAchievement.js index 19b236a..4628a2e 100644 --- a/src/ui/themes/cyber/cyberAchievement.js +++ b/src/ui/themes/cyber/cyberAchievement.js @@ -1,5 +1,10 @@ export default class cyberAchievement extends CyberAchievementUI { constructor() { super(); + this.btnBack.on(Laya.Event.CLICK, this, () => UIManager.getInstance().switchView(UIManager.getInstance().themes.MAIN)); + } + + init() { + const status = core.status; } } \ No newline at end of file diff --git a/src/ui/themes/cyber/cyberMain.js b/src/ui/themes/cyber/cyberMain.js index acb2972..640ccaf 100644 --- a/src/ui/themes/cyber/cyberMain.js +++ b/src/ui/themes/cyber/cyberMain.js @@ -5,4 +5,9 @@ export default class cyberMain extends CyberMainUI { this.btnAchievement.on(Laya.Event.CLICK, this, ()=>UIManager.getInstance().switchView(UIManager.getInstance().themes.ACHIEVEMENT)); this.btnThanks.on(Laya.Event.CLICK, this, ()=>UIManager.getInstance().switchView(UIManager.getInstance().themes.THANKS)); } + + init() { + this.btnAchievement.visible = + this.btnThanks.visible = !!core.times; + } } \ No newline at end of file diff --git a/src/ui/themes/cyber/cyberSummary.js b/src/ui/themes/cyber/cyberSummary.js index a01e529..118bfa4 100644 --- a/src/ui/themes/cyber/cyberSummary.js +++ b/src/ui/themes/cyber/cyberSummary.js @@ -2,9 +2,88 @@ export default class cyberSummary extends CyberSummaryUI { constructor() { super(); this.listSelectedTalents.renderHandler = Laya.Handler.create(this, this.renderTalent, null, false); + this.btnAgain.on(Laya.Event.CLICK, this, this.onAgain); + } + + get gradeFilters() { + return [ + this.colorGrade0.text, + this.colorGrade1.text, + this.colorGrade2.text, + this.colorGrade3.text, + ]; + } + + get gradeColors() { + return [ + this.colorGrade0.color, + this.colorGrade1.color, + this.colorGrade2.color, + this.colorGrade3.color, + ]; + } + + onAgain() { + UIManager.getInstance().switchView(UIManager.getInstance().themes.MAIN); + core.times ++; } init({talents}) { + const {summary, lastExtendTalent} = core; + const gradeFilters = this.gradeFilters; + const gradeColors = this.gradeColors; + + console.debug(summary, lastExtendTalent); + const age = summary[core.PropertyTypes.HAGE]; + this.labAge.text = ''+age.value; + this.labAgeJudge.text = age.judge; + this.labAgeJudge.color = gradeColors[age.grade]; + + const sum = summary[core.PropertyTypes.SUM]; + this.labTotal.text = ''+sum.value; + this.labTotalJudge.text = sum.judge; + this.labTotalJudge.color = gradeColors[sum.grade]; + + const chr = summary[core.PropertyTypes.HCHR]; + this.labCharm.text = ''+chr.value; + this.prgCharm.value = chr.progress; + this.labCharmJudge.text = chr.judge; + this.labCharmJudge.color = gradeColors[chr.grade]; + this.boxCharmGrade.colorFilter = gradeFilters[chr.grade]; + + const int = summary[core.PropertyTypes.HINT]; + this.labIntelligence.text = ''+int.value; + this.prgIntelligence.value = int.progress; + this.labIntelligenceJudge.text = int.judge; + this.labIntelligenceJudge.color = gradeColors[int.grade]; + this.boxIntelligenceGrade.colorFilter = gradeFilters[int.grade]; + + const str = summary[core.PropertyTypes.HSTR]; + this.labStrength.text = ''+str.value; + this.prgStrength.value = str.progress; + this.labStrengthJudge.text = str.judge; + this.labStrengthJudge.color = gradeColors[str.grade]; + this.boxStrengthGrade.colorFilter = gradeFilters[str.grade]; + + const mny = summary[core.PropertyTypes.HMNY]; + this.labMoney.text = ''+mny.value; + this.prgMoney.value = mny.progress; + this.labMoneyJudge.text = mny.judge; + this.labMoneyJudge.color = gradeColors[mny.grade]; + this.boxMoneyGrade.colorFilter = gradeFilters[mny.grade]; + + const spr = summary[core.PropertyTypes.HSPR]; + this.labSpirit.text = ''+spr.value; + this.prgSpirit.value = spr.progress; + this.labSpiritJudge.text = spr.judge; + this.labSpiritJudge.color = gradeColors[spr.grade]; + this.boxSpiritGrade.colorFilter = gradeFilters[spr.grade]; + + talents.sort(({id:a, grade:ag}, {id:b, grade:bg},)=>{ + if(a == lastExtendTalent) return -1; + if(b == lastExtendTalent) return 1; + return bg - ag; + }); this.listSelectedTalents.array = talents; } diff --git a/src/ui/themes/cyber/cyberTrajectory.js b/src/ui/themes/cyber/cyberTrajectory.js index eefaf56..e790956 100644 --- a/src/ui/themes/cyber/cyberTrajectory.js +++ b/src/ui/themes/cyber/cyberTrajectory.js @@ -67,6 +67,7 @@ export default class CyberTrajectory extends CyberTrajectoryUI { #talents; init({propertyAllocate, talents}) { + this.btnSummary.visible = false; this.#trajectoryItems = []; this.#isEnd = false; this.#talents = talents; @@ -100,7 +101,7 @@ export default class CyberTrajectory extends CyberTrajectoryUI { this.#isEnd = isEnd; if(isEnd) { - console.debug('end'); + this.btnSummary.visible = true; } const item = this.#createTrajectoryItem();