Skip to content

Commit

Permalink
Routine card update; added new Daily Befuddles, added Ko-Fi button
Browse files Browse the repository at this point in the history
  • Loading branch information
suitangi committed Feb 23, 2024
1 parent fafc233 commit 69e698d
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 8 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ A Magic: The Gathering card art letter guessing game similar to Hangman. With da

### Misc/Bugs
- Better daily share copy pasta/discord spoilers mode
- Easter eggs
- More Easter eggs

### Options menu:
- Discord Spoilers for guesses
Expand All @@ -25,6 +25,7 @@ A Magic: The Gathering card art letter guessing game similar to Hangman. With da

# Changelog
```
2/23/2024: Routine card update; added new Daily Befuddles, added Ko-Fi button
1/25/2024: Small bug fix (daylight savings 1 hour off bug)
1/2/2024: Routine card update, added new daily Befuddles
7/6/2023: Switch to Scryfall Collections API (free play)
Expand Down
2 changes: 1 addition & 1 deletion cardList.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dailyList.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<script async src="https://cdn.jsdelivr.net/npm/canvas-confetti@1.5.1/dist/confetti.browser.min.js"></script>
<script async type="application/javascript" src="https://cdn.jsdelivr.net/npm/chart.js@3.7.1/dist/chart.min.js"></script>
<script defer type="application/javascript" src="https://cdn.jsdelivr.net/npm/js-cookie@3.0.1/dist/js.cookie.min.js"></script>
<script type='text/javascript' src='https://storage.ko-fi.com/cdn/widget/Widget_2.js'></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.2/jquery-confirm.min.css">

<!-- local -->
Expand Down
21 changes: 20 additions & 1 deletion scripts/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const canVibrate = window.navigator.vibrate;
const befuddleAppVersion = "2024.1.25";
const befuddleAppVersion = "2024.2.23";

//Helper: Get Query
function getParameterByName(name, url) {
Expand Down Expand Up @@ -496,6 +496,14 @@ function gameLostDaily() {
typeAnimated: true,
closeIcon: true,
buttons: {
kofi: {
text: '<img src="https://storage.ko-fi.com/cdn/cup-border.png" alt="Ko-Fi">',
btnClass: 'btn-blue kofi-btn',
action: function() {
buyDrink();
return false;
}
},
free: {
text: "Free Play",
btnClass: 'btn-purple',
Expand Down Expand Up @@ -592,6 +600,14 @@ function gameWinDaily() {
typeAnimated: true,
closeIcon: true,
buttons: {
kofi: {
text: '<img src="https://storage.ko-fi.com/cdn/cup-border.png" alt="Ko-Fi">',
btnClass: 'btn-blue kofi-btn',
action: function() {
buyDrink();
return false;
}
},
free: {
text: "Free Play",
btnClass: 'btn-purple',
Expand Down Expand Up @@ -1658,6 +1674,9 @@ function loadGame() {
Cookies.set('befuddle', JSON.stringify(window.game), {
expires: 365
});
if (getDateNumber() - data.start >= data.list.length) {
console.error('Daily Befuddle needs to be updated, please report a bug to Suitangi');
}
loadCard(data.list[getDateNumber() - data.start]);
}

Expand Down
45 changes: 41 additions & 4 deletions styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -173,31 +173,31 @@ body {
top: 50%;
transform: translate(0, -50%);
left: 1%;
font-variation-settings: 'FILL'0, 'wght'300;
font-variation-settings: 'FILL' 0, 'wght' 300;
}

#help-button {
font-size: min(30px, 8vw);
top: 50%;
transform: translate(125%, -50%);
left: 1%;
font-variation-settings: 'FILL'0, 'wght'250;
font-variation-settings: 'FILL' 0, 'wght' 250;
}

#stats-button {
font-size: min(30px, 8vw);
top: 50%;
right: 1%;
transform: translate(-125%, -50%);
font-variation-settings: 'FILL'0, 'wght'150;
font-variation-settings: 'FILL' 0, 'wght' 150;
}

#settings-button {
font-size: min(30px, 8vw);
top: 50%;
right: 1%;
transform: translate(0, -50%);
font-variation-settings: 'FILL'1, 'wght'150;
font-variation-settings: 'FILL' 1, 'wght' 150;
;
}

Expand Down Expand Up @@ -617,6 +617,43 @@ body {
font-size: 17px;
}

.kofi-btn {
position: absolute;
background: none !important;
left: 1%;
}

.kofi-btn img {
animation: none;
height: 20px;
}

.kofi-btn:hover img {
animation: tilt-shaking 0.25s infinite;
}

@keyframes tilt-shaking {
0% {
transform: rotate(0deg);
}

25% {
transform: rotate(5deg);
}

50% {
transform: rotate(0eg);
}

75% {
transform: rotate(-5deg);
}

100% {
transform: rotate(0deg);
}
}

.rabButton {
background: var(--bg);
border: none;
Expand Down

0 comments on commit 69e698d

Please sign in to comment.