Skip to content

Commit bc5015c

Browse files
committed
fix: ai now won't use suicide card (part of #5)
1 parent 4081c73 commit bc5015c

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

assets/misc/ogimage.jpg

-4.49 KB
Loading

src/ai/coefs.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const coefs = {
1111
drawDiscardPlayagain: 27.6,
1212
undiscardable: 2.03,
1313
useDiscardRatio: 2.18,
14+
loseDeduction: 999,
1415
enemy: 1.08,
1516
randomDice: 100,
1617
}

src/ai/main.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ export const aiDecision = (
8585
if (special?.undiscardable) {
8686
card.score += coefs.undiscardable
8787
}
88+
89+
if (loseImm) {
90+
card.score -= coefs.loseDeduction
91+
}
8892
}
8993

9094
const scores = cardList.map((card, i) => ({

0 commit comments

Comments
 (0)