feat: support Currency Wars damage reports, King Pom-Pom metadata and CW commands
This commit is contained in:
1 parent
6bb1b18d50
commit
e8dbafb19d
4 files changed
+26
-3
No files matched your search
@@ -22,3 +22,7 @@ config.local.json
|
|||||||
config.local.js
|
config.local.js
|
||||||
.env
|
.env
|
||||||
.env.local
|
.env.local
|
||||||
|
|
||||||
|
# Python
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
@@ -1484,7 +1484,7 @@ function renderMiniBattleSummary() {
|
|||||||
const elemColor = ELEMENT_COLORS[meta.element] || '#38bdf8';
|
const elemColor = ELEMENT_COLORS[meta.element] || '#38bdf8';
|
||||||
const pct = getAvatarDamagePercent(av, report.team_total_damage || 0, hasAvatarDamage);
|
const pct = getAvatarDamagePercent(av, report.team_total_damage || 0, hasAvatarDamage);
|
||||||
const iconUrl = getAvatarIconUrl(av.avatar_id);
|
const iconUrl = getAvatarIconUrl(av.avatar_id);
|
||||||
const rankStr = av.rank !== undefined ? `E${av.rank}` : '';
|
const rankStr = report.is_currency_wars ? (av.rank ? `${av.rank}★` : '1★') : (av.rank !== undefined ? `E${av.rank}` : '');
|
||||||
const lvlStr = av.level ? `Lv.${av.level}` : '';
|
const lvlStr = av.level ? `Lv.${av.level}` : '';
|
||||||
const metaSub = [lvlStr, rankStr, translatePath(meta.path)].filter(Boolean).join(' • ');
|
const metaSub = [lvlStr, rankStr, translatePath(meta.path)].filter(Boolean).join(' • ');
|
||||||
|
|
||||||
@@ -9230,6 +9230,7 @@ function renderEmptyDamageAnalyst() {
|
|||||||
|
|
||||||
function orderBattleReportAvatars(avatars) {
|
function orderBattleReportAvatars(avatars) {
|
||||||
if (!Array.isArray(avatars) || avatars.length < 2) return avatars || [];
|
if (!Array.isArray(avatars) || avatars.length < 2) return avatars || [];
|
||||||
|
if (analystState.currentReport?.is_currency_wars || avatars.length > 4) return avatars;
|
||||||
|
|
||||||
const lineup = state.statusData?.lineups;
|
const lineup = state.statusData?.lineups;
|
||||||
if (!lineup) return avatars;
|
if (!lineup) return avatars;
|
||||||
@@ -9309,7 +9310,10 @@ function renderDamageAnalyst() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const colors = ['#ef4444', '#38bdf8', '#34d399', '#fbbf24', '#c084fc', '#ec4899'];
|
const colors = [
|
||||||
|
'#ef4444', '#38bdf8', '#34d399', '#fbbf24', '#c084fc', '#ec4899',
|
||||||
|
'#f97316', '#14b8a6', '#a855f7', '#06b6d4', '#eab308', '#f43f5e'
|
||||||
|
];
|
||||||
|
|
||||||
// Team Share Bar
|
// Team Share Bar
|
||||||
if (el.analystShareBarContainer) {
|
if (el.analystShareBarContainer) {
|
||||||
@@ -9394,7 +9398,7 @@ function renderDamageAnalyst() {
|
|||||||
<div>
|
<div>
|
||||||
<div style="font-weight: 800; font-size: 1.05rem; color: var(--text-highlight); display: flex; align-items: center; gap: 0.45rem;">
|
<div style="font-weight: 800; font-size: 1.05rem; color: var(--text-highlight); display: flex; align-items: center; gap: 0.45rem;">
|
||||||
<span>${info.name}</span>
|
<span>${info.name}</span>
|
||||||
<span style="font-size: 0.75rem; padding: 0.1rem 0.4rem; border-radius: 4px; background: rgba(255,255,255,0.08); color: var(--text-muted); font-weight: 700;">Lv.${a.level || 80} E${a.rank !== undefined ? a.rank : 0}</span>
|
<span style="font-size: 0.75rem; padding: 0.1rem 0.4rem; border-radius: 4px; background: rgba(255,255,255,0.08); color: var(--text-muted); font-weight: 700;">Lv.${a.level || 80} ${report.is_currency_wars ? `${a.rank || 1}★` : `E${a.rank !== undefined ? a.rank : 0}`}</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="font-size: 0.75rem; color: var(--text-muted); margin-top: 0.15rem;">
|
<div style="font-size: 0.75rem; color: var(--text-muted); margin-top: 0.15rem;">
|
||||||
${translatePath(info.path)} • ${translateElement(info.element)}
|
${translatePath(info.path)} • ${translateElement(info.element)}
|
||||||
|
|||||||
@@ -2079,6 +2079,20 @@ export const AVATAR_METADATA = {
|
|||||||
"element": "Lightning",
|
"element": "Lightning",
|
||||||
"rarity": 5,
|
"rarity": 5,
|
||||||
"hasExRank": false
|
"hasExRank": false
|
||||||
|
},
|
||||||
|
"6042": {
|
||||||
|
"names": {
|
||||||
|
"th": "King Pom-Pom",
|
||||||
|
"en": "King Pom-Pom",
|
||||||
|
"zh-CN": "帕姆大王",
|
||||||
|
"zh-TW": "帕姆大王",
|
||||||
|
"ja": "パム大王",
|
||||||
|
"ko": "폼폼 대왕"
|
||||||
|
},
|
||||||
|
"path": "Elation",
|
||||||
|
"element": "Physical",
|
||||||
|
"rarity": 5,
|
||||||
|
"hasExRank": false
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ export const COMMANDS = [
|
|||||||
spec('/cw help', 'แสดงวิธีใช้คำสั่ง CW'), spec('/cw status', 'ดูเงิน HP เลเวล และสถานะรอบ CW'),
|
spec('/cw help', 'แสดงวิธีใช้คำสั่ง CW'), spec('/cw status', 'ดูเงิน HP เลเวล และสถานะรอบ CW'),
|
||||||
spec('/cw list', 'แสดงรายการ ID ของ CW', [arg('category', 'เลือกชนิดข้อมูล', ['role','equip','orb','consumable','forge'])]),
|
spec('/cw list', 'แสดงรายการ ID ของ CW', [arg('category', 'เลือกชนิดข้อมูล', ['role','equip','orb','consumable','forge'])]),
|
||||||
...['gold','hp','exp'].map(p => spec('/cw '+p, p === 'exp' ? 'เพิ่ม EXP ในรอบ CW' : 'ตั้งค่า '+p+' ในรอบ CW', [arg(p === 'exp' ? 'gain' : 'total', p === 'hp' ? 'HP 1 ถึงเพดานของรอบปัจจุบัน' : 'จำนวนเต็มไม่ติดลบ (เป็นยอดรวม ยกเว้น exp ที่เป็นจำนวนเพิ่ม)', ['1','10','100','1000'])])),
|
...['gold','hp','exp'].map(p => spec('/cw '+p, p === 'exp' ? 'เพิ่ม EXP ในรอบ CW' : 'ตั้งค่า '+p+' ในรอบ CW', [arg(p === 'exp' ? 'gain' : 'total', p === 'hp' ? 'HP 1 ถึงเพดานของรอบปัจจุบัน' : 'จำนวนเต็มไม่ติดลบ (เป็นยอดรวม ยกเว้น exp ที่เป็นจำนวนเพิ่ม)', ['1','10','100','1000'])])),
|
||||||
|
...['tbpower','tb','trailblaze'].map(p => spec('/cw '+p, 'ตั้งค่าพลังบุกเบิก (Trailblaze Power / เหรียญร้านรถไฟ) ในรอบ CW', [arg('total', 'จำนวนพลังบุกเบิก เช่น 10, 50, 100', ['10','50','100','500'])])),
|
||||||
spec('/cw role', 'เพิ่มตัวละคร CW (ใช้ได้ใน Preparation)', [arg('roleID', 'เลือก Role ID ของ CW', 'cw_roles'), arg('star', 'ดาวที่มีข้อมูลรองรับสำหรับ Role นี้', 'cw_stars'), quantity()]),
|
spec('/cw role', 'เพิ่มตัวละคร CW (ใช้ได้ใน Preparation)', [arg('roleID', 'เลือก Role ID ของ CW', 'cw_roles'), arg('star', 'ดาวที่มีข้อมูลรองรับสำหรับ Role นี้', 'cw_stars'), quantity()]),
|
||||||
...['equip','orb','consumable','forge'].map(p => spec('/cw '+p, 'เพิ่ม '+p+' ในรอบ CW (Preparation)', [arg('itemID', 'เลือก ID จากข้อมูล CW ของ Client', 'cw_'+p), quantity()])),
|
...['equip','orb','consumable','forge'].map(p => spec('/cw '+p, 'เพิ่ม '+p+' ในรอบ CW (Preparation)', [arg('itemID', 'เลือก ID จากข้อมูล CW ของ Client', 'cw_'+p), quantity()])),
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in new issue
Block a user