Add equipment icons and canonical weapon names
This commit is contained in:
@@ -1930,19 +1930,25 @@ export class BattleScene extends Phaser.Scene {
|
||||
const item = getItem(state.itemId);
|
||||
const next = equipmentExpToNext(state.level);
|
||||
const isTreasure = item.rank === 'treasure';
|
||||
const bg = this.trackSideObject(this.add.rectangle(x, y, width, 24, isTreasure ? 0x1f2430 : 0x101820, isTreasure ? 0.94 : 0.86));
|
||||
const bg = this.trackSideObject(this.add.rectangle(x, y, width, 26, isTreasure ? 0x1f2430 : 0x101820, isTreasure ? 0.94 : 0.86));
|
||||
bg.setOrigin(0);
|
||||
bg.setStrokeStyle(1, isTreasure ? palette.gold : 0x53606c, isTreasure ? 0.58 : 0.42);
|
||||
|
||||
this.trackSideObject(this.add.text(x + 8, y + 5, equipmentSlotLabels[slot], {
|
||||
const iconFrame = this.trackSideObject(this.add.rectangle(x + 14, y + 13, 22, 22, 0x0a0f14, 0.82));
|
||||
iconFrame.setStrokeStyle(1, isTreasure ? palette.gold : 0x53606c, isTreasure ? 0.72 : 0.48);
|
||||
|
||||
const icon = this.trackSideObject(this.add.image(x + 14, y + 13, this.itemIconKey(item.id)));
|
||||
icon.setDisplaySize(22, 22);
|
||||
|
||||
this.trackSideObject(this.add.text(x + 31, y + 6, equipmentSlotLabels[slot], {
|
||||
fontFamily: '"Malgun Gothic", "Noto Sans KR", sans-serif',
|
||||
fontSize: '12px',
|
||||
color: '#9fb0bf',
|
||||
fontStyle: '700'
|
||||
}));
|
||||
this.trackSideObject(this.add.text(x + 54, y + 4, item.name, {
|
||||
this.trackSideObject(this.add.text(x + 78, y + 4, item.name, {
|
||||
fontFamily: '"Malgun Gothic", "Noto Sans KR", sans-serif',
|
||||
fontSize: '14px',
|
||||
fontSize: '13px',
|
||||
color: isTreasure ? '#f4dfad' : '#d4dce6',
|
||||
fontStyle: isTreasure ? '700' : '400'
|
||||
}));
|
||||
@@ -1969,7 +1975,12 @@ export class BattleScene extends Phaser.Scene {
|
||||
}));
|
||||
levelText.setOrigin(1, 0);
|
||||
|
||||
this.drawGauge(x + 54, y + 19, width - 154, 4, state.exp / next, isTreasure ? 0xd8b15f : 0x58aee0);
|
||||
this.drawGauge(x + 78, y + 20, width - 178, 4, state.exp / next, isTreasure ? 0xd8b15f : 0x58aee0);
|
||||
}
|
||||
|
||||
private itemIconKey(itemId: string) {
|
||||
const key = `item-${itemId}`;
|
||||
return this.textures.exists(key) ? key : 'item-training-sword';
|
||||
}
|
||||
|
||||
private itemBonusText(item: ReturnType<typeof getItem>) {
|
||||
|
||||
Reference in New Issue
Block a user