luminol_data/rmxp/
weapon.rs

1// Copyright (C) 2024 Melody Madeline Lyons
2//
3// This file is part of Luminol.
4//
5// Luminol is free software: you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation, either version 3 of the License, or
8// (at your option) any later version.
9//
10// Luminol is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with Luminol.  If not, see <http://www.gnu.org/licenses/>.
17pub use crate::{
18    id_alox, id_serde, id_vec_alox, id_vec_serde, optional_id_alox, optional_id_serde,
19    optional_path_alox, optional_path_serde, rpg::AudioFile, Path,
20};
21
22#[derive(Default, Debug, serde::Deserialize, serde::Serialize)]
23#[derive(alox_48::Deserialize, alox_48::Serialize)]
24#[marshal(class = "RPG::Weapon")]
25pub struct Weapon {
26    #[serde(with = "id_serde")]
27    #[marshal(with = "id_alox")]
28    pub id: usize,
29    pub name: String,
30    #[serde(with = "optional_path_serde")]
31    #[marshal(with = "optional_path_alox")]
32    pub icon_name: Path,
33    pub description: String,
34    #[serde(with = "optional_id_serde")]
35    #[marshal(with = "optional_id_alox")]
36    pub animation1_id: Option<usize>,
37    #[serde(with = "optional_id_serde")]
38    #[marshal(with = "optional_id_alox")]
39    pub animation2_id: Option<usize>,
40    pub price: i32,
41    pub atk: i32,
42    pub pdef: i32,
43    pub mdef: i32,
44    pub str_plus: i32,
45    pub dex_plus: i32,
46    pub agi_plus: i32,
47    pub int_plus: i32,
48    #[serde(with = "id_vec_serde")]
49    #[marshal(with = "id_vec_alox")]
50    pub element_set: Vec<usize>,
51    #[serde(with = "id_vec_serde")]
52    #[marshal(with = "id_vec_alox")]
53    pub plus_state_set: Vec<usize>,
54    #[serde(with = "id_vec_serde")]
55    #[marshal(with = "id_vec_alox")]
56    pub minus_state_set: Vec<usize>,
57}