Explorar el Código

first version speed calc system

SBird1337 hace 8 años
padre
commit
558666c4cf

+ 3
- 0
bpre.sym Ver fichero

@@ -24,6 +24,7 @@ gpu_sprites_upload = 0x08007320|1;
24 24
 obj_delete_all = 0x8007770|1;
25 25
 camera_move_and_redraw = 0x0805ACB4|1;
26 26
 calc_circle = 0x0807EE2C|1;
27
+random = 0x08044EC8|1;
27 28
 
28 29
 pal_decompress_slice_to_faded_and_unfaded = 0x080703A8|1;
29 30
 gpu_tile_obj_decompress_alloc_tag_and_upload = 0x0800F035;
@@ -94,9 +95,11 @@ battle_hitmarker = 0x02023dd0;
94 95
 battle_stat_changer = 0x02023FDE;
95 96
 battle_menu_chosen_item = 0x02023D7C;
96 97
 battle_stuff_ptr = 0x02023FE8;
98
+battle_enigma_berry = 0x02023F54;
97 99
 side_affecting_halfword = 0x2023DDE;
98 100
 
99 101
 item_get_quality = 0x0809A948|1;
102
+item_get_x12 = 0x0809A924|1;
100 103
 
101 104
 
102 105
 battle_status3_bits_pbs = 0x02023DFC;

+ 20
- 0
nbproject/configurations.xml Ver fichero

@@ -4593,6 +4593,7 @@
4593 4593
           <df name="scripts">
4594 4594
             <in>hazards.S</in>
4595 4595
           </df>
4596
+          <in>battle_abilities.c</in>
4596 4597
           <in>battle_help.c</in>
4597 4598
           <in>battle_initiative.c</in>
4598 4599
           <in>battle_initiative.h</in>
@@ -4606,6 +4607,12 @@
4606 4607
         <df name="encode">
4607 4608
           <in>crc32.c</in>
4608 4609
         </df>
4610
+        <df name="include">
4611
+          <in>battle_abilities.h</in>
4612
+          <in>item_effects.h</in>
4613
+          <in>items.h</in>
4614
+          <in>pokemon.h</in>
4615
+        </df>
4609 4616
         <df name="interface">
4610 4617
           <in>lcd_io_test.S</in>
4611 4618
           <in>textbox_mugshots.c</in>
@@ -27158,6 +27165,11 @@
27158 27165
       </item>
27159 27166
       <item path="src/battle_bg/battle_bg_hook.S" ex="false" tool="4" flavor2="0">
27160 27167
       </item>
27168
+      <item path="src/battle_engine/battle_abilities.c"
27169
+            ex="false"
27170
+            tool="0"
27171
+            flavor2="0">
27172
+      </item>
27161 27173
       <item path="src/battle_engine/battle_help.c" ex="false" tool="0" flavor2="0">
27162 27174
       </item>
27163 27175
       <item path="src/battle_engine/battle_initiative.c"
@@ -27201,6 +27213,14 @@
27201 27213
       </item>
27202 27214
       <item path="src/encode/crc32.c" ex="false" tool="0" flavor2="0">
27203 27215
       </item>
27216
+      <item path="src/include/battle_abilities.h" ex="false" tool="3" flavor2="0">
27217
+      </item>
27218
+      <item path="src/include/item_effects.h" ex="false" tool="3" flavor2="0">
27219
+      </item>
27220
+      <item path="src/include/items.h" ex="false" tool="3" flavor2="0">
27221
+      </item>
27222
+      <item path="src/include/pokemon.h" ex="false" tool="3" flavor2="0">
27223
+      </item>
27204 27224
       <item path="src/interface/lcd_io_test.S" ex="false" tool="4" flavor2="0">
27205 27225
       </item>
27206 27226
       <item path="src/interface/textbox_mugshots.c" ex="false" tool="0" flavor2="0">

+ 5
- 0
nbproject/private/configurations.xml Ver fichero

@@ -4731,6 +4731,7 @@
4731 4731
           <df name="scripts">
4732 4732
             <in>hazards.S</in>
4733 4733
           </df>
4734
+          <in>battle_abilities.c</in>
4734 4735
           <in>battle_help.c</in>
