SBird1337 8 lat temu
rodzic
commit
00be287b88

+ 1
- 0
bpre.sym Wyświetl plik

@@ -82,6 +82,7 @@ battle_participants	= 0x02023BE4;
82 82
 battle_data_ability = 0x02023C04;
83 83
 battle_data_current_hp = 0x02023C0C;
84 84
 battle_executed_move = 0x02023D4A;
85
+battle_last_used_ability = 0x02023D6A;
85 86
 battle_attacker_bank = 0x02023D6B;
86 87
 battle_defender_bank = 0x02023D6C;
87 88
 battle_attacker_p_bank = 0x02023D6D;

+ 2
- 1
data/moves/effect_table.S Wyświetl plik

@@ -231,4 +231,5 @@ m_effect_table:
231 231
         .word bs_lucky_chant        @222
232 232
         .word bs_gastro_acid        @223
233 233
         .word bs_swap_moves         @224
234
-        .word bs_punishment         @225
234
+        .word bs_punishment         @225
235
+        .word bs_change_ability     @226

+ 4
- 2
data/moves/move_data.S Wyświetl plik

@@ -398,15 +398,17 @@ 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 399
 move_data_magensaefte:		.byte	223,            	0,		3,		100,		10,		0,		0,		0,		50,		0,		2,		0
400 400
 move_data_beschwoerung:		.byte	222,            	0,		0,		0,		30,		0,		16,		0,		4,		0,		2,		0
401
+@TODO EGOTRIP
401 402
 move_data_egotrip:		.byte	MOVE_EFFECT_NONE,	0,		0,		0,		20,		0,		0,		0,		2,		0,		2,		0
402 403
 move_data_imitator:		.byte	9,			0,		0,		0,		20,		0,		1,		0,		0,		0,		2,		0
403 404
 move_data_krafttausch:		.byte	224,            	0,		14,		0,		10,		0,		16,		0,		2,		0,		2,		0
404 405
 move_data_schutztausch:		.byte	224,                	0,		14,		0,		10,		0,		0,		0,		2,		0,		2,		0
405 406
 move_data_strafattacke:		.byte	225,            	1,		17,		100,		5,		0,		0,		0,		51,		0,		0,		0
407
+@TODO LAST RESORT
406 408
 move_data_zuflucht:		.byte	MOVE_EFFECT_NONE,	140,		0,		100,		5,		0,		0,		0,		51,		0,		0,		0
407
-move_data_sorgensamen:		.byte	MOVE_EFFECT_NONE,	0,		12,		100,		10,		0,		0,		0,		26,		0,		2,		0
409
+move_data_sorgensamen:		.byte	226,            	0,		12,		100,		10,		0,		0,		0,		26,		0,		2,		0
408 410
 move_data_tiefschlag:		.byte	MOVE_EFFECT_NONE,	80,		17,		100,		5,		0,		0,		1,		51,		0,		0,		0
409
-move_data_giftspitzen:		.byte	MOVE_EFFECT_NONE,	0,		3,		0,		20,		0,		64,		0,		0,		0,		2,		0
411
+move_data_giftspitzen:		.byte	112,            	0,		3,		0,		20,		0,		64,		0,		0,		0,		2,		0
410 412
 move_data_statustausch:		.byte	224,            	0,		14,		0,		10,		0,		0,		0,		2,		0,		2,		0
411 413
 move_data_wasserring:		.byte	181,			0,		11,		0,		20,		0,		16,		0,		4,		0,		2,		0
412 414
 move_data_magnetflug:		.byte	MOVE_EFFECT_NONE,	0,		13,		0,		10,		0,		16,		0,		0,		0,		2,		0

+ 14
- 14
data/pkmn_tables/pokemon_moveset_table.S Wyświetl plik

@@ -626,7 +626,7 @@ moveset_table:
626 626
 .word moveset_karippas
627 627
 .word moveset_flapteryx
628 628
 .word moveset_aeropteryx
629
-.word moveset_unratütox
629
+.word moveset_unratütox
630 630
 .word moveset_deponitox
631 631
 .word moveset_zorua
632 632
 .word moveset_zoroark
@@ -689,7 +689,7 @@ moveset_table:
689 689
 .word moveset_washakwil
