Browse Source

more moves

gastro acid, power swap, guard swap, heart swap, lucky chant,
punishment
SBird1337 7 years ago
parent
commit
a44a3d856b

+ 1
- 0
bpre.sym View File

@@ -91,6 +91,7 @@ battle_weather = 0x02023F1C;
91 91
 battle_damage_store = 0x02023D50;
92 92
 battle_base_power = 0x02023F50;
93 93
 battle_string_message_table = 0x083FDF3C;
94
+battle_string_chooser = 0x0203C020;
94 95
 battle_crit_loc = 0x02023D71;
95 96
 battle_side_unknown = 0x02023FDB;
96 97
 battle_side_timers = 0x02023DE4;

+ 9
- 5
data/moves/effect_table.S View File

@@ -222,9 +222,13 @@ m_effect_table:
222 222
 	.word 0x081D865F @213
223 223
         .word bs_bride   @214
224 224
         .word bs_tailwind@215
225
-        .word bs_feint   @216
226
-        .word bs_close_combat @217
227
-        .word bs_pay_back@218
228
-        .word bs_assurance@219
225
+        .word bs_feint              @216
226
+        .word bs_close_combat       @217
227
+        .word bs_pay_back           @218
228
+        .word bs_assurance          @219
229 229
         .word bs_crush_grip_like    @220
230
-        .word bs_power_trick    @221
230
+        .word bs_power_trick        @221
231
+        .word bs_lucky_chant        @222
232
+        .word bs_gastro_acid        @223
233
+        .word bs_swap_moves         @224
234
+        .word bs_punishment         @225

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

@@ -396,18 +396,18 @@ move_data_trumpfkarte:		.byte	MOVE_EFFECT_NONE,	1,		0,		100,		5,		0,		0,		0,		51
396 396
 move_data_heilblockade:		.byte	MOVE_EFFECT_NONE,	0,		14,		100,		15,		0,		8,		0,		18,		0,		2,		0
397 397
 move_data_auswringen:		.byte	220,			1,		0,		100,		5,		0,		0,		0,		51,		0,		1,		0
398 398
 move_data_krafttrick:		.byte	221,            	0,		14,		0,		10,		0,		0,		0,		4,		0,		2,		0
399
-move_data_magensaefte:		.byte	MOVE_EFFECT_NONE,	0,		3,		100,		10,		0,		0,		0,		50,		0,		2,		0
400
-move_data_beschwoerung:		.byte	MOVE_EFFECT_NONE,	0,		0,		0,		30,		0,		16,		0,		4,		0,		2,		0
399
+move_data_magensaefte:		.byte	223,            	0,		3,		100,		10,		0,		0,		0,		50,		0,		2,		0
400
+move_data_beschwoerung:		.byte	222,            	0,		0,		0,		30,		0,		16,		0,		4,		0,		2,		0
401 401
 move_data_egotrip:		.byte	MOVE_EFFECT_NONE,	0,		0,		0,		20,		0,		0,		0,		2,		0,		2,		0
402 402
 move_data_imitator:		.byte	9,			0,		0,		0,		20,		0,		1,		0,		0,		0,		2,		0
403
-move_data_krafttausch:		.byte	MOVE_EFFECT_NONE,	0,		14,		0,		10,		0,		16,		0,		2,		0,		2,		0
404
-move_data_schutztausch:		.byte	MOVE_EFFECT_NONE,	0,		14,		0,		10,		0,		0,		0,		2,		0,		2,		0
405
-move_data_strafattacke:		.byte	MOVE_EFFECT_NONE,	60,		17,		100,		5,		0,		0,		0,		51,		0,		0,		0
403
+move_data_krafttausch:		.byte	224,            	0,		14,		0,		10,		0,		16,		0,		2,		0,		2,		0
404
+move_data_schutztausch:		.byte	224,                	0,		14,		0,		10,		0,		0,		0,		2,		0,		2,		0
405
+move_data_strafattacke:		.byte	225,            	1,		17,		100,		5,		0,		0,		0,		51,		0,		0,		0
406 406
 move_data_zuflucht:		.byte	MOVE_EFFECT_NONE,	140,		0,		100,		5,		0,		0,		0,		51,		0,		0,		0
