Selaa lähdekoodia

flare blitz, magnet rise

SBird1337 8 vuotta sitten
vanhempi
commit
6b64eae51f

+ 1
- 0
bpre.sym Näytä tiedosto

@@ -106,6 +106,7 @@ battle_damage_multiplier = 0x02023FD2;
106 106
 battle_protect = 0x02023E8C;
107 107
 side_affecting_halfword = 0x2023DDE;
108 108
 battle_turn_order = 0x02023bde;
109
+battle_status_3 = 0x02023DFC;
109 110
 
110 111
 item_get_quality = 0x0809A948|1;
111 112
 item_get_x12 = 0x0809A924|1;

+ 3
- 2
data/moves/effect_table.S Näytä tiedosto

@@ -131,7 +131,7 @@ m_effect_table:
131 131
 	.word 0x081D7962 @122
132 132
 	.word 0x081D7954 @123
133 133
 	.word 0x081D796E @124
134
-	.word 0x081D7977 @125
134
+	.word bs_flare_blitz @125   also used for flame wheel, scald, steam eruption
135 135
 	.word 0x081D7982 @126
136 136
 	.word bs_uturn_btpass @127 (uturn, volt switch, baton pass)
137 137
 	.word 0x081D6900 @128
@@ -232,4 +232,5 @@ m_effect_table:
232 232
         .word bs_gastro_acid        @223
233 233
         .word bs_swap_moves         @224
234 234
         .word bs_punishment         @225
235
-        .word bs_change_ability     @226
235
+        .word bs_change_ability     @226
236
+        .word bs_magnet_rise        @227

+ 2
- 2
data/moves/move_data.S Näytä tiedosto

@@ -411,8 +411,8 @@ move_data_tiefschlag:		.byte	MOVE_EFFECT_NONE,	80,		17,		100,		5,		0,		0,		1,		5
411 411
 move_data_giftspitzen:		.byte	112,            	0,		3,		0,		20,		0,		64,		0,		0,		0,		2,		0
412 412
 move_data_statustausch:		.byte	224,            	0,		14,		0,		10,		0,		0,		0,		2,		0,		2,		0
413 413
 move_data_wasserring:		.byte	181,			0,		11,		0,		20,		0,		16,		0,		4,		0,		2,		0
414
-move_data_magnetflug:		.byte	MOVE_EFFECT_NONE,	0,		13,		0,		10,		0,		16,		0,		0,		0,		2,		0
415
-move_data_flammenblitz:		.byte	MOVE_EFFECT_NONE,	120,		10,		100,		15,		0,		0,		0,		51,		0,		0,		0
414
+move_data_magnetflug:		.byte	227,            	0,		13,		0,		10,		0,		16,		0,		0,		0,		2,		0
415
+move_data_flammenblitz:		.byte	125,            	120,		10,		100,		15,		0,		0,		0,		51,		0,		0,		0
416 416
 move_data_kraftwelle:		.byte	6,			60,		1,		100,		10,		0,		0,		0,		51,		0,		0,		0
417 417
 move_data_aurasphaere:		.byte	17,			80,		1,		0,		20,		0,		0,		0,		50,		0,		1,		0
418 418
 move_data_steinpolitur:		.byte	52,			0,		5,		0,		20,		0,		0,		0,		4,		0,		2,		0

+ 1
- 1
data/pkmn_tables/pokemon_moveset_table.S Näytä tiedosto

@@ -1218,7 +1218,7 @@ moveset_bisasam:
1218 1218
 .byte 0x1 
1219 1219
 .hword MOVE_HOWL 
1220 1220
 .byte 0x3 
1221
-.hword MOVE_WORRY_SEED
1221
+.hword MOVE_MAGNET_RISE
1222 1222
 .byte 0x7 
1223 1223
 .hword MOVE_HYPNOSIS
1224 1224
 .byte 0x7

+ 22
- 0
nbproject/configurations.xml Näytä tiedosto

