Skip to content

Commit 68c458a

Browse files
committed
function_tweaks and striped basculin details.
1 parent 48ec0cc commit 68c458a

File tree

5 files changed

+24
-8
lines changed

5 files changed

+24
-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
@@ -75,15 +75,13 @@ object GenerationsMolangFunctions {
7575
val feature = pokemon.getOrCreateFeature(featureName) ?: return@Function DoubleValue.ZERO
7676

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

8987
"remove_rotom_move" to Function {

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
@@ -129,7 +129,7 @@ private fun Stat.color(): String {
129129
}
130130

131131
private fun String.properCase(): String {
132-
return this.get(0) + this.substring(1).toLowerCase()
132+
return this.get(0) + this.substring(1).lowercase()
133133
}
134134

135135
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: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"type": "choice",
3+
"keys": [
4+
"striped"
5+
],
6+
"default": "random",
7+
"choices": [
8+
"blue",
9+
"white",
10+
"red"
11+
],
12+
"isAspect": true,
13+
"aspectFormat": "{{choice}}striped"
14+
}

0 commit comments

Comments
 (0)