Deploy-timed skills run the normal duration lifecycle: one charge on deployment, a duration bar, a real end, again on the next deployment (#109)
宴 S2, 斯卡蒂 S2, 野鬃 S1, 砾 S1 / S2, 伊内丝 S3, 缄默德克萨斯 S1–S3 and 耀骑士临光 S2 used a separate timed buff while the skill stayed active; equipment and bond effects that read the skill state now see it end. 伊内丝's first sentry placement starts no skill. Contributed by @Sukvii.
This commit is contained in:
1 parent
ede8e7e773
commit
ffdb1293c4
22 files changed
+607
-104
No files matched your search
@@ -89,13 +89,16 @@ export function animOf(u, t) {
|
||||
/** Snapshot tuple for one unit. */
|
||||
export function unitTuple(u, t) {
|
||||
const sk = u.skill;
|
||||
const spMax = sk && !sk.noSkill ? sk.spCost : 0;
|
||||
let spMax = sk && !sk.noSkill ? sk.spCost : 0;
|
||||
let sp = sk && !sk.noSkill ? sk.sp : 0;
|
||||
if (sk && sk.active && sk.isTimed) {
|
||||
// show remaining duration/ammo as a draining bar — ammo out of the activation's real total (base + bullets added:
|
||||
// 拉特兰, 逃犯引渡手续, refills; community report #35), so every bullet shortens it
|
||||
if (sk.kind === 'ammo') sp = spMax * (sk.ammoLeft / Math.max(1, sk.ammoMax || sk.ammo || 0, sk.ammoLeft));
|
||||
else if (Number.isFinite(sk.timeLeft) && sk.duration > 0) sp = spMax * (sk.timeLeft / sk.duration);
|
||||
else if (Number.isFinite(sk.timeLeft) && sk.duration > 0) {
|
||||
if (spMax === 0) spMax = sk.duration;
|
||||
sp = spMax * (sk.timeLeft / sk.duration);
|
||||
}
|
||||
}
|
||||
// hp is rounded up (a living unit never shows 0) but never above the rounded max HP
|
||||
const maxHp = Math.max(1, Math.round(u.s.maxHp));
|
||||
|
||||
Reference in new issue
Block a user