690 690
 .word moveset_skallyk
691 691
 .word moveset_grypheldis
692
-.word moveset_furnifraß
692
+.word moveset_furnifraß
693 693
 .word moveset_fermicula
694 694
 .word moveset_kapuno
695 695
 .word moveset_duodino
@@ -727,10 +727,10 @@ moveset_table:
727 727
 .word moveset_vivillon
728 728
 .word moveset_leufeo
729 729
 .word moveset_pyroleo
730
-.word moveset_flabébé
730
+.word moveset_flabébé
731 731
 .word moveset_floette
732 732
 .word moveset_florges
733
-.word moveset_mähikel
733
+.word moveset_mähikel
734 734
 .word moveset_chevrumm
735 735
 .word moveset_pam_pam
736 736
 .word moveset_pandagro
@@ -1054,16 +1054,16 @@ moveset_table:
1054 1054
 .word moveset_barschuft
1055 1055
 .word moveset_schalellos
1056 1056
 .word moveset_gastrodon
1057
-.word moveset_flabébé
1057
+.word moveset_flabébé
1058 1058
 .word moveset_floette
1059 1059
 .word moveset_florges
1060
-.word moveset_flabébé
1060
+.word moveset_flabébé
1061 1061
 .word moveset_floette
1062 1062
 .word moveset_florges
1063
-.word moveset_flabébé
1063
+.word moveset_flabébé
1064 1064
 .word moveset_floette
1065 1065
 .word moveset_florges
1066
-.word moveset_flabébé
1066
+.word moveset_flabébé
1067 1067
 .word moveset_floette
1068 1068
 .word moveset_florges
1069 1069
 .word moveset_zygarde
@@ -1218,9 +1218,9 @@ moveset_bisasam:
1218 1218
 .byte 0x1 
1219 1219
 .hword MOVE_HOWL 
1220 1220
 .byte 0x3 
1221
-.hword MOVE_PUNISHMENT
1221
+.hword MOVE_WORRY_SEED
1222 1222
 .byte 0x7 
1223
-.hword MOVE_GUARD_SWAP
1223
+.hword MOVE_HYPNOSIS
1224 1224
 .byte 0x7
1225 1225
 .hword 0x4D 
1226 1226
 .byte 0xD 
@@ -21651,7 +21651,7 @@ moveset_aeropteryx:
21651 21651
 .byte 0xFF, 0x0
21652 21652
 
21653 21653
 .align 2
21654
-moveset_unratütox: 
21654
+moveset_unratütox: 
21655 21655
 .hword 0x8B 
21656 21656
 .byte 0x1 
21657 21657
 .hword 0x1 
@@ -24112,7 +24112,7 @@ moveset_grypheldis:
24112 24112
 .byte 0xFF, 0x0
24113 24113
 
24114 24114
 .align 2
24115
-moveset_furnifraß: 
24115
+moveset_furnifraß: 
24116 24116
 .hword 0x1FE 
24117 24117
 .byte 0x1 
24118 24118
 .hword 0x205 
@@ -25556,7 +25556,7 @@ moveset_pyroleo:
25556 25556
 .byte 0xFF, 0x0
25557 25557
 
25558 25558
 .align 2
25559
-moveset_flabébé: 
25559
+moveset_flabébé: 
25560 25560
 .hword 0x21 
25561 25561
 .byte 0x1 
25562 25562
 .hword 0x16 
@@ -25651,7 +25651,7 @@ moveset_florges:
25651 25651
 .byte 0xFF, 0x0
25652 25652
 
25653 25653
 .align 2
25654
-moveset_mähikel: 
25654
+moveset_mähikel: 
25655 25655
 .hword 0x21 
25656 25656
 .byte 0x1 
25657 25657
 .hword 0x4A 

+ 14
- 0
nbproject/configurations.xml Wyświetl plik

@@ -4645,6 +4645,10 @@
4645 4645
           </df>
4646 4646
         </df>
4647 4647
         <df name="moves">
4648
+          <df name="ability_changers">
4649
+            <in>ability_change_script.S</in>
4650
+            <in>worry_seed.c</in>
4651
+          </df>
4648 4652
           <df name="assurance">
4649 4653
             <in>assurance.c</in>
4650 4654
             <in>assurance_script.S</in>
