feedback3 WB: 圣聆初雪 S2 freezes the protection point (the blue gate) once it holds 5 snow layers, deploy attributes ignored, and no other tile; the frozen gate shows as an ice diamond instead of her own face (PRTS 备注, community report #32)
This commit is contained in:
1 parent
e53a181ae9
commit
3e9f81fcbf
6 files changed
+83
-17
No files matched your search
@@ -99,6 +99,11 @@ export function dieClipDur(entry) {
|
||||
/** World step (x = col, y = row) of a direction. */
|
||||
export const DIR_STEP = Object.freeze({ UP: [0, 1], RIGHT: [1, 0], DOWN: [0, -1], LEFT: [-1, 0] });
|
||||
const nowMs = () => (globalThis.performance ? globalThis.performance.now() : Date.now());
|
||||
/** Units with no art in the game data drawn as an ice diamond: 圣聆初雪 S2's frozen protection point (保护目标(冻结状态), PRTS
|
||||
* 无头像; data/assets.json has no avatar or model for it, so the token fallback showed 圣聆初雪's own face) — the marker of a
|
||||
* frozen gate. */
|
||||
const ICE_TOKENS = new Set(['token_10058_sbell2_icetgt']);
|
||||
const ICE_FRAME = 0x9fe6ff;
|
||||
/** How long a view waits for its avatar before showing the image-less placeholder diamond. */
|
||||
const PIC_WAIT_MS = 400;
|
||||
/**
|
||||
@@ -380,6 +385,7 @@ export class UnitView {
|
||||
|
||||
_frameColor() {
|
||||
if (this.isEnemy) return this.isBoss ? ENEMY_FRAME.boss : this.tier >= 2 ? ENEMY_FRAME.elite : ENEMY_FRAME.normal;
|
||||
if (ICE_TOKENS.has(this.info.defId)) return ICE_FRAME;
|
||||
if (this.golden) return 0xffc600;
|
||||
return TIER_COLORS[this.tier] || TIER_COLORS[1];
|
||||
}
|
||||
@@ -390,7 +396,8 @@ export class UnitView {
|
||||
// is missing or still loading after PIC_WAIT_MS).
|
||||
_loadPicture() {
|
||||
const a = this.ctx.assets;
|
||||
const url = a && (a.picture ? a.picture(this.info.avatar) || a.picture(this.info.defId) || a.picture(this.info.spine) : null);
|
||||
// (an ICE_TOKENS unit takes no picture: the token fallback would be its owner's face — assets.js tokenAvatarUrl)
|
||||
const url = ICE_TOKENS.has(this.info.defId) ? null : a && (a.picture ? a.picture(this.info.avatar) || a.picture(this.info.defId) || a.picture(this.info.spine) : null);
|
||||
this._pic = { key: String(this.info.avatar || this.info.defId || 'unknown'), color: this._frameColor(), img: null, state: 'none', shown: null, t0: nowMs() };
|
||||
if (!url || !a.image) return;
|
||||
const cached = typeof a.imageNow === 'function' ? a.imageNow(url) : null;
|
||||
@@ -409,7 +416,7 @@ export class UnitView {
|
||||
let want = pic.state === 'img' ? 'img' : 'placeholder';
|
||||
if (pic.state === 'wait' && nowMs() - pic.t0 < PIC_WAIT_MS) want = null;
|
||||
if (!want || pic.shown === want) return;
|
||||
this.fallback.texture = diamondTexture(pic.key, want === 'img' ? pic.img : null, pic.color, { enemy: this.isEnemy, golden: this.golden });
|
||||
this.fallback.texture = diamondTexture(pic.key, want === 'img' ? pic.img : null, pic.color, { enemy: this.isEnemy, golden: this.golden, ice: ICE_TOKENS.has(this.info.defId) });
|
||||
pic.shown = want;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user