407 407
 move_data_sorgensamen:		.byte	MOVE_EFFECT_NONE,	0,		12,		100,		10,		0,		0,		0,		26,		0,		2,		0
408 408
 move_data_tiefschlag:		.byte	MOVE_EFFECT_NONE,	80,		17,		100,		5,		0,		0,		1,		51,		0,		0,		0
409 409
 move_data_giftspitzen:		.byte	MOVE_EFFECT_NONE,	0,		3,		0,		20,		0,		64,		0,		0,		0,		2,		0
410
-move_data_statustausch:		.byte	MOVE_EFFECT_NONE,	0,		14,		0,		10,		0,		0,		0,		2,		0,		2,		0
410
+move_data_statustausch:		.byte	224,            	0,		14,		0,		10,		0,		0,		0,		2,		0,		2,		0
411 411
 move_data_wasserring:		.byte	181,			0,		11,		0,		20,		0,		16,		0,		4,		0,		2,		0
412 412
 move_data_magnetflug:		.byte	MOVE_EFFECT_NONE,	0,		13,		0,		10,		0,		16,		0,		0,		0,		2,		0
413 413
 move_data_flammenblitz:		.byte	MOVE_EFFECT_NONE,	120,		10,		100,		15,		0,		0,		0,		51,		0,		0,		0

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

@@ -1216,12 +1216,12 @@ moveset_unknown:
1216 1216
 moveset_bisasam: 
1217 1217
 .hword MOVE_TACKLE
1218 1218
 .byte 0x1 
1219
-.hword 0x2D 
1219
+.hword MOVE_HOWL 
1220 1220
 .byte 0x3 
1221
-.hword MOVE_WRING_OUT
1221
+.hword MOVE_PUNISHMENT
1222 1222
 .byte 0x7 
1223
-.hword 0x16 
1224
-.byte 0x9 
1223
+.hword MOVE_GUARD_SWAP
1224
+.byte 0x7
1225 1225
 .hword 0x4D 
1226 1226
 .byte 0xD 
1227 1227
 .hword 0x4F 
@@ -1765,7 +1765,7 @@ moveset_tauboss:
1765 1765
 .align 2
1766 1766
 moveset_rattfratz: 
1767 1767
 
1768
-.hword MOVE_METAL_BURST
1768
+.hword MOVE_SWORDS_DANCE
1769 1769
 .byte 1
1770 1770
 //.hword 0x27 
1771 1771
 //.byte 0x1 

+ 50
- 0
nbproject/configurations.xml View File

@@ -4678,9 +4678,17 @@
4678 4678
             <in>feint.c</in>
4679 4679
             <in>feint_scripts.S</in>
4680 4680
           </df>
4681
+          <df name="gastro_acid">
4682
+            <in>gastro_acid.c</in>
4683
+            <in>gastro_acid_script.S</in>
4684
+          </df>
4681 4685
           <df name="hazards">
4682 4686
             <in>hazards_scripts.S</in>
4683 4687
           </df>
4688
+          <df name="lucky_chant">
4689
+            <in>lucky_chant.c</in>
4690
+            <in>lucky_chant_script.S</in>
4691
+          </df>
4684 4692
           <df name="metal_burst">
4685 4693
             <in>metal_burst.c</in>
4686 4694
             <in>metal_burst_script.S</in>
@@ -4693,10 +4701,18 @@
4693 4701
             <in>power_trick.c</in>
4694 4702
             <in>power_trick_script.S</in>
4695 4703
           </df>
4704
+          <df name="punishment">
4705
+            <in>punishment.c</in>
4706
+            <in>punishment_script.S</in>
4707
+          </df>
4696 4708
           <df name="roost">
4697 4709
             <in>roost.c</in>
4698 4710
             <in>roost_scripts.S</in>
4699 4711
           </df>