4735 4736
           <in>battle_help.h</in>
4736 4737
           <in>battle_initiative.c</in>
@@ -4750,6 +4751,7 @@
4750 4751
           <in>abilities.h</in>
4751 4752
           <in>attack_names.h</in>
4752 4753
           <in>battle.h</in>
4754
+          <in>battle_abilities.h</in>
4753 4755
           <in>battle_locations.h</in>
4754 4756
           <in>battle_script.h</in>
4755 4757
           <in>battle_structs.h</in>
@@ -4758,10 +4760,13 @@
4758 4760
           <in>config.h</in>
4759 4761
           <in>custom_structs.h</in>
4760 4762
           <in>fade.h</in>
4763
+          <in>item_effects.h</in>
4764
+          <in>items.h</in>
4761 4765
           <in>lcd.h</in>
4762 4766
           <in>moves.h</in>
4763 4767
           <in>objects.h</in>
4764 4768
           <in>pkmn_types.h</in>
4769
+          <in>pokemon.h</in>
4765 4770
           <in>sound.h</in>
4766 4771
           <in>types.h</in>
4767 4772
         </df>

+ 5
- 0
patches/battle_engine/battle_engine.asm Ver fichero

@@ -6,4 +6,9 @@ bx r0
6 6
 .org 0x08024FE4
7 7
 ldr r4, =battle_switch_in_hook|1
8 8
 bx r4
9
+.pool
10
+
11
+.org 0x08014CD8
12
+ldr r3, =get_first_to_strike|1
13
+bx r3
9 14
 .pool

+ 22
- 0
src/battle_engine/battle_abilities.c Ver fichero

@@ -0,0 +1,22 @@
1
+#include <battle_abilities.h>
2
+#include <custom_structs.h>
3
+
4
+#include "battle_structs.h"
5
+
6
+u8 has_ability_effect(u8 bank, u8 mold_breaker, u8 gastro)
7
+{
8
+    if(gastro && custom_battle_elements.ptr->bank_affecting[bank].gastro_acided)
9
+        return false;
10
+    return true;
11
+    //TODO: MOLD BREAKER
12
+}
13
+
14
+u8 weather_abilities_effect()
15
+{
16
+    //TODO: AIR LOCK AND CLOUD NINE
17
+    return true;
18
+}
19
+u8 has_ability(u8 bank, u8 ability)
20
+{
21
+    return (has_ability_effect(bank,0,1) && battle_participants[bank].ability_id == ability);
22
+}

+ 12
- 0
src/battle_engine/battle_help.c Ver fichero

@@ -89,6 +89,18 @@ u8 has_type(u8 bank, u8 type) {
89 89
     return battle_participants[bank].type1 == type || battle_participants[bank].type2 == type;
90 90
 }
91 91
 
