Browse Source

added unburden to init calc

SBird1337 8 years ago
parent
commit
867aea7c99

+ 3
- 3
makefile View File

6
 ARS     := armips
6
 ARS     := armips
7
 MAKE    := make
7
 MAKE    := make
8
 NM      := @arm-none-eabi-nm
8
 NM      := @arm-none-eabi-nm
9
-LAN		:= de
9
+LAN	:= de
10
 STRAGB	:= string2agb
10
 STRAGB	:= string2agb
11
 
11
 
12
 export PATH := $(realpath ../tools):$(PATH)
12
 export PATH := $(realpath ../tools):$(PATH)
13
 
13
 
14
 DEFINES   := -DBPRE -DSOFTWARE_VERSION=0
14
 DEFINES   := -DBPRE -DSOFTWARE_VERSION=0
15
 ASFLAGS   := -mthumb
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
 GRITFLAGS := -ftc -fa
17
 GRITFLAGS := -ftc -fa
18
 LDFLAGS   := -z muldefs
18
 LDFLAGS   := -z muldefs
19
 BLDPATH   := object
19
 BLDPATH   := object
52
 ALL_OBJ     := $(C_OBJ) $(ASM_OBJ_PP) $(ASM_OBJ) $(DATA_OBJ_PP) $(DATA_OBJ)
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
 $(STRINGDIR)/%.S: $(STRINGDIR)/%.txt
56
 $(STRINGDIR)/%.S: $(STRINGDIR)/%.txt
57
 	$(STRAGB) -o $@ -i $< -t string/table.tbl -e 0xFF
57
 	$(STRAGB) -o $@ -i $< -t string/table.tbl -e 0xFF
58
 
58
 

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

55
           <in>pokemon_tm_vm.s</in>
55
           <in>pokemon_tm_vm.s</in>
56
         </df>
56
         </df>
57
       </df>
57
       </df>
58
+      <df name="doc">
59
+      </df>
58
       <df name="gfx_build">
60
       <df name="gfx_build">
59
         <df name="icons">
61
         <df name="icons">
62
+          <in>305.s</in>
60
         </df>
63
         </df>
61
         <df name="overworlds">
64
         <df name="overworlds">
62
           <in>ow_0000.s</in>
65
           <in>ow_0000.s</in>
4256
         </df>
4259
         </df>
4257
       </df>
4260
       </df>
4258
       <df name="object">
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
         <df name="src">
4272
         <df name="src">
4260
           <df name="assets">
4273
           <df name="assets">
4261
             <df name="meteor">
4274
             <df name="meteor">
6223
       </df>
6236
       </df>
6224
       <df name="string">
6237
       <df name="string">
6225
         <df name="de">
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
         </df>
6245
         </df>
6227
         <df name="en">
6246
         <df name="en">
6228
         </df>
6247
         </df>

+ 1
- 1
sots-private

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

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

85
             effect = 20;
85
             effect = 20;
86
         }
86
         }
87
     }
87
     }
88
-    //handle normal / fighting on ghost
88
+    /* handle normal / fighting on ghost */
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) {
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
         effect = 10;
90
         effect = 10;
91
     }
91
     }
92
-    //handle other effectiveness changers here
92
+    /* handle other effectiveness changers here */
93
 
93
 
94
     switch (effect) {
94
     switch (effect) {
95
         case 0:
95
         case 0:
109
 u16 battle_apply_type_effectiveness(u16 chained_effect, u8 move_type, u8 target_bank, u8 atk_bank, u8 airstatus) {
109
 u16 battle_apply_type_effectiveness(u16 chained_effect, u8 move_type, u8 target_bank, u8 atk_bank, u8 airstatus) {
110
     u8 defender_type1 = battle_participants[target_bank].type1;
110
     u8 defender_type1 = battle_participants[target_bank].type1;
111
     u8 defender_type2 = battle_participants[target_bank].type2;
111
     u8 defender_type2 = battle_participants[target_bank].type2;
112
-    //set different types
112
+    /* set different types */
113
     if (defender_type2 == defender_type1)
113
     if (defender_type2 == defender_type1)
114
         defender_type2 = TYPE_EGG;
114
         defender_type2 = TYPE_EGG;
115
     chained_effect = battle_damage_type_effectiveness_update(move_type, defender_type1, atk_bank, target_bank, chained_effect, airstatus);
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
                 if (battle_participants[bank].status.flags.burn || battle_participants[bank].status.flags.poison || battle_participants[bank].status.flags.toxic_poison)
81
                 if (battle_participants[bank].status.flags.burn || battle_participants[bank].status.flags.poison || battle_participants[bank].status.flags.toxic_poison)
82
                     speed = speed + ((speed * 50) / 100);
82
                     speed = speed + ((speed * 50) / 100);
83
                 else if (battle_participants[bank].status.flags.paralysis) {
83
                 else if (battle_participants[bank].status.flags.paralysis) {
84
-                    //cancel para
84
+                    /* cancel para */
85
                     speed *= 4;
85
                     speed *= 4;
86
                     speed = speed + ((speed * 50) / 100);
86
                     speed = speed + ((speed * 50) / 100);
87
                 }
87
                 }
92
         speed >>= 2;
92
         speed >>= 2;
93
     if (custom_battle_elements.ptr->side_affecting[get_side_from_bank(bank)].tailwind)
93
     if (custom_battle_elements.ptr->side_affecting[get_side_from_bank(bank)].tailwind)
94
         speed *= 2;
94
         speed *= 2;
95
-    //TODO: unburden
95
+    if (battle_status_3[bank].unburden)
96
+        speed *= 2;
97
+    //TODO: /* SWAMP EFFECT */
96
     speed = (speed * stat_buffs[battle_participants[bank].spd_buff].dividend) / (stat_buffs[battle_participants[bank].spd_buff].divisor);
98
     speed = (speed * stat_buffs[battle_participants[bank].spd_buff].dividend) / (stat_buffs[battle_participants[bank].spd_buff].divisor);
97
     return (u16) (speed >> 16);
99
     return (u16) (speed >> 16);
98
 }
100
 }
129
 
131
 
130
         s8 prio_one = 0;
132
         s8 prio_one = 0;
131
         s8 prio_two = 0;
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
         if (battle_menu_chosen_item[bank_one] == 0)
136
         if (battle_menu_chosen_item[bank_one] == 0)
134
             prio_one = move_table[move_one].priority;
137
             prio_one = move_table[move_one].priority;
135
         if (battle_menu_chosen_item[bank_two] == 0)
138
         if (battle_menu_chosen_item[bank_two] == 0)