4712
+          <df name="swap_moves">
4713
+            <in>swap_moves.c</in>
4714
+            <in>swap_moves_script.S</in>
4715
+          </df>
4700 4716
           <df name="tailwind">
4701 4717
             <in>tailwind.c</in>
4702 4718
             <in>tailwind_scripts.S</in>
@@ -27411,11 +27427,31 @@
27411 27427
       </item>
27412 27428
       <item path="src/moves/feint/feint_scripts.S" ex="false" tool="4" flavor2="0">
27413 27429
       </item>
27430
+      <item path="src/moves/gastro_acid/gastro_acid.c"
27431
+            ex="false"
27432
+            tool="0"
27433
+            flavor2="0">
27434
+      </item>
27435
+      <item path="src/moves/gastro_acid/gastro_acid_script.S"
27436
+            ex="false"
27437
+            tool="4"
27438
+            flavor2="0">
27439
+      </item>
27414 27440
       <item path="src/moves/hazards/hazards_scripts.S"
27415 27441
             ex="false"
27416 27442
             tool="4"
27417 27443
             flavor2="0">
27418 27444
       </item>
27445
+      <item path="src/moves/lucky_chant/lucky_chant.c"
27446
+            ex="false"
27447
+            tool="0"
27448
+            flavor2="0">
27449
+      </item>
27450
+      <item path="src/moves/lucky_chant/lucky_chant_script.S"
27451
+            ex="false"
27452
+            tool="4"
27453
+            flavor2="0">
27454
+      </item>
27419 27455
       <item path="src/moves/metal_burst/metal_burst.c"
27420 27456
             ex="false"
27421 27457
             tool="0"
@@ -27443,10 +27479,24 @@
27443 27479
             tool="4"
27444 27480
             flavor2="0">
27445 27481
       </item>
27482
+      <item path="src/moves/punishment/punishment.c" ex="false" tool="0" flavor2="0">
27483
+      </item>
27484
+      <item path="src/moves/punishment/punishment_script.S"
27485
+            ex="false"
27486
+            tool="4"
27487
+            flavor2="0">
27488
+      </item>
27446 27489
       <item path="src/moves/roost/roost.c" ex="false" tool="0" flavor2="0">
27447 27490
       </item>
27448 27491
       <item path="src/moves/roost/roost_scripts.S" ex="false" tool="4" flavor2="0">
27449 27492
       </item>
27493
+      <item path="src/moves/swap_moves/swap_moves.c" ex="false" tool="0" flavor2="0">
27494
+      </item>
27495
+      <item path="src/moves/swap_moves/swap_moves_script.S"
27496
+            ex="false"
27497
+            tool="4"
27498
+            flavor2="0">
27499
+      </item>
27450 27500
       <item path="src/moves/tailwind/tailwind.c" ex="false" tool="0" flavor2="0">
27451 27501
       </item>
27452 27502
       <item path="src/moves/tailwind/tailwind_scripts.S"

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

@@ -4061,16 +4061,24 @@
4061 4061
             </df>
4062 4062
             <df name="feint">
4063 4063
             </df>
4064
+            <df name="gastro_acid">
4065
+            </df>
4064 4066
             <df name="hazards">
4065 4067
             </df>
4068
+            <df name="lucky_chant">
4069
+            </df>
4066 4070
             <df name="metal_burst">
4067 4071
             </df>
4068 4072
             <df name="pay_back">
4069 4073
             </df>
4070 4074
             <df name="power_trick">
4071 4075
             </df>
4076
+            <df name="punishment">
4077
+            </df>
4072 4078
             <df name="roost">
4073 4079
             </df>
4080
+            <df name="swap_moves">
4081
+            </df>
4074 4082
             <df name="tailwind">
4075 4083
             </df>
4076 4084
             <df name="uturn">
@@ -5837,9 +5845,17 @@
5837 5845
             <in>feint.c</in>
5838 5846
             <in>feint_scripts.S</in>
5839 5847
           </df>
