Browse Source

added unburden to init calc

SBird1337 7 years ago
parent
commit
867aea7c99

+ 3
- 3
makefile View File

@@ -6,14 +6,14 @@ CC      := @arm-none-eabi-gcc
6 6
 ARS     := armips
7 7
 MAKE    := make
8 8
 NM      := @arm-none-eabi-nm
9
-LAN		:= de
9
+LAN	:= de
10 10
 STRAGB	:= string2agb
11 11
 
12 12
 export PATH := $(realpath ../tools):$(PATH)
13 13
 
14 14
 DEFINES   := -DBPRE -DSOFTWARE_VERSION=0
15 15
 ASFLAGS   := -mthumb
16
-CFLAGS    := -mthumb -mno-thumb-interwork -g -mcpu=arm7tdmi -fno-inline -mlong-calls -march=armv4t -O3 -std=c99 -Wall -Isrc/include $(DEFINES)
16
+CFLAGS    := -mthumb -mno-thumb-interwork -g -mcpu=arm7tdmi -fno-inline -mlong-calls -march=armv4t -O0 -std=c99 -Wall -Isrc/include $(DEFINES)
17 17
 GRITFLAGS := -ftc -fa
18 18
 LDFLAGS   := -z muldefs
19 19
 BLDPATH   := object
@@ -52,7 +52,7 @@ DATA_OBJ    := $(DATA_SRC:%.s=$(BLDPATH)/%.o)
52 52
 ALL_OBJ     := $(C_OBJ) $(ASM_OBJ_PP) $(ASM_OBJ) $(DATA_OBJ_PP) $(DATA_OBJ)
53 53
 
54 54
 
55
-
55
+.PRECIOUS: $(STRING_SRC)
56 56
 $(STRINGDIR)/%.S: $(STRINGDIR)/%.txt
57 57
 	$(STRAGB) -o $@ -i $< -t string/table.tbl -e 0xFF
58 58
 

+ 19
- 0
nbproject/private/configurations.xml View File

@@ -55,8 +55,11 @@
55 55
           <in>pokemon_tm_vm.s</in>
56 56
         </df>
57 57
       </df>
58
+      <df name="doc">
59
+      </df>
58 60
       <df name="gfx_build">
59 61
         <df name="icons">
62
+          <in>305.s</in>
60 63
         </df>
61 64
         <df name="overworlds">
62 65
           <in>ow_0000.s</in>
@@ -4256,6 +4259,16 @@
4256 4259
         </df>
4257 4260
       </df>
4258 4261
       <df name="object">
4262
+        <df name="data">
4263
+          <df name="item">
4264
+          </df>
4265
+          <df name="moves">
4266
+          </df>
4267
+          <df name="overworld">
4268
+          </df>
4269
+          <df name="pkmn_tables">
4270
+          </df>
4271
+        </df>
4259 4272
         <df name="src">
4260 4273
           <df name="assets">
4261 4274
             <df name="meteor">
@@ -6223,6 +6236,12 @@
6223 6236
       </df>
6224 6237
       <df name="string">
6225 6238
         <df name="de">
6239
+          <in>hazards.S</in>
6240
+          <in>item_data.S</in>
6241
+          <in>item_descriptions.S</in>
6242
+          <in>move_descriptions.S</in>
6243
+          <in>move_names.S</in>
6244
+          <in>move_strings.S</in>
6226 6245
         </df>
6227 6246
         <df name="en">
6228 6247
         </df>

+ 1
- 1
sots-private

@@ -1 +1 @@
1
-Subproject commit 9cda479e9af1b39b15891190ab843fb2559ea29b
1
+Subproject commit 2020088a019c62e8bd095565efc41d1f806e092c

+ 3
- 3
src/battle_engine/battle_help.c View File

@@ -85,11 +85,11 @@ u16 battle_damage_type_effectiveness_update(u8 attacking_type, u8 defending_type
85 85
             effect = 20;
86 86
         }
87 87
     }
88
-    //handle normal / fighting on ghost
88
+    /* handle normal / fighting on ghost */
89 89
     if ((((attacking_type == TYPE_NORMAL || attacking_type == TYPE_FIGHTING) && defending_type == TYPE_GHOST && ((battle_participants[def_bank].status2.foresight))) || battle_participants[atk_bank].ability_id == ABILITY_SCRAPPY) && effect == 0) {
90 90
         effect = 10;
91 91
     }
92
-    //handle other effectiveness changers here
92
+    /* handle other effectiveness changers here */
93 93
 
94 94
     switch (effect) {
95 95
         case 0:
@@ -109,7 +109,7 @@ u16 battle_damage_type_effectiveness_update(u8 attacking_type, u8 defending_type
109 109
 u16 battle_apply_type_effectiveness(u16 chained_effect, u8 move_type, u8 target_bank, u8 atk_bank, u8 airstatus) {
110 110
     u8 defender_type1 = battle_participants[target_bank].type1;
111 111
     u8 defender_type2 = battle_participants[target_bank].type2;
112
-    //set different types
112
+    /* set different types */
113 113
     if (defender_type2 == defender_type1)
114 114
         defender_type2 = TYPE_EGG;
115 115
     chained_effect = battle_damage_type_effectiveness_update(move_type, defender_type1, atk_bank, target_bank, chained_effect, airstatus);

+ 6
- 3
src/battle_engine/battle_initiative.c View File

@@ -81,7 +81,7 @@ u16 get_speed(u8 bank) {
81 81
                 if (battle_participants[bank].status.flags.burn || battle_participants[bank].status.flags.poison || battle_participants[bank].status.flags.toxic_poison)
82 82
                     speed = speed + ((speed * 50) / 100);
83 83
                 else if (battle_participants[bank].status.flags.paralysis) {
84
-                    //cancel para
84
+                    /* cancel para */
85 85
                     speed *= 4;
86 86
                     speed = speed + ((speed * 50) / 100);
87 87
                 }
@@ -92,7 +92,9 @@ u16 get_speed(u8 bank) {
92 92
         speed >>= 2;
93 93
     if (custom_battle_elements.ptr->side_affecting[get_side_from_bank(bank)].tailwind)
94 94
         speed *= 2;
95
-    //TODO: unburden
95
+    if (battle_status_3[bank].unburden)
96
+        speed *= 2;
97
+    //TODO: /* SWAMP EFFECT */
96 98
     speed = (speed * stat_buffs[battle_participants[bank].spd_buff].dividend) / (stat_buffs[battle_participants[bank].spd_buff].divisor);
97 99
     return (u16) (speed >> 16);
98 100
 }
@@ -129,7 +131,8 @@ enum init_enum get_first_to_strike(u8 bank_one, u8 bank_two, u8 ignore_prio) {
129 131
 
130 132
         s8 prio_one = 0;
131 133
         s8 prio_two = 0;
132
-        //note priority changing effects and abilities not added as of yet
134
+        /* note priority changing effects and abilities not added as of yet */
135
+        /* NOTE: !HANDLE PRIORITY LIKE A PROPERTY! */
133 136
         if (battle_menu_chosen_item[bank_one] == 0)
134 137
             prio_one = move_table[move_one].priority;
135 138
         if (battle_menu_chosen_item[bank_two] == 0)