@@ -4682,6 +4682,9 @@
4682 4682
             <in>feint.c</in>
4683 4683
             <in>feint_scripts.S</in>
4684 4684
           </df>
4685
+          <df name="flare_blitz">
4686
+            <in>flare_blitz_script.S</in>
4687
+          </df>
4685 4688
           <df name="gastro_acid">
4686 4689
             <in>gastro_acid.c</in>
4687 4690
             <in>gastro_acid_script.S</in>
@@ -4693,6 +4696,10 @@
4693 4696
             <in>lucky_chant.c</in>
4694 4697
             <in>lucky_chant_script.S</in>
4695 4698
           </df>
4699
+          <df name="magnet_rise">
4700
+            <in>magnet_rise.c</in>
4701
+            <in>magnet_rise_script.S</in>
4702
+          </df>
4696 4703
           <df name="metal_burst">
4697 4704
             <in>metal_burst.c</in>
4698 4705
             <in>metal_burst_script.S</in>
@@ -27441,6 +27448,11 @@
27441 27448
       </item>
27442 27449
       <item path="src/moves/feint/feint_scripts.S" ex="false" tool="4" flavor2="0">
27443 27450
       </item>
27451
+      <item path="src/moves/flare_blitz/flare_blitz_script.S"
27452
+            ex="false"
27453
+            tool="4"
27454
+            flavor2="0">
27455
+      </item>
27444 27456
       <item path="src/moves/gastro_acid/gastro_acid.c"
27445 27457
             ex="false"
27446 27458
             tool="0"
@@ -27466,6 +27478,16 @@
27466 27478
             tool="4"
27467 27479
             flavor2="0">
27468 27480
       </item>
27481
+      <item path="src/moves/magnet_rise/magnet_rise.c"
27482
+            ex="false"
27483
+            tool="0"
27484
+            flavor2="0">
27485
+      </item>
27486
+      <item path="src/moves/magnet_rise/magnet_rise_script.S"
27487
+            ex="false"
27488
+            tool="4"
27489
+            flavor2="0">
27490
+      </item>
27469 27491
       <item path="src/moves/metal_burst/metal_burst.c"
27470 27492
             ex="false"
27471 27493
             tool="0"

+ 11
- 0
nbproject/private/configurations.xml Näytä tiedosto

@@ -4063,12 +4063,16 @@
4063 4063
             </df>
4064 4064
             <df name="feint">
4065 4065
             </df>
4066
+            <df name="flare_blitz">
4067
+            </df>
4066 4068
             <df name="gastro_acid">
4067 4069
             </df>
4068 4070
             <df name="hazards">
4069 4071
             </df>
4070 4072
             <df name="lucky_chant">
4071 4073
             </df>
4074
+            <df name="magnet_rise">
4075
+            </df>
4072 4076
             <df name="metal_burst">
4073 4077
             </df>
4074 4078
             <df name="pay_back">
@@ -5851,6 +5855,9 @@
5851 5855
             <in>feint.c</in>
5852 5856
             <in>feint_scripts.S</in>
5853 5857
           </df>
5858
+          <df name="flare_blitz">
5859
+            <in>flare_blitz_script.S</in>
5860
+          </df>
5854 5861
           <df name="gastro_acid">
5855 5862
             <in>gastro_acid.c</in>
5856 5863
             <in>gastro_acid_script.S</in>
@@ -5862,6 +5869,10 @@
5862 5869
             <in>lucky_chant.c</in>
5863 5870
             <in>lucky_chant_script.S</in>
5864 5871
           </df>
5872
+          <df name="magnet_rise">
5873
+            <in>magnet_rise.c</in>
5874
+            <in>magnet_rise_script.S</in>
5875
+          </df>
5865 5876
           <df name="metal_burst">
5866 5877
             <in>metal_burst.c</in>
5867 5878
             <in>metal_burst_script.S</in>

