Browse Source

worry seed

SBird1337 8 years ago
parent
commit
00be287b88

+ 1
- 0
bpre.sym View File

82
 battle_data_ability = 0x02023C04;
82
 battle_data_ability = 0x02023C04;
83
 battle_data_current_hp = 0x02023C0C;
83
 battle_data_current_hp = 0x02023C0C;
84
 battle_executed_move = 0x02023D4A;
84
 battle_executed_move = 0x02023D4A;
85
+battle_last_used_ability = 0x02023D6A;
85
 battle_attacker_bank = 0x02023D6B;
86
 battle_attacker_bank = 0x02023D6B;
86
 battle_defender_bank = 0x02023D6C;
87
 battle_defender_bank = 0x02023D6C;
87
 battle_attacker_p_bank = 0x02023D6D;
88
 battle_attacker_p_bank = 0x02023D6D;

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

231
         .word bs_lucky_chant        @222
231
         .word bs_lucky_chant        @222
232
         .word bs_gastro_acid        @223
232
         .word bs_gastro_acid        @223
233
         .word bs_swap_moves         @224
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 View File

398
 move_data_krafttrick:		.byte	221,            	0,		14,		0,		10,		0,		0,		0,		4,		0,		2,		0
398
 move_data_krafttrick:		.byte	221,            	0,		14,		0,		10,		0,		0,		0,		4,		0,		2,		0
399
 move_data_magensaefte:		.byte	223,            	0,		3,		100,		10,		0,		0,		0,		50,		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
400
 move_data_beschwoerung:		.byte	222,            	0,		0,		0,		30,		0,		16,		0,		4,		0,		2,		0
401
+@TODO EGOTRIP
401
 move_data_egotrip:		.byte	MOVE_EFFECT_NONE,	0,		0,		0,		20,		0,		0,		0,		2,		0,		2,		0
402
 move_data_egotrip:		.byte	MOVE_EFFECT_NONE,	0,		0,		0,		20,		0,		0,		0,		2,		0,		2,		0
402
 move_data_imitator:		.byte	9,			0,		0,		0,		20,		0,		1,		0,		0,		0,		2,		0
403
 move_data_imitator:		.byte	9,			0,		0,		0,		20,		0,		1,		0,		0,		0,		2,		0
403
 move_data_krafttausch:		.byte	224,            	0,		14,		0,		10,		0,		16,		0,		2,		0,		2,		0
404
 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_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
 move_data_strafattacke:		.byte	225,            	1,		17,		100,		5,		0,		0,		0,		51,		0,		0,		0
407
+@TODO LAST RESORT
406
 move_data_zuflucht:		.byte	MOVE_EFFECT_NONE,	140,		0,		100,		5,		0,		0,		0,		51,		0,		0,		0
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
 move_data_tiefschlag:		.byte	MOVE_EFFECT_NONE,	80,		17,		100,		5,		0,		0,		1,		51,		0,		0,		0
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
 move_data_statustausch:		.byte	224,            	0,		14,		0,		10,		0,		0,		0,		2,		0,		2,		0
412
 move_data_statustausch:		.byte	224,            	0,		14,		0,		10,		0,		0,		0,		2,		0,		2,		0
411
 move_data_wasserring:		.byte	181,			0,		11,		0,		20,		0,		16,		0,		4,		0,		2,		0
413
 move_data_wasserring:		.byte	181,			0,		11,		0,		20,		0,		16,		0,		4,		0,		2,		0
412
 move_data_magnetflug:		.byte	MOVE_EFFECT_NONE,	0,		13,		0,		10,		0,		16,		0,		0,		0,		2,		0
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 View File

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

+ 14
- 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="ability_changers">
4649
+            <in>ability_change_script.S</in>
4650
+            <in>worry_seed.c</in>
4651
+          </df>
4648
           <df name="assurance">
4652
           <df name="assurance">
4649
             <in>assurance.c</in>
4653
             <in>assurance.c</in>
4650
             <in>assurance_script.S</in>
4654
             <in>assurance_script.S</in>
27353
       </item>
27357
       </item>
27354
       <item path="src/item/tmhm/tm_save_block.S" ex="false" tool="4" flavor2="0">
27358
       <item path="src/item/tmhm/tm_save_block.S" ex="false" tool="4" flavor2="0">
27355
       </item>
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
       <item path="src/moves/assurance/assurance.c" ex="false" tool="0" flavor2="0">
27370
       <item path="src/moves/assurance/assurance.c" ex="false" tool="0" flavor2="0">
27357
       </item>
27371
       </item>
27358
       <item path="src/moves/assurance/assurance_script.S"
27372
       <item path="src/moves/assurance/assurance_script.S"

+ 6
- 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="ability_changers">
4051
+            </df>
4050
             <df name="assurance">
4052
             <df name="assurance">
4051
             </df>
4053
             </df>
4052
             <df name="battle_engine">
4054
             <df name="battle_engine">
5812
           </df>
5814
           </df>
5813
         </df>
5815
         </df>
5814
         <df name="moves">
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
           <df name="assurance">
5821
           <df name="assurance">
5816
             <in>assurance.c</in>
5822
             <in>assurance.c</in>
5817
             <in>assurance_script.S</in>
5823
             <in>assurance_script.S</in>

+ 1
- 1
nbproject/project.xml View File

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

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

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

+ 19
- 0
src/moves/ability_changers/ability_change_script.S View File

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 View File

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 View File

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

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

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

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

6
 str_gastro_acid=Die Fähigkeit von \hFD\h10\nwurde unterdrückt!
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!
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!
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!