timinc-cobble / cobblemon-unchained-1.4-fabric

Naturally spawning Hidden Abilities. KOs and/or captures increase nearby shiny rates, and can also give perfect IVs to nearby spawns.
https://cobble.timinc.us/?loader=fabric&version=1.4&id=unchained
MIT License
1 stars 1 forks source link

Consume points on success #9

Open tmetcalfe89 opened 1 year ago

tmetcalfe89 commented 1 year ago

At the moment, if a player wanders around with the correct points, they'll unlock a threshold forever(ish, a streak could be reset by the player if they KO/capture another species). If a server wants this kind of permanent boost, that's fine, but if they want to consume points on success, we should be able to do that as well.

I propose adding this to all configs:

{
    ...
    // KO streak points consumed on success
    "koStreakPointsCost": 0,
    // KO count points consumed on success
    "koCountPointsCost": 0,
    // Capture streak points consumed on success
    "captureStreakPointsCost": 0,
    // Capture count points consumed on success
    "captureCountPointsCost": 0,
    ...
}

Let's take the default Shiny Booster config as an example. Players get 1 total point for every KO streak point they have, and unlock bonus shiny chances on 101+, 301+, and 501+ total points. If we set koStreakPointsCost to 100, every time a shiny spawns because of a particular player's points, they'll lose 100 KO streak points. So if you were at 104 points, and a Pokemon was turned shiny because of their points, they'll get bumped down to 4 points.

This would probably be best paired with a notification when the module goes off successfully, but that's another issue.

RiftSpatial commented 1 year ago

I'm not sure this'll work how it's expected. If you have multiple boosts using the same points, then, let's say you're going for a 5 IV pokemon, while also having a chance to get a hidden ability, if you get a hidden ability, then you lose points, it may get to the point of being impossible to reach certain thresholds, or even getting what you're going for. It could definitely work if you can work around this, however I just see it being an annoyance. (I do like the idea, as it could solve my issue with Shiny odds being permanently boosted, just so it's probable to hunt rarer spawns.)

tmetcalfe89 commented 1 year ago

@RiftSpatial Hmm, you're right. We'd need a per-player, per-module store saying how many points have been spent. Sounds like a job for Cobblemon Counter.

tmetcalfe89 commented 1 year ago

Actually, I take it back. The new stores should belong to this mod. Cobblemon Counter is just for counting, not for keeping track of spent points.