Skip to content

Commit

Permalink
fix: ai now won't use suicide card (part of #5)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchen committed Apr 2, 2021
1 parent 4081c73 commit bc5015c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
Binary file modified assets/misc/ogimage.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/ai/coefs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const coefs = {
drawDiscardPlayagain: 27.6,
undiscardable: 2.03,
useDiscardRatio: 2.18,
loseDeduction: 999,
enemy: 1.08,
randomDice: 100,
}
Expand Down
4 changes: 4 additions & 0 deletions src/ai/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ export const aiDecision = (
if (special?.undiscardable) {
card.score += coefs.undiscardable
}

if (loseImm) {
card.score -= coefs.loseDeduction
}
}

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

0 comments on commit bc5015c

Please sign in to comment.