Browse Source

added payback and assurance

SBird1337 8 years ago
parent
commit
b87d32209d

+ 1
- 0
bpre.sym View File

103
 battle_damage_multiplier = 0x02023FD2;
103
 battle_damage_multiplier = 0x02023FD2;
104
 battle_protect = 0x02023E8C;
104
 battle_protect = 0x02023E8C;
105
 side_affecting_halfword = 0x2023DDE;
105
 side_affecting_halfword = 0x2023DDE;
106
+battle_turn_order = 0x02023bde;
106
 
107
 
107
 item_get_quality = 0x0809A948|1;
108
 item_get_quality = 0x0809A948|1;
108
 item_get_x12 = 0x0809A924|1;
109
 item_get_x12 = 0x0809A924|1;

+ 1
- 1
data/moves/animation_table.S View File

375
 .word as_metal_burst @368
375
 .word as_metal_burst @368
376
 .word as_uturn @369
376
 .word as_uturn @369
377
 .word as_close_combat @370
377
 .word as_close_combat @370
378
-.word 0x081C6F34 @371
378
+.word as_pay_back @371
379
 .word 0x081C6F34 @372
379
 .word 0x081C6F34 @372
380
 .word 0x081C6F34 @373
380
 .word 0x081C6F34 @373
381
 .word 0x081C6F34 @374
381
 .word 0x081C6F34 @374

+ 2
- 0
data/moves/effect_table.S View File

224
         .word bs_tailwind@215
224
         .word bs_tailwind@215
225
         .word bs_feint   @216
225
         .word bs_feint   @216
226
         .word bs_close_combat @217
226
         .word bs_close_combat @217
227
+        .word bs_pay_back@218
228
+        .word bs_assurance@219

+ 6
- 6
data/moves/move_data.S View File

383
 move_data_pfluecker:		.byte	MOVE_EFFECT_NONE,	60,		2,		100,		20,		0,		0,		0,		51,		0,		0,		0
383
 move_data_pfluecker:		.byte	MOVE_EFFECT_NONE,	60,		2,		100,		20,		0,		0,		0,		51,		0,		0,		0
384
 move_data_rueckenwind:		.byte	215,                    0,		2,		0,		15,		0,		16,		0,		4,		0,		2,		0
384
 move_data_rueckenwind:		.byte	215,                    0,		2,		0,		15,		0,		16,		0,		4,		0,		2,		0
385
 @TODO AKUPRESSUR
385
 @TODO AKUPRESSUR
386
-move_data_akupressur:		.byte	214,			0,		0,		0,		30,		0,		16,		0,		4,		0,		2,		0
386
+move_data_akupressur:		.byte	MOVE_EFFECT_NONE,			0,		0,		0,		30,		0,		16,		0,		4,		0,		2,		0
387
 move_data_metallstoss:		.byte	89,                     1,		8,		100,		10,		0,		1,		0,		0,		0,		0,		0
387
 move_data_metallstoss:		.byte	89,                     1,		8,		100,		10,		0,		1,		0,		0,		0,		0,		0
388
 move_data_kehrtwende:		.byte	127,            	70,		6,		100,		20,		0,		0,		0,		51,		0,		0,		0
388
 move_data_kehrtwende:		.byte	127,            	70,		6,		100,		20,		0,		0,		0,		51,		0,		0,		0
389
 
389
 
390
 move_data_nahkampf:		.byte	217,            	120,		1,		100,		5,		100,		0,		0,		51,		0,		0,		0
390
 move_data_nahkampf:		.byte	217,            	120,		1,		100,		5,		100,		0,		0,		51,		0,		0,		0
391
-move_data_gegenstoss:		.byte	MOVE_EFFECT_NONE,	50,		17,		100,		10,		0,		0,		0,		51,		0,		0,		0
392
-move_data_gewissheit:		.byte	215,			60,		17,		100,		10,		0,		0,		0,		51,		0,		0,		0
391
+move_data_gegenstoss:		.byte	218,            	50,		17,		100,		10,		0,		0,		0,		51,		0,		0,		0
392
+move_data_gewissheit:		.byte	219,			60,		17,		100,		10,		0,		0,		0,		51,		0,		0,		0
393
 move_data_itemsperre:		.byte	MOVE_EFFECT_NONE,	0,		17,		100,		15,		0,		0,		0,		26,		0,		2,		0
