Skip to content

Commit caa814e

Browse files
committed
fix(notes): more proofreading
1 parent 9f6806b commit caa814e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

content/notes/2026-01-07-cobblemon-shiny-rates.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ tags:
77
excerpt: How to work with ShinyChanceCalculationEvent in Cobblemon
88
slug: cobblemon-shiny-rates
99
date: 2026-01-07
10+
modified: 2026-01-08
1011
---
1112

1213

1314
Sometimes you want to modify the ✨*shiny*✨ rate of the species you are working with.
1415

15-
Use cases may vary. The typical scenario is when you are trying to give a player a species via methods other than natural spawning.
16+
Use cases tend to differ. The typical scenario is when you are trying to give a player a species via methods other than natural spawning.
1617

1718
The code in this note is **Kotlin**. Your experience with **Java** may vary. Don't be afraid to ask questions in the Cobblemon Discord's `#programming` channel.
1819

@@ -30,13 +31,13 @@ It accepts only two parameters:
3031

3132
Now that we have created an event instance, we are ready to do some work—the instance exposes a couple of handy functions.
3233

33-
The first allows us to apply a flat modifier to the event chance:
34+
The first exposed function allows us to apply a flat modifier to the event chance:
3435

3536
```kotlin
3637
event.addModifier(modifier: Float)
3738
```
3839

39-
The second allows us to apply a callable function to modify the chance.
40+
The second exposed function allows us to apply a callable function to modify the chance.
4041
We expect three arguments to be passed to it:
4142
* `Float` - Shiny rate
4243
* `ServerPlayer` - Nullable player
@@ -79,6 +80,7 @@ event.addModificationFunction { chance, player, pokemon ->
7980
```
8081

8182
> [!hint] Kotlin specific
83+
> The absence of parentheses in function call is Kotlin syntactic sugar - in this case we only pass callable function as sole argument
8284
> The `return@addModificationFunction` is *specific to Kotlin* because we can explicitly tell Kotlin which function we want to return from.
8385
8486

0 commit comments

Comments
 (0)