comparison libmlk-adventure/adventure/state/mainmenu.c @ 290:9948e288925b

rpg: add support for items in battle
author David Demelier <markand@malikania.fr>
date Fri, 08 Jan 2021 12:56:10 +0100
parents 3991779aaba9
children 196264679079
comparison
equal deleted inserted replaced
289:63d9fb56c609 290:9948e288925b
40 40
41 #include <adventure/assets.h> 41 #include <adventure/assets.h>
42 #include <adventure/molko.h> 42 #include <adventure/molko.h>
43 #include <adventure/adventure_p.h> 43 #include <adventure/adventure_p.h>
44 44
45 #include <adventure/item/potion.h>
45 #include <adventure/character/neth.h> 46 #include <adventure/character/neth.h>
46 47
47 #include "mainmenu.h" 48 #include "mainmenu.h"
48 #include "continue.h" 49 #include "continue.h"
49 50
65 /* TODO: temporary. */ 66 /* TODO: temporary. */
66 molko.team.members[0] = &character_neth; 67 molko.team.members[0] = &character_neth;
67 character_reset(molko.team.members[0]); 68 character_reset(molko.team.members[0]);
68 molko.team.members[0]->hp = molko.team.members[0]->hpmax; 69 molko.team.members[0]->hp = molko.team.members[0]->hpmax;
69 molko.team.members[0]->mp = molko.team.members[0]->mpmax; 70 molko.team.members[0]->mp = molko.team.members[0]->mpmax;
71 inventory_add(&molko.inventory, &item_potion, 10);
72
70 molko_teleport("maps/map-world.map", -1, -1); 73 molko_teleport("maps/map-world.map", -1, -1);
71 } 74 }
72 75
73 static void 76 static void
74 resume(void) 77 resume(void)