forked from mirrors/cobblemon
Merge branch 'vera-bait-changes' into 'main'
Bait Changes See merge request cable-mc/cobblemon!2189
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
- Factor in the weight of pokemon when calculating pushing forces between hitboxes.
|
||||
- Remade the Starter Selection Screen with new assets
|
||||
- Refactored berry trees to be less impactful on TPS (more performant)
|
||||
- Changed the bait effects of the following items: (Vanilla) Sweet & Glow Berries, Golden & Enchanted Golden Apples (Cobblemon) Custap, Eggant, Hopo & Micle Berries, Sweet Hearts
|
||||
|
||||
### Fixes
|
||||
- Fixes https://gitlab.com/cable-mc/cobblemon/-/issues/1943
|
||||
|
||||
@@ -68,6 +68,7 @@ class SpawnBait(
|
||||
val TYPING = cobblemonResource("typing")
|
||||
val EGG_GROUP = cobblemonResource("egg_group")
|
||||
val SHINY_REROLL = cobblemonResource("shiny_reroll")
|
||||
val MARK_CHANCE = cobblemonResource("mark_chance")
|
||||
val DROPS_REROLL = cobblemonResource("drops_reroll")
|
||||
val HIDDEN_ABILITY_CHANCE = cobblemonResource("ha_chance")
|
||||
val POKEMON_CHANCE = cobblemonResource("pokemon_chance")
|
||||
@@ -86,6 +87,7 @@ class SpawnBait(
|
||||
registerEffect(NATURE) { entity, effect -> FishingSpawnCause.alterNatureAttempt(entity, effect) }
|
||||
registerEffect(IV) { entity, effect -> FishingSpawnCause.alterIVAttempt(entity, effect) }
|
||||
registerEffect(SHINY_REROLL) { entity, effect -> FishingSpawnCause.shinyReroll(entity, effect) }
|
||||
registerEffect(MARK_CHANCE) { entity, effect -> FishingSpawnCause.alterMarksAttempt(entity, effect) }
|
||||
registerEffect(DROPS_REROLL) { entity, effect -> FishingSpawnCause.saveDropsReroll(entity, effect) }
|
||||
registerEffect(GENDER_CHANCE) { entity, effect -> FishingSpawnCause.alterGenderAttempt(entity, effect) }
|
||||
registerEffect(LEVEL_RAISE) { entity, effect -> FishingSpawnCause.alterLevelAttempt(entity, effect) }
|
||||
|
||||
+8
@@ -62,6 +62,14 @@ class FishingSpawnCause(
|
||||
}
|
||||
}
|
||||
|
||||
fun alterMarksAttempt(pokemonEntity: PokemonEntity, effect: SpawnBait.Effect) {
|
||||
// This is not needed as markings are only applied when the pokémon gets captured by a player,
|
||||
// but let's leave it here just in case
|
||||
if (pokemonEntity.pokemon.marks.isNotEmpty()) return
|
||||
|
||||
pokemonEntity.pokemon.applyPotentialMarks(1.0 + (effect.value / 100))
|
||||
}
|
||||
|
||||
fun saveDropsReroll(pokemonEntity: PokemonEntity, effect: SpawnBait.Effect) {
|
||||
pokemonEntity.pokemon.forcedAspects += DROPS_REROLL_ASPECT
|
||||
}
|
||||
|
||||
@@ -1291,7 +1291,7 @@ open class Pokemon : ShowdownIdentifiable {
|
||||
* Calculate mark to give from list of potential marks.
|
||||
* @return True if a mark has been applied, false otherwise
|
||||
*/
|
||||
fun applyPotentialMarks(): Boolean {
|
||||
fun applyPotentialMarks(chance: Double = 1.0): Boolean {
|
||||
// Remove any marks that are already owned
|
||||
val potentials = potentialMarks.filterNot { mark -> marks.contains(mark) }.toMutableSet()
|
||||
|
||||
@@ -1303,7 +1303,7 @@ open class Pokemon : ShowdownIdentifiable {
|
||||
val probability = chanceGroup.second.coerceIn(0F, 1F) * 100
|
||||
val randomValue = Random.nextDouble(0.0, 100.0)
|
||||
|
||||
if (randomValue < probability) {
|
||||
if (randomValue / chance < probability) {
|
||||
selectedMark = group.random()
|
||||
break
|
||||
}
|
||||
|
||||
@@ -1030,6 +1030,7 @@
|
||||
"cobblemon.fishing_bait_effects.typing.tooltip": "%1$s%% - %3$s× Chance for %2$s Types",
|
||||
"cobblemon.fishing_bait_effects.egg_group.tooltip": "%1$s%% - %3$s× Chance for %2$s Egg Group",
|
||||
"cobblemon.fishing_bait_effects.shiny_reroll.tooltip": "%1$s%% - %3$s× Shiny Chance",
|
||||
"cobblemon.fishing_bait_effects.mark_chance.tooltip": "%1$s%% - +%3$s%% Mark Chance",
|
||||
"cobblemon.fishing_bait_effects.drops_reroll.tooltip": "%1$s%% - %3$s× Drops Reroll",
|
||||
"cobblemon.fishing_bait_effects.ha_chance.tooltip": "%1$s%% - Attract Hidden Ability",
|
||||
"cobblemon.fishing_bait_effects.pokemon_chance.tooltip": "%1$s%% - Reel in a Pokémon",
|
||||
|
||||
+6
-10
@@ -1,14 +1,10 @@
|
||||
{
|
||||
"item": "cobblemon:custap_berry",
|
||||
"effects": [
|
||||
{
|
||||
"type": "cobblemon:pokemon_chance",
|
||||
"chance": 0.7
|
||||
},
|
||||
{
|
||||
"type": "cobblemon:bite_time",
|
||||
"chance": 1.0,
|
||||
"value": 0.25
|
||||
}
|
||||
{
|
||||
"type": "cobblemon:drops_reroll",
|
||||
"chance": 1.0,
|
||||
"value": 1.0
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
+8
-1
@@ -1,4 +1,11 @@
|
||||
{
|
||||
"item": "cobblemon:eggant_berry",
|
||||
"effects": [ ]
|
||||
"effects": [
|
||||
{
|
||||
"type": "cobblemon:egg_group",
|
||||
"chance": 1.0,
|
||||
"value": 10.0,
|
||||
"subcategory": "ditto"
|
||||
}
|
||||
]
|
||||
}
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
{
|
||||
"type": "cobblemon:bite_time",
|
||||
"chance": 1.0,
|
||||
"value": 0.25
|
||||
"value": 0.33
|
||||
}
|
||||
]
|
||||
}
|
||||
+6
-10
@@ -1,14 +1,10 @@
|
||||
{
|
||||
"item": "cobblemon:micle_berry",
|
||||
"effects": [
|
||||
{
|
||||
"type": "cobblemon:pokemon_chance",
|
||||
"chance": 1.0
|
||||
},
|
||||
{
|
||||
"type": "cobblemon:bite_time",
|
||||
"chance": 1.0,
|
||||
"value": 0.25
|
||||
}
|
||||
{
|
||||
"type": "cobblemon:mark_chance",
|
||||
"chance": 1.0,
|
||||
"value": 5.0
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
{
|
||||
"type": "cobblemon:bite_time",
|
||||
"chance": 1.0,
|
||||
"value": 0.125
|
||||
"value": 0.25
|
||||
}
|
||||
]
|
||||
}
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
{
|
||||
"type": "cobblemon:bite_time",
|
||||
"chance": 1.0,
|
||||
"value": 0.1
|
||||
"value": 1.0
|
||||
},
|
||||
{
|
||||
"type": "cobblemon:rarity_bucket",
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
{
|
||||
"type": "cobblemon:bite_time",
|
||||
"chance": 1.0,
|
||||
"value": 0.25
|
||||
"value": 0.75
|
||||
},
|
||||
{
|
||||
"type": "cobblemon:rarity_bucket",
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"item": "cobblemon:sweet_heart",
|
||||
"effects": [
|
||||
{
|
||||
"type": "cobblemon:friendship",
|
||||
"chance": 1.0,
|
||||
"value": 35.0
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user