mirror of
https://github.com/VickScarlet/lifeRestart.git
synced 2026-03-25 16:48:23 +08:00
Compare commits
2 Commits
v1.1.0-bet
...
a59bce865f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a59bce865f | ||
|
|
1003a78a2a |
@@ -2924,7 +2924,7 @@
|
|||||||
"id": 10346,
|
"id": 10346,
|
||||||
"event": "寿元终。",
|
"event": "寿元终。",
|
||||||
"include": "TLT?[1048]",
|
"include": "TLT?[1048]",
|
||||||
"exclude": "EVT?[10333]",
|
"exclude": "EVT?[10333,40001]",
|
||||||
"branch": [
|
"branch": [
|
||||||
"TLT?[1048]:10000"
|
"TLT?[1048]:10000"
|
||||||
]
|
]
|
||||||
@@ -2933,7 +2933,7 @@
|
|||||||
"id": 10347,
|
"id": 10347,
|
||||||
"event": "寿元终。",
|
"event": "寿元终。",
|
||||||
"include": "TLT?[1048]",
|
"include": "TLT?[1048]",
|
||||||
"exclude": "EVT?[10345,10361]",
|
"exclude": "EVT?[10345,10361,40001]",
|
||||||
"branch": [
|
"branch": [
|
||||||
"TLT?[1048]:10000"
|
"TLT?[1048]:10000"
|
||||||
]
|
]
|
||||||
|
|||||||
BIN
data/events.xlsx
BIN
data/events.xlsx
Binary file not shown.
Binary file not shown.
@@ -1359,5 +1359,71 @@
|
|||||||
{
|
{
|
||||||
"group": 2,
|
"group": 2,
|
||||||
"name": "圆果团子"
|
"name": "圆果团子"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": 2,
|
||||||
|
"name": "神之领域"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": 2,
|
||||||
|
"name": "西域刀客"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": 2,
|
||||||
|
"name": "书签"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": 2,
|
||||||
|
"name": "轩尘"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": 1,
|
||||||
|
"name": "正牌孟岩様",
|
||||||
|
"comment": "如果真能重来的话……"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": 2,
|
||||||
|
"name": "王杰文"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": 2,
|
||||||
|
"name": "Kevin Lu"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": 2,
|
||||||
|
"name": "赵发红"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": 2,
|
||||||
|
"name": "黑衣人"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": 2,
|
||||||
|
"name": "你的粉丝"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": 2,
|
||||||
|
"name": "有林啊.",
|
||||||
|
"color": "red"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": 2,
|
||||||
|
"name": "渡鸦"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": 2,
|
||||||
|
"name": "犽犽超级喜欢赫尔"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": 2,
|
||||||
|
"name": "绕圈跑"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": 2,
|
||||||
|
"name": "董研策"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": 2,
|
||||||
|
"name": "口爆青年"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
File diff suppressed because one or more lines are too long
54
src/app.js
54
src/app.js
@@ -16,6 +16,7 @@ class App{
|
|||||||
#selectedExtendTalent = null;
|
#selectedExtendTalent = null;
|
||||||
#hintTimeout;
|
#hintTimeout;
|
||||||
#specialthanks;
|
#specialthanks;
|
||||||
|
#autoTrajectory;
|
||||||
|
|
||||||
async initial() {
|
async initial() {
|
||||||
this.initPages();
|
this.initPages();
|
||||||
@@ -347,6 +348,8 @@ class App{
|
|||||||
<ul id="lifeProperty" class="lifeProperty"></ul>
|
<ul id="lifeProperty" class="lifeProperty"></ul>
|
||||||
<ul id="lifeTrajectory" class="lifeTrajectory"></ul>
|
<ul id="lifeTrajectory" class="lifeTrajectory"></ul>
|
||||||
<div class="btn-area">
|
<div class="btn-area">
|
||||||
|
<button id="auto" class="mainbtn">自动播放</button>
|
||||||
|
<button id="auto2x" class="mainbtn">自动播放2x</button>
|
||||||
<button id="summary" class="mainbtn">人生总结</button>
|
<button id="summary" class="mainbtn">人生总结</button>
|
||||||
<button id="domToImage" class="mainbtn">人生回放</button>
|
<button id="domToImage" class="mainbtn">人生回放</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -380,6 +383,8 @@ class App{
|
|||||||
$(document).unbind("keydown");
|
$(document).unbind("keydown");
|
||||||
this.#isEnd = true;
|
this.#isEnd = true;
|
||||||
trajectoryPage.find('#summary').show();
|
trajectoryPage.find('#summary').show();
|
||||||
|
trajectoryPage.find('#auto').hide();
|
||||||
|
trajectoryPage.find('#auto2x').hide();
|
||||||
// trajectoryPage.find('#domToImage').show();
|
// trajectoryPage.find('#domToImage').show();
|
||||||
} else {
|
} else {
|
||||||
// 如未死亡,更新数值
|
// 如未死亡,更新数值
|
||||||
@@ -419,9 +424,40 @@ class App{
|
|||||||
trajectoryPage
|
trajectoryPage
|
||||||
.find('#summary')
|
.find('#summary')
|
||||||
.click(()=>{
|
.click(()=>{
|
||||||
|
clearInterval(this.#autoTrajectory);
|
||||||
|
this.#autoTrajectory = null;
|
||||||
this.switch('summary');
|
this.switch('summary');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const auto = tick=>{
|
||||||
|
if(this.#autoTrajectory) {
|
||||||
|
clearInterval(this.#autoTrajectory);
|
||||||
|
this.#autoTrajectory = null;
|
||||||
|
} else {
|
||||||
|
if(!this.isEnd)
|
||||||
|
trajectoryPage
|
||||||
|
.find('#lifeTrajectory')
|
||||||
|
.click();
|
||||||
|
this.#autoTrajectory = setInterval(()=>{
|
||||||
|
if(this.isEnd) {
|
||||||
|
clearInterval(this.#autoTrajectory);
|
||||||
|
this.#autoTrajectory = null;
|
||||||
|
} else {
|
||||||
|
trajectoryPage
|
||||||
|
.find('#lifeTrajectory')
|
||||||
|
.click();
|
||||||
|
}
|
||||||
|
}, tick);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
trajectoryPage
|
||||||
|
.find('#auto')
|
||||||
|
.click(()=>auto(1000));
|
||||||
|
trajectoryPage
|
||||||
|
.find('#auto2x')
|
||||||
|
.click(()=>auto(500));
|
||||||
|
|
||||||
// Summary
|
// Summary
|
||||||
const summaryPage = $(`
|
const summaryPage = $(`
|
||||||
<div id="main">
|
<div id="main">
|
||||||
@@ -543,7 +579,7 @@ class App{
|
|||||||
total.append(`
|
total.append(`
|
||||||
<li class="achvg${getGrade('times', times)}"><span class="achievementtitle">已重开${times}次</span>${formatRate('times', times)}</li>
|
<li class="achvg${getGrade('times', times)}"><span class="achievementtitle">已重开${times}次</span>${formatRate('times', times)}</li>
|
||||||
<li class="achvg${getGrade('achievement', achievement)}"><span class="achievementtitle">成就达成${achievement}个</span>${formatRate('achievement', achievement)}</li>
|
<li class="achvg${getGrade('achievement', achievement)}"><span class="achievementtitle">成就达成${achievement}个</span>${formatRate('achievement', achievement)}</li>
|
||||||
<li class="achvg${getGrade('eventRate', eventRate)}"><span class="achievementtitle">事件选择率</span>${Math.floor(eventRate * 100)}%</li>
|
<li class="achvg${getGrade('eventRate', eventRate)}"><span class="achievementtitle">事件收集率</span>${Math.floor(eventRate * 100)}%</li>
|
||||||
<li class="achvg${getGrade('talentRate', talentRate)}"><span class="achievementtitle">天赋收集率</span>${Math.floor(talentRate * 100)}%</li>
|
<li class="achvg${getGrade('talentRate', talentRate)}"><span class="achievementtitle">天赋收集率</span>${Math.floor(talentRate * 100)}%</li>
|
||||||
`);
|
`);
|
||||||
|
|
||||||
@@ -606,6 +642,8 @@ class App{
|
|||||||
this.#currentPage = 'trajectory';
|
this.#currentPage = 'trajectory';
|
||||||
trajectoryPage.find('#lifeTrajectory').empty();
|
trajectoryPage.find('#lifeTrajectory').empty();
|
||||||
trajectoryPage.find('#summary').hide();
|
trajectoryPage.find('#summary').hide();
|
||||||
|
trajectoryPage.find('#auto').show();
|
||||||
|
trajectoryPage.find('#auto2x').show();
|
||||||
this.#isEnd = false;
|
this.#isEnd = false;
|
||||||
},
|
},
|
||||||
born: ()=>{
|
born: ()=>{
|
||||||
@@ -620,7 +658,18 @@ class App{
|
|||||||
const talents = summaryPage.find('#talents');
|
const talents = summaryPage.find('#talents');
|
||||||
judge.empty();
|
judge.empty();
|
||||||
talents.empty();
|
talents.empty();
|
||||||
this.#talentSelected.forEach(talent=>{
|
const lastExtendTalent = this.#life.getLastExtendTalent();
|
||||||
|
Array
|
||||||
|
.from(this.#talentSelected)
|
||||||
|
.sort((
|
||||||
|
{id:a, grade:ag},
|
||||||
|
{id:b, grade:bg},
|
||||||
|
)=>{
|
||||||
|
if(a == lastExtendTalent) return -1;
|
||||||
|
if(b == lastExtendTalent) return 1;
|
||||||
|
return bg - ag;
|
||||||
|
})
|
||||||
|
.forEach((talent, i)=>{
|
||||||
const li = createTalent(talent);
|
const li = createTalent(talent);
|
||||||
talents.append(li);
|
talents.append(li);
|
||||||
li.click(()=>{
|
li.click(()=>{
|
||||||
@@ -635,6 +684,7 @@ class App{
|
|||||||
li.addClass('selected');
|
li.addClass('selected');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if(!i) li.click();
|
||||||
});
|
});
|
||||||
|
|
||||||
const summaryData = this.#life.getSummary();
|
const summaryData = this.#life.getSummary();
|
||||||
|
|||||||
Reference in New Issue
Block a user