diff --git a/src/app.js b/src/app.js
index 61e3090..eaaa248 100644
--- a/src/app.js
+++ b/src/app.js
@@ -267,6 +267,7 @@ class App{
// Trajectory
const trajectoryPage = $(`
@@ -297,6 +298,16 @@ class App{
$(document).unbind("keydown");
this.#isEnd = true;
trajectoryPage.find('#summary').show();
+ } else {
+ // 如未死亡,更新数值
+ // Update properties if not die yet
+ const property = this.#life.getLastRecord();
+ $("#lifeProperty").html(`
+ 颜值:${property.CHR}
+ 智力:${property.INT}
+ 体质:${property.STR}
+ 家境:${property.MNY}
+ 快乐:${property.STR} `);
}
});
diff --git a/src/life.js b/src/life.js
index 4ff1b5c..cfde44e 100644
--- a/src/life.js
+++ b/src/life.js
@@ -111,6 +111,10 @@ class Life {
return this.#property.getRecord();
}
+ getLastRecord() {
+ return this.#property.getLastRecord();
+ }
+
exclusive(talents, exclusive) {
return this.#talent.exclusive(talents, exclusive);
}
diff --git a/src/property.js b/src/property.js
index e446e6a..8fa2ffd 100644
--- a/src/property.js
+++ b/src/property.js
@@ -107,6 +107,10 @@ class Property {
return clone(this.#record);
}
+ getLastRecord() {
+ return clone(this.#record[this.#record.length - 1]);
+ }
+
change(prop, value) {
if(Array.isArray(value)) {
for(const v of value)
diff --git a/view/dark.css b/view/dark.css
index 595c551..7669353 100644
--- a/view/dark.css
+++ b/view/dark.css
@@ -157,6 +157,31 @@ body {
text-align: center;
}
+.lifeProperty{
+ position: fixed;
+ list-style-type: none;
+ left: 50%;
+ top: 2rem;
+ width: 30rem;
+ max-width: calc(100% - 2rem);
+ padding: 0;
+ overflow: auto;
+ transform: translateX(-50%);
+ display: flex;
+ color: white;
+}
+
+.lifeProperty > li {
+ width: 100%;
+ position: relative;
+ border: 1px #ccc solid;
+ display: inline-block;
+ margin: 0.1rem 2px;
+ font-size: 1rem;
+ text-align: center;
+ border-radius: 0.2rem;
+}
+
.selectlist > li {
position: relative;
border: 1px #EEEEEE solid;
diff --git a/view/light.css b/view/light.css
index f1e4d11..79f7109 100644
--- a/view/light.css
+++ b/view/light.css
@@ -153,6 +153,31 @@ body {
text-align: center;
}
+.lifeProperty{
+ position: fixed;
+ list-style-type: none;
+ left: 50%;
+ top: 2rem;
+ width: 30rem;
+ max-width: calc(100% - 2rem);
+ padding: 0;
+ overflow: auto;
+ transform: translateX(-50%);
+ display: flex;
+ color: white;
+}
+
+.lifeProperty > li {
+ width: 100%;
+ position: relative;
+ border: 1px #ccc solid;
+ display: inline-block;
+ margin: 0.1rem 2px;
+ font-size: 1rem;
+ text-align: center;
+ border-radius: 0.2rem;
+}
+
.selectlist > li {
position: relative;
border: 1px #ccc solid;