393
 move_data_itemsperre:		.byte	MOVE_EFFECT_NONE,	0,		17,		100,		15,		0,		0,		0,		26,		0,		2,		0
394
 move_data_schleuder:		.byte	MOVE_EFFECT_NONE,	1,		17,		100,		10,		0,		0,		0,		18,		0,		0,		0
394
 move_data_schleuder:		.byte	MOVE_EFFECT_NONE,	1,		17,		100,		10,		0,		0,		0,		18,		0,		0,		0
395
 move_data_psybann:		.byte	MOVE_EFFECT_NONE,	0,		14,		100,		10,		0,		0,		0,		18,		0,		2,		0
395
 move_data_psybann:		.byte	MOVE_EFFECT_NONE,	0,		14,		100,		10,		0,		0,		0,		18,		0,		2,		0
439
 move_data_lawine:		.byte	185,			60,		15,		100,		10,		0,		8,		252,		51,		0,		0,		0
439
 move_data_lawine:		.byte	185,			60,		15,		100,		10,		0,		8,		252,		51,		0,		0,		0
440
 move_data_eissplitter:		.byte	0,			40,		15,		100,		30,		0,		0,		1,		50,		0,		0,		0
440
 move_data_eissplitter:		.byte	0,			40,		15,		100,		30,		0,		0,		1,		50,		0,		0,		0
441
 move_data_dunkelklaue:		.byte	43,			70,		7,		100,		15,		0,		0,		0,		51,		0,		0,		0
441
 move_data_dunkelklaue:		.byte	43,			70,		7,		100,		15,		0,		0,		0,		51,		0,		0,		0
442
-move_data_donnerzahn:		.byte	MOVE_EFFECT_NONE,	65,		13,		95,		15,		0,		0,		0,		51,		0,		0,		0
443
-move_data_eiszahn:		.byte	MOVE_EFFECT_NONE,	65,		15,		95,		15,		0,		0,		0,		51,		0,		0,		0
444
-move_data_feuerzahn:		.byte	MOVE_EFFECT_NONE,	65,		10,		95,		15,		0,		0,		0,		51,		0,		0,		0
442
+move_data_donnerzahn:		.byte	31,             	65,		13,		95,		15,		0,		0,		0,		51,		0,		0,		0
443
+move_data_eiszahn:		.byte	31,             	65,		15,		95,		15,		0,		0,		0,		51,		0,		0,		0
444
+move_data_feuerzahn:		.byte	31,                     65,		10,		95,		15,		0,		0,		0,		51,		0,		0,		0
445
 move_data_schattenstoss:	.byte	MOVE_EFFECT_NONE,	40,		7,		100,		30,		0,		0,		0,		51,		0,		0,		0
445
 move_data_schattenstoss:	.byte	MOVE_EFFECT_NONE,	40,		7,		100,		30,		0,		0,		0,		51,		0,		0,		0
446
 move_data_schlammbombe:		.byte	73,			65,		4,		85,		10,		30,		0,		0,		50,		0,		1,		0
446
 move_data_schlammbombe:		.byte	73,			65,		4,		85,		10,		30,		0,		0,		50,		0,		1,		0
447
 move_data_psychoklinge:		.byte	43,			70,		14,		100,		20,		0,		0,		0,		51,		0,		0,		0
447
 move_data_psychoklinge:		.byte	43,			70,		14,		100,		20,		0,		0,		0,		51,		0,		0,		0

+ 1
- 1
data/pkmn_tables/pokemon_moveset_table.S View File

1218
 .byte 0x1 
1218
 .byte 0x1 
1219
 .hword 0x2D 
1219
 .hword 0x2D 
1220
 .byte 0x3 
1220
 .byte 0x3 
1221
-.hword MOVE_CLOSE_COMBAT 
1221
+.hword MOVE_THUNDER
1222
 .byte 0x7 
1222
 .byte 0x7 
1223
 .hword 0x16 
1223
 .hword 0x16 
1224
 .byte 0x9 
1224
 .byte 0x9 

+ 22
- 0
nbproject/configurations.xml View File

4645
           </df>
4645
           </df>
4646
         </df>
4646
         </df>
4647
         <df name="moves">
4647
         <df name="moves">
4648
+          <df name="assurance">
4649
+            <in>assurance.c</in>
4650
+            <in>assurance_script.S</in>
4651
+          </df>
4648
           <df name="battle_engine">
4652
           <df name="battle_engine">
4649
             <in>bs_table.S</in>
4653
             <in>bs_table.S</in>
