SBird1337 8 роки тому
джерело
коміт
bd7c13d5f7

+ 2
- 1
data/moves/effect_table.S Переглянути файл

@@ -4,7 +4,8 @@
4 4
 
5 5
 .global m_effect_table
6 6
 m_effect_table:
7
-	.word 0x081D6900 @0
7
+	.word bs_power_trick    @for testing
8
+        @.word 0x081D6900 @0
8 9
 	.word 0x081D696D @1
9 10
 	.word 0x081D69DC @2
10 11
 	.word 0x081D69E7 @3

+ 24
- 0
nbproject/configurations.xml Переглянути файл

@@ -4634,6 +4634,10 @@
4634 4634
           <df name="hazards">
4635 4635
             <in>hazards_scripts.S</in>
4636 4636
           </df>
4637
+          <df name="power_trick">
4638
+            <in>power_trick.c</in>
4639
+            <in>power_trick_script.S</in>
4640
+          </df>
4637 4641
         </df>
4638 4642
         <df name="music">
4639 4643
           <in>main_mixer.S</in>
@@ -4654,6 +4658,11 @@
4654 4658
           <in>cutscene_meteor.c</in>
4655 4659
         </df>
4656 4660
       </df>
4661
+      <df name="string">
4662
+        <df name="en">
4663
+          <in>move_strings.txt</in>
4664
+        </df>
4665
+      </df>
4657 4666
       <df name="todo">
4658 4667
         <in>pokemon_evolution.s</in>
4659 4668
         <in>pokemon_habitats.s</in>
@@ -4667,6 +4676,7 @@
4667 4676
       <itemPath>nbproject/private/launcher.properties</itemPath>
4668 4677
       <itemPath>makefile</itemPath>
4669 4678
     </logicalFolder>
4679
+    <itemPath>string/de/move_strings.txt</itemPath>
4670 4680
   </logicalFolder>
4671 4681
   <sourceFolderFilter>^(nbproject)$</sourceFolderFilter>
4672 4682
   <sourceRootList>
@@ -27225,6 +27235,16 @@
27225 27235
             tool="4"
27226 27236
             flavor2="0">
27227 27237
       </item>
27238
+      <item path="src/moves/power_trick/power_trick.c"
27239
+            ex="false"
27240
+            tool="0"
27241
+            flavor2="0">
27242
+      </item>
27243
+      <item path="src/moves/power_trick/power_trick_script.S"
27244
+            ex="false"
27245
+            tool="4"
27246
+            flavor2="0">
27247
+      </item>
27228 27248
       <item path="src/music/main_mixer.S" ex="false" tool="4" flavor2="0">
27229 27249
       </item>
27230 27250
       <item path="src/music/music_override.c" ex="false" tool="0" flavor2="0">
@@ -27248,6 +27268,10 @@
27248 27268
       </item>
27249 27269
       <item path="src/specials/cutscene_meteor.c" ex="false" tool="0" flavor2="0">
27250 27270
       </item>
27271
+      <item path="string/de/move_strings.txt" ex="false" tool="3" flavor2="0">
27272
+      </item>
27273
+      <item path="string/en/move_strings.txt" ex="false" tool="3" flavor2="0">
27274
+      </item>
27251 27275
       <item path="todo/pokemon_evolution.s" ex="false" tool="4" flavor2="0">
27252 27276
       </item>
27253 27277
       <item path="todo/pokemon_habitats.s" ex="false" tool="4" flavor2="0">

+ 8
- 0
nbproject/private/configurations.xml Переглянути файл

@@ -3807,6 +3807,8 @@
3807 3807
             </df>
3808 3808
             <df name="hazards">
3809 3809
             </df>
3810
+            <df name="power_trick">
3811
+            </df>
3810 3812
           </df>
3811 3813
           <df name="music">
3812 3814
           </df>
@@ -4793,6 +4795,10 @@
4793 4795
           <df name="hazards">
4794 4796
             <in>hazards_scripts.S</in>
4795 4797
           </df>
4798
+          <df name="power_trick">
4799
+            <in>power_trick.c</in>
4800
+            <in>power_trick_script.S</in>
4801
+          </df>
4796 4802
         </df>
4797 4803
         <df name="music">
4798 4804
           <in>main_mixer.S</in>
@@ -4819,6 +4825,7 @@
4819 4825
         <df name="de">
4820 4826
         </df>
4821 4827
         <df name="en">
4828
+          <in>move_strings.txt</in>
4822 4829
         </df>
4823 4830
       </df>
4824 4831
       <df name="todo">
@@ -4827,6 +4834,7 @@
4827 4834
       </df>
4828 4835
       <in>main.asm</in>
4829 4836
     </df>
4837
+    <itemPath>string/de/move_strings.txt</itemPath>
4830 4838
   </logicalFolder>
4831 4839
   <projectmakefile>makefile</projectmakefile>
4832 4840
   <confs>

+ 13
- 0
src/moves/power_trick/power_trick.c Переглянути файл

@@ -0,0 +1,13 @@
1
+#include <battle.h>
2
+#include <bpre.h>
3
+
4
+u8 power_trick_swap() 
5
+{
6
+    custom_battle_elements.ptr->bank_affecting[battle_active_bank].powertrick = 1;
7
+    u16 *atk = &battle_participants[battle_active_bank].atk;
8
+    u16 *def = &battle_participants[battle_active_bank].def;
9
+    u16 switch_var = *atk;
10
+    *atk = *def;
11
+    *def = switch_var;
12
+    return 0;
13
+}

+ 18
- 0
src/moves/power_trick/power_trick_script.S Переглянути файл

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

+ 1
- 0
string/de/move_strings.txt Переглянути файл

@@ -0,0 +1 @@
1
+str_power_swap=\hFD\h0F tauscht Angriff und\nVerteidigung!

+ 1
- 0
string/en/move_strings.txt Переглянути файл

@@ -0,0 +1 @@
1
+str_power_swap=\hFD\h0F switched its Attack\nand Defense!