1use crate::EnemyAction;
2use crate::Table;
3
4#[derive(
5 Debug,
6 serde::Serialize,
7 serde::Deserialize,
8 ruby_marshal_derive::FromValue,
9 ruby_marshal_derive::IntoValue,
10)]
11#[ruby_marshal(object = b"RPG::Enemy")]
12pub struct Enemy {
13 pub animation1_id: i32,
14 pub eva: i32,
15 #[ruby_marshal(name = b"@str")]
16 pub str_: i32,
17 pub weapon_id: i32,
18 pub gold: i32,
19 pub mdef: i32,
20 #[ruby_marshal(
21 from_value = "crate::util::ruby_string2string",
22 into_value = "crate::util::string2ruby_string"
23 )]
24 pub name: String,
25 pub int: i32,
26 pub treasure_prob: i32,
27 pub maxsp: i32,
28 pub exp: i32,
29 pub pdef: i32,
30 pub agi: i32,
31 pub armor_id: i32,
32 pub maxhp: i32,
33 pub state_ranks: Table,
34 pub atk: i32,
35 pub battler_hue: i32,
36 pub animation2_id: i32,
37 pub dex: i32,
38 pub item_id: i32,
39 pub id: i32,
40 pub actions: Vec<EnemyAction>,
41 pub element_ranks: Table,
42 #[ruby_marshal(
43 from_value = "crate::util::ruby_string2string",
44 into_value = "crate::util::string2ruby_string"
45 )]
46 pub battler_name: String,
47}