Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: include rarity and luck in pet notifications #433

Merged
merged 28 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
84b5aca
feat: include rarity and luck in pet notifications
iProdigy Mar 4, 2024
b406ca1
feat: calculate agility pet luck
iProdigy Mar 5, 2024
34c89c4
Merge branch 'master' into feature/pet-rarity
iProdigy Mar 16, 2024
528d991
chore: update changelog
iProdigy Mar 16, 2024
aada140
fix: toa levels beyond 550 don't alter drop rate
iProdigy Mar 17, 2024
fdd85dd
fix: assume 3 searches per rift close instead of 1
iProdigy Mar 20, 2024
6b613dd
fix: use tempoross reward pool instead of kc
iProdigy Mar 20, 2024
b47541a
Merge branch 'master' into feature/pet-rarity
iProdigy Mar 22, 2024
6874538
chore: add Quetzin without rarity info
iProdigy Mar 22, 2024
3b34bf4
Merge branch 'master' into feature/pet-rarity
iProdigy Mar 23, 2024
cf8de35
Merge branch 'master' into feature/pet-rarity
iProdigy Mar 28, 2024
17e883a
Merge branch 'master' into feature/pet-rarity
iProdigy Mar 29, 2024
9d60269
feat: add best guess at quetzin rarity
iProdigy Mar 30, 2024
b98790d
fix: account for different drop rates per skill level
iProdigy Mar 30, 2024
b05d327
refactor: use MultiSource for agility pet
iProdigy Mar 30, 2024
6b2da59
fix: off-by-one for xp delta calculation
iProdigy Mar 30, 2024
5663ccc
Merge branch 'master' into feature/pet-rarity
iProdigy Mar 31, 2024
958bc31
chore: remove comment; quetzin rate was correct
iProdigy Apr 5, 2024
459f35b
Merge branch 'master' into feature/pet-rarity
iProdigy Apr 7, 2024
7bee735
feat: support smol heredit pet
iProdigy Apr 11, 2024
39e9683
chore: add unit test for SerializedLoot
iProdigy Apr 11, 2024
c751785
Merge branch 'master' into feature/pet-rarity
iProdigy Apr 12, 2024
1d306ef
Merge branch 'master' into feature/pet-rarity
Felanbird Apr 20, 2024
57f04bd
Merge branch 'master' into feature/pet-rarity
iProdigy Jun 26, 2024
78693c0
chore: update changelog
iProdigy Jun 26, 2024
9efa511
Merge branch 'master' into feature/pet-rarity
iProdigy Jul 20, 2024
c93efe5
Merge branch 'master' into feature/pet-rarity
iProdigy Aug 4, 2024
83af2f5
Merge branch 'master' into feature/pet-rarity
iProdigy Aug 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Unreleased

- Minor: Include rarity and luck for pet notifications. (#433)

## 1.9.0

- Major: Add item rarity to monster loot and collection notifications. (#425, #427)
Expand Down
11 changes: 11 additions & 0 deletions src/main/java/dinkplugin/message/Field.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@ public Field(String name, String value) {
this(name, value, true);
}

public static Field ofLuck(double probability, int kTrials) {
return ofLuck(MathUtils.cumulativeGeometric(probability, kTrials));
}

public static Field ofLuck(double geomCdf) {
String percentile = geomCdf < 0.5
? "Top " + MathUtils.formatPercentage(geomCdf, 2) + " (Lucky)"
: "Bottom " + MathUtils.formatPercentage(1 - geomCdf, 2) + " (Unlucky)";
return new Field("Luck", Field.formatBlock("", percentile));
}

public static String formatBlock(String codeBlockLanguage, String content) {
return String.format("```%s\n%s\n```", StringUtils.defaultString(codeBlockLanguage), content);
}
Expand Down
Loading
Loading