5848
+          <df name="gastro_acid">
5849
+            <in>gastro_acid.c</in>
5850
+            <in>gastro_acid_script.S</in>
5851
+          </df>
5840 5852
           <df name="hazards">
5841 5853
             <in>hazards_scripts.S</in>
5842 5854
           </df>
5855
+          <df name="lucky_chant">
5856
+            <in>lucky_chant.c</in>
5857
+            <in>lucky_chant_script.S</in>
5858
+          </df>
5843 5859
           <df name="metal_burst">
5844 5860
             <in>metal_burst.c</in>
5845 5861
             <in>metal_burst_script.S</in>
@@ -5852,10 +5868,18 @@
5852 5868
             <in>power_trick.c</in>
5853 5869
             <in>power_trick_script.S</in>
5854 5870
           </df>
5871
+          <df name="punishment">
5872
+            <in>punishment.c</in>
5873
+            <in>punishment_script.S</in>
5874
+          </df>
5855 5875
           <df name="roost">
5856 5876
             <in>roost.c</in>
5857 5877
             <in>roost_scripts.S</in>
5858 5878
           </df>
5879
+          <df name="swap_moves">
5880
+            <in>swap_moves.c</in>
5881
+            <in>swap_moves_script.S</in>
5882
+          </df>
5859 5883
           <df name="tailwind">
5860 5884
             <in>tailwind.c</in>
5861 5885
             <in>tailwind_scripts.S</in>

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

@@ -3,6 +3,7 @@
3 3
 
4 4
 u8 battle_active_bank;
5 5
 u8 battle_stat_changer;
6
+void* battle_string_chooser;
6 7
 u16 battle_executed_move;
7 8
 u8 battle_attacker_bank;
8 9
 u8 battle_defender_bank;

+ 10
- 0
src/moves/gastro_acid/gastro_acid.c View File

@@ -0,0 +1,10 @@
1
+#include <battle.h>
2
+
3
+u8 gastro_acid_set() {
4
+    if (custom_battle_elements.ptr->bank_affecting[battle_defender_bank].gastro_acided) {
5
+        battlescript_cursor = (void*) (0x081D7DF0);
6
+        return true;
7
+    }
8
+    custom_battle_elements.ptr->bank_affecting[battle_defender_bank].gastro_acided = true;
9
+    return false;
10
+}

+ 18
- 0
src/moves/gastro_acid/gastro_acid_script.S View File

@@ -0,0 +1,18 @@
1
+#include <battle_script.h>
2
+
3
+.align 2
4
+.text
5
+.thumb
6
+
7
+.global bs_gastro_acid
8
+bs_gastro_acid:
9
+    attackcanceler
10
+    attackstring
11
+    ppreduce
12
+    callasm gastro_acid_set+1
13
+    attackanimation
14
+    waitanimation
15
+    setword STRING_LOADER str_gastro_acid
16
+    printstring 0x184
17
+    waitmessage 0x40
18
+    goto 0x081D694E

+ 14
- 0
src/moves/lucky_chant/lucky_chant.c View File

@@ -0,0 +1,14 @@
1
+#include <battle.h>
2
+
3
+u8 lucky_chant_set()
4
+{
5
+    u8 attacker_side = get_side_from_bank(battle_attacker_bank);
6
+    if(custom_battle_elements.ptr->side_affecting[attacker_side].lucky_chant)
7
+    {
8
+        battlescript_cursor = (void*)(0x081D7DF0);
9
+        return true;
10
+    }
11
+    custom_battle_elements.ptr->side_affecting[attacker_side].lucky_chant = 5;
12
+    custom_battle_elements.ptr->side_affecting[attacker_side].lucky_chant_bank = battle_attacker_bank;
13
+    return false; 
14
+}

+ 18
- 0
src/moves/lucky_chant/lucky_chant_script.S View File

@@ -0,0 +1,18 @@
1
+#include <battle_script.h>
2
+
3
+.align 2
4
+.thumb
5
+.text
6
+
7
+.global bs_lucky_chant
8
+bs_lucky_chant:
9
+    attackcanceler
10
+    attackstring
11
+    ppreduce
12
+    callasm lucky_chant_set+1
13
+    attackanimation
14
+    waitanimation
15
+    setword STRING_LOADER str_lucky_chant
16
+    printstring 0x184
17
+    waitmessage 0x40
18
+    goto 0x081D694E

