Skip to content

Commit b804d4b

Browse files
committed
function tweaks and striped basculine details.
1 parent ca8ed87 commit b804d4b

File tree

5 files changed

+22
-8
lines changed

5 files changed

+22
-8
lines changed

common/src/main/java/generations/gg/generations/core/generationscore/common/api/GenerationsMolangFunctions.kt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,13 @@ object GenerationsMolangFunctions {
7474
val feature = pokemon.getOrCreateFeature(featureName) ?: return@Function DoubleValue.ZERO
7575

7676
when (feature) {
77-
is StringSpeciesFeature -> it.getStringOrNull(1)?.also {
78-
feature.value = it
79-
}?.also {
80-
feature.apply(pokemon)
81-
} ?: return@Function StringValue(feature.value)
77+
is StringSpeciesFeature -> it.getStringOrNull(1)?.also { feature.value = it }?.also { feature.apply(pokemon) }
8278
is FlagSpeciesFeature -> it.getBooleanOrNull(1)?.also { feature.enabled = it }?.also { feature.apply(pokemon) }
8379
is IntSpeciesFeature -> it.getIntOrNull(1)?.also { feature.value = it }?.also { feature.apply(pokemon) }
84-
else -> return@Function DoubleValue.ZERO
80+
else -> {}
8581
}
82+
83+
DoubleValue.ZERO
8684
}
8785
)
8886
})

common/src/main/java/generations/gg/generations/core/generationscore/common/util/PokemonFunctions.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ private fun Stat.color(): String {
115115
}
116116

117117
private fun String.properCase(): String {
118-
return this.get(0) + this.substring(1).toLowerCase()
118+
return this.get(0) + this.substring(1).lowercase()
119119
}
120120

121121
fun MutableList<Component>.add(pokemon: Pokemon) {

common/src/main/resources/data/generations_core/species_additions/generation5/basculin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"target": "cobblemon:basculin_bluestriped",
2+
"target": "cobblemon:basculin",
33
"behaviour": {
44
"moving": {
55
"swim": {
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"pokemon": ["basculin"],
3+
"features": ["striped"]
4+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"type": "choice",
3+
"keys": ["striped"],
4+
"default": "random",
5+
"choices": [
6+
"blue",
7+
"white",
8+
"red"
9+
],
10+
"isAspect": true,
11+
"aspectFormat": "{{choice}}striped"
12+
}

0 commit comments

Comments
 (0)