4650
             <in>cmd_callasm.S</in>
4654
             <in>cmd_callasm.S</in>
4677
             <in>metal_burst.c</in>
4681
             <in>metal_burst.c</in>
4678
             <in>metal_burst_script.S</in>
4682
             <in>metal_burst_script.S</in>
4679
           </df>
4683
           </df>
4684
+          <df name="pay_back">
4685
+            <in>pay_back.c</in>
4686
+            <in>pay_back_script.S</in>
4687
+          </df>
4680
           <df name="power_trick">
4688
           <df name="power_trick">
4681
             <in>power_trick.c</in>
4689
             <in>power_trick.c</in>
4682
             <in>power_trick_script.S</in>
4690
             <in>power_trick_script.S</in>
27325
       </item>
27333
       </item>
27326
       <item path="src/item/tmhm/tm_save_block.S" ex="false" tool="4" flavor2="0">
27334
       <item path="src/item/tmhm/tm_save_block.S" ex="false" tool="4" flavor2="0">
27327
       </item>
27335
       </item>
27336
+      <item path="src/moves/assurance/assurance.c" ex="false" tool="0" flavor2="0">
27337
+      </item>
27338
+      <item path="src/moves/assurance/assurance_script.S"
27339
+            ex="false"
27340
+            tool="4"
27341
+            flavor2="0">
27342
+      </item>
27328
       <item path="src/moves/battle_engine/bs_table.S" ex="false" tool="4" flavor2="0">
27343
       <item path="src/moves/battle_engine/bs_table.S" ex="false" tool="4" flavor2="0">
27329
       </item>
27344
       </item>
27330
       <item path="src/moves/battle_engine/cmd_callasm.S"
27345
       <item path="src/moves/battle_engine/cmd_callasm.S"
27397
             tool="4"
27412
             tool="4"
27398
             flavor2="0">
27413
             flavor2="0">
27399
       </item>
27414
       </item>
27415
+      <item path="src/moves/pay_back/pay_back.c" ex="false" tool="0" flavor2="0">
27416
+      </item>
27417
+      <item path="src/moves/pay_back/pay_back_script.S"
27418
+            ex="false"
27419
+            tool="4"
27420
+            flavor2="0">
27421
+      </item>
27400
       <item path="src/moves/power_trick/power_trick.c"
27422
       <item path="src/moves/power_trick/power_trick.c"
27401
             ex="false"
27423
             ex="false"
27402
             tool="0"
27424
             tool="0"

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

4047
             </df>
4047
             </df>
4048
           </df>
4048
           </df>
4049
           <df name="moves">
4049
           <df name="moves">
4050
+            <df name="assurance">
4051
+            </df>
4050
             <df name="battle_engine">
4052
             <df name="battle_engine">
4051
             </df>
4053
             </df>
4052
             <df name="bride">
4054
             <df name="bride">
4061
             </df>
4063
             </df>
4062
             <df name="metal_burst">
4064
             <df name="metal_burst">
4063
             </df>
4065
             </df>
4066
+            <df name="pay_back">
4067
+            </df>
4064
             <df name="power_trick">
4068
             <df name="power_trick">
4065
             </df>
4069
             </df>
4066
             <df name="roost">
4070
             <df name="roost">
5798
           </df>
5802
           </df>
5799
         </df>
5803
         </df>
5800
         <df name="moves">
5804
         <df name="moves">
5805
+          <df name="assurance">
5806
+            <in>assurance.c</in>
5807
+            <in>assurance_script.S</in>
5808
+          </df>
5801
           <df name="battle_engine">
5809
           <df name="battle_engine">
5802
             <in>bs_table.S</in>
5810
             <in>bs_table.S</in>
5803
             <in>cmd_callasm.S</in>
5811
             <in>cmd_callasm.S</in>
5830
             <in>metal_burst.c</in>
5838
             <in>metal_burst.c</in>
5831
             <in>metal_burst_script.S</in>
5839
             <in>metal_burst_script.S</in>
5832
           </df>
5840
           </df>
5841
+          <df name="pay_back">
5842
+            <in>pay_back.c</in>
5843
+            <in>pay_back_script.S</in>
5844
+          </df>
5833
           <df name="power_trick">
5845
           <df name="power_trick">
5834
             <in>power_trick.c</in>
5846
             <in>power_trick.c</in>
5835
             <in>power_trick_script.S</in>
5847
             <in>power_trick_script.S</in>

