Commit 46c3c9fa authored by chechunchi's avatar chechunchi

fix small

parent 20776ae3
......@@ -85,25 +85,43 @@ export const CardModal = () => {
);
})}
{effectInteractivies.length > 0 ? (
<button
className="card-modal-btn"
onClick={() => {
for (const effect of effectInteractivies) {
const effectMsg =
meta && effect.effectCode
? getCardStr(meta, effect.effectCode & 0xf) ?? "[:?]"
: "[:?]";
messageStore.optionModal.options.push({
msg: effectMsg,
response: effect.response,
});
}
cardModal.isOpen = false;
messageStore.optionModal.isOpen = true;
}}
>
发动效果
</button>
effectInteractivies.length == 1 ? (
// 如果只有一个效果,点击直接触发
<button
className="card-modal-btn"
onClick={() => {
sendSelectIdleCmdResponse(effectInteractivies[0].response);
cardModal.isOpen = false;
clearAllIdleInteractivities(0);
clearAllIdleInteractivities(1);
}}
>
{effectInteractivies[0].desc}
</button>
) : (
// 如果有多个效果,点击后进入`OptionModal`选择
<button
className="card-modal-btn"
onClick={() => {
for (const effect of effectInteractivies) {
const effectMsg =
meta && effect.effectCode
? getCardStr(meta, effect.effectCode & 0xf) ?? "[:?]"
: "[:?]";
messageStore.optionModal.options.push({
msg: effectMsg,
response: effect.response,
});
}
cardModal.isOpen = false;
clearAllIdleInteractivities(0);
clearAllIdleInteractivities(1);
messageStore.optionModal.isOpen = true;
}}
>
发动效果
</button>
)
) : (
<></>
)}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment