Compare commits

...
5 changed files with 13 additions and 1 deletions
+1
View File
@@ -184,6 +184,7 @@
- Added a `battle_ended` callback, backed by the new `BATTLE_ENDED` event, which fires whenever a battle ends for any reason, alongside a multitude of flags not previously covered by `BATTLE_VICTORY`.
- Added `battle_pokemon` to battle actor structs and `has_faced_opponents` to battle Pokémon structs.
- Added the `cobblemon:form_change/bagworm_cloak/plant_cloak`, `sandy_cloak` and `trash_cloak` biome tags, which control Burmy's cloak after battle.
- Added a `battlingEyeHeight` field to set the eye height of a Pokémon while battling
### Particles
@@ -37,7 +37,12 @@ object ChangeEyeHeight {
.then(
Commands.literal("swimming").then(Commands.argument("height", FloatArgumentType.floatArg())
.executes { setEyeHeight(it) { species, height -> species.swimmingEyeHeight = height } })
))
)
.then(
Commands.literal("battling").then(Commands.argument("height", FloatArgumentType.floatArg())
.executes { setEyeHeight(it) { species, height -> species.battlingEyeHeight = height } })
)
)
dispatcher.register(command)
}
@@ -485,6 +485,8 @@ open class PokemonEntity(
}
BATTLE_ID -> {
// refresh dimensions in case this pokemon has a battlingEyeHeight
refreshDimensions()
if (battleId != null) {
busyLocks.remove(BATTLE_LOCK) // Remove in case it's hopped across to another battle, don't want extra battle locks
busyLocks.add(BATTLE_LOCK)
@@ -91,6 +91,7 @@ class Species : ShowdownIdentifiable {
var standingEyeHeight: Float? = null
var swimmingEyeHeight: Float? = null
var flyingEyeHeight: Float? = null
var battlingEyeHeight: Float? = null
var behaviour = PokemonBehaviour()
private set
var pokedex = mutableListOf<String>()
@@ -221,6 +222,7 @@ class Species : ShowdownIdentifiable {
private fun resolveEyeHeight(entity: PokemonEntity): Float? = when {
entity.getCurrentPoseType() in SWIMMING_POSES -> this.swimmingEyeHeight ?: standingEyeHeight
entity.getCurrentPoseType() in FLYING_POSES -> this.flyingEyeHeight ?: standingEyeHeight
entity.isBattling -> this.battlingEyeHeight ?: standingEyeHeight
else -> this.standingEyeHeight
}
@@ -42,6 +42,8 @@
"catchRate": 45,
"eggCycles": 20,
"baseFriendship": 50,
"standingEyeHeight": 0.9,
"battlingEyeHeight": 0.5,
"baseScale": 0.6,
"hitbox": {
"width": 1.5,