+ 1
- 0
src/include/battle_locations.h View File

11
 u32 battle_hitmarker;
11
 u32 battle_hitmarker;
12
 void* battlescript_cursor;
12
 void* battlescript_cursor;
13
 u8 battle_menu_chosen_item[4];
13
 u8 battle_menu_chosen_item[4];
14
+u8 battle_turn_order[4];
14
 
15
 
15
 #endif
16
 #endif

+ 7
- 0
src/moves/assurance/assurance.c View File

1
+#include <battle.h>
2
+
3
+u8 assurance_damage_modifier()
4
+{
5
+    if((battle_protect[battle_defender_bank].physical_damage + battle_protect[battle_defender_bank].special_damage) > 0)
6
+        battle_damage_multiplier *=2;
7
+}

+ 12
- 0
src/moves/assurance/assurance_script.S View File

1
+#include <battle_script.h>
2
+
3
+.align 2
4
+.thumb
5
+.text
6
+
7
+.global bs_assurance
8
+bs_assurance:
9
+    callasm assurance_damage_modifier+1
10
+    goto 0x081D6900
11
+
12
+

+ 8
- 0
src/moves/pay_back/pay_back.c View File

1
+#include <battle.h>
2
+
3
+u8 pay_back_damage_modifier()
4
+{
5
+    if(battle_turn_order[battle_attacker_bank] > battle_turn_order[battle_defender_bank])
6
+        battle_damage_multiplier *=2;
7
+    return false;
8
+}

+ 27
- 0
src/moves/pay_back/pay_back_script.S View File

1
+#include <battle_script.h>
2
+
3
+.align 2
4
+.thumb
5
+.text
6
+
7
+.global bs_pay_back
8
+bs_pay_back:
9
+    callasm pay_back_damage_modifier+1
10
+    goto 0x081D6900 @normal damaging move
11
+
12
+.global as_pay_back
13
+as_pay_back:
14
+    .byte 0x14, 0x00, 0x17, 0x00, 0x97, 0x27, 0x00, 0x9F, 0x27, 0x0A, 0x03, 0x0C, 0x0C, 0x08, 0x03, 0x7D
15
+    .byte 0x90, 0x09, 0x08, 0x02, 0x05, 0x00, 0x00, 0x12, 0x00, 0x06, 0x00, 0x01, 0x00, 0x04, 0x00, 0x19
16
+    .byte 0x73, 0x00, 0xC0, 0x05, 0x02, 0x9C, 0x4E, 0x3D, 0x08, 0x02, 0x05, 0x00, 0x00, 0x14, 0x00, 0x00
17
+    .byte 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x04, 0x02, 0x08, 0x7C, 0x3E, 0x08, 0x02, 0x04, 0xF1, 0xFF
18
+    .byte 0x12, 0x00, 0x01, 0x00, 0x00, 0x00, 0x19, 0x74, 0x00, 0x3F, 0x04, 0x01, 0x03, 0xF9, 0x89, 0x09
19
+    .byte 0x08, 0x02, 0x05, 0x01, 0x00, 0x05, 0x00, 0x00, 0x00, 0x19, 0x00, 0x01, 0x00, 0x02, 0x10, 0x67
20
+    .byte 0x3E, 0x08, 0x03, 0x05, 0xF1, 0xFF, 0x12, 0x00, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x03
21
+    .byte 0x02, 0x08, 0x7C, 0x3E, 0x08, 0x02, 0x04, 0x00, 0x00, 0xFC, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x19
22
+    .byte 0x74, 0x00, 0x3F, 0x04, 0x01, 0x02, 0x10, 0x67, 0x3E, 0x08, 0x03, 0x05, 0x00, 0x00, 0xFC, 0xFF
23
+    .byte 0x08, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x03, 0x02, 0x08, 0x7C, 0x3E, 0x08, 0x02, 0x04, 0x0F
24
+    .byte 0x00, 0x09, 0x00, 0x01, 0x00, 0x00, 0x00, 0x19, 0x74, 0x00, 0x3F, 0x04, 0x01, 0x02, 0x10, 0x67
25
+    .byte 0x3E, 0x08, 0x03, 0x05, 0x0F, 0x00, 0x09, 0x00, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x05
26
+    .byte 0x02, 0x84, 0x4E, 0x3D, 0x08, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x0B, 0x03
27
+    .byte 0x0D, 0x0E, 0xC7, 0x59, 0x1D, 0x08, 0x08