|
@@ -0,0 +1,52 @@
|
|
1
|
+/****************************************************************************
|
|
2
|
+ * Copyright (C) 2015-2017 by the SotS Team *
|
|
3
|
+ * *
|
|
4
|
+ * This file is part of Sovereign of the Skies. *
|
|
5
|
+ * *
|
|
6
|
+ * Sovereign of the Skies is free software: you can redistribute it *
|
|
7
|
+ * and/or modify it *
|
|
8
|
+ * under the terms of the GNU Lesser General Public License as published *
|
|
9
|
+ * by the Free Software Foundation, either version 3 of the License, or *
|
|
10
|
+ * (at your option) any later version provided you include a copy of the *
|
|
11
|
+ * licence and this header. *
|
|
12
|
+ * *
|
|
13
|
+ * Sovereign of the Skies is distributed in the hope that it will be *
|
|
14
|
+ * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
15
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
16
|
+ * GNU Lesser General Public License for more details. *
|
|
17
|
+ * *
|
|
18
|
+ * You should have received a copy of the GNU Lesser General Public *
|
|
19
|
+ * License along with Sovereign of the Skies. *
|
|
20
|
+ * If not, see <http://www.gnu.org/licenses/>. *
|
|
21
|
+ ****************************************************************************/
|
|
22
|
+
|
|
23
|
+/**
|
|
24
|
+ * @file evolution_methods.c
|
|
25
|
+ * @author Sturmvogel
|
|
26
|
+ * @date 18 apr 2017
|
|
27
|
+ * @brief decide if a pokémon is able to evolve and what the consequences are.
|
|
28
|
+ *
|
|
29
|
+ */
|
|
30
|
+#include <game_engine.h>
|
|
31
|
+#include <pkmn_attributes.h>
|
|
32
|
+#include <agb_debug.h>
|
|
33
|
+
|
|
34
|
+enum evo_source
|
|
35
|
+{
|
|
36
|
+ LEVEL_UP,
|
|
37
|
+ TRADE,
|
|
38
|
+ STONE_EVOLUTION,
|
|
39
|
+ STONE_REQUEST
|
|
40
|
+};
|
|
41
|
+
|
|
42
|
+u16 evolution_try_evolve(struct pokemon* pokemon, enum evo_source source, u16 stoneId)
|
|
43
|
+{
|
|
44
|
+ u16 held_item = pokemon_get_attribute(pokemon, ATTR_HELD_ITEM, NULL);
|
|
45
|
+ u16 species = pokemon_get_attribute(pokemon, ATTR_SPECIES, NULL);
|
|
46
|
+ u16 level = pokemon_get_attribute(pokemon, ATTR_LEVEL, NULL);
|
|
47
|
+ //TODO PID
|
|
48
|
+ dprintf("Species %d tried to evolve.\n", species);
|
|
49
|
+ dprintf("Cause: %d\n", source);
|
|
50
|
+ dprintf("Held Item: %d; Level: %d\nBlocking evolution for debug.", held_item, level);
|
|
51
|
+ return 150;
|
|
52
|
+}
|