Skip to content

Commit

Permalink
Nerf karma
Browse files Browse the repository at this point in the history
  • Loading branch information
easafe committed Oct 26, 2022
1 parent ea31a49 commit ba2f662
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion production.dhall
Original file line number Diff line number Diff line change
@@ -1 +1 @@
./spago.dhall // { backend = "purs-backend-es build --directives build-directives" }
./spago.dhall // { backend = "purs-backend-es build --directives build-directives", sources = [ "src/**/*.purs" ] }
2 changes: 1 addition & 1 deletion src/Client/css/karmaPrivileges.css
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
.privilege-quantity {
padding-right: 40px;
align-self: center;
min-width: 50px;
min-width: 55px;
color: hsl(145, 80%, 28%)
}

Expand Down
6 changes: 3 additions & 3 deletions src/Server/Wheel.purs
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ import Data.Tuple (Tuple(..))
-- | * Interest bonus is the ratio of how many characters one user typed to the other
-- | * New chat bonus is how fresh a chat is, more karma should be earned on the first day of a chat than that on the 30000th
-- | * Fast reply tries to assert how "instantaneous" a given conversation is by making some assumptions about how many characters should have been typed in the time it took for a reply to be sent
-- | * Sender bonus is equal to half of karma earned
-- | * Sender bonus is equal to a third of karma earned
karmaFrom Turn Tuple Int Int
karmaFrom { senderStats, recipientStats, chatAge } =
let
grossSender = karma senderStats
in
Tuple (DI.floor $ grossSender + grossSender * 0.5) (DI.floor $ karma recipientStats)
Tuple (DI.floor $ grossSender + grossSender * 0.3) (DI.floor $ karma recipientStats)
where
karma { interest, characters, replyDelay, accountAge } =
let
Expand All @@ -35,6 +35,6 @@ karmaFrom { senderStats, recipientStats, chatAge } =
in
constant' * interestBonus + constant' * newChatBonus + constant' * fastReplyBonus

constant = 50.0
constant = 35.0
days = 7.0
charactersMinute = 200.0
1 change: 0 additions & 1 deletion src/Shared/KarmaPrivileges/View.purs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ view { top10, inBetween10, userPosition, toggleBoard, privileges, stats: { sent,
<<< HE.div (HA.class' "privilege-list") $ map statEntry
[ Tuple karma "Total karma"
, Tuple total "Total chats"
, Tuple total "Chats started"
, Tuple started "Chats started"
, Tuple sent "Messages sent"
]
Expand Down

0 comments on commit ba2f662

Please sign in to comment.