feat(game): start a wild battle when a player steps in grass (#68)

* feat(game): start a wild battle when a player steps in grass

* fix(codegen): key species by national dex so the client shows the right mon
This commit is contained in:
Fiereu authored and GitHub committed 2026-07-26 11:04:35 +02:00
1 parent 300bc52531
commit 109cf5f814
18 files changed
+488 -9

No files matched your search

@@ -1,6 +1,12 @@
package de.fiereu.openmmo.common
data class Tile2D(val material: Short, val collision: Byte) {
import de.fiereu.openmmo.common.enums.TileBehavior
data class Tile2D(
val material: Short,
val collision: Byte,
val behavior: TileBehavior = TileBehavior.NORMAL,
) {
val movementCollision: Int
get() = collision.toInt() and 0x03
@@ -0,0 +1,9 @@
package de.fiereu.openmmo.common.enums
/** How a wild monster is met on a map. Each method has its own table and slot weights. */
enum class EncounterMethod {
LAND,
WATER,
ROCK_SMASH,
FISHING,
}
@@ -0,0 +1,11 @@
package de.fiereu.openmmo.common.enums
/**
* What kind of tile the player is standing on, normalized across games from the decomp metatile
* behaviors. Only the behaviors we act on are named, everything else is [NORMAL].
*/
enum class TileBehavior {
NORMAL,
TALL_GRASS,
LONG_GRASS,
}