Mercurial > molko
comparison examples/example-battle/main.c @ 291:5d8700074dd7
rpg: add battle_message module
author | David Demelier <markand@malikania.fr> |
---|---|
date | Fri, 08 Jan 2021 13:15:24 +0100 |
parents | 76afe639fd72 |
children | 196264679079 |
comparison
equal
deleted
inserted
replaced
290:9948e288925b | 291:5d8700074dd7 |
---|---|
86 } | 86 } |
87 | 87 |
88 static struct character team[] = { | 88 static struct character team[] = { |
89 { | 89 { |
90 .name = "Molko", | 90 .name = "Molko", |
91 .type = "Adventurer", | |
92 .level = 1, | 91 .level = 1, |
93 .hp = 120, | 92 .hp = 120, |
94 .mp = 50, | 93 .mp = 50, |
95 .reset = adventurer_reset, | 94 .reset = adventurer_reset, |
96 .sprites = { | 95 .sprites = { |
121 battle_attack(bt, bt->order_cur->ch, bt->team[0].ch); | 120 battle_attack(bt, bt->order_cur->ch, bt->team[0].ch); |
122 } | 121 } |
123 | 122 |
124 static struct character haunted_wood = { | 123 static struct character haunted_wood = { |
125 .name = "Haunted Wood", | 124 .name = "Haunted Wood", |
126 .type = "Wood", | |
127 .level = 30, | 125 .level = 30, |
128 .reset = haunted_wood_reset, | 126 .reset = haunted_wood_reset, |
129 .sprites = { | 127 .sprites = { |
130 [CHARACTER_SPRITE_NORMAL] = ®istry_sprites[REGISTRY_TEXTURE_HAUNTED_WOOD], | 128 [CHARACTER_SPRITE_NORMAL] = ®istry_sprites[REGISTRY_TEXTURE_HAUNTED_WOOD], |
131 }, | 129 }, |
132 .exec = haunted_wood_strat | 130 .exec = haunted_wood_strat |
133 }; | 131 }; |
134 | 132 |
135 static struct character black_cat = { | 133 static struct character black_cat = { |
136 .name = "Black Cat", | 134 .name = "Black Cat", |
137 .type = "Cat", | |
138 .level = 6, | 135 .level = 6, |
139 .reset = black_cat_reset, | 136 .reset = black_cat_reset, |
140 .sprites = { | 137 .sprites = { |
141 [CHARACTER_SPRITE_NORMAL] = ®istry_sprites[REGISTRY_TEXTURE_BLACK_CAT], | 138 [CHARACTER_SPRITE_NORMAL] = ®istry_sprites[REGISTRY_TEXTURE_BLACK_CAT], |
142 }, | 139 }, |