diff --git a/src/game/card/property/moves.rs b/src/game/card/property/moves.rs index b33ca5a..6599f26 100644 --- a/src/game/card/property/moves.rs +++ b/src/game/card/property/moves.rs @@ -89,6 +89,22 @@ impl Bytes for Move { } fn validate(&self) -> Validation { - Validation::new() + // Create the initial validation + let mut validation = Validation::new(); + + // If our name is longer or equal to `0x16` bytes, emit error + if self.name.len() >= 0x16 { + validation.add_error("Name must be at most 21 characters."); + } + + // If the power isn't a multiple of 10, warn, as we don't know how the game handles + // powers that aren't multiples of 10. + // TODO: Verify if the game can handle non-multiple of 10 powers. + if self.power % 10 != 0 { + validation.add_warning("Powers that are not a multiple of 10 are not fully supported."); + } + + // And return the validation + validation } }