Player report #6: 凯瑟琳's 定向投放 offer after a level-up showed three nameless operator cards (the raw item ids) under the promotion reward's 晋升奖励 header. The shop bar now draws each offer slot by its kind (item slots as free item cards) and names the offer: m.private shop.rewardOffer carries source ('merge' | 'special') and label (the strategy's effect name, the item's name or the 特质's operator — effectsMeta.offerLabel); the reminder pill says <label>待选择. Same path for 娜仁图亚, 寻呼模块, 信标 and 松果.
21 lines
1.3 KiB
JavaScript
21 lines
1.3 KiB
JavaScript
// Pick-one offer reminder (research 00 §3): the offer's cards themselves live in the shop bar (shopBar.js RewardCards —
|
|
// after a promotion, or a special refresh such as 凯瑟琳's 定向投放, they replace the bar's operator cards, like the
|
|
// original). When the player puts the pick off (稍后选择) this pill above the bar brings the cards back; it names the
|
|
// offer like the bar's header (gameLogic.offerHeader: 晋升奖励待选择 / 定向投放待选择 …, player report #6 after 0.1.0) and
|
|
// disappears once the server clears `shop.rewardOffer` (picked, or the round ended).
|
|
|
|
import { html, Icon, TierChip } from './components.js';
|
|
import { offerHeader } from './gameLogic.js';
|
|
|
|
/**
|
|
* @param {{ priv:any, minimized:boolean, onMinimize:(m:boolean)=>void }} props
|
|
*/
|
|
export function RewardOverlay({ priv, minimized, onMinimize }) {
|
|
const offer = priv?.shop?.rewardOffer;
|
|
if (!offer || !Array.isArray(offer.slots) || !offer.slots.length || !minimized) return null;
|
|
const head = offerHeader(offer);
|
|
return html`<button type="button" class="rewardpill" onClick=${() => onMinimize(false)}>
|
|
<${Icon} name=${head.icon} /><span>${head.pill}</span>${Number.isInteger(offer.tier) ? html`<${TierChip} tier=${offer.tier} size="sm" />` : null}
|
|
</button>`;
|
|
}
|