diff --git a/layout/default/layout.css b/layout/default/layout.css
index 919c23090..6149f1b2e 100644
--- a/layout/default/layout.css
+++ b/layout/default/layout.css
@@ -2688,6 +2688,12 @@ div:not(.handcards)>.card>.info>span,
background: rgba(63, 119, 173,1);
border: 1px solid rgba(63, 119, 173, 1);
}
+.hp[data-condition="hidden"]>div:not(.lost):not(.shield) {
+ background-image:url('../../theme/style/hp/image/hidden_hp.png') !important;
+ width: 12px;
+ height: 12px;
+ background-size: 100% 100%;
+}
.hp[data-condition="high"]>div:not(.lost):not(.shield) {
background: rgba(57, 123, 4,1);
border: 1px solid rgba(39, 79, 7, 1);
diff --git a/noname/library/element/player.js b/noname/library/element/player.js
index b72b3f7fe..bca4e52a7 100644
--- a/noname/library/element/player.js
+++ b/noname/library/element/player.js
@@ -2099,6 +2099,7 @@ export class Player extends HTMLDivElement {
}
//原有函数
init(character, character2, skill, update) {
+ let hidden = false;
if (typeof character == 'string' && !lib.character[character]) {
lib.character[character] = get.character(character);
}
@@ -2154,7 +2155,7 @@ export class Player extends HTMLDivElement {
skills = [];
this.name = 'unknown';
this.sex = 'male';
- this.storage.nohp = true;
+ hidden = true;
skills.add('g_hidden_ai');
}
if (character2 && lib.character[character2]) {
@@ -2208,17 +2209,19 @@ export class Player extends HTMLDivElement {
if (info2[4].includes('hiddenSkill') && !this.noclick) {
if (!this.hiddenSkills) this.hiddenSkills = [];
this.hiddenSkills.addArray(info2[3]);
- this.storage.nohp = true;
+ hidden = true;
skills.add('g_hidden_ai');
}
else skills = skills.concat(info2[3]);
}
- if (this.storage.nohp) {
+ if (this.storage.nohp || hidden) {
this.storage.rawHp = this.hp;
this.storage.rawMaxHp = this.maxHp;
this.hp = 1;
this.maxHp = 1;
- this.node.hp.hide();
+ if (this.storage.nohp) {
+ this.node.hp.hide();
+ }
}
if (skill != false) {
skills = skills.filter(skill => {
@@ -3050,20 +3053,22 @@ export class Player extends HTMLDivElement {
}
}
if (!this.storage.nohp) {
- if (this.maxHp == Infinity) {
+ const hidden = (this.classList.contains('unseen_show') || this.classList.contains('unseen2_show'));
+ const maxHp = (hidden ? 1 : this.maxHp);
+ if (maxHp == Infinity) {
hp.innerHTML = '∞';
}
- else if (game.layout == 'default' && this.maxHp > 14) {
- hp.innerHTML = this.hp + '/' + this.maxHp;
+ else if (game.layout == 'default' && maxHp > 14) {
+ hp.innerHTML = this.hp + '/' + maxHp;
hp.classList.add('text');
}
else if (get.is.newLayout() &&
(
- this.maxHp > 9 ||
- (this.maxHp > 5 && this.classList.contains('minskin')) ||
- ((game.layout == 'mobile' || game.layout == 'long') && this.dataset.position == 0 && this.maxHp > 7)
+ maxHp > 9 ||
+ (maxHp > 5 && this.classList.contains('minskin')) ||
+ ((game.layout == 'mobile' || game.layout == 'long') && this.dataset.position == 0 && maxHp > 7)
)) {
- hp.innerHTML = this.hp + '
/
' + this.maxHp + '