jamesgiu / quick-hit

Table tennis ELO application using React and Firebase
https://jamesgiu.github.io/quick-hit/
MIT License
12 stars 0 forks source link

Badges on player card and profile #15

Open jamesgiu opened 3 years ago

jamesgiu commented 3 years ago

Being a nemesis or victim should be reflected as an icon on someone's player card

Tournament winners should earn badges for their win (maybe the tournament creator can choose an image or have it based on an svg icon, e.g. a golden thumbs up for one tournament)

ChrisNeedham24 commented 3 years ago

Badge/achievement ideas:

I'll add more if I think of any.

jamesgiu commented 3 years ago

LOL at Sacked

jamesgiu commented 3 years ago

I'd love to work on the initial cut of this ticket, maybe tonight/tomorrow (RDO) ;) ??

jamesgiu commented 3 years ago

Rancher: Have a 5 game winning streak against someone Boar Farmer: Have a 10 game winning streak against someone It Ain't Much But it's Honest Work: Have a 15 game winning streak against someone Heartless: Beat your current Victim 5 times in a row

jamesgiu commented 3 years ago

Question: can you get the same achievement twice? E.g. if you get it against 2 different players?

jamesgiu commented 3 years ago

With the amount of calculations required, this'll definitely be a backend thing I think (e.g. checking for triggers and recording the achievement in the DB after a game has been entered)

ChrisNeedham24 commented 3 years ago

Question: can you get the same achievement twice? E.g. if you get it against 2 different players?

I think it's probably not worth having it more than once, but that's just my opinion. We can gauge opinions tomorrow I suppose.

jamesgiu commented 3 years ago

Maybe the achievement text can record the player who was involved in triggering it

"Boar Farmer

10 game win streak against jjg"

ChrisNeedham24 commented 3 years ago

Just While I'm Deploying: Play 50 games Raise The Bat: Play 100 games Need A Charge Code: Play 200 games

ChrisNeedham24 commented 3 years ago

Cellar Dweller: Drop to 1100 ELO or lower ✅ Drunk On ELO: Gain 100 or more ELO in one happy hour Mistakes Were Made: Lose 100 or more ELO in one happy hour Shaking Hands: Win a happy hour game to 11 or more by 2 points Who Said It Was Happy?: Lose a happy hour game to 11 or more by 2 points A Little Embarrassing: Lose to a player with an ELO of 200+ less than you ✅ Should Have Put Money On It: Beat a player with an ELO of 200+ more than you ✅

jamesgiu commented 3 years ago

These are amazing

ChrisNeedham24 commented 3 years ago

Open Season: be the victim for 5 other players Try As You Might: be the nemesis for 5 other players

jamesgiu commented 3 years ago

Might work on this tonight

jamesgiu commented 3 years ago

First cut is in via https://github.com/jamesgiu/quick-hit/pull/54

Issues:

ChrisNeedham24 commented 3 years ago

We may have some issues here, at least a couple of these achievements are being granted without having actually achieved them. Namely Cellar Dweller and Helpless.

jamesgiu commented 3 years ago

Yeah something weird is going on - will have a look tonight if I can (the code where they live is pretty nice to expand on though if you felt like taking a squizz too)

ChrisNeedham24 commented 3 years ago

Well, the issue for Cellar Dweller is that is it's checking for an ELO of >= 1100, when it should be <= 1100. I believe the issues with the other achievements could be to do with your use of == rather than === for comparisons.

jamesgiu commented 3 years ago

latenightcommits hahah

jamesgiu commented 3 years ago

I'll try and sort those out tonight, also thanks for ticking off those ideas!

EDIT: TICKING OFF I have no clue where "fucking off" came from, WTF

jamesgiu commented 3 years ago

I have no idea how that last comment had "fucking off" instead of "ticking off" - I had to do like 3 takes of it to believe it. Jesus

ChrisNeedham24 commented 3 years ago

Imma be honest, I was a little confused too lol

jamesgiu commented 3 years ago

Bloody hell - table tennis is serious business

jamesgiu commented 3 years ago

Horatio: Play 20 games or more and have a winrate >= 80%

Getting Better (Can't Get No Worse): Play 20 games or more and have a winrate <= 40%

ChrisNeedham24 commented 3 years ago

Spread the love: beat every other active player ELO booster: lose to every other active player

ChrisNeedham24 commented 3 years ago

Was going to take a look at this but decided it was all too hard