mirror of
https://gitlab.com/cable-mc/cobblemon.git
synced 2026-10-20 14:16:26 -04:00
Compare commits
11
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
69a4ac41e3 | ||
|
|
24c123405e | ||
|
|
78b94e4fad | ||
|
|
5ff907c5ae | ||
|
|
b6d12e64d9 | ||
|
|
94c863910c | ||
|
|
df155cf2cb | ||
|
|
b44bda602e | ||
|
|
01d0047c36 | ||
|
|
c803cfe22d | ||
|
|
2b8713ce02 |
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user