luminol_data/rmxp/
skill.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::Skill")]
25pub struct Skill {
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    pub scope: crate::rpg::Scope,
35    pub occasion: crate::rpg::Occasion,
36    #[serde(with = "optional_id_serde")]
37    #[marshal(with = "optional_id_alox")]
38    pub animation1_id: Option<usize>,
39    #[serde(with = "optional_id_serde")]
40    #[marshal(with = "optional_id_alox")]
41    pub animation2_id: Option<usize>,
42    pub menu_se: AudioFile,
43    #[serde(with = "optional_id_serde")]
44    #[marshal(with = "optional_id_alox")]
45    pub common_event_id: Option<usize>,
46    pub sp_cost: i32,
47    pub power: i32,
48    pub atk_f: i32,
49    pub eva_f: i32,
50    pub str_f: i32,
51    pub dex_f: i32,
52    pub agi_f: i32,
53    pub int_f: i32,
54    pub hit: i32,
55    pub pdef_f: i32,
56    pub mdef_f: i32,
57    pub variance: i32,
58    #[serde(with = "id_vec_serde")]
59    #[marshal(with = "id_vec_alox")]
60    pub element_set: Vec<usize>,
61    #[serde(with = "id_vec_serde")]
62    #[marshal(with = "id_vec_alox")]
63    pub plus_state_set: Vec<usize>,
64    #[serde(with = "id_vec_serde")]
65    #[marshal(with = "id_vec_alox")]
66    pub minus_state_set: Vec<usize>,
67}