Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion find_winning_deck.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,11 @@ export async function do_riddle(riddle, handler) {
} else {
let combo_idx = 0;
const tried_combos = {};
for (let combo of k_combinations(my_cards, 8)) {
let slot = 8;
if (riddle.players[my_idx].round_number) {
slot = Math.min(8, riddle.players[my_idx].round_number + 2);
}
for (let combo of k_combinations(my_cards, slot)) {
combo_idx += 1;
// sort the combo
combo.sort();
Expand Down
29 changes: 16 additions & 13 deletions gamestate_full_ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -710,23 +710,25 @@ export class Player {
this.cards = this.cards.slice(0, slot);
}
reset_can_play() {
{
const cards = this.cards;
for (let i=0; i<cards.length; i++) {
let card_id = cards[i];
if (swogi[card_id].does_not_exist) {
card_id = card_id.substring(0, 5);
for (let j=1; j<3; j++) {
const maybe_card_id = card_id + j;
if (!swogi[maybe_card_id].does_not_exist) {
cards[i] = card_id;
break;
}

this.do_set_cards_by_round()

const cards = this.cards;

for (let i=0; i<cards.length; i++) {
let card_id = cards[i];
if (swogi[card_id].does_not_exist) {
card_id = card_id.substring(0, 5);
for (let j=1; j<3; j++) {
const maybe_card_id = card_id + j;
if (!swogi[maybe_card_id].does_not_exist) {
cards[i] = card_id;
break;
}
}
}
}
this.do_set_cards_by_round()

if (this.chengyuns_fusion_style_stacks > 0) {
const swordplay_talent_cards = this.swordplay_talent_cards;
let seen_yeying = false;
Expand Down Expand Up @@ -2817,6 +2819,7 @@ export class GameState {
this.process_this_card_chases();
}
}
me.xuanming_recurring_hp = me.hp;
if (this.check_for_death()) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion names.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
{
"id": 114041,
"name": "CentiBird Spirit Sword Rhythm",
"namecn": "白鸟灵剑诀"
"namecn": "百鸟灵剑诀"
},
{
"id": 114051,
Expand Down
2 changes: 1 addition & 1 deletion web_worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ self.onmessage = async (event) => {
const myHP = game.players[my_idx].hp;
const enemyHP = game.players[enemy_idx].hp;
const turns = game.turns_taken;
const winning_margin = (myHP - enemyHP) / turns;
const winning_margin = (myHP * 2 - enemyHP - Math.min(turns, 8) * 2);
const p_combo = combo.slice();
if (winning_margin > best_winning_margin) {
winning_decks.length = 0;
Expand Down