Make all places that shows cards use the interact module function. #38

Closed
opened 2023-04-21 08:23:49 +00:00 by LunarTides · 0 comments
LunarTides commented 2023-04-21 08:23:49 +00:00 (Migrated from github.com)

For example in interact.js:discover

values.forEach((v, i) => {
    v = game.functions.getCardByName(v.name);
    let stats = v.type == "Minion" ? ` [${v.getAttack()} / ${v.getHealth()}]`.brightGreen : "";
    let desc = v.desc ? `(${v.desc}) ` : "";

    // Check for a TypeError and ignore it
    try {
        p += `[${i + 1}] ` + `{${v.mana}} `.cyan + game.functions.colorByRarity(`${v.displayName || v.name}`, v.rarity) + `${stats} ${desc}` + `(${game.functions.getType(v)})`.yellow + `,\n`;
    } catch (e) {}
});

Make this use the interact module viewCards or getReadableCard

For example in interact.js:discover ```js values.forEach((v, i) => { v = game.functions.getCardByName(v.name); let stats = v.type == "Minion" ? ` [${v.getAttack()} / ${v.getHealth()}]`.brightGreen : ""; let desc = v.desc ? `(${v.desc}) ` : ""; // Check for a TypeError and ignore it try { p += `[${i + 1}] ` + `{${v.mana}} `.cyan + game.functions.colorByRarity(`${v.displayName || v.name}`, v.rarity) + `${stats} ${desc}` + `(${game.functions.getType(v)})`.yellow + `,\n`; } catch (e) {} }); ``` Make this use the interact module viewCards or getReadableCard
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
LunarTides/Hearthstone.js#38
No description provided.