@@ -27353,6 +27357,16 @@
27353 27357
       </item>
27354 27358
       <item path="src/item/tmhm/tm_save_block.S" ex="false" tool="4" flavor2="0">
27355 27359
       </item>
27360
+      <item path="src/moves/ability_changers/ability_change_script.S"
27361
+            ex="false"
27362
+            tool="4"
27363
+            flavor2="0">
27364
+      </item>
27365
+      <item path="src/moves/ability_changers/worry_seed.c"
27366
+            ex="false"
27367
+            tool="0"
27368
+            flavor2="0">
27369
+      </item>
27356 27370
       <item path="src/moves/assurance/assurance.c" ex="false" tool="0" flavor2="0">
27357 27371
       </item>
27358 27372
       <item path="src/moves/assurance/assurance_script.S"

+ 6
- 0
nbproject/private/configurations.xml Wyświetl plik

@@ -4047,6 +4047,8 @@
4047 4047
             </df>
4048 4048
           </df>
4049 4049
           <df name="moves">
4050
+            <df name="ability_changers">
4051
+            </df>
4050 4052
             <df name="assurance">
4051 4053
             </df>
4052 4054
             <df name="battle_engine">
@@ -5812,6 +5814,10 @@
5812 5814
           </df>
5813 5815
         </df>
5814 5816
         <df name="moves">
5817
+          <df name="ability_changers">
5818
+            <in>ability_change_script.S</in>
5819
+            <in>worry_seed.c</in>
5820
+          </df>
5815 5821
           <df name="assurance">
5816 5822
             <in>assurance.c</in>
5817 5823
             <in>assurance_script.S</in>

+ 1
- 1
nbproject/project.xml Wyświetl plik

@@ -7,7 +7,7 @@
7 7
             <c-extensions>c</c-extensions>
8 8
             <cpp-extensions/>
9 9
             <header-extensions>h</header-extensions>
10
-            <sourceEncoding>ISO-8859-1</sourceEncoding>
10
+            <sourceEncoding>UTF-8</sourceEncoding>
11 11
             <make-dep-projects/>
12 12
             <sourceRootList>
13 13
                 <sourceRootElem>.</sourceRootElem>

+ 1
- 0
src/include/battle_locations.h Wyświetl plik

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

+ 19
- 0
src/moves/ability_changers/ability_change_script.S Wyświetl plik

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

+ 22
- 0
src/moves/ability_changers/worry_seed.c Wyświetl plik

@@ -0,0 +1,22 @@
1
+#include <battle.h>
2
+
3
+extern void* str_worry_seed_ref;
4
+
5
+u8 worry_seed()
6
+{
7
+    u8 def_ability = battle_participants[battle_defender_bank].ability_id;
8
+    if(def_ability == ABILITY_STANCE_CHANGE && def_ability == ABILITY_MULTITYPE && def_ability == ABILITY_TRUANT)
9
+    {
10
+        //we fail
11
+        battlescript_cursor = (void*) (0x081D7DF0);
12
+        return true;
13
+    }
14
+    else
15
+    {
16
+        battle_participants[battle_defender_bank].ability_id = ABILITY_INSOMNIA;
17
+        battle_last_used_ability = ABILITY_INSOMNIA;
18
+        battle_string_chooser = str_worry_seed_ref;
19
+        return false;
20
+    }
21
+    return false;
22
+}

+ 6
- 6
src/moves/punishment/punishment.c Wyświetl plik

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

+ 0
- 1
string/de/lucky_chant.txt Wyświetl plik

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

+ 2
- 1
string/de/move_strings.txt Wyświetl plik

@@ -6,4 +6,5 @@ str_tailwind=Die Pokémon, die auf deiner Seite\nkämpfen, erhalten Rückenwind!
6 6
 str_gastro_acid=Die Fähigkeit von \hFD\h10\nwurde unterdrückt!
7 7
 str_power_swap=\hFD\h0F tauscht seinen Angriff\nund Spezialangriff mit dem Ziel!
8 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!
9
+str_heart_swap=\hFD\h0F tauscht seine Statusveränderungen\nmit den Ziel!
10
+str_worry_seed=\hFD\h10 nimmt die Fähigkeit\nInsomnia an!