+ 24
- 0
src/include/battle_structs.h Näytä tiedosto

@@ -177,6 +177,30 @@ struct in_battle_weather{
177 177
     u32 air_current : 1;
178 178
 };
179 179
 
180
+struct status_3{
181
+    u32 leech_seed_hp_receiver : 2; // 2 bits
182
+    u32 leech_seed : 1; //4
183
+    u32 always_hits : 2; //x8 | x10
184
+    u32 perish_song : 1; //x20
185
+    u32 on_air : 1; //x40
186
+    u32 underground : 1;//80
187
+    u32 minimized : 1; //x100
188
+    u32 charged_up : 1; //x200
189
+    u32 rooted : 1; //x400
190
+    u32 yawn : 2; //x800 || x1000
191
+    u32 imprision : 1; //x2000
192
+    u32 grudge : 1; //x4000
193
+    u32 unkown_no_crit : 1; //x8000
194
+    u32 mud_sport : 1; //x10 000
195
+    u32 watersport : 1; //x20 000
196
+    u32 underwater : 1; //x40 000
197
+    u32 switchinlock : 1; //x80 000
198
+    u32 unburden : 1; //x100 000 (previously trace)
199
+    u32 phantomforce : 1; //x200 000
200
+};
201
+
202
+extern struct status_3 battle_status_3[4];
203
+
180 204
 union battle_weather{
181 205
     u32 int_bw;
182 206
     struct in_battle_weather flags;

+ 35
- 0
src/moves/flare_blitz/flare_blitz_script.S Näytä tiedosto

@@ -0,0 +1,35 @@
1
+#include <battle_script.h>
2
+#include <moves.h>
3
+
4
+.align 2
5
+.thumb
6
+.text
7
+
8
+.global bs_flare_blitz
9
+bs_flare_blitz:
10
+
11
+    setbyte 0x2023E85 0x3
12
+    jumpifhalfword 0x0 0x2023D4A MOVE_FLARE_BLITZ flare_blitz
13
+    goto 0x81D6900
14
+
15
+flare_blitz:
16
+    attackcanceler
17
+    accuracycheck 0x81D695E 0x0
18
+    attackstring
19
+    ppreduce
20
+    calculatedamage
21
+    attackanimation
22
+    waitanimation
23
+    missmessage
24
+    cmd5c BANK_TARGET
25
+    waitstate
26
+    graphicalhpupdate BANK_TARGET   
27
+    datahpupdate BANK_TARGET
28
+    critmessage
29
+    waitmessage DELAY_1SECOND
30
+    resultmessage
31
+    waitmessage DELAY_1SECOND
32
+    seteffectwithchancetarget
33
+    setbyte 0x2023E85 0xE6
34
+    seteffectwithchancetarget
35
+    goto 0x81D6947

+ 14
- 0
src/moves/magnet_rise/magnet_rise.c Näytä tiedosto

@@ -0,0 +1,14 @@
1
+#include <battle.h>
2
+
3
+u8 set_magnet_rise() {
4
+    struct bank_affecting* user = &custom_battle_elements.ptr->bank_affecting[battle_attacker_bank];
5
+    if (user->magnet_rise || user->smacked_down || battle_status_3[battle_attacker_bank].rooted) {
6
+        //we failed
7
+        battlescript_cursor = (void*) (0x081D7DF0);
8
+        return true;
9
+    } else {
10
+        user->magnet_rise = 5;
11
+        return false;
12
+    }
13
+    return false;
14
+}

+ 19
- 0
src/moves/magnet_rise/magnet_rise_script.S Näytä tiedosto

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

+ 2
- 1
string/de/move_strings.txt Näytä tiedosto

@@ -7,4 +7,5 @@ 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 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!
10
+str_worry_seed=\hFD\h10 nimmt die Fähigkeit\nInsomnia an!
11
+str_magnet_rise=\hFD\h0F schwebt aufgrund von\nElektromagnetismus!