+ 1
- 1
src/moves/power_trick/power_trick_script.S View File

@@ -12,7 +12,7 @@ ppreduce
12 12
 callasm power_trick_swap+1
13 13
 attackanimation
14 14
 waitanimation
15
-setword STRING_LOADER str_power_swap
15
+setword STRING_LOADER str_power_trick
16 16
 printstring 0x184
17 17
 waitmessage 0x40
18 18
 goto 0x081D694E

+ 18
- 0
src/moves/punishment/punishment.c View File

@@ -0,0 +1,18 @@
1
+#include <battle.h>
2
+
3
+u8 punishment_damage_mod()
4
+{
5
+    struct battle_participant* defender = &battle_participants[battle_defender_bank];
6
+    u8 status_count = 
7
+            (defender->hp_buff > 6 ? defender->hp_buff - 6 : 0) + 
8
+            (defender->atk_buff > 6 ? defender->atk_buff - 6 : 0) + 
9
+            (defender->def_buff > 6 ? defender->def_buff - 6 : 0) +
10
+            (defender->sp_atk_buff > 6 ? defender->sp_atk_buff - 6 : 0) +
11
+            (defender->sp_def_buff > 6 ? defender->sp_def_buff - 6 : 0) +
12
+            (defender->spd_buff > 6 ? defender->spd_buff - 6 : 0) +
13
+            (defender->evasion_buff > 6 ? defender->evasion_buff - 6 : 0);
14
+    battle_base_power = 60 + (status_count * 20);
15
+    if(battle_base_power > 200)
16
+        battle_base_power = 200;
17
+    return false;
18
+}

+ 30
- 0
src/moves/punishment/punishment_script.S View File

@@ -0,0 +1,30 @@
1
+#include <battle_script.h>
2
+
3
+.align 2
4
+.thumb
5
+.text
6
+
7
+.global bs_punishment
8
+bs_punishment:
9
+    attackcanceler
10
+    accuracycheck 0x081D695E 0
11
+    attackstring    
12
+    ppreduce
13
+    callasm punishment_damage_mod+1
14
+    calculatedamage
15
+    attackanimation
16
+    waitanimation
17
+    missmessage
18
+    cmd5c 0x0
19
+    waitstate
20
+    graphicalhpupdate 0x0
21
+    datahpupdate 0x0
22
+    critmessage
23
+    waitmessage 0x40
24
+    resultmessage
25
+    waitmessage 0x40
26
+    seteffectwithchancetarget
27
+    faintpokemon 0x0 0x0 0x0
28
+    setbyte 0x2023FD8 0x0
29
+    cmd49 0x0 0x0
30
+    end

+ 62
- 0
src/moves/swap_moves/swap_moves.c View File