92
+u8 get_item_effect(u8 bank, u8 check_negating_effects) {
93
+    if (check_negating_effects) {
94
+        if (battle_participants[bank].ability_id == ABILITY_KLUTZ || custom_battle_elements.ptr->bank_affecting[bank].embargo)
95
+            return ITEM_EFFECT_NOEFFECT;
96
+    }
97
+    if (battle_participants[bank].held_item == ITEM_ENIGMABERRY) {
98
+        return battle_enigma_berry[bank].battle_effect_x12;
99
+    } else {
100
+        return item_get_x12(battle_participants[bank].held_item);
101
+    }
102
+}
103
+
92 104
 u8 cant_poison(u8 bank, u8 self_inflicted) { //0 == can poison
93 105
     //1 == is already poisoned
94 106
     //2 == has other major condition

+ 1
- 0
src/battle_engine/battle_help.h Ver fichero

@@ -3,6 +3,7 @@
3 3
 #ifndef BATTLE_HELP_H_
4 4
 #define BATTLE_HELP_H_
5 5
 
6
+u8 get_item_effect(u8 bank, u8 check_negating_effects);
6 7
 u16 damage_type_effectiveness_update(u8 attacking_type, u8 defending_type, u8 atk_bank, u8 def_bank, u16 chained_effect, u8 airstatus);
7 8
 u16 apply_type_effectiveness(u16 chained_effect, u8 move_type, u8 target_bank, u8 atk_bank, u8 airstatus);
8 9
 u16 type_effectiveness_calc(u16 move, u8 move_type, u8 atk_bank, u8 def_bank, u8 effects_handling_and_recording);

+ 72
- 2
src/battle_engine/battle_initiative.c Ver fichero

@@ -1,7 +1,54 @@
1 1
 #include "battle_initiative.h"
2
-
3 2
 struct move_info move_table[1024];
4 3
 
4
+u16 get_speed(u8 bank) {
5
+    u16 speed = battle_participants[bank].spd;
6
+    switch (get_item_effect(bank, 1)) {
7
+        case ITEM_EFFECT_IRONBALL:
8
+            speed >>= 1;
9
+            break;
10
+        case ITEM_EFFECT_CHOICESCARF:
11
+            speed = (speed * 150) / 100;
12
+            break;
13
+        case ITEM_EFFECT_QUICKPOWDER:
14
+            if (battle_participants[bank].poke_species == POKE_DITTO && !battle_participants[bank].status2.transformed)
15
+                speed <<= 1;
16
+            break;
17
+    }
18
+    if(has_ability_effect(bank, 0, 1))
19
+    {
20
+        u8 weather_effects = weather_abilities_effect();
21
+        switch (battle_participants[bank].ability_id)
22
+        {
23
+            case ABILITY_CHLOROPHYLL:
24
+                if(weather_effects && (battle_weather.flags.harsh_sun || battle_weather.flags.permament_sun || battle_weather.flags.sun))
25
+                    speed *=2;
26
+                break;
27
+            case ABILITY_SWIFT_SWIM:
28
+                if(weather_effects && (battle_weather.flags.rain || battle_weather.flags.downpour || battle_weather.flags.permament_rain || battle_weather.flags.heavy_rain))
29
+                    speed *=2;
30
+                break;
31
+            case ABILITY_SAND_RUSH:
32
+                if(weather_effects && (battle_weather.flags.sandstorm || battle_weather.flags.permament_sandstorm))
33
+                    speed *= 2;
34
+                break;
35
+            case ABILITY_QUICK_FEET:
36
+                if(battle_participants[bank].status.flags.burn || battle_participants[bank].status.flags.poison || battle_participants[bank].status.flags.toxic_poison)
37
+                    speed *= 2;
38
+                else if(battle_participants[bank].status.flags.paralysis)
39
+                    speed *= 4;
40
+                break;
41
+        }
42
+    }
43
+    if(battle_participants[bank].status.flags.paralysis)
44
+        speed >= 2;
45
+    if(custom_battle_elements.ptr->side_affecting[get_side_from_bank(bank)].tailwind)
46
+        speed *= 2;
47
+    //TODO: unburden
48
+    speed = (speed * stat_buffs[battle_participants[bank].spd_buff].dividend) / (stat_buffs[battle_participants[bank].spd_buff].divisor);
49
+    return speed;
50
+}
51
+
5 52
 enum init_enum get_first_to_strike(u8 bank_one, u8 bank_two, u8 ignore_prio) {
6 53
     enum init_enum result = TIE;
7 54
     //TODO: implement quash
@@ -22,8 +69,31 @@ enum init_enum get_first_to_strike(u8 bank_one, u8 bank_two, u8 ignore_prio) {
22 69
             result = TWO;
23 70
     }
24 71
     if (result == TIE) {
25
-        //TODO: calculate item effects
72
+        //TODO: calculate item bracket effects
26 73
         //TODO: calculate speed
74
+        u8 stall_one = has_ability(bank_one, ABILITY_STALL);
75
+        u8 stall_two = has_ability(bank_two, ABILITY_STALL);
76
+        if(stall_one && !stall_two)
77
+            result = TWO;
78
+        else if(stall_two && !stall_one)
79
+            result = ONE;
80
+        else
81
+        {
82
+            u16 speed_one = get_speed(bank_one);
83
+            u16 speed_two = get_speed(bank_two);
84
+            if(custom_battle_elements.ptr->field_affecting.trick_room || (stall_one && stall_two))
85
+            {
86
+                u16 swap_speed = speed_one;
87
+                speed_one = speed_two;
88
+                speed_two = swap_speed;
89
+            }
90
+            if(speed_one > speed_two)
91
+                result = ONE;
92
+            else if(speed_two > speed_one)
93
+                result = TWO;
94
+            else if (random() & 1)
95
+                result = ONE;
96
+        }
27 97
     }
28 98
     return result;
29 99
 }

+ 2
- 1
src/battle_engine/battle_initiative.h Ver fichero

@@ -2,11 +2,12 @@
2 2
 #define BATTLE_INITIATIVE_H
3 3
 
4 4
 #include <battle.h>
5
+#include "battle_help.h"
5 6
 #include <bpre.h>
6 7
 
7 8
 enum init_enum {ONE, TWO, TIE};
8 9
 
9
-enum init_enum get_first_strike_bank(u8 bank1, u8 bank2, u8 ignore_prio);
10
+enum init_enum get_first_to_strike(u8 bank1, u8 bank2, u8 ignore_prio);
10 11
 
11 12
 #endif /* BATTLE_INITIATIVE_H */
12 13
 

+ 0
- 3
src/battle_engine/custom_structs_malloc.c Ver fichero

@@ -6,9 +6,6 @@
6 6
 void malloc_battle_structs()
7 7
 {
8 8
 	custom_battle_elements.ptr=(struct custom_battle_struct*)malloc(sizeof(struct custom_battle_struct));
9
-        custom_battle_elements.ptr->side_affecting[0].stealth_rock=1;
10
-        custom_battle_elements.ptr->side_affecting[0].toxic_spikes_psn=1;
11
-        custom_battle_elements.ptr->side_affecting[0].sticky_web=1;
12 9
 }
13 10
 
14 11
 void free_battle_structs()

+ 12
- 1
src/include/battle.h Ver fichero

@@ -4,6 +4,10 @@
4 4
 #include <pkmn_types.h>
5 5
 #include <abilities.h>
6 6
 #include <moves.h>
7
+#include <item_effects.h>
8
+#include <items.h>
9
+#include <pokemon.h>
10
+#include <battle_abilities.h>
7 11
 
8 12
 #ifndef BATTLE_H_
9 13
 #define BATTLE_H_
@@ -11,11 +15,18 @@
11 15
 #define REQUEST_HELDITEM_BATTLE 0x2
12 16
 #define REQUEST_STATUS_BATTLE 0x28
13 17
 
18
+struct stat_fractions{
19
+    u8 dividend;
20
+    u8 divisor;
21
+};
22
+
23
+struct stat_fractions stat_buffs[] = { {2, 8}, {2, 7}, {2, 6}, {2, 5}, {2, 4}, {2, 3}, {2, 2}, {3, 2}, {4, 2}, {5, 2}, {6, 2}, {7, 2}, {8, 2} };
24
+
14 25
 u8 get_side_from_bank(u8 bank);
15 26
 
16 27
 void mark_buffer_bank_for_execution(u8 bank);
17 28
 void prepare_setattributes_in_battle(u8 buffer, u8 data_request, u8 unkown, u8 data_to_add, void* ptr_to_attribute);
18
-
29
+u8 get_item_x12_battle_function(u16 item_id);
19 30
 void battle_script_push();
20 31
 
21 32
 #endif

+ 11
- 0
src/include/battle_abilities.h Ver fichero

@@ -0,0 +1,11 @@
1
+#ifndef BATTLE_ABILITIES_H
2
+#define BATTLE_ABILITIES_H
3
+
4
+#include <bpre.h>
5
+
6
+u8 has_ability_effect(u8 bank, u8 mold_breaker, u8 gastro);
7
+u8 weather_abilities_effect();
8
+u8 has_ability(u8 bank, u8 ability);
9
+
10
+#endif /* BATTLE_ABILITIES_H */
11
+

+ 10
- 0
src/include/battle_structs.h Ver fichero

@@ -250,4 +250,14 @@ struct move_info{
250 250
     u8 arg2;
251 251
 };
252 252
 
253
+struct b_enigma_berry{
254
+    u8 field0[7];
255
+    u8 battle_effect_x12;
256
+    u8 field8[18];
257
+    u8 quality;
258
+    u8 field1B;
259
+};
260
+
261
+extern struct b_enigma_berry battle_enigma_berry[4];
262
+
253 263
 #endif

+ 1
- 1
src/include/bpre.h Ver fichero

@@ -11,7 +11,7 @@
11 11
 u16 *var_access(int index);
12 12
 u8 flag_check(int flag);
13 13
 void clear_flag(u16 flag);
14
-
14
+u16 random();
15 15
 void* malloc(int size);
16 16
 void free(void* address);
17 17
 

+ 143
- 0
src/include/item_effects.h Ver fichero

@@ -0,0 +1,143 @@
1
+#ifndef ITEM_BATTLE_EFFECTS_H
2
+#define ITEM_BATTLE_EFFECTS_H
3
+
4
+#define ITEM_EFFECT_NOEFFECT 0
5
+#define ITEM_EFFECT_ORANBERRY 1
6
+#define ITEM_EFFECT_CHERIBERRY 2
7
+#define ITEM_EFFECT_CHESTOBERRY 3
8
+#define ITEM_EFFECT_PECHABERRY 4
9
+#define ITEM_EFFECT_RAWSTBERRY 5
10
+#define ITEM_EFFECT_ASPEARBERRY 6
11
+#define ITEM_EFFECT_LEPPABERRY 7
12
+#define ITEM_EFFECT_PERSIMBERRY 8
13
+#define ITEM_EFFECT_LUMBERRY 9
14
+#define ITEM_EFFECT_FIGYBERRY 0xA
15
+#define ITEM_EFFECT_WIKIBERRY 0xB
16
+#define ITEM_EFFECT_MAGOBERRY 0xC
17
+#define ITEM_EFFECT_AGUAVBERRY 0xD
18
+#define ITEM_EFFECT_IAPAPABERRY 0xE
19
+#define ITEM_EFFECT_LIECHIBERRY 0xF
20
+#define ITEM_EFFECT_GANLONBERRY 0x10
21
+#define ITEM_EFFECT_SALACBERRY 0x11
22
+#define ITEM_EFFECT_PETAYABERRY 0x12
23
+#define ITEM_EFFECT_APICOTBERRY 0x13
24
+#define ITEM_EFFECT_LANSATBERRY 0x14
25
+#define ITEM_EFFECT_STARFBERRY 0x15
26
+#define ITEM_EFFECT_BRIGHTPOWDER 0x16
27
+#define ITEM_EFFECT_WHITEHERB 0x17
28
+#define ITEM_EFFECT_MACHOBRACE 0x18
29
+#define ITEM_EFFECT_EXPSHARE 0x19
30
+#define ITEM_EFFECT_QUICKCLAW 0x1A
31
+#define ITEM_EFFECT_SOOTHEBELL 0x1B
32
+#define ITEM_EFFECT_MENTALHERB 0x1C
33
+#define ITEM_EFFECT_CHOICEBAND 0x1D
34
+#define ITEM_EFFECT_KINGSROCK 0x1E
35
+#define ITEM_EFFECT_SILVERPOWDER 0x1F
36
+#define ITEM_EFFECT_AMULETCOIN 0x20
37
+#define ITEM_EFFECT_CLENSEATAG 0x21
38
+#define ITEM_EFFECT_SOULDEW 0x22
39
+#define ITEM_EFFECT_DEEPSEATOOTH 0x23
40
+#define ITEM_EFFECT_DEEPSEASCALE 0x24
41
+#define ITEM_EFFECT_SMOKEBALL 0x25
42
+#define ITEM_EFFECT_EVERSTONE 0x26
43
+#define ITEM_EFFECT_FOCUSBAND 0x27
44
+#define ITEM_EFFECT_LUCKYEGG 0x28
45
+#define ITEM_EFFECT_SCOPELENS 0x29
46
+#define ITEM_EFFECT_METALCOAT 0x2A
47
+#define ITEM_EFFECT_LEFTOVERS 0x2B
48
+#define ITEM_EFFECT_DRAGONSCALE 0x2C
49
+#define ITEM_EFFECT_LIGHTBALL 0x2D
50
+#define ITEM_EFFECT_SOFTSAND 0x2E
51
+#define ITEM_EFFECT_HARDSTONE 0x2F
52
+#define ITEM_EFFECT_MIRACLESEED 0x30
53
+#define ITEM_EFFECT_BLACKGLASSES 0x31
54
+#define ITEM_EFFECT_BLACKBELT 0x32
55
+#define ITEM_EFFECT_MAGNET 0x33
56
+#define ITEM_EFFECT_MYSTICWATER 0x34
57
+#define ITEM_EFFECT_SHARPBEAK 0x35
58
+#define ITEM_EFFECT_POISONBARB 0x36
59
+#define ITEM_EFFECT_NEVERMELTICE 0x37
60
+#define ITEM_EFFECT_SPELLTAG 0x38
61
+#define ITEM_EFFECT_TWISTEDSPOON 0x39
62
+#define ITEM_EFFECT_CHARCOAL 0x3A
63
+#define ITEM_EFFECT_DRAGONFANG 0x3B
64
+#define ITEM_EFFECT_SILKSCARF 0x3C
65
+#define ITEM_EFFECT_UPGRADE 0x3D
66
+#define ITEM_EFFECT_SHELLBELL 0x3E
67
+#define ITEM_EFFECT_LUCKYPUNCH 0x3F
68
+#define ITEM_EFFECT_METALPOWDER 0x40
69
+#define ITEM_EFFECT_THICKCLUB 0x41
70
+#define ITEM_EFFECT_STICK 0x42
71
+
72
+//new effects
73
+#define ITEM_EFFECT_FAIRYPLATE 0x46
74
+#define ITEM_EFFECT_CHOICESPECS 0x47
75
+#define ITEM_EFFECT_ADAMANTORB 0x48
76
+#define ITEM_EFFECT_GRISEOUSORB 0x49
77
+#define ITEM_EFFECT_LIFEORB 0x4A
78
+#define ITEM_EFFECT_LUSTROUSORB 0x4B
79
+#define ITEM_EFFECT_EVIOLITE 0x4C
80
+#define ITEM_EFFECT_ASSAULTVEST 0x4D
81
+#define ITEM_EFFECT_MUSCLEBAND 0x4E
82
+#define ITEM_EFFECT_WISEGLASSES 0x4F
83
+#define ITEM_EFFECT_BURNDRIVE 0x50
84
+#define ITEM_EFFECT_CHILLDRIVE 0x51
85
+#define ITEM_EFFECT_DOUSEDRIVE 0x52
86
+#define ITEM_EFFECT_SHOCKDRIVE 0x53
87
+#define ITEM_EFFECT_RINGTARGET 0x54
88
+#define ITEM_EFFECT_EXPERTBELT 0x55
89
+#define ITEM_EFFECT_OCCABERRY 0x56
90
+#define ITEM_EFFECT_PASSHOBERRY 0x57
91
+#define ITEM_EFFECT_WACANBERRY 0x58
92
+#define ITEM_EFFECT_RINDOBERRY 0x59
93
+#define ITEM_EFFECT_YACHEBERRY 0x5A
94
+#define ITEM_EFFECT_CHOPLEBERRY 0x5B
95
+#define ITEM_EFFECT_KEBIABERRY 0x5C
96
+#define ITEM_EFFECT_SHUCABERRY 0x5D
97
+#define ITEM_EFFECT_COBABERRY 0x5E
98
+#define ITEM_EFFECT_PAPAYABERRY 0x5F
99
+#define ITEM_EFFECT_TANGABERRY 0x60
100
+#define ITEM_EFFECT_CHARTIBERRY 0x61
101
+#define ITEM_EFFECT_KASIBBERRY 0x62
102
+#define ITEM_EFFECT_HABANBERRY 0x63
103
+#define ITEM_EFFECT_COLBURBERRY 0x64
104
+#define ITEM_EFFECT_BABIRIBERRY 0x65
105
+#define ITEM_EFFECT_ROSELIBERRY 0x66
106
+#define ITEM_EFFECT_CHILANBERRY 0x67
107
+#define ITEM_EFFECT_WIDELENS 0x68
108
+#define ITEM_EFFECT_ZOOMLENS 0x69
109
+#define ITEM_EFFECT_FOCUSSASH 0x6A
110
+#define ITEM_EFFECT_SAFETYGOOGLES 0x6B
111
+#define ITEM_EFFECT_CHOICESCARF 0x6C
112
+#define ITEM_EFFECT_LAGGINGTAIL 0x6D
113
+#define ITEM_EFFECT_FLOATSTONE 0x6E
114
+#define ITEM_EFFECT_METRONOME 0x6F
115
+#define ITEM_EFFECT_IRONBALL 0x70
116
+#define ITEM_EFFECT_AIRBALLOON 0x71
117
+#define ITEM_EFFECT_HEATROCK 0x72
118
+#define ITEM_EFFECT_DAMPROCK 0x73
119
+#define ITEM_EFFECT_SMOOTHROCK 0x74
120
+#define ITEM_EFFECT_ICYROCK 0x75
121
+#define ITEM_EFFECT_SITRUSBERRY 0x76
122
+#define ITEM_EFFECT_BLACKSLUDGE 0x77
123
+#define ITEM_EFFECT_STICKYBARB 0x78
124
+#define ITEM_EFFECT_FLAMEORB 0x79
125
+#define ITEM_EFFECT_TOXICORB 0x7A
126
+#define ITEM_EFFECT_WEAKNESSPOLICY 0x7B
127
+#define ITEM_EFFECT_EJECTBUTTON 0x7C
128
+#define ITEM_EFFECT_REDCARD 0x7D
129
+#define ITEM_EFFECT_ROCKYHELMET 0x7E
130
+#define ITEM_EFFECT_LIGHTCLAY 0x7F
131
+#define ITEM_EFFECT_DESTINYKNOT 0x80
132
+#define ITEM_EFFECT_LUMINOUSMOSS 0x81
133
+#define ITEM_EFFECT_CELLBATTERY 0x82
134
+#define ITEM_EFFECT_SNOWBALL 0x83
135
+#define ITEM_EFFECT_ABSORBBULB 0x84
136
+#define ITEM_EFFECT_QUICKPOWDER 0x85
137
+#define ITEM_EFFECT_BIGROOT 0x86
138
+#define ITEM_EFFECT_BINDINGBAND 0x87
139
+#define ITEM_EFFECT_GRIPCLAW 0x88
140
+#define ITEM_EFFECT_CUSTAPBERRY 0x89
141
+#define ITEM_EFFECT_POWERHERB 0x8A
142
+
143
+#endif /* ITEM_BATTLE_EFFECTS_H_H */

+ 6
- 0
src/include/items.h Ver fichero

@@ -0,0 +1,6 @@
1
+#ifndef ITEM_IDS_H
2
+#define ITEM_IDS_H
3
+
4
+#define ITEM_ENIGMABERRY 0xAF
5
+
6
+#endif /* ITEM_IDS */

+ 18
- 0
src/include/pokemon.h Ver fichero

@@ -0,0 +1,18 @@
1
+#ifndef POKE_INDICES_H
2
+#define POKE_INDICES_H
3
+
4
+#define POKE_PIKACHU 0x19
5
+#define POKE_CUBONE 0x68
6
+#define POKE_MAROWAK 0x69
7
+#define POKE_FARFETCHD 0x53
8
+#define POKE_CHANSEY 0x71
9
+#define POKE_DITTO 132
10
+#define POKE_CLAMPERL 0x175
11
+#define POKE_LATIAS 0x197
12
+#define POKE_LATIOS 0x198
13
+#define POKE_CHERRIM 0x200
14
+#define POKE_DIALGA 0x218
15
+#define POKE_PALKIA 0x219
16
+#define POKE_GIRATINA 0x21C || 0x21C //for that another form
17
+
18
+#endif /* POKE_INDICES_H */

+ 5
- 0
src/include/types.h Ver fichero

@@ -14,6 +14,11 @@ typedef     signed long long int    s64;
14 14
 typedef     float                   f32;
15 15
 typedef     double                  f64;
16 16
 
17
+#define true 1
18
+#define false 0
19
+
20
+#define NULL 0
21
+
17 22
 #define		rgb5(r,g,b)				(u16)( r | ( g << 5) | ( b << 10) )
18 23
 
19 24
 #endif