所有案件
花火 的案件
#78674: "The entire card deck is exposed to the player via `gameui.gamedatas.deck`"
#78674: "The entire card deck is exposed to the player via `gameui.gamedatas.deck`"
這是關於哪方面的案件?
發生什麼事? 請從下方選擇
規則:遊戲規則有所錯漏
發生什麼事? 請從下方選擇
規則:遊戲規則有所錯漏
請檢查是否已有同課題案件
若肯定,請「投票」給這樁案件。最高票的案件將「優先」處理!
# | Status | Votes | Game | Type | Title | Last update |
---|
細節描述
• 如果可以的話,請轉貼螢幕顯示的錯誤訊息。
The player's cards aren't completely hidden. The card deck is not hidden.• 請說明你當時想做什麼,你做了什麼,然後發生了什麼事
No.• 你的瀏覽器是什麼?
Google Chrome v108
• 請簡明精確地解釋你的建議,以便讓人一目了然。
The player's cards aren't completely hidden. The card deck is not hidden.• 你的瀏覽器是什麼?
Google Chrome v108
• 當你不能動作時,螢幕上顯示什麼?(螢幕全黑?部份遊戲介面?錯誤訊息?)
The player's cards aren't completely hidden. The card deck is not hidden.• 你的瀏覽器是什麼?
Google Chrome v108
• 遊戲規則的哪部分在 BGA 版本有所錯漏?
The player's cards aren't completely hidden. The card deck is not hidden.• 這項違反規則之處可否在遊戲重播中看到?若可以是在哪步?(重播時左上角資訊)
No.• 你的瀏覽器是什麼?
Google Chrome v108
• 你當時想採取哪個遊戲行動?
The player's cards aren't completely hidden. The card deck is not hidden.• 你想觸發這個遊戲行動時做了什麼?
No.• 當你試著這麼做時發生了什麼(錯誤訊息、遊戲狀態條訊息...)?
• 你的瀏覽器是什麼?
Google Chrome v108
• 問題發生在遊戲的哪一步?(當前遊戲指示是什麼)
The player's cards aren't completely hidden. The card deck is not hidden.• 當你試著進行遊戲動作時發生了什麼(錯誤訊息、遊戲狀態條訊息...)?
No.• 你的瀏覽器是什麼?
Google Chrome v108
• 請描述顯示問題。 建議將此錯誤的螢幕截圖上傳到 Imgur.com 並轉貼連結。
The player's cards aren't completely hidden. The card deck is not hidden.• 你的瀏覽器是什麼?
Google Chrome v108
• 請簡明精確地解釋你的建議,以便讓人一目了然。
The player's cards aren't completely hidden. The card deck is not hidden.• 你的瀏覽器是什麼?
Google Chrome v108
案件沿革
2023年 1月 5日 22:53 • Spicy • 開發者尚未重現這項錯誤:
For some reason the game client knows the entire content of the card deck from the very beginning of the match. This data is passed to `gameui.completesetup(...)` as an argument (location: the page source) and is accessible through `gameui.gamedatas.deck`.
Here's a script that uses this information, which we definitely shouldn't have, and prints the player's hand and the top card of the deck.
```
(function() {
function printPlayerHand() {
const cardsDiv = document.getElementById(`playertablecard_${gameui.player_id}`);
const cards = [...cardsDiv.getElementsByClassName("card")].reverse();
const message = cards.map(card => {
const cardId = card.id.split("_").at(-1);
const info = gameui.gamedatas.deck[cardId];
return info ? `${info.type_arg} ${gameui.colorNames[info.type]}` : "?";
}).join(", ");
console.log(`Your hand: ${message}`);
}
function printNextCard() {
const cardsLeft = Number(document.getElementById("deck_pile_item_1").textContent);
const info = gameui.gamedatas.deck[String(cardsLeft * 2)];
console.log(`The next card in the deck: ${info.type_arg} ${gameui.colorNames[info.type]}`)
}
printPlayerHand();
printNextCard();
})();
```
Output: i.imgur.com/UjiO7xF.png
Now I know my cards are (4 blue, 2 white, 5 green, ?) without needing any clues. "?" means this card is one of my starting cards, so it's not in the `deck` object.
Interestingly enough, I couldn't find any usage of this object in the code. If that's true, I'm guessing it's a pretty easy fix.
Here's a script that uses this information, which we definitely shouldn't have, and prints the player's hand and the top card of the deck.
```
(function() {
function printPlayerHand() {
const cardsDiv = document.getElementById(`playertablecard_${gameui.player_id}`);
const cards = [...cardsDiv.getElementsByClassName("card")].reverse();
const message = cards.map(card => {
const cardId = card.id.split("_").at(-1);
const info = gameui.gamedatas.deck[cardId];
return info ? `${info.type_arg} ${gameui.colorNames[info.type]}` : "?";
}).join(", ");
console.log(`Your hand: ${message}`);
}
function printNextCard() {
const cardsLeft = Number(document.getElementById("deck_pile_item_1").textContent);
const info = gameui.gamedatas.deck[String(cardsLeft * 2)];
console.log(`The next card in the deck: ${info.type_arg} ${gameui.colorNames[info.type]}`)
}
printPlayerHand();
printNextCard();
})();
```
Output: i.imgur.com/UjiO7xF.png
Now I know my cards are (4 blue, 2 white, 5 green, ?) without needing any clues. "?" means this card is one of my starting cards, so it's not in the `deck` object.
Interestingly enough, I couldn't find any usage of this object in the code. If that's true, I'm guessing it's a pretty easy fix.
2023年 1月 7日 10:10 • Spicy • 開發者尚未重現這項錯誤:
The `deck` object is no longer present in `gameui.gamedatas`. Looks like the issue has already been patched. Thanks for the quick fix.
為本案件添加內容
任何可能重現這項錯誤或了解你的建議之相關資訊,都請在此填寫:
- 其他同樣狀況的桌號/步數
- 按 F5 是否解決了這個問題?
- 問題是否發生了好幾次?每次都發生?時好時壞?
- 建議將此錯誤的螢幕截圖上傳到 Imgur.com 並轉貼連結。
更改案件狀態為:
bug?id=78674