@@ -0,0 +1,62 @@
1
+#include <battle.h>
2
+
3
+extern void* str_power_swap_ref;
4
+extern void* str_guard_swap_ref;
5
+extern void* str_heart_swap_ref;
6
+
7
+u8 set_swap_moves() {
8
+    struct battle_participant* attacker = &battle_participants[battle_attacker_bank];
9
+    struct battle_participant* defender = &battle_participants[battle_defender_bank];
10
+    u8 swap;
11
+    switch (battle_executed_move) {
12
+        case MOVE_POWER_SWAP:
13
+            swap = attacker->atk_buff;
14
+            attacker->atk_buff = defender->atk_buff;
15
+            defender->atk_buff = swap;
16
+            swap = attacker->sp_atk_buff;
17
+            attacker->sp_atk_buff = defender->sp_atk_buff;
18
+            defender->sp_atk_buff = swap;
19
+            battle_string_chooser = str_power_swap_ref;
20
+            break;
21
+        case MOVE_GUARD_SWAP:
22
+            swap = attacker->def_buff;
23
+            attacker->def_buff = defender->def_buff;
24
+            defender->def_buff = swap;
25
+            swap = attacker->sp_def_buff;
26
+            attacker->sp_def_buff = defender->sp_def_buff;
27
+            defender->sp_def_buff = swap;
28
+            battle_string_chooser = str_guard_swap_ref;
29
+            break;
30
+        case MOVE_HEART_SWAP:
31
+            swap = attacker->hp_buff;
32
+            attacker->hp_buff = defender->hp_buff;
33
+            defender->hp_buff = swap;
34
+
35
+            swap = attacker->spd_buff;
36
+            attacker->spd_buff = defender->spd_buff;
37
+            defender->spd_buff = swap;
38
+
39
+            swap = attacker->evasion_buff;
40
+            attacker->evasion_buff = defender->evasion_buff;
41
+            defender->evasion_buff = swap;
42
+
43
+            swap = attacker->atk_buff;
44
+            attacker->atk_buff = defender->atk_buff;
45
+            defender->atk_buff = swap;
46
+
47
+            swap = attacker->sp_atk_buff;
48
+            attacker->sp_atk_buff = defender->sp_atk_buff;
49
+            defender->sp_atk_buff = swap;
50
+
51
+            swap = attacker->atk_buff;
52
+            attacker->atk_buff = defender->atk_buff;
53
+            defender->atk_buff = swap;
54
+
55
+            swap = attacker->sp_atk_buff;
56
+            attacker->sp_atk_buff = defender->sp_atk_buff;
57
+            defender->sp_atk_buff = swap;
58
+            battle_string_chooser = str_heart_swap_ref;
59
+            break;
60
+    }
61
+    return false;
62
+}

+ 19
- 0
src/moves/swap_moves/swap_moves_script.S View File

@@ -0,0 +1,19 @@
1
+#include <battle_script.h>
2
+
3
+.align 2
4
+.text
5
+.thumb
6
+
7
+.global bs_swap_moves
8
+bs_swap_moves:
9
+    attackcanceler
10
+    attackstring
11
+    ppreduce
12
+    callasm set_swap_moves+1
13
+    attackanimation
14
+    waitanimation
15
+    printstring 0x184
16
+    waitmessage 0x40
17
+    goto 0x081D694E
18
+
19
+

+ 1
- 0
string/de/lucky_chant.txt View File

@@ -0,0 +1 @@
1
+str_lucky_chant=Beschwörung schützt dein Team\nvor kritischen Treffern!

+ 9
- 1
string/de/move_strings.txt View File

@@ -1 +1,9 @@
1
-str_power_swap=\hFD\h0F tauscht Angriff und\nVerteidigung!
1
+str_power_trick=\hFD\h0F tauscht Angriff und\nVerteidigung!
2
+str_lucky_chant=Beschwörung schützt dein Team\nvor kritischen Treffern!
3
+str_shield_break_normal=Schilde gebrochen und so.
4
+str_shield_break_feint=Offenlegung und so.
5
+str_tailwind=Die Pokémon, die auf deiner Seite\nkämpfen, erhalten Rückenwind!
6
+str_gastro_acid=Die Fähigkeit von \hFD\h10\nwurde unterdrückt!
7
+str_power_swap=\hFD\h0F tauscht seinen Angriff\nund Spezialangriff mit dem Ziel!
8
+str_guard_swap=\hFD\h0F tauscht seine Verteidigung\nund Spezialverteidigung mit dem Ziel!
9
+str_heart_swap=\hFD\h0F tauscht seine Statusveränderungen\nmit den Ziel!

+ 0
- 2
string/de/shield_break.txt View File

@@ -1,2 +0,0 @@
1
-str_shield_break_normal=Schilde gebrochen und so.
2
-str_shield_break_feint=Offenlegung und so.

+ 0
- 1
string/de/tailwind.txt View File

@@ -1 +0,0 @@
1
-str_tailwind=Die Pokémon, die auf deiner Seite\nkämpfen, erhalten Rückenwind!