comparison libmlk-adventure/adventure/character/neth.c @ 286:3991779aaba9

adventure: initial test of spawn
author David Demelier <markand@malikania.fr>
date Wed, 23 Dec 2020 15:37:48 +0100
parents
children 63d9fb56c609
comparison
equal deleted inserted replaced
285:c43e39745cd8 286:3991779aaba9
1 /*
2 * neth.c -- Neth
3 *
4 * Copyright (c) 2020 David Demelier <markand@malikania.fr>
5 *
6 * Permission to use, copy, modify, and/or distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 */
18
19 #include <rpg/character.h>
20
21 #include <adventure/adventure_p.h>
22 #include <adventure/assets.h>
23
24 #include "neth.h"
25
26 static void
27 reset(struct character *ch)
28 {
29 /* TODO: compute hpmax given the level. */
30 ch->hpmax = 570;
31 ch->mpmax = 50;
32 ch->atk = 22;
33 ch->def = 19;
34 ch->agt = 16;
35 ch->luck = 3;
36 }
37
38 struct character character_neth = {
39 .name = N_("Neth"),
40 .level = 1,
41 .sprites = {
42 [CHARACTER_SPRITE_NORMAL] = &assets_sprites[ASSETS_SPRITE_CHARACTER_NETH],
43 [CHARACTER_SPRITE_SWORD] = &assets_sprites[ASSETS_SPRITE_CHARACTER_NETH_SWORD]
44 },
45 .reset = reset
46 };