mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-31 01:35:20 +02:00
Compare commits
514 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
705ff1582c | ||
|
2d487492b8 | ||
|
b8f67d73cc | ||
|
c578b39392 | ||
|
fa040c22e6 | ||
|
d1acef9657 | ||
|
d07e75fa46 | ||
|
b512557cfb | ||
|
a24d07fd38 | ||
|
32eabbef50 | ||
|
7cecdce726 | ||
|
b3ad6179bb | ||
|
8abe751132 | ||
|
491c4d5185 | ||
|
5f3916a00d | ||
|
3758dbc6f0 | ||
|
f94a01c7b1 | ||
|
504d8a175b | ||
|
59733b10df | ||
|
53eb65a28b | ||
|
e0712f44bf | ||
|
ae07184364 | ||
|
ed6d2d6f11 | ||
|
71321cea42 | ||
|
95fb9bb952 | ||
|
497ba78537 | ||
|
42c04176dc | ||
|
5eb5e3f942 | ||
|
be3b5bc0b0 | ||
|
7a34977d87 | ||
|
5dd47e5b2d | ||
|
b03fa9f0fc | ||
|
a3f733c7b6 | ||
|
96ffc3e85b | ||
|
b542b87bad | ||
|
0ce133bb41 | ||
|
cb5cdf1b5c | ||
|
3a8b37823b | ||
|
d14bed83cd | ||
|
c536f700d3 | ||
|
12a08025f9 | ||
|
53598b94d1 | ||
|
378e3f38dc | ||
|
808001ceec | ||
|
ff1d21f115 | ||
|
becb559498 | ||
|
66b78158e3 | ||
|
eed0301367 | ||
|
1217ead8fd | ||
|
12115e7d51 | ||
|
667fab564f | ||
|
2e49dbea07 | ||
|
7a838d92b4 | ||
|
206a038dbc | ||
|
8427a5ff07 | ||
|
9a73020f23 | ||
|
8850ecb6ec | ||
|
a1a17596ef | ||
|
d733fcda6d | ||
|
bb5d825b9d | ||
|
2625347a3d | ||
|
102ff53d70 | ||
|
44da17fff8 | ||
|
8e55a7867b | ||
|
9a571e480f | ||
|
f8d50ed35a | ||
|
3318e02c67 | ||
|
2620084c76 | ||
|
63f998bc4d | ||
|
a43d9d8354 | ||
|
84f200af4a | ||
|
ff50de4bdd | ||
|
9a6a6d7999 | ||
|
41c5d35864 | ||
|
e4dc1e2adc | ||
|
15e71ce34d | ||
|
8ab41db738 | ||
|
e011432856 | ||
|
be0d5f09db | ||
|
aed2bec9a8 | ||
|
57e7eb2935 | ||
|
38c0d9368f | ||
|
297821dfd7 | ||
|
e83a77d23f | ||
|
de6a9fd411 | ||
|
bdd9761d53 | ||
|
e7c3281a34 | ||
|
a3e44cd510 | ||
|
6eff647b8f | ||
|
f9949ae6d0 | ||
|
c002a20453 | ||
|
17c559d723 | ||
|
dab71b95f7 | ||
|
e6c32dc8a1 | ||
|
8ec0e71675 | ||
|
a146dde118 | ||
|
190eb2bae0 | ||
|
87937a371d | ||
|
bfa8e2cef7 | ||
|
4c20805d75 | ||
|
071301432b | ||
|
1aed676e6b | ||
|
43528154c4 | ||
|
6509fe1cb0 | ||
|
af89b308c7 | ||
|
1c9effb03f | ||
|
fe6098fc7b | ||
|
3b298ba2b5 | ||
|
62fbec7c43 | ||
|
5012313ca8 | ||
|
cff7dd2083 | ||
|
5fd6ca1e38 | ||
|
fcff6fe74e | ||
|
ba3c3c7f23 | ||
|
9be1e7838b | ||
|
a7bb36f10c | ||
|
2400d68fb6 | ||
|
d01af0ad9d | ||
|
0b82f53032 | ||
|
831af723f6 | ||
|
306a9894fc | ||
|
407cf76546 | ||
|
a759fc9cb0 | ||
|
253e4b50f3 | ||
|
fb368e0f2d | ||
|
4d5173fab4 | ||
|
d9da71c812 | ||
|
e6d78d1d3b | ||
|
644d2c64ef | ||
|
d7735f33ba | ||
|
396f2b37ee | ||
|
20ce172674 | ||
|
9fce336574 | ||
|
8b560a0dcc | ||
|
438fff5e54 | ||
|
7a920335d4 | ||
|
cee683452e | ||
|
d9b7e2258b | ||
|
2fa95df3e7 | ||
|
b6f19fb764 | ||
|
742c43ac4d | ||
|
1fd932d43f | ||
|
d529b58409 | ||
|
b50af8744b | ||
|
2fd98316fe | ||
|
01a2487839 | ||
|
e03827880e | ||
|
574a3eb8eb | ||
|
206dcc5dae | ||
|
cb0a693a11 | ||
|
8f5c040441 | ||
|
e62791ca05 | ||
|
52bd699e34 | ||
|
995f46d716 | ||
|
3d4ccb5e58 | ||
|
491080871f | ||
|
28f87c422b | ||
|
bf4a94927a | ||
|
0083f5a10c | ||
|
19d01ed0df | ||
|
41278e06ab | ||
|
f79ccb2a20 | ||
|
f4f8a63d93 | ||
|
96276520e3 | ||
|
96984213b1 | ||
|
b1c09a3ebb | ||
|
7ee85091f2 | ||
|
f1fb11fa1f | ||
|
e66bf6ae2a | ||
|
82604aa024 | ||
|
26e2f2d279 | ||
|
2cc74f7631 | ||
|
b7e6ff3381 | ||
|
359afde27d | ||
|
885f7f80d6 | ||
|
3a0887023b | ||
|
940059013c | ||
|
ef770de841 | ||
|
6a4615f1e1 | ||
|
540186d2ea | ||
|
1cdb83545e | ||
|
74f03692d2 | ||
|
68a3317536 | ||
|
8e0372da30 | ||
|
98ee3d48eb | ||
|
e9a8a89856 | ||
|
1db6f81cb3 | ||
|
aa7dbc3f20 | ||
|
b85e6162d9 | ||
|
84a925b120 | ||
|
37cc3a7556 | ||
|
0022bf7455 | ||
|
568d7d62f3 | ||
|
b3f8811503 | ||
|
c7c5155c80 | ||
|
a13b0c50ae | ||
|
2e0110ae40 | ||
|
536874888a | ||
|
8d9a8e63f2 | ||
|
7dfdf7eebd | ||
|
df0e3ad85c | ||
|
736af58545 | ||
|
57803d7266 | ||
|
f33eb9b3cd | ||
|
83c6cc7027 | ||
|
3a47a87735 | ||
|
69f70919b6 | ||
|
021d79d08d | ||
|
e132a2500c | ||
|
75f9914bb4 | ||
|
7214556dda | ||
|
4621ecbb12 | ||
|
666fbf7007 | ||
|
f9d1076086 | ||
|
c6e101bd3f | ||
|
d2ef0e708d | ||
|
7e37e1c382 | ||
|
44ce38ccef | ||
|
aba304e5d4 | ||
|
2e2af670e3 | ||
|
a8dd94a7e6 | ||
|
8b7363364c | ||
|
9b942ab977 | ||
|
d49217ff95 | ||
|
e74ff7cc50 | ||
|
3a4535dd57 | ||
|
d70887c319 | ||
|
369cd8a187 | ||
|
13a47b5276 | ||
|
a70c4e39dd | ||
|
e5c979b9ac | ||
|
aef9bf78f7 | ||
|
a5550404e0 | ||
|
787cd5358e | ||
|
052f32a5de | ||
|
5a546db127 | ||
|
1812c4914d | ||
|
a3277e47e6 | ||
|
a68dd860a5 | ||
|
e2a3be2096 | ||
|
a049998b44 | ||
|
2640ec070f | ||
|
0415df9ee3 | ||
|
4edb20faae | ||
|
c19a7b06cd | ||
|
66de1ce8c9 | ||
|
15dd897e9a | ||
|
3649717883 | ||
|
e7153fdc4f | ||
|
9522656df9 | ||
|
d02763959f | ||
|
4fca486fab | ||
|
10cc749328 | ||
|
3f6f8a57f2 | ||
|
a51f0dc27a | ||
|
db6d04174f | ||
|
221bdd6b9c | ||
|
2b1c2a9145 | ||
|
b6f356a6ba | ||
|
27e940f117 | ||
|
9739e6eecd | ||
|
11f8f9cc5c | ||
|
8fd32c031b | ||
|
d94bb95d0c | ||
|
254c829b61 | ||
|
04ae735b18 | ||
|
2c9a1ebc61 | ||
|
16a88c1c22 | ||
|
eaa0c8d2c3 | ||
|
a96c13f123 | ||
|
79b23efe92 | ||
|
e81237bd64 | ||
|
ebbe37413e | ||
|
3cf7687348 | ||
|
8fa1f76cf4 | ||
|
58d9acc96f | ||
|
d3ad439226 | ||
|
eeb0ba84c2 | ||
|
7188108444 | ||
|
de15767ce3 | ||
|
1c3e30d59e | ||
|
90b13caf94 | ||
|
73fc0bc916 | ||
|
6f450b12e6 | ||
|
6759aba500 | ||
|
0738507791 | ||
|
1e0fb98359 | ||
|
0bf698e9c2 | ||
|
aae35a8724 | ||
|
93f8d63aaf | ||
|
e065eb575a | ||
|
f5feba5e99 | ||
|
ad49e7af7b | ||
|
90464e6530 | ||
|
da7b534aa0 | ||
|
89b111536f | ||
|
cbe568a6f8 | ||
|
b802531748 | ||
|
27bd072946 | ||
|
1c6f8cf00f | ||
|
9fae5d2dfc | ||
|
689ce95c49 | ||
|
97387050c7 | ||
|
a0bcce2809 | ||
|
6908c4a72d | ||
|
46cb18974d | ||
|
2e1418af8f | ||
|
09d9c51aa1 | ||
|
c2bb993a40 | ||
|
36ba9c6875 | ||
|
b53ee169e5 | ||
|
facfbc9f4e | ||
|
f985bf5952 | ||
|
fef6ff28df | ||
|
5c9faa6710 | ||
|
15ee853001 | ||
|
49ba9c9294 | ||
|
6afb1fdd00 | ||
|
7de8cb3973 | ||
|
549d313509 | ||
|
6f41946e21 | ||
|
17c87d1b53 | ||
|
a049abea81 | ||
|
3d52f4fa94 | ||
|
12a61f5dae | ||
|
9578265fb5 | ||
|
5a0243644f | ||
|
7d80fda0b3 | ||
|
d87a6cf18d | ||
|
1241a11611 | ||
|
caf99db33f | ||
|
d9b5b35006 | ||
|
34fc3ffbbe | ||
|
afee85c4ac | ||
|
ee7c0e5b94 | ||
|
100ba59891 | ||
|
f22403795b | ||
|
25bcc154a2 | ||
|
f346a32495 | ||
|
7ea152fbe5 | ||
|
6c065abfdd | ||
|
ce52888a0d | ||
|
b48debe4e2 | ||
|
873411d40e | ||
|
7c2ff10f33 | ||
|
f4354a9922 | ||
|
14dd28290c | ||
|
3d7eb3bd66 | ||
|
f2a9babcd7 | ||
|
813e939090 | ||
|
8479bd0fc3 | ||
|
260cf6aa66 | ||
|
72702a2c61 | ||
|
65fd7dc53e | ||
|
c3254073f3 | ||
|
b8fcb31484 | ||
|
0d442e54ef | ||
|
2e43afbbc2 | ||
|
60c1030659 | ||
|
cbc09b8358 | ||
|
dad278e810 | ||
|
4a16501926 | ||
|
eca6a70ed6 | ||
|
0fb05ba815 | ||
|
e400c49d7d | ||
|
c2f3eeff22 | ||
|
56e436d69e | ||
|
f74f1212dd | ||
|
cab4e66cea | ||
|
9873f15aa5 | ||
|
1a7e08d361 | ||
|
ee05af333c | ||
|
844bf81eb8 | ||
|
4717d097e7 | ||
|
d5d291bdda | ||
|
6360c93368 | ||
|
9eb32c6b59 | ||
|
0d36580015 | ||
|
2d65ce8ce1 | ||
|
9d912e939b | ||
|
c0b3fe06d0 | ||
|
064c99a4f3 | ||
|
224f9c87d7 | ||
|
81f05a3bd1 | ||
|
3318a6accc | ||
|
fabbc958d9 | ||
|
fa52bddf96 | ||
|
86428f8055 | ||
|
9f7b722bcf | ||
|
eac90b82d9 | ||
|
045a299826 | ||
|
11001f69d0 | ||
|
e37b4ed2da | ||
|
754d88d05b | ||
|
ccd1b9bb7d | ||
|
8451718d14 | ||
|
399c00daf7 | ||
|
628e3816ef | ||
|
82fee7a434 | ||
|
a0fd0f061a | ||
|
730e3ad766 | ||
|
59a8a2e502 | ||
|
afb752ee4f | ||
|
e47f20ef35 | ||
|
6ca5a5442c | ||
|
1bef17409e | ||
|
2c2271f733 | ||
|
58a12e5edb | ||
|
86cdffdd76 | ||
|
62f6605a0f | ||
|
65ec57d27b | ||
|
f280c5718c | ||
|
4c5bd0b7f6 | ||
|
2cbe35552c | ||
|
59f1fd2361 | ||
|
6c49740ba2 | ||
|
88d72bb451 | ||
|
9ffa127999 | ||
|
fdd015a8b4 | ||
|
142fd4d3cf | ||
|
275201de44 | ||
|
1c73ca3a5a | ||
|
e2cfd5207a | ||
|
88b963b8d5 | ||
|
cb2bc3aad1 | ||
|
8b0b977665 | ||
|
d5ed9d5cca | ||
|
1e231196f0 | ||
|
f1c1558c28 | ||
|
49d1c6c73e | ||
|
b04e869783 | ||
|
582e934b80 | ||
|
255fc12aee | ||
|
38acb8955b | ||
|
67f4a63273 | ||
|
04055651ac | ||
|
eabd35006a | ||
|
fdc89e31e8 | ||
|
9fe5f00e2a | ||
|
5f54709231 | ||
|
6d9138ee38 | ||
|
5b774623c5 | ||
|
e7e6ba8d0c | ||
|
619f1b3d93 | ||
|
9bb85df200 | ||
|
d239ad0b84 | ||
|
b0149c7604 | ||
|
ceaf5e50a6 | ||
|
d0e1d670ad | ||
|
fe23d5f4b4 | ||
|
3ab16fdf3e | ||
|
88f1f64838 | ||
|
4992a87b09 | ||
|
5e58d4d249 | ||
|
fb4d9d15d5 | ||
|
f1d7bc81c5 | ||
|
e217895a20 | ||
|
24e1335caa | ||
|
5f826a799a | ||
|
402fc4d64c | ||
|
979b3f68c9 | ||
|
1816038a63 | ||
|
fe712bbcdc | ||
|
5221fcf25b | ||
|
823e26afd7 | ||
|
b1695d6751 | ||
|
c708d9eaab | ||
|
2398cccd20 | ||
|
61de91a141 | ||
|
36b226d8bb | ||
|
b41ac535cd | ||
|
8532fd6169 | ||
|
8dd81c6dc1 | ||
|
a0425be424 | ||
|
6685465b90 | ||
|
aeb1a1829d | ||
|
7ba709eaaa | ||
|
de102f4aa7 | ||
|
35355174cc | ||
|
537fcd93af | ||
|
833916cafb | ||
|
67b2d55e85 | ||
|
af0b31b567 | ||
|
6f62a77d0f | ||
|
f56dba35cc | ||
|
1d26954eab | ||
|
50c7125f71 | ||
|
c50c645654 | ||
|
8ab0da3f38 | ||
|
e8da25f6bd | ||
|
85bcb52780 | ||
|
3f1b7ffc0c | ||
|
845464f03c | ||
|
168255e1a0 | ||
|
c1cadd3078 | ||
|
a1c3c6f9da | ||
|
b40dde8904 | ||
|
0dad856a14 | ||
|
459ce005d0 | ||
|
09051e0cba | ||
|
5857a05eb9 | ||
|
63c7f96cb8 | ||
|
bd2d2f2c3d | ||
|
58eba766ac | ||
|
3c01312fd6 | ||
|
84df4d7ccc | ||
|
a5e68a153a | ||
|
705e0b9725 | ||
|
0e5c260f42 | ||
|
2c3ca27c2d | ||
|
68a64fde7d | ||
|
250bc9899f | ||
|
58d438f179 | ||
|
e2d0996ffd |
@ -1,11 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<packageRestore>
|
<packageRestore>
|
||||||
<add key="enabled" value="True" />
|
<add key="enabled" value="True" />
|
||||||
<add key="automatic" value="True" />
|
<add key="automatic" value="True" />
|
||||||
</packageRestore>
|
</packageRestore>
|
||||||
<packageSources>
|
<packageSources>
|
||||||
<add key="monogame-dev" value="http://teamcity.monogame.net/guestAuth/app/nuget/v1/FeedService.svc/" />
|
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
|
||||||
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
|
|
||||||
</packageSources>
|
</packageSources>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
@ -2,23 +2,20 @@
|
|||||||
|
|
||||||
Inherits BattleAnimation3D
|
Inherits BattleAnimation3D
|
||||||
|
|
||||||
Public Duration As Single = 2.0F
|
Dim FadeInSpeed As Single = 0.01F
|
||||||
Public FadeInSpeed As Single = 0.01F
|
Dim FadeOutSpeed As Single = 0.01F
|
||||||
Public FadeOutSpeed As Single = 0.01F
|
Dim BackgroundOpacity As Single = 0.0F
|
||||||
Public BackgroundOpacity As Single = 0.0F
|
Dim Texture As Texture2D
|
||||||
Public Texture As Texture2D
|
Dim DoTile As Boolean = False
|
||||||
Public DoTile As Boolean = False
|
Dim AnimationWidth As Integer = -1
|
||||||
Public AnimationWidth As Integer = -1
|
Dim AfterFadeInOpacity As Single = 1.0F
|
||||||
Public AnimationLength As Integer = 1
|
Dim FadeProgress As FadeSteps = FadeSteps.FadeIn
|
||||||
Public AnimationSpeed As Integer = 16
|
Dim DurationDate As Date
|
||||||
Public AfterFadeInOpacity As Single = 1.0F
|
Dim DurationWhole As Single
|
||||||
Public FadeProgress As FadeSteps = FadeSteps.FadeIn
|
Dim DurationFraction As Single
|
||||||
Private DurationDate As Date
|
Dim BackgroundAnimation As Animation
|
||||||
Private DurationWhole As Single
|
Dim CurrentRectangle As New Rectangle(0, 0, 0, 0)
|
||||||
Private DurationFraction As Single
|
Dim TextureScale As Integer = 4
|
||||||
Private BackgroundAnimation As Animation
|
|
||||||
Private CurrentRectangle As New Rectangle(0, 0, 0, 0)
|
|
||||||
Private TextureScale As Integer = 4
|
|
||||||
|
|
||||||
Public Enum FadeSteps As Integer
|
Public Enum FadeSteps As Integer
|
||||||
FadeIn
|
FadeIn
|
||||||
@ -29,13 +26,11 @@
|
|||||||
Public Sub New(ByVal Texture As Texture2D, ByVal startDelay As Single, ByVal endDelay As Single, ByVal Duration As Single, Optional ByVal AfterFadeInOpacity As Single = 1.0F, Optional ByVal FadeInSpeed As Single = 0.125F, Optional ByVal FadeOutSpeed As Single = 0.125F, Optional ByVal DoTile As Boolean = False, Optional ByVal AnimationLength As Integer = 1, Optional ByVal AnimationSpeed As Integer = 2, Optional TextureScale As Integer = 4)
|
Public Sub New(ByVal Texture As Texture2D, ByVal startDelay As Single, ByVal endDelay As Single, ByVal Duration As Single, Optional ByVal AfterFadeInOpacity As Single = 1.0F, Optional ByVal FadeInSpeed As Single = 0.125F, Optional ByVal FadeOutSpeed As Single = 0.125F, Optional ByVal DoTile As Boolean = False, Optional ByVal AnimationLength As Integer = 1, Optional ByVal AnimationSpeed As Integer = 2, Optional TextureScale As Integer = 4)
|
||||||
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
|
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
|
||||||
Me.Texture = Texture
|
Me.Texture = Texture
|
||||||
Me.Duration = Duration
|
|
||||||
Me.AfterFadeInOpacity = AfterFadeInOpacity
|
Me.AfterFadeInOpacity = AfterFadeInOpacity
|
||||||
Me.FadeInSpeed = FadeInSpeed
|
Me.FadeInSpeed = FadeInSpeed
|
||||||
Me.FadeOutSpeed = FadeOutSpeed
|
Me.FadeOutSpeed = FadeOutSpeed
|
||||||
Me.DoTile = DoTile
|
Me.DoTile = DoTile
|
||||||
Me.AnimationWidth = CInt(Texture.Width / AnimationLength)
|
Me.AnimationWidth = CInt(Texture.Width / AnimationLength)
|
||||||
Me.AnimationLength = AnimationLength
|
|
||||||
DurationWhole = CSng(Math.Truncate(CDbl(Duration / 6.0F)))
|
DurationWhole = CSng(Math.Truncate(CDbl(Duration / 6.0F)))
|
||||||
DurationFraction = CSng((Duration / 6.0F - DurationWhole) * 1000)
|
DurationFraction = CSng((Duration / 6.0F - DurationWhole) * 1000)
|
||||||
Me.TextureScale = TextureScale
|
Me.TextureScale = TextureScale
|
||||||
|
@ -4,8 +4,8 @@ Public Class BACameraChangeAngle
|
|||||||
|
|
||||||
Inherits BattleAnimation3D
|
Inherits BattleAnimation3D
|
||||||
|
|
||||||
Public CameraAngleID As Integer
|
Dim CameraAngleID As Integer
|
||||||
Public BV2Screen As BattleSystem.BattleScreen
|
Dim BV2Screen As BattleSystem.BattleScreen
|
||||||
|
|
||||||
Public Sub New(ByRef Battlescreen As BattleSystem.BattleScreen, ByVal CameraAngleID As Integer, ByVal startDelay As Single, ByVal endDelay As Single)
|
Public Sub New(ByRef Battlescreen As BattleSystem.BattleScreen, ByVal CameraAngleID As Integer, ByVal startDelay As Single, ByVal endDelay As Single)
|
||||||
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
|
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
|
||||||
|
@ -2,20 +2,19 @@
|
|||||||
|
|
||||||
Inherits BattleAnimation3D
|
Inherits BattleAnimation3D
|
||||||
|
|
||||||
Public StartPosition As Vector3
|
Dim StartPosition As Vector3
|
||||||
Public ReturnToStart As Vector3
|
Dim ReturnToStart As Vector3
|
||||||
Public HalfDistance As New Vector3(0.0F)
|
Dim HalfDistance As New Vector3(0.0F)
|
||||||
Public DestinationDistance As New Vector3(0.0F)
|
Dim DestinationDistance As New Vector3(0.0F)
|
||||||
Public CurrentDistance As New Vector3(0.0F)
|
Dim CurrentDistance As New Vector3(0.0F)
|
||||||
Public MoveSpeed As Single
|
Dim MoveSpeed As Single
|
||||||
Public MoveBothWays As Boolean = True
|
Dim MoveBothWays As Boolean = True
|
||||||
Public MovementCurve As Integer = 0
|
Dim MovementCurve As Integer = 0
|
||||||
Public RemoveEntityAfter As Boolean
|
Dim Duration As TimeSpan
|
||||||
Public Duration As TimeSpan
|
Dim ReadyTime As Date
|
||||||
Public ReadyTime As Date
|
Dim ReadyAxis As New Vector3(0)
|
||||||
Public ReadyAxis As New Vector3(0)
|
Dim InterpolationSpeed As Vector3
|
||||||
Public InterpolationSpeed As Vector3
|
Dim InterpolationDirection As Boolean = True
|
||||||
Public InterpolationDirection As Boolean = True
|
|
||||||
Public Enum Curves As Integer
|
Public Enum Curves As Integer
|
||||||
Linear
|
Linear
|
||||||
Smooth
|
Smooth
|
||||||
|
@ -2,18 +2,17 @@
|
|||||||
|
|
||||||
Inherits BattleAnimation3D
|
Inherits BattleAnimation3D
|
||||||
|
|
||||||
Public TargetEntity As Entity
|
Dim TargetEntity As Entity
|
||||||
Public TransitionSpeed As Single = 0.01F
|
Dim TransitionSpeed As Single = 0.01F
|
||||||
Public TransitionSpeedOut As Single = 0.01F
|
Dim TransitionSpeedOut As Single = 0.01F
|
||||||
Public FadeIn As Boolean = False
|
Dim ReturnToFromWhenDone As Boolean = False
|
||||||
Public ReturnToFromWhenDone As Boolean = False
|
Dim RemoveEntityAfter As Boolean = False
|
||||||
Public RemoveEntityAfter As Boolean = False
|
Dim InitialColorSet As Boolean = False
|
||||||
Public InitialColorSet As Boolean = False
|
Dim IsReturning As Boolean = False
|
||||||
Public IsReturning As Boolean = False
|
Dim ColorTo As Vector3 = New Vector3(1.0F, 1.0F, 1.0F)
|
||||||
Public ColorTo As Vector3 = New Vector3(1.0F, 1.0F, 1.0F)
|
Dim ColorFrom As Vector3 = New Vector3(1.0F, 1.0F, 1.0F)
|
||||||
Public ColorFrom As Vector3 = New Vector3(1.0F, 1.0F, 1.0F)
|
|
||||||
|
|
||||||
Public Sub New(ByVal Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal TransitionSpeedIn As Single, ByVal ReturnToFromWhenDone As Boolean, ByVal startDelay As Single, ByVal endDelay As Single, ByVal ColorTo As Vector3, Optional ByVal ColorFrom As Vector3 = Nothing, Optional TransitionSpeedOut As Single = -1)
|
Public Sub New(ByRef Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal TransitionSpeedIn As Single, ByVal ReturnToFromWhenDone As Boolean, ByVal startDelay As Single, ByVal endDelay As Single, ByVal ColorTo As Vector3, Optional ByVal ColorFrom As Vector3 = Nothing, Optional TransitionSpeedOut As Single = -1)
|
||||||
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
|
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
|
||||||
Me.RemoveEntityAfter = RemoveEntityAfter
|
Me.RemoveEntityAfter = RemoveEntityAfter
|
||||||
If TransitionSpeedOut = -1 Then
|
If TransitionSpeedOut = -1 Then
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
Dim TurnTime As Single = 0.0F
|
Dim TurnTime As Single = 0.0F
|
||||||
Dim TurnDelay As Single = 0.0F
|
Dim TurnDelay As Single = 0.0F
|
||||||
|
|
||||||
Public Sub New(ByVal TargetEntity As NPC, ByVal TurnSteps As Integer, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal EndFaceRotation As Integer = -1, Optional ByVal TurnSpeed As Integer = 1, Optional ByVal TurnDelay As Single = 0.25F)
|
Public Sub New(ByRef TargetEntity As NPC, ByVal TurnSteps As Integer, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal EndFaceRotation As Integer = -1, Optional ByVal TurnSpeed As Integer = 1, Optional ByVal TurnDelay As Single = 0.25F)
|
||||||
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
|
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
|
||||||
If EndFaceRotation = -1 Then
|
If EndFaceRotation = -1 Then
|
||||||
Me.EndFaceRotation = TargetEntity.faceRotation
|
Me.EndFaceRotation = TargetEntity.faceRotation
|
||||||
|
@ -2,21 +2,21 @@
|
|||||||
|
|
||||||
Inherits BattleAnimation3D
|
Inherits BattleAnimation3D
|
||||||
|
|
||||||
Public StartPosition As Vector3
|
Dim StartPosition As Vector3
|
||||||
Public TargetEntity As Entity
|
Dim TargetEntity As Entity
|
||||||
Public Destination As Vector3
|
Dim Destination As Vector3
|
||||||
Public MoveDistance As New Vector3(0.0F)
|
Dim MoveDistance As New Vector3(0.0F)
|
||||||
Public MoveSpeed As Single
|
Dim MoveSpeed As Single
|
||||||
Public MoveYSpeed As Single
|
Dim MoveYSpeed As Single
|
||||||
Public InterpolationSpeed As Single
|
Dim InterpolationSpeed As Single
|
||||||
Public InterpolationYSpeed As Single
|
Dim InterpolationYSpeed As Single
|
||||||
Public SpinX As Boolean = False
|
Dim SpinX As Boolean = False
|
||||||
Public SpinZ As Boolean = False
|
Dim SpinZ As Boolean = False
|
||||||
Public SpinSpeedX As Single = 0.1F
|
Dim SpinSpeedX As Single = 0.1F
|
||||||
Public SpinSpeedZ As Single = 0.1F
|
Dim SpinSpeedZ As Single = 0.1F
|
||||||
Public MovementCurve As Integer = 3
|
Dim MovementCurve As Integer = 3
|
||||||
Private EasedIn As Boolean = False
|
Dim EasedIn As Boolean = False
|
||||||
Private EasedOut As Boolean = False
|
Dim EasedOut As Boolean = False
|
||||||
Public RemoveEntityAfter As Boolean
|
Public RemoveEntityAfter As Boolean
|
||||||
Dim ReadyAxis As Vector3 = New Vector3(0.0F)
|
Dim ReadyAxis As Vector3 = New Vector3(0.0F)
|
||||||
Public Enum Curves As Integer
|
Public Enum Curves As Integer
|
||||||
@ -93,11 +93,6 @@
|
|||||||
|
|
||||||
Private Sub Move()
|
Private Sub Move()
|
||||||
|
|
||||||
Dim DestinationOffset As Vector3 = New Vector3(0)
|
|
||||||
If TargetEntity.Model IsNot Nothing Then
|
|
||||||
DestinationOffset = New Vector3(0, -0.5, 0)
|
|
||||||
End If
|
|
||||||
|
|
||||||
Select Case MovementCurve
|
Select Case MovementCurve
|
||||||
Case Curves.EaseIn
|
Case Curves.EaseIn
|
||||||
If EasedIn = False Then
|
If EasedIn = False Then
|
||||||
@ -195,17 +190,17 @@
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If MoveDistance.Y > 0.05F Then
|
If MoveDistance.Y > 0.05F Then
|
||||||
If StartPosition.Y < Me.Destination.Y + DestinationOffset.Y Then
|
If StartPosition.Y < Me.Destination.Y Then
|
||||||
TargetEntity.Position.Y += Me.MoveYSpeed
|
TargetEntity.Position.Y += Me.MoveYSpeed
|
||||||
|
|
||||||
If TargetEntity.Position.Y >= Me.Destination.Y + DestinationOffset.Y - 0.05 Then
|
If TargetEntity.Position.Y >= Me.Destination.Y - 0.05 Then
|
||||||
TargetEntity.Position.Y = Me.Destination.Y + DestinationOffset.Y
|
TargetEntity.Position.Y = Me.Destination.Y
|
||||||
End If
|
End If
|
||||||
ElseIf StartPosition.Y > Me.Destination.Y + DestinationOffset.Y Then
|
ElseIf StartPosition.Y > Me.Destination.Y Then
|
||||||
TargetEntity.Position.Y -= Me.MoveYSpeed
|
TargetEntity.Position.Y -= Me.MoveYSpeed
|
||||||
|
|
||||||
If TargetEntity.Position.Y <= Me.Destination.Y + DestinationOffset.Y + 0.05 Then
|
If TargetEntity.Position.Y <= Me.Destination.Y + 0.05 Then
|
||||||
TargetEntity.Position.Y = Me.Destination.Y + DestinationOffset.Y
|
TargetEntity.Position.Y = Me.Destination.Y
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
MoveDistance.Y -= Me.MoveYSpeed
|
MoveDistance.Y -= Me.MoveYSpeed
|
||||||
|
@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
Inherits BattleAnimation3D
|
Inherits BattleAnimation3D
|
||||||
|
|
||||||
Public TargetEntity As Entity
|
Dim TargetEntity As Entity
|
||||||
Public TransitionSpeed As Single = 0.01F
|
Dim TransitionSpeed As Single = 0.01F
|
||||||
Public FadeIn As Boolean = False
|
Dim FadeIn As Boolean = False
|
||||||
Public EndState As Single = 0.0F
|
Dim EndState As Single = 0.0F
|
||||||
Public RemoveEntityAfter As Boolean
|
Dim RemoveEntityAfter As Boolean
|
||||||
|
|
||||||
Public Sub New(ByVal entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal TransitionSpeed As Single, ByVal FadeIn As Boolean, ByVal EndState As Single, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal StartState As Single = 1.0F)
|
Public Sub New(ByRef entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal TransitionSpeed As Single, ByVal FadeIn As Boolean, ByVal EndState As Single, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal StartState As Single = 1.0F)
|
||||||
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
|
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
|
||||||
Me.RemoveEntityAfter = RemoveEntityAfter
|
Me.RemoveEntityAfter = RemoveEntityAfter
|
||||||
Me.EndState = EndState
|
Me.EndState = EndState
|
||||||
|
@ -2,21 +2,21 @@
|
|||||||
|
|
||||||
Inherits BattleAnimation3D
|
Inherits BattleAnimation3D
|
||||||
|
|
||||||
Public StartPosition As Vector3
|
Dim StartPosition As Vector3
|
||||||
Public ReturnToStart As Vector3
|
Dim ReturnToStart As Vector3
|
||||||
Public TargetEntity As Entity
|
Dim TargetEntity As Entity
|
||||||
Public HalfDistance As New Vector3(0.0F)
|
Dim HalfDistance As New Vector3(0.0F)
|
||||||
Public DestinationDistance As New Vector3(0.0F)
|
Dim DestinationDistance As New Vector3(0.0F)
|
||||||
Public CurrentDistance As New Vector3(0.0F)
|
Dim CurrentDistance As New Vector3(0.0F)
|
||||||
Public MoveSpeed As Single
|
Dim MoveSpeed As Single
|
||||||
Public MoveBothWays As Boolean = True
|
Dim MoveBothWays As Boolean = True
|
||||||
Public MovementCurve As Integer = 0
|
Dim MovementCurve As Integer = 0
|
||||||
Public RemoveEntityAfter As Boolean
|
Dim RemoveEntityAfter As Boolean
|
||||||
Public Duration As TimeSpan
|
Dim Duration As TimeSpan
|
||||||
Public ReadyTime As Date
|
Dim ReadyTime As Date
|
||||||
Public ReadyAxis As New Vector3(0)
|
Dim ReadyAxis As New Vector3(0)
|
||||||
Public InterpolationSpeed As Vector3
|
Dim InterpolationSpeed As Vector3
|
||||||
Public InterpolationDirection As Boolean = True
|
Dim InterpolationDirection As Boolean = True
|
||||||
Public Enum Curves As Integer
|
Public Enum Curves As Integer
|
||||||
Linear
|
Linear
|
||||||
Smooth
|
Smooth
|
||||||
|
@ -11,9 +11,9 @@
|
|||||||
Dim DoRotation As Vector3 = New Vector3(1.0F)
|
Dim DoRotation As Vector3 = New Vector3(1.0F)
|
||||||
Dim AmountRotated As Vector3 = New Vector3(0.0F)
|
Dim AmountRotated As Vector3 = New Vector3(0.0F)
|
||||||
Dim ReadyAxis As Vector3 = New Vector3(0.0F)
|
Dim ReadyAxis As Vector3 = New Vector3(0.0F)
|
||||||
Public RemoveEntityAfter As Boolean = False
|
Dim RemoveEntityAfter As Boolean = False
|
||||||
|
|
||||||
Public Sub New(ByVal Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal RotationSpeedVector As Vector3, ByVal EndRotation As Vector3, ByVal startDelay As Single, ByVal endDelay As Single)
|
Public Sub New(ByRef Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal RotationSpeedVector As Vector3, ByVal EndRotation As Vector3, ByVal startDelay As Single, ByVal endDelay As Single)
|
||||||
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
|
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
|
||||||
Me.RemoveEntityAfter = RemoveEntityAfter
|
Me.RemoveEntityAfter = RemoveEntityAfter
|
||||||
Me.RotationSpeedVector = RotationSpeedVector
|
Me.RotationSpeedVector = RotationSpeedVector
|
||||||
@ -24,7 +24,7 @@
|
|||||||
Me.AnimationType = AnimationTypes.Rotation
|
Me.AnimationType = AnimationTypes.Rotation
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub New(ByVal Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal RotationSpeedVector As Vector3, ByVal EndRotation As Vector3, ByVal startDelay As Single, ByVal endDelay As Single, ByVal DoXRotation As Boolean, ByVal DoYRotation As Boolean, ByVal DoZRotation As Boolean)
|
Public Sub New(ByRef Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal RotationSpeedVector As Vector3, ByVal EndRotation As Vector3, ByVal startDelay As Single, ByVal endDelay As Single, ByVal DoXRotation As Boolean, ByVal DoYRotation As Boolean, ByVal DoZRotation As Boolean)
|
||||||
Me.New(Entity, RemoveEntityAfter, RotationSpeedVector, EndRotation, startDelay, endDelay)
|
Me.New(Entity, RemoveEntityAfter, RotationSpeedVector, EndRotation, startDelay, endDelay)
|
||||||
|
|
||||||
If DoXRotation = False Then
|
If DoXRotation = False Then
|
||||||
@ -41,7 +41,7 @@
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub New(ByVal Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal RotationSpeedVector As Vector3, ByVal EndRotation As Vector3, ByVal startDelay As Single, ByVal endDelay As Single, ByVal DoXRotation As Boolean, ByVal DoYRotation As Boolean, ByVal DoZRotation As Boolean, ByVal DoReturn As Boolean)
|
Public Sub New(ByRef Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal RotationSpeedVector As Vector3, ByVal EndRotation As Vector3, ByVal startDelay As Single, ByVal endDelay As Single, ByVal DoXRotation As Boolean, ByVal DoYRotation As Boolean, ByVal DoZRotation As Boolean, ByVal DoReturn As Boolean)
|
||||||
Me.New(Entity, RemoveEntityAfter, RotationSpeedVector, EndRotation, startDelay, endDelay, DoXRotation, DoYRotation, DoZRotation)
|
Me.New(Entity, RemoveEntityAfter, RotationSpeedVector, EndRotation, startDelay, endDelay, DoXRotation, DoYRotation, DoZRotation)
|
||||||
|
|
||||||
Me.DoReturn = DoReturn
|
Me.DoReturn = DoReturn
|
||||||
|
@ -2,16 +2,16 @@
|
|||||||
|
|
||||||
Inherits BattleAnimation3D
|
Inherits BattleAnimation3D
|
||||||
|
|
||||||
Public Grow As Boolean = False
|
Dim Grow As Boolean = False
|
||||||
Public EndSize As Vector3
|
Dim EndSize As Vector3
|
||||||
Public SizeSpeed As Single = 0.01F
|
Dim SizeSpeed As Single = 0.01F
|
||||||
Public TargetEntity As Entity
|
Dim TargetEntity As Entity
|
||||||
Public Anchors As String '1 = Bottom, 2 = Top, 3 = Left, 4 = Right. Combinations are possible.
|
Dim Anchors As String '1 = Bottom, 2 = Top, 3 = Left, 4 = Right. Combinations are possible.
|
||||||
|
|
||||||
Public Change As New Vector3(1)
|
Dim SpeedMultiplier As Vector3
|
||||||
Public RemoveEntityAfter As Boolean
|
Dim RemoveEntityAfter As Boolean
|
||||||
|
|
||||||
Public Sub New(ByVal Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal Scale As Vector3, ByVal Grow As Boolean, ByVal EndSize As Vector3, ByVal SizeSpeed As Single, ByVal startDelay As Single, ByVal endDelay As Single, ByVal Anchors As String)
|
Public Sub New(ByRef Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal Scale As Vector3, ByVal Grow As Boolean, ByVal EndSize As Vector3, ByVal SizeSpeed As Single, ByVal startDelay As Single, ByVal endDelay As Single, ByVal Anchors As String, Optional SpeedMultiplier As Vector3 = Nothing)
|
||||||
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, Scale, startDelay, endDelay)
|
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, Scale, startDelay, endDelay)
|
||||||
Me.RemoveEntityAfter = RemoveEntityAfter
|
Me.RemoveEntityAfter = RemoveEntityAfter
|
||||||
Me.Anchors = Anchors
|
Me.Anchors = Anchors
|
||||||
@ -19,6 +19,11 @@
|
|||||||
Me.EndSize = EndSize
|
Me.EndSize = EndSize
|
||||||
Me.SizeSpeed = SizeSpeed
|
Me.SizeSpeed = SizeSpeed
|
||||||
Me.TargetEntity = Entity
|
Me.TargetEntity = Entity
|
||||||
|
If SpeedMultiplier <> Nothing Then
|
||||||
|
Me.SpeedMultiplier = SpeedMultiplier
|
||||||
|
Else
|
||||||
|
Me.SpeedMultiplier = New Vector3(1)
|
||||||
|
End If
|
||||||
|
|
||||||
Me.AnimationType = AnimationTypes.Size
|
Me.AnimationType = AnimationTypes.Size
|
||||||
End Sub
|
End Sub
|
||||||
@ -26,9 +31,9 @@
|
|||||||
Public Overrides Sub DoActionActive()
|
Public Overrides Sub DoActionActive()
|
||||||
Dim saveScale As Vector3 = TargetEntity.Scale
|
Dim saveScale As Vector3 = TargetEntity.Scale
|
||||||
|
|
||||||
Dim changeX As Single = SizeSpeed * Change.X
|
Dim changeX As Single = SizeSpeed * SpeedMultiplier.X
|
||||||
Dim changeY As Single = SizeSpeed * Change.Y
|
Dim changeY As Single = SizeSpeed * SpeedMultiplier.Y
|
||||||
Dim changeZ As Single = SizeSpeed * Change.Z
|
Dim changeZ As Single = SizeSpeed * SpeedMultiplier.Z
|
||||||
|
|
||||||
If Grow = True Then
|
If Grow = True Then
|
||||||
If TargetEntity.Scale.X < Me.EndSize.X Then
|
If TargetEntity.Scale.X < Me.EndSize.X Then
|
||||||
@ -102,9 +107,6 @@
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub SetChange(ByVal changeX As Single, ByVal changeY As Single, ByVal changeZ As Single)
|
|
||||||
Me.Change = New Vector3(changeX, changeY, changeZ)
|
|
||||||
End Sub
|
|
||||||
Public Overrides Sub DoRemoveEntity()
|
Public Overrides Sub DoRemoveEntity()
|
||||||
If Me.RemoveEntityAfter = True Then
|
If Me.RemoveEntityAfter = True Then
|
||||||
TargetEntity.CanBeRemoved = True
|
TargetEntity.CanBeRemoved = True
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
Inherits BattleAnimation3D
|
Inherits BattleAnimation3D
|
||||||
|
|
||||||
Public TargetEntity As Entity
|
Dim TargetEntity As Entity
|
||||||
Public SetPosition As Vector3
|
Dim SetPosition As Vector3
|
||||||
Public RemoveEntityAfter As Boolean
|
Dim RemoveEntityAfter As Boolean
|
||||||
|
|
||||||
Public Sub New(ByRef Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal SetPosition As Vector3, ByVal startDelay As Single, ByVal endDelay As Single)
|
Public Sub New(ByRef Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal SetPosition As Vector3, ByVal startDelay As Single, ByVal endDelay As Single)
|
||||||
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
|
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
Inherits BattleAnimation3D
|
Inherits BattleAnimation3D
|
||||||
|
|
||||||
Public Texture As Texture2D
|
Dim Texture As Texture2D
|
||||||
Public TargetEntity As Entity
|
Dim TargetEntity As Entity
|
||||||
Public RemoveEntityAfter As Boolean
|
Dim RemoveEntityAfter As Boolean
|
||||||
|
|
||||||
Public Sub New(ByVal Entity As Entity, ByVal RemoveEntityAfter As Boolean, Texture As Texture2D, ByVal startDelay As Single, ByVal endDelay As Single)
|
Public Sub New(ByRef Entity As Entity, ByVal RemoveEntityAfter As Boolean, Texture As Texture2D, ByVal startDelay As Single, ByVal endDelay As Single)
|
||||||
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
|
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
|
||||||
Me.RemoveEntityAfter = RemoveEntityAfter
|
Me.RemoveEntityAfter = RemoveEntityAfter
|
||||||
Me.TargetEntity = Entity
|
Me.TargetEntity = Entity
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
Inherits BattleAnimation3D
|
Inherits BattleAnimation3D
|
||||||
|
|
||||||
Private soundfile As String
|
Dim soundfile As String
|
||||||
Private stopMusic As Boolean
|
Dim stopMusic As Boolean
|
||||||
Private IsPokemon As Boolean
|
Dim IsPokemon As Boolean
|
||||||
Private CrySuffix As String = ""
|
Dim CrySuffix As String = ""
|
||||||
|
|
||||||
|
|
||||||
Public Sub New(ByVal sound As String, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal stopMusic As Boolean = False, Optional ByVal IsPokemon As Boolean = False, Optional ByVal CrySuffix As String = "")
|
Public Sub New(ByVal sound As String, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal stopMusic As Boolean = False, Optional ByVal IsPokemon As Boolean = False, Optional ByVal CrySuffix As String = "")
|
||||||
|
@ -24,14 +24,14 @@
|
|||||||
Public Ready As Boolean = False
|
Public Ready As Boolean = False
|
||||||
Public startDelay As Date
|
Public startDelay As Date
|
||||||
Public endDelay As Date
|
Public endDelay As Date
|
||||||
Public SpawnedEntity As Boolean = False
|
Dim SpawnedEntity As Boolean = False
|
||||||
Public Started As Boolean = False
|
Dim Started As Boolean = False
|
||||||
Private DelayDivide As Single = 6.0F
|
Dim DelayDivide As Single = 6.0F
|
||||||
Private StartDelayWhole As Single
|
Dim StartDelayWhole As Single
|
||||||
Private StartDelayFraction As Single
|
Dim StartDelayFraction As Single
|
||||||
Private EndDelayWhole As Single
|
Dim EndDelayWhole As Single
|
||||||
Private EndDelayFraction As Single
|
Dim EndDelayFraction As Single
|
||||||
Private hasStartedEndDelay As Boolean = False
|
Dim hasStartedEndDelay As Boolean = False
|
||||||
|
|
||||||
Public Sub New(ByVal Position As Vector3, ByVal Texture As Texture2D, ByVal Scale As Vector3, ByVal startDelay As Single, ByVal endDelay As Single, Optional SpawnedEntity As Boolean = False)
|
Public Sub New(ByVal Position As Vector3, ByVal Texture As Texture2D, ByVal Scale As Vector3, ByVal startDelay As Single, ByVal endDelay As Single, Optional SpawnedEntity As Boolean = False)
|
||||||
MyBase.New(Position.X, Position.Y, Position.Z, "BattleAnimation", {Texture}, {0, 0}, False, 0, Scale, BaseModel.BillModel, 0, "", New Vector3(1.0F))
|
MyBase.New(Position.X, Position.Y, Position.Z, "BattleAnimation", {Texture}, {0, 0}, False, 0, Scale, BaseModel.BillModel, 0, "", New Vector3(1.0F))
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
Return Nothing
|
Return Nothing
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
Return TextureManager.GetTexture("GUI\Menus\Types", r, "")
|
Return TextureManager.GetTexture(Element.GetElementTexturePath(), r, "")
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Function GetStatColor(ByVal Status As Pokemon.StatusProblems) As Color
|
Public Shared Function GetStatColor(ByVal Status As Pokemon.StatusProblems) As Color
|
||||||
|
@ -24,13 +24,63 @@
|
|||||||
Dim Argument As Object
|
Dim Argument As Object
|
||||||
End Structure
|
End Structure
|
||||||
|
|
||||||
Public OwnStep As RoundConst
|
Public Shared OwnStep As RoundConst
|
||||||
Public OppStep As RoundConst
|
Public Shared OppStep As RoundConst
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' Returns the move of a Pokémon with a specified ID.
|
''' Returns the move of a Pokémon with a specified ID.
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Private Function GetPokemonMoveFromID(ByVal Pokemon As Pokemon, ByVal MoveID As Integer) As Attack
|
Private Function GetPokemonMoveFromID(ByVal Pokemon As Pokemon, ByVal MoveID As Integer, BattleScreen As BattleScreen, own As Boolean) As Attack
|
||||||
|
If own = True Then
|
||||||
|
If BattleScreen.FieldEffects.OwnUsedRandomMove = True Then
|
||||||
|
For Each a As Attack In Pokemon.Attacks
|
||||||
|
If a.Name.ToLower = "metronome" OrElse a.IsGameModeMove AndAlso a.gmUseRandomMove = True Then
|
||||||
|
If a.CurrentPP > 0 Then
|
||||||
|
a.CurrentPP -= 1
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
If BattleScreen.FieldEffects.OwnUsedMirrorMove = True Then
|
||||||
|
For Each a As Attack In Pokemon.Attacks
|
||||||
|
If a.Name.ToLower = "mirror move" Then
|
||||||
|
If a.CurrentPP > 0 Then
|
||||||
|
a.CurrentPP -= 1
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
If BattleScreen.FieldEffects.OwnUsedRandomMove = True Or BattleScreen.FieldEffects.OwnUsedMirrorMove = True Then
|
||||||
|
Return Attack.GetAttackByID(MoveID)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If BattleScreen.FieldEffects.OppUsedRandomMove = True Then
|
||||||
|
For Each a As Attack In Pokemon.Attacks
|
||||||
|
If a.Name.ToLower = "metronome" OrElse a.IsGameModeMove AndAlso a.gmUseRandomMove = True Then
|
||||||
|
If a.CurrentPP > 0 Then
|
||||||
|
a.CurrentPP -= 1
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
If BattleScreen.FieldEffects.OppUsedMirrorMove = True Then
|
||||||
|
For Each a As Attack In Pokemon.Attacks
|
||||||
|
If a.Name.ToLower = "mirror move" Then
|
||||||
|
If a.CurrentPP > 0 Then
|
||||||
|
a.CurrentPP -= 1
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
If BattleScreen.FieldEffects.OppUsedRandomMove = True Or BattleScreen.FieldEffects.OppUsedMirrorMove = True Then
|
||||||
|
Return Attack.GetAttackByID(MoveID)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
For Each a As Attack In Pokemon.Attacks
|
For Each a As Attack In Pokemon.Attacks
|
||||||
If a.ID = MoveID Then
|
If a.ID = MoveID Then
|
||||||
Return a
|
Return a
|
||||||
@ -56,7 +106,7 @@
|
|||||||
If BattleScreen.FieldEffects.OwnRolloutCounter > 0 Then
|
If BattleScreen.FieldEffects.OwnRolloutCounter > 0 Then
|
||||||
SelectedMoveOwn = False
|
SelectedMoveOwn = False
|
||||||
DeleteHostQuery(BattleScreen)
|
DeleteHostQuery(BattleScreen)
|
||||||
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 205)})
|
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 205, BattleScreen, True)})
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -64,7 +114,7 @@
|
|||||||
If BattleScreen.FieldEffects.OwnIceBallCounter > 0 Then
|
If BattleScreen.FieldEffects.OwnIceBallCounter > 0 Then
|
||||||
SelectedMoveOwn = False
|
SelectedMoveOwn = False
|
||||||
DeleteHostQuery(BattleScreen)
|
DeleteHostQuery(BattleScreen)
|
||||||
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 301)})
|
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 301, BattleScreen, True)})
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -72,7 +122,7 @@
|
|||||||
If BattleScreen.FieldEffects.OwnFlyCounter >= 1 Then
|
If BattleScreen.FieldEffects.OwnFlyCounter >= 1 Then
|
||||||
SelectedMoveOwn = False
|
SelectedMoveOwn = False
|
||||||
DeleteHostQuery(BattleScreen)
|
DeleteHostQuery(BattleScreen)
|
||||||
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 19)})
|
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 19, BattleScreen, True)})
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -80,7 +130,7 @@
|
|||||||
If BattleScreen.FieldEffects.OwnDigCounter >= 1 Then
|
If BattleScreen.FieldEffects.OwnDigCounter >= 1 Then
|
||||||
SelectedMoveOwn = False
|
SelectedMoveOwn = False
|
||||||
DeleteHostQuery(BattleScreen)
|
DeleteHostQuery(BattleScreen)
|
||||||
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 91)})
|
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 91, BattleScreen, True)})
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -88,7 +138,7 @@
|
|||||||
If BattleScreen.FieldEffects.OwnOutrage >= 1 Then
|
If BattleScreen.FieldEffects.OwnOutrage >= 1 Then
|
||||||
SelectedMoveOwn = False
|
SelectedMoveOwn = False
|
||||||
DeleteHostQuery(BattleScreen)
|
DeleteHostQuery(BattleScreen)
|
||||||
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 200)})
|
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 200, BattleScreen, True)})
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -96,7 +146,7 @@
|
|||||||
If BattleScreen.FieldEffects.OwnThrash >= 1 Then
|
If BattleScreen.FieldEffects.OwnThrash >= 1 Then
|
||||||
SelectedMoveOwn = False
|
SelectedMoveOwn = False
|
||||||
DeleteHostQuery(BattleScreen)
|
DeleteHostQuery(BattleScreen)
|
||||||
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 37)})
|
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 37, BattleScreen, True)})
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -104,7 +154,7 @@
|
|||||||
If BattleScreen.FieldEffects.OwnPetalDance >= 1 Then
|
If BattleScreen.FieldEffects.OwnPetalDance >= 1 Then
|
||||||
SelectedMoveOwn = False
|
SelectedMoveOwn = False
|
||||||
DeleteHostQuery(BattleScreen)
|
DeleteHostQuery(BattleScreen)
|
||||||
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 80)})
|
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 80, BattleScreen, True)})
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -112,7 +162,7 @@
|
|||||||
If BattleScreen.FieldEffects.OwnBounceCounter >= 1 Then
|
If BattleScreen.FieldEffects.OwnBounceCounter >= 1 Then
|
||||||
SelectedMoveOwn = False
|
SelectedMoveOwn = False
|
||||||
DeleteHostQuery(BattleScreen)
|
DeleteHostQuery(BattleScreen)
|
||||||
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 340)})
|
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 340, BattleScreen, True)})
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -120,7 +170,7 @@
|
|||||||
If BattleScreen.FieldEffects.OwnDiveCounter >= 1 Then
|
If BattleScreen.FieldEffects.OwnDiveCounter >= 1 Then
|
||||||
SelectedMoveOwn = False
|
SelectedMoveOwn = False
|
||||||
DeleteHostQuery(BattleScreen)
|
DeleteHostQuery(BattleScreen)
|
||||||
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 291)})
|
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 291, BattleScreen, True)})
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -128,7 +178,7 @@
|
|||||||
If BattleScreen.FieldEffects.OwnShadowForceCounter = 1 Then
|
If BattleScreen.FieldEffects.OwnShadowForceCounter = 1 Then
|
||||||
SelectedMoveOwn = False
|
SelectedMoveOwn = False
|
||||||
DeleteHostQuery(BattleScreen)
|
DeleteHostQuery(BattleScreen)
|
||||||
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 467)})
|
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 467, BattleScreen, True)})
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -136,13 +186,13 @@
|
|||||||
If BattleScreen.FieldEffects.OwnPhantomForceCounter = 1 Then
|
If BattleScreen.FieldEffects.OwnPhantomForceCounter = 1 Then
|
||||||
SelectedMoveOwn = False
|
SelectedMoveOwn = False
|
||||||
DeleteHostQuery(BattleScreen)
|
DeleteHostQuery(BattleScreen)
|
||||||
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 566)})
|
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 566, BattleScreen, True)})
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'If Sky Drop gets programmed, put this in.
|
'If Sky Drop gets programmed, put this in.
|
||||||
'If BattleScreen.FieldEffects.OwnSkyDropCounter = 1 Then
|
'If BattleScreen.FieldEffects.OwnSkyDropCounter = 1 Then
|
||||||
' InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, xxx)})
|
' InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, xxx, BattleScreen, True)})
|
||||||
' Exit Sub
|
' Exit Sub
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
@ -150,7 +200,7 @@
|
|||||||
If BattleScreen.FieldEffects.OwnGeomancyCounter = 1 Then
|
If BattleScreen.FieldEffects.OwnGeomancyCounter = 1 Then
|
||||||
SelectedMoveOwn = False
|
SelectedMoveOwn = False
|
||||||
DeleteHostQuery(BattleScreen)
|
DeleteHostQuery(BattleScreen)
|
||||||
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 601)})
|
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 601, BattleScreen, True)})
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -158,7 +208,7 @@
|
|||||||
If BattleScreen.FieldEffects.OwnSolarBeam >= 1 Then
|
If BattleScreen.FieldEffects.OwnSolarBeam >= 1 Then
|
||||||
SelectedMoveOwn = False
|
SelectedMoveOwn = False
|
||||||
DeleteHostQuery(BattleScreen)
|
DeleteHostQuery(BattleScreen)
|
||||||
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 76)})
|
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 76, BattleScreen, True)})
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -166,7 +216,7 @@
|
|||||||
If BattleScreen.FieldEffects.OwnSolarBlade >= 1 Then
|
If BattleScreen.FieldEffects.OwnSolarBlade >= 1 Then
|
||||||
SelectedMoveOwn = False
|
SelectedMoveOwn = False
|
||||||
DeleteHostQuery(BattleScreen)
|
DeleteHostQuery(BattleScreen)
|
||||||
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 669)})
|
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 669, BattleScreen, True)})
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -174,7 +224,7 @@
|
|||||||
If BattleScreen.FieldEffects.OwnSkyAttackCounter >= 1 Then
|
If BattleScreen.FieldEffects.OwnSkyAttackCounter >= 1 Then
|
||||||
SelectedMoveOwn = False
|
SelectedMoveOwn = False
|
||||||
DeleteHostQuery(BattleScreen)
|
DeleteHostQuery(BattleScreen)
|
||||||
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 143)})
|
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 143, BattleScreen, True)})
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -182,7 +232,7 @@
|
|||||||
If BattleScreen.FieldEffects.OwnSkullBashCounter >= 1 Then
|
If BattleScreen.FieldEffects.OwnSkullBashCounter >= 1 Then
|
||||||
SelectedMoveOwn = False
|
SelectedMoveOwn = False
|
||||||
DeleteHostQuery(BattleScreen)
|
DeleteHostQuery(BattleScreen)
|
||||||
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 130)})
|
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 130, BattleScreen, True)})
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -190,7 +240,7 @@
|
|||||||
If BattleScreen.FieldEffects.OwnRazorWindCounter >= 1 Then
|
If BattleScreen.FieldEffects.OwnRazorWindCounter >= 1 Then
|
||||||
SelectedMoveOwn = False
|
SelectedMoveOwn = False
|
||||||
DeleteHostQuery(BattleScreen)
|
DeleteHostQuery(BattleScreen)
|
||||||
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 13)})
|
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 13, BattleScreen, True)})
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -198,7 +248,7 @@
|
|||||||
If BattleScreen.FieldEffects.OwnUproar >= 1 Then
|
If BattleScreen.FieldEffects.OwnUproar >= 1 Then
|
||||||
SelectedMoveOwn = False
|
SelectedMoveOwn = False
|
||||||
DeleteHostQuery(BattleScreen)
|
DeleteHostQuery(BattleScreen)
|
||||||
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 253)})
|
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 253, BattleScreen, True)})
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -206,7 +256,7 @@
|
|||||||
If BattleScreen.FieldEffects.OwnBideCounter > 0 Then
|
If BattleScreen.FieldEffects.OwnBideCounter > 0 Then
|
||||||
SelectedMoveOwn = False
|
SelectedMoveOwn = False
|
||||||
DeleteHostQuery(BattleScreen)
|
DeleteHostQuery(BattleScreen)
|
||||||
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 117)})
|
InitializeRound(BattleScreen, New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OwnPokemon, 117, BattleScreen, True)})
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -279,120 +329,120 @@
|
|||||||
'Rollout
|
'Rollout
|
||||||
If BattleScreen.FieldEffects.OppRolloutCounter > 0 Then
|
If BattleScreen.FieldEffects.OppRolloutCounter > 0 Then
|
||||||
SelectedMoveOpp = False
|
SelectedMoveOpp = False
|
||||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 205)}
|
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 205, BattleScreen, False)}
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'IceBall
|
'IceBall
|
||||||
If BattleScreen.FieldEffects.OppIceBallCounter > 0 Then
|
If BattleScreen.FieldEffects.OppIceBallCounter > 0 Then
|
||||||
SelectedMoveOpp = False
|
SelectedMoveOpp = False
|
||||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 301)}
|
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 301, BattleScreen, False)}
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Fly:
|
'Fly:
|
||||||
If BattleScreen.FieldEffects.OppFlyCounter >= 1 Then
|
If BattleScreen.FieldEffects.OppFlyCounter >= 1 Then
|
||||||
SelectedMoveOpp = False
|
SelectedMoveOpp = False
|
||||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 19)}
|
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 19, BattleScreen, False)}
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Dig:
|
'Dig:
|
||||||
If BattleScreen.FieldEffects.OppDigCounter >= 1 Then
|
If BattleScreen.FieldEffects.OppDigCounter >= 1 Then
|
||||||
SelectedMoveOpp = False
|
SelectedMoveOpp = False
|
||||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 91)}
|
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 91, BattleScreen, False)}
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Outrage:
|
'Outrage:
|
||||||
If BattleScreen.FieldEffects.OppOutrage >= 1 Then
|
If BattleScreen.FieldEffects.OppOutrage >= 1 Then
|
||||||
SelectedMoveOpp = False
|
SelectedMoveOpp = False
|
||||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 200)}
|
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 200, BattleScreen, False)}
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Thrash:
|
'Thrash:
|
||||||
If BattleScreen.FieldEffects.OppThrash >= 1 Then
|
If BattleScreen.FieldEffects.OppThrash >= 1 Then
|
||||||
SelectedMoveOpp = False
|
SelectedMoveOpp = False
|
||||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 37)}
|
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 37, BattleScreen, False)}
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Petal Dance:
|
'Petal Dance:
|
||||||
If BattleScreen.FieldEffects.OppPetalDance >= 1 Then
|
If BattleScreen.FieldEffects.OppPetalDance >= 1 Then
|
||||||
SelectedMoveOpp = False
|
SelectedMoveOpp = False
|
||||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 80)}
|
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 80, BattleScreen, False)}
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Bounce:
|
'Bounce:
|
||||||
If BattleScreen.FieldEffects.OppBounceCounter >= 1 Then
|
If BattleScreen.FieldEffects.OppBounceCounter >= 1 Then
|
||||||
SelectedMoveOpp = False
|
SelectedMoveOpp = False
|
||||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 340)}
|
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 340, BattleScreen, False)}
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Dive:
|
'Dive:
|
||||||
If BattleScreen.FieldEffects.OppDiveCounter = 1 Then
|
If BattleScreen.FieldEffects.OppDiveCounter = 1 Then
|
||||||
SelectedMoveOpp = False
|
SelectedMoveOpp = False
|
||||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 291)}
|
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 291, BattleScreen, False)}
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Shadow Force:
|
'Shadow Force:
|
||||||
If BattleScreen.FieldEffects.OppShadowForceCounter = 1 Then
|
If BattleScreen.FieldEffects.OppShadowForceCounter = 1 Then
|
||||||
SelectedMoveOpp = False
|
SelectedMoveOpp = False
|
||||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 467)}
|
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 467, BattleScreen, False)}
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Phantom Force:
|
'Phantom Force:
|
||||||
If BattleScreen.FieldEffects.OppPhantomForceCounter = 1 Then
|
If BattleScreen.FieldEffects.OppPhantomForceCounter = 1 Then
|
||||||
SelectedMoveOpp = False
|
SelectedMoveOpp = False
|
||||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 566)}
|
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 566, BattleScreen, False)}
|
||||||
End If
|
End If
|
||||||
|
|
||||||
''Sky Drop:
|
''Sky Drop:
|
||||||
'If BattleScreen.FieldEffects.OppSkyDropCounter = 1 Then
|
'If BattleScreen.FieldEffects.OppSkyDropCounter = 1 Then
|
||||||
' Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = (19).ToString()}
|
' Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = (19).ToString(), BattleScreen, False}
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
'Geomancy:
|
'Geomancy:
|
||||||
If BattleScreen.FieldEffects.OppGeomancyCounter = 1 Then
|
If BattleScreen.FieldEffects.OppGeomancyCounter = 1 Then
|
||||||
SelectedMoveOpp = False
|
SelectedMoveOpp = False
|
||||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 601)}
|
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 601, BattleScreen, False)}
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Solar Beam:
|
'Solar Beam:
|
||||||
If BattleScreen.FieldEffects.OppSolarBeam >= 1 Then
|
If BattleScreen.FieldEffects.OppSolarBeam >= 1 Then
|
||||||
SelectedMoveOpp = False
|
SelectedMoveOpp = False
|
||||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 76)}
|
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 76, BattleScreen, False)}
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Solar Blade:
|
'Solar Blade:
|
||||||
If BattleScreen.FieldEffects.OppSolarBlade >= 1 Then
|
If BattleScreen.FieldEffects.OppSolarBlade >= 1 Then
|
||||||
SelectedMoveOpp = False
|
SelectedMoveOpp = False
|
||||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 669)}
|
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 669, BattleScreen, False)}
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Sky Attack:
|
'Sky Attack:
|
||||||
If BattleScreen.FieldEffects.OppSkyAttackCounter >= 1 Then
|
If BattleScreen.FieldEffects.OppSkyAttackCounter >= 1 Then
|
||||||
SelectedMoveOpp = False
|
SelectedMoveOpp = False
|
||||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 143)}
|
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 143, BattleScreen, False)}
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Skull Bash:
|
'Skull Bash:
|
||||||
If BattleScreen.FieldEffects.OppSkullBashCounter >= 1 Then
|
If BattleScreen.FieldEffects.OppSkullBashCounter >= 1 Then
|
||||||
SelectedMoveOpp = False
|
SelectedMoveOpp = False
|
||||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 130)}
|
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 130, BattleScreen, False)}
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'RazorWind:
|
'RazorWind:
|
||||||
If BattleScreen.FieldEffects.OppRazorWindCounter >= 1 Then
|
If BattleScreen.FieldEffects.OppRazorWindCounter >= 1 Then
|
||||||
SelectedMoveOpp = False
|
SelectedMoveOpp = False
|
||||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 13)}
|
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 13, BattleScreen, False)}
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Uproar:
|
'Uproar:
|
||||||
If BattleScreen.FieldEffects.OppUproar >= 1 Then
|
If BattleScreen.FieldEffects.OppUproar >= 1 Then
|
||||||
SelectedMoveOpp = False
|
SelectedMoveOpp = False
|
||||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 253)}
|
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 253, BattleScreen, False)}
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Bide:
|
'Bide:
|
||||||
If BattleScreen.FieldEffects.OppBideCounter > 0 Then
|
If BattleScreen.FieldEffects.OppBideCounter > 0 Then
|
||||||
SelectedMoveOpp = False
|
SelectedMoveOpp = False
|
||||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 117)}
|
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, 117, BattleScreen, False)}
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -417,7 +467,7 @@
|
|||||||
moveID = CInt(inputString)
|
moveID = CInt(inputString)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, moveID)}
|
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, moveID, BattleScreen, False)}
|
||||||
ElseIf BattleScreen.ReceivedInput.StartsWith("SWITCH|") Then
|
ElseIf BattleScreen.ReceivedInput.StartsWith("SWITCH|") Then
|
||||||
BattleScreen.OppStatistics.Switches += 1
|
BattleScreen.OppStatistics.Switches += 1
|
||||||
Dim switchID As Integer = CInt(BattleScreen.ReceivedInput.Remove(0, 7))
|
Dim switchID As Integer = CInt(BattleScreen.ReceivedInput.Remove(0, 7))
|
||||||
@ -473,39 +523,76 @@
|
|||||||
Private Function GetAttack(ByVal BattleScreen As BattleScreen, ByVal own As Boolean, ByVal move As Attack) As RoundConst
|
Private Function GetAttack(ByVal BattleScreen As BattleScreen, ByVal own As Boolean, ByVal move As Attack) As RoundConst
|
||||||
'TODO: Reset rage counters
|
'TODO: Reset rage counters
|
||||||
|
|
||||||
Select Case move.Name.ToLower()
|
If own = True Then
|
||||||
Case "metronome"
|
If BattleScreen.FieldEffects.OwnUsedRandomMove = True AndAlso (move.Name.ToLower() <> "metronome" OrElse move.IsGameModeMove = True AndAlso move.gmUseRandomMove = False) Then
|
||||||
If move.CurrentPP > 0 Then
|
BattleScreen.FieldEffects.OwnUsedRandomMove = False
|
||||||
move.CurrentPP -= 1
|
End If
|
||||||
End If
|
If BattleScreen.FieldEffects.OwnUsedMirrorMove = True AndAlso (move.Name.ToLower() <> "mirror move") Then
|
||||||
|
BattleScreen.FieldEffects.OwnUsedMirrorMove = False
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If BattleScreen.FieldEffects.OppUsedRandomMove = True AndAlso (move.Name.ToLower() <> "metronome" OrElse move.IsGameModeMove = True AndAlso move.gmUseRandomMove = False) Then
|
||||||
|
BattleScreen.FieldEffects.OppUsedRandomMove = False
|
||||||
|
End If
|
||||||
|
If BattleScreen.FieldEffects.OppUsedMirrorMove = True AndAlso (move.Name.ToLower() <> "mirror move") Then
|
||||||
|
BattleScreen.FieldEffects.OppUsedMirrorMove = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = Moves.Normal.Metronome.GetMetronomeMove()}
|
If move.IsGameModeMove = True AndAlso move.gmUseRandomMove = True Then
|
||||||
Case "mirror move"
|
If move.CurrentPP > 0 Then
|
||||||
If move.CurrentPP > 0 Then
|
move.CurrentPP -= 1
|
||||||
move.CurrentPP -= 1
|
End If
|
||||||
End If
|
If own = True Then
|
||||||
|
BattleScreen.FieldEffects.OwnUsedRandomMove = True
|
||||||
Dim id As Integer = -1
|
Else
|
||||||
If own = True Then
|
BattleScreen.FieldEffects.OppUsedRandomMove = True
|
||||||
If Not BattleScreen.FieldEffects.OppLastMove Is Nothing AndAlso BattleScreen.FieldEffects.OppLastMove.MirrorMoveAffected = True Then
|
End If
|
||||||
id = BattleScreen.FieldEffects.OppLastMove.ID
|
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = move.GetRandomAttack()}
|
||||||
|
Else
|
||||||
|
Select Case move.Name.ToLower()
|
||||||
|
Case "metronome"
|
||||||
|
If move.CurrentPP > 0 Then
|
||||||
|
move.CurrentPP -= 1
|
||||||
End If
|
End If
|
||||||
Else
|
If own = True Then
|
||||||
If Not BattleScreen.FieldEffects.OwnLastMove Is Nothing AndAlso BattleScreen.FieldEffects.OwnLastMove.MirrorMoveAffected = True Then
|
BattleScreen.FieldEffects.OwnUsedRandomMove = True
|
||||||
id = BattleScreen.FieldEffects.OwnLastMove.ID
|
Else
|
||||||
|
BattleScreen.FieldEffects.OppUsedRandomMove = True
|
||||||
|
End If
|
||||||
|
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = Moves.Normal.Metronome.GetMetronomeMove()}
|
||||||
|
Case "mirror move"
|
||||||
|
If move.CurrentPP > 0 Then
|
||||||
|
move.CurrentPP -= 1
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
|
|
||||||
If id <> -1 Then
|
Dim id As Integer = -1
|
||||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = Attack.GetAttackByID(id)}
|
If own = True Then
|
||||||
Else
|
If Not BattleScreen.FieldEffects.OppLastMove Is Nothing AndAlso BattleScreen.FieldEffects.OppLastMove.MirrorMoveAffected = True Then
|
||||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Text, .Argument = "Mirror Move failed!"}
|
id = BattleScreen.FieldEffects.OppLastMove.ID
|
||||||
End If
|
End If
|
||||||
Case "struggle"
|
Else
|
||||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = move}
|
If Not BattleScreen.FieldEffects.OwnLastMove Is Nothing AndAlso BattleScreen.FieldEffects.OwnLastMove.MirrorMoveAffected = True Then
|
||||||
Case Else
|
id = BattleScreen.FieldEffects.OwnLastMove.ID
|
||||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = move}
|
End If
|
||||||
End Select
|
End If
|
||||||
|
|
||||||
|
If id <> -1 Then
|
||||||
|
If own = True Then
|
||||||
|
BattleScreen.FieldEffects.OwnUsedMirrorMove = True
|
||||||
|
Else
|
||||||
|
BattleScreen.FieldEffects.OppUsedMirrorMove = True
|
||||||
|
End If
|
||||||
|
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = Attack.GetAttackByID(id)}
|
||||||
|
Else
|
||||||
|
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Text, .Argument = "Mirror Move failed!"}
|
||||||
|
End If
|
||||||
|
Case "struggle"
|
||||||
|
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = move}
|
||||||
|
Case Else
|
||||||
|
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = move}
|
||||||
|
End Select
|
||||||
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public SelectedMoveOwn As Boolean = True
|
Public SelectedMoveOwn As Boolean = True
|
||||||
@ -631,8 +718,8 @@
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
Dim OppStep = GetOppStep(BattleScreen, OwnStep)
|
Dim OppStep = GetOppStep(BattleScreen, OwnStep)
|
||||||
Me.OwnStep = OwnStep
|
Battle.OwnStep = OwnStep
|
||||||
Me.OppStep = OppStep
|
Battle.OppStep = OppStep
|
||||||
BattleScreen.OwnFaint = False '''
|
BattleScreen.OwnFaint = False '''
|
||||||
BattleScreen.OppFaint = False '''
|
BattleScreen.OppFaint = False '''
|
||||||
If OwnStep.StepType = RoundConst.StepTypes.Move Then
|
If OwnStep.StepType = RoundConst.StepTypes.Move Then
|
||||||
@ -856,8 +943,8 @@
|
|||||||
ChangeCameraAngle(0, True, BattleScreen)
|
ChangeCameraAngle(0, True, BattleScreen)
|
||||||
BattleScreen.BattleQuery.Add(New TextQueryObject(BattleScreen.OwnPokemon.GetDisplayName() & " is trapped!"))
|
BattleScreen.BattleQuery.Add(New TextQueryObject(BattleScreen.OwnPokemon.GetDisplayName() & " is trapped!"))
|
||||||
|
|
||||||
BattleScreen.FieldEffects.OppUsedMoves.Add(CInt(OppStep.Argument))
|
Dim oppMove As Attack = CType(OppStep.Argument, Attack)
|
||||||
Dim oppMove As Attack = Attack.GetAttackByID(CInt(OppStep.Argument))
|
BattleScreen.FieldEffects.OppUsedMoves.Add(oppMove.ID)
|
||||||
If SelectedMoveOpp = True Then oppMove.MoveSelected(False, BattleScreen)
|
If SelectedMoveOpp = True Then oppMove.MoveSelected(False, BattleScreen)
|
||||||
DoAttackRound(BattleScreen, False, oppMove)
|
DoAttackRound(BattleScreen, False, oppMove)
|
||||||
EndRound(BattleScreen, 2)
|
EndRound(BattleScreen, 2)
|
||||||
@ -1054,6 +1141,7 @@
|
|||||||
p.RemoveVolatileStatus(Pokemon.VolatileStatus.Confusion)
|
p.RemoveVolatileStatus(Pokemon.VolatileStatus.Confusion)
|
||||||
Case 38 'Full Heal
|
Case 38 'Full Heal
|
||||||
Me.CureStatusProblem(False, False, BattleScreen, BattleScreen.Trainer.Name & " used a Full Heal on " & p.GetDisplayName() & "!", "item:fullheal")
|
Me.CureStatusProblem(False, False, BattleScreen, BattleScreen.Trainer.Name & " used a Full Heal on " & p.GetDisplayName() & "!", "item:fullheal")
|
||||||
|
p.RemoveVolatileStatus(Pokemon.VolatileStatus.Confusion)
|
||||||
Case 9 'Antidote
|
Case 9 'Antidote
|
||||||
Me.CureStatusProblem(False, False, BattleScreen, BattleScreen.Trainer.Name & " used an Antidote on " & p.GetDisplayName() & "!", "item:antidote")
|
Me.CureStatusProblem(False, False, BattleScreen, BattleScreen.Trainer.Name & " used an Antidote on " & p.GetDisplayName() & "!", "item:antidote")
|
||||||
Case 10 'Burn Heal
|
Case 10 'Burn Heal
|
||||||
@ -1212,15 +1300,19 @@
|
|||||||
op = BattleScreen.OppPokemon
|
op = BattleScreen.OppPokemon
|
||||||
pNPC = BattleScreen.OwnPokemonNPC
|
pNPC = BattleScreen.OwnPokemonNPC
|
||||||
opNPC = BattleScreen.OppPokemonNPC
|
opNPC = BattleScreen.OppPokemonNPC
|
||||||
BattleScreen.FieldEffects.OwnLastMove = moveUsed
|
If Not (own AndAlso BattleScreen.FieldEffects.OwnLastMove IsNot Nothing AndAlso BattleScreen.FieldEffects.OwnLastMove.ID = 214) Then
|
||||||
|
BattleScreen.FieldEffects.OwnLastMove = moveUsed
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
p = BattleScreen.OppPokemon
|
p = BattleScreen.OppPokemon
|
||||||
op = BattleScreen.OwnPokemon
|
op = BattleScreen.OwnPokemon
|
||||||
pNPC = BattleScreen.OppPokemonNPC
|
pNPC = BattleScreen.OppPokemonNPC
|
||||||
opNPC = BattleScreen.OwnPokemonNPC
|
opNPC = BattleScreen.OwnPokemonNPC
|
||||||
BattleScreen.FieldEffects.OppLastMove = moveUsed
|
If Not (Not own AndAlso BattleScreen.FieldEffects.OppLastMove IsNot Nothing AndAlso BattleScreen.FieldEffects.OppLastMove.ID = 214) Then
|
||||||
|
BattleScreen.FieldEffects.OppLastMove = moveUsed
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
If WildHasEscaped Then
|
If WildHasEscaped Then
|
||||||
WildHasEscaped = False
|
WildHasEscaped = False
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
@ -1351,6 +1443,7 @@
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
' If the last move was Sleep Talk, don't do sleep animation
|
||||||
If (own AndAlso BattleScreen.FieldEffects.OwnLastMove IsNot Nothing AndAlso BattleScreen.FieldEffects.OwnLastMove.ID = 214) OrElse (Not own AndAlso BattleScreen.FieldEffects.OppLastMove IsNot Nothing AndAlso BattleScreen.FieldEffects.OppLastMove.ID = 214) Then
|
If (own AndAlso BattleScreen.FieldEffects.OwnLastMove IsNot Nothing AndAlso BattleScreen.FieldEffects.OwnLastMove.ID = 214) OrElse (Not own AndAlso BattleScreen.FieldEffects.OppLastMove IsNot Nothing AndAlso BattleScreen.FieldEffects.OppLastMove.ID = 214) Then
|
||||||
If own Then
|
If own Then
|
||||||
BattleScreen.FieldEffects.OwnLastMove = moveUsed
|
BattleScreen.FieldEffects.OwnLastMove = moveUsed
|
||||||
@ -1358,30 +1451,34 @@
|
|||||||
BattleScreen.FieldEffects.OppLastMove = moveUsed
|
BattleScreen.FieldEffects.OppLastMove = moveUsed
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If sleepTurns > 0 Then
|
' If the used move is not Snore, do sleep animation or wake up
|
||||||
ChangeCameraAngle(1, own, BattleScreen)
|
If Not (sleepTurns > 0 AndAlso moveUsed.ID = 173) Then
|
||||||
'Sleep Animation
|
|
||||||
If Core.Player.ShowBattleAnimations <> 0 AndAlso BattleScreen.IsPVPBattle = False Then
|
|
||||||
Dim SleepAnimation As New AnimationQueryObject(pNPC, Not own)
|
|
||||||
|
|
||||||
SleepAnimation.AnimationPlaySound("Battle\Effects\Asleep", 0, 0)
|
If sleepTurns > 0 Then
|
||||||
Dim SleepEntity1 As Entity = SleepAnimation.SpawnEntity(New Vector3(0, 0.25, 0), TextureManager.GetTexture("Textures\Battle\StatusEffect\Asleep", New Rectangle(0, 0, 16, 16), ""), New Vector3(0.5F), 1, 0, 1)
|
ChangeCameraAngle(1, own, BattleScreen)
|
||||||
SleepAnimation.AnimationChangeTexture(SleepEntity1, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Asleep", New Rectangle(0, 16, 16, 16), ""), 1, 1)
|
'Sleep Animation
|
||||||
SleepAnimation.AnimationMove(SleepEntity1, True, 0, 0.5, 0.25, 0.01, False, False, 0, 0)
|
If Core.Player.ShowBattleAnimations <> 0 AndAlso BattleScreen.IsPVPBattle = False Then
|
||||||
|
Dim SleepAnimation As New AnimationQueryObject(pNPC, Not own)
|
||||||
|
|
||||||
Dim SleepEntity2 As Entity = SleepAnimation.SpawnEntity(New Vector3(0, 0.25, 0), TextureManager.GetTexture("Textures\Battle\StatusEffect\Asleep", New Rectangle(0, 0, 16, 16), ""), New Vector3(0.5F), 1, 1.5, 1)
|
SleepAnimation.AnimationPlaySound("Battle\Effects\Asleep", 0, 0)
|
||||||
|
Dim SleepEntity1 As Entity = SleepAnimation.SpawnEntity(New Vector3(0, 0.25, 0), TextureManager.GetTexture("Textures\Battle\StatusEffect\Asleep", New Rectangle(0, 0, 16, 16), ""), New Vector3(0.5F), 1, 0, 1)
|
||||||
|
SleepAnimation.AnimationChangeTexture(SleepEntity1, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Asleep", New Rectangle(0, 16, 16, 16), ""), 1, 1)
|
||||||
|
SleepAnimation.AnimationMove(SleepEntity1, True, 0, 0.5, 0.25, 0.01, False, False, 0, 0)
|
||||||
|
|
||||||
SleepAnimation.AnimationChangeTexture(SleepEntity2, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Asleep", New Rectangle(0, 16, 16, 16), ""), 2.5, 1)
|
Dim SleepEntity2 As Entity = SleepAnimation.SpawnEntity(New Vector3(0, 0.25, 0), TextureManager.GetTexture("Textures\Battle\StatusEffect\Asleep", New Rectangle(0, 0, 16, 16), ""), New Vector3(0.5F), 1, 1.5, 1)
|
||||||
SleepAnimation.AnimationMove(SleepEntity2, True, 0, 0.5, 0.25, 0.01, False, False, 2, 0)
|
|
||||||
|
|
||||||
BattleScreen.BattleQuery.Add(SleepAnimation)
|
SleepAnimation.AnimationChangeTexture(SleepEntity2, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Asleep", New Rectangle(0, 16, 16, 16), ""), 2.5, 1)
|
||||||
|
SleepAnimation.AnimationMove(SleepEntity2, True, 0, 0.5, 0.25, 0.01, False, False, 2, 0)
|
||||||
|
|
||||||
|
BattleScreen.BattleQuery.Add(SleepAnimation)
|
||||||
|
Else
|
||||||
|
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Asleep", False))
|
||||||
|
End If
|
||||||
|
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is fast asleep."))
|
||||||
|
Exit Sub
|
||||||
Else
|
Else
|
||||||
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Asleep", False))
|
CureStatusProblem(own, own, BattleScreen, p.GetDisplayName() & " woke up!", "sleepturns")
|
||||||
End If
|
End If
|
||||||
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is fast asleep."))
|
|
||||||
Exit Sub
|
|
||||||
Else
|
|
||||||
CureStatusProblem(own, own, BattleScreen, p.GetDisplayName() & " woke up!", "sleepturns")
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@ -1393,7 +1490,7 @@
|
|||||||
truantTurn = BattleScreen.FieldEffects.OppTruantRound
|
truantTurn = BattleScreen.FieldEffects.OppTruantRound
|
||||||
End If
|
End If
|
||||||
If truantTurn = 1 Then
|
If truantTurn = 1 Then
|
||||||
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is loafing around."))
|
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is loafing around!"))
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@ -1550,8 +1647,6 @@
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
moveUsed.PreAttack(own, BattleScreen)
|
|
||||||
|
|
||||||
If p.HasVolatileStatus(Pokemon.VolatileStatus.Flinch) = True Then
|
If p.HasVolatileStatus(Pokemon.VolatileStatus.Flinch) = True Then
|
||||||
p.RemoveVolatileStatus(Pokemon.VolatileStatus.Flinch)
|
p.RemoveVolatileStatus(Pokemon.VolatileStatus.Flinch)
|
||||||
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " flinched and couldn't move!"))
|
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " flinched and couldn't move!"))
|
||||||
@ -1576,6 +1671,15 @@
|
|||||||
Dim gravity As Integer = BattleScreen.FieldEffects.Gravity
|
Dim gravity As Integer = BattleScreen.FieldEffects.Gravity
|
||||||
If gravity > 0 Then
|
If gravity > 0 Then
|
||||||
If moveUsed.DisabledWhileGravity = True Then
|
If moveUsed.DisabledWhileGravity = True Then
|
||||||
|
Dim fly As Integer = BattleScreen.FieldEffects.OwnFlyCounter
|
||||||
|
If own = False Then
|
||||||
|
fly = BattleScreen.FieldEffects.OppFlyCounter
|
||||||
|
End If
|
||||||
|
|
||||||
|
If fly > 0 Then
|
||||||
|
moveUsed.MoveMisses(own, BattleScreen)
|
||||||
|
End If
|
||||||
|
|
||||||
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & "'s move was prevented due to Gravity!"))
|
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & "'s move was prevented due to Gravity!"))
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
@ -1598,6 +1702,7 @@
|
|||||||
BattleScreen.BattleQuery.Add(HeartAnimation)
|
BattleScreen.BattleQuery.Add(HeartAnimation)
|
||||||
End If
|
End If
|
||||||
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is in love with " & op.GetDisplayName() & "!"))
|
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is in love with " & op.GetDisplayName() & "!"))
|
||||||
|
moveUsed.IsAttracted(own, BattleScreen)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@ -1637,6 +1742,7 @@
|
|||||||
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Paralyzed", False))
|
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Paralyzed", False))
|
||||||
End If
|
End If
|
||||||
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is fully paralyzed!" & Environment.NewLine & "It cannot move!"))
|
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is fully paralyzed!" & Environment.NewLine & "It cannot move!"))
|
||||||
|
moveUsed.IsParalyzed(own, BattleScreen)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@ -1698,6 +1804,8 @@
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
moveUsed.PreAttack(own, BattleScreen)
|
||||||
|
|
||||||
Dim substitute As Integer = BattleScreen.FieldEffects.OppSubstitute
|
Dim substitute As Integer = BattleScreen.FieldEffects.OppSubstitute
|
||||||
If own = False Then
|
If own = False Then
|
||||||
substitute = BattleScreen.FieldEffects.OwnSubstitute
|
substitute = BattleScreen.FieldEffects.OwnSubstitute
|
||||||
@ -1711,9 +1819,15 @@
|
|||||||
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " used " & moveUsed.Name & "!"))
|
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " used " & moveUsed.Name & "!"))
|
||||||
|
|
||||||
If moveUsed.DeductPP(own, BattleScreen) = True Then
|
If moveUsed.DeductPP(own, BattleScreen) = True Then
|
||||||
moveUsed.CurrentPP -= 1
|
If moveUsed.CurrentPP > 0 Then
|
||||||
If op.Ability.Name.ToLower() = "pressure" And moveUsed.CurrentPP > 0 Then
|
|
||||||
moveUsed.CurrentPP -= 1
|
moveUsed.CurrentPP -= 1
|
||||||
|
If op.Ability.Name.ToLower() = "pressure" And moveUsed.CurrentPP > 0 Then
|
||||||
|
moveUsed.CurrentPP -= 1
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
BattleScreen.BattleQuery.Add(New TextQueryObject("But it failed..."))
|
||||||
|
moveUsed.MoveMisses(own, BattleScreen)
|
||||||
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -1767,6 +1881,15 @@
|
|||||||
DoesNotMiss = True
|
DoesNotMiss = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim minimize As Integer = BattleScreen.FieldEffects.OppMinimize
|
||||||
|
If own = False Then
|
||||||
|
minimize = BattleScreen.FieldEffects.OwnMinimize
|
||||||
|
End If
|
||||||
|
|
||||||
|
If minimize > 0 AndAlso moveUsed.Name.ToLower = "stomp" Then
|
||||||
|
DoesNotMiss = True
|
||||||
|
End If
|
||||||
|
|
||||||
'if the target pokemon can't be hit because of a two-turn move (Fly, for example)
|
'if the target pokemon can't be hit because of a two-turn move (Fly, for example)
|
||||||
Dim UseTwoTurnCheck As Boolean = True
|
Dim UseTwoTurnCheck As Boolean = True
|
||||||
If moveUsed.ProtectAffected = False Then
|
If moveUsed.ProtectAffected = False Then
|
||||||
@ -2036,6 +2159,7 @@
|
|||||||
|
|
||||||
If protectWorks = True Then
|
If protectWorks = True Then
|
||||||
BattleScreen.BattleQuery.Add(New TextQueryObject(op.GetDisplayName() & " protected itself!"))
|
BattleScreen.BattleQuery.Add(New TextQueryObject(op.GetDisplayName() & " protected itself!"))
|
||||||
|
moveUsed.MoveProtectedDetected(own, BattleScreen)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@ -2054,6 +2178,7 @@
|
|||||||
|
|
||||||
If detectWorks = True Then
|
If detectWorks = True Then
|
||||||
BattleScreen.BattleQuery.Add(New TextQueryObject(op.GetDisplayName() & " protected itself!"))
|
BattleScreen.BattleQuery.Add(New TextQueryObject(op.GetDisplayName() & " protected itself!"))
|
||||||
|
moveUsed.MoveProtectedDetected(own, BattleScreen)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@ -2076,7 +2201,7 @@
|
|||||||
If moveUsed.MakesContact = True Then
|
If moveUsed.MakesContact = True Then
|
||||||
Me.LowerStat(own, Not own, BattleScreen, "Attack", 1, "", "move:kingsshield")
|
Me.LowerStat(own, Not own, BattleScreen, "Attack", 1, "", "move:kingsshield")
|
||||||
End If
|
End If
|
||||||
|
moveUsed.MoveProtectedDetected(own, BattleScreen)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@ -2102,6 +2227,14 @@
|
|||||||
'Opp Pokémon move animation! This displays the move effects that target the other Pokémon and appear after the camera switched around.
|
'Opp Pokémon move animation! This displays the move effects that target the other Pokémon and appear after the camera switched around.
|
||||||
moveUsed.OpponentPokemonMoveAnimation(BattleScreen, own)
|
moveUsed.OpponentPokemonMoveAnimation(BattleScreen, own)
|
||||||
|
|
||||||
|
'Reset Fly if needed after the animation definition
|
||||||
|
If own = True And BattleScreen.FieldEffects.OwnFlyCounter = 2 Then
|
||||||
|
BattleScreen.FieldEffects.OwnFlyCounter = 0
|
||||||
|
End If
|
||||||
|
If own = False And BattleScreen.FieldEffects.OppFlyCounter = 2 Then
|
||||||
|
BattleScreen.FieldEffects.OwnFlyCounter = 0
|
||||||
|
End If
|
||||||
|
|
||||||
If moveUsed.IsDamagingMove = True Then
|
If moveUsed.IsDamagingMove = True Then
|
||||||
ChangeCameraAngle(2, own, BattleScreen)
|
ChangeCameraAngle(2, own, BattleScreen)
|
||||||
If op.Ability.Name.ToLower() = "wonder guard" And effectiveness <= 1.0F And BattleScreen.FieldEffects.CanUseAbility(Not own, BattleScreen) = True And moveUsed.IsWonderGuardAffected = True Then
|
If op.Ability.Name.ToLower() = "wonder guard" And effectiveness <= 1.0F And BattleScreen.FieldEffects.CanUseAbility(Not own, BattleScreen) = True And moveUsed.IsWonderGuardAffected = True Then
|
||||||
@ -2320,7 +2453,7 @@
|
|||||||
BattleScreen.BattleQuery.Add(New TextQueryObject("It's a critical hit!"))
|
BattleScreen.BattleQuery.Add(New TextQueryObject("It's a critical hit!"))
|
||||||
|
|
||||||
If op.Ability.Name.ToLower() = "anger point" And op.StatAttack < 6 And op.HP > 0 Then
|
If op.Ability.Name.ToLower() = "anger point" And op.StatAttack < 6 And op.HP > 0 Then
|
||||||
BattleScreen.BattleQuery.Add(New TextQueryObject(op.GetDisplayName() & "s Anger Point maxed it's attack!"))
|
BattleScreen.BattleQuery.Add(New TextQueryObject(op.GetDisplayName() & "'s Anger Point maxed it's attack!"))
|
||||||
op.StatAttack = 6
|
op.StatAttack = 6
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@ -2408,7 +2541,7 @@
|
|||||||
|
|
||||||
op.Type1 = moveUsed.GetAttackType(own, BattleScreen)
|
op.Type1 = moveUsed.GetAttackType(own, BattleScreen)
|
||||||
op.Type2.Type = Element.Types.Blank
|
op.Type2.Type = Element.Types.Blank
|
||||||
BattleScreen.BattleQuery.Add(New TextQueryObject(op.GetDisplayName() & " changed it's color!"))
|
BattleScreen.BattleQuery.Add(New TextQueryObject(op.GetDisplayName() & " changed its color!"))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Case "rough skin"
|
Case "rough skin"
|
||||||
@ -2734,13 +2867,16 @@
|
|||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
If BattleScreen.FieldEffects.TempTripleKick > 0 Then
|
||||||
|
BattleScreen.FieldEffects.TempTripleKick = 0
|
||||||
|
End If
|
||||||
Else 'If not damaging move
|
Else 'If not damaging move
|
||||||
Dim lastMove As Attack = BattleScreen.FieldEffects.OppLastMove
|
Dim lastMove As Attack = BattleScreen.FieldEffects.OppLastMove
|
||||||
If own = False Then
|
If own = False Then
|
||||||
lastMove = BattleScreen.FieldEffects.OwnLastMove
|
lastMove = BattleScreen.FieldEffects.OwnLastMove
|
||||||
End If
|
End If
|
||||||
If moveUsed.SnatchAffected = True AndAlso Not lastMove Is Nothing AndAlso lastMove.ID = 289 Then 'Snatch
|
If moveUsed.SnatchAffected = True AndAlso Not lastMove Is Nothing AndAlso lastMove.ID = 289 Then 'Snatch
|
||||||
BattleScreen.BattleQuery.Add(New TextQueryObject(op.GetDisplayName() & " snatched the " & p.GetDisplayName() & "'s move!"))
|
BattleScreen.BattleQuery.Add(New TextQueryObject(op.GetDisplayName() & " snatched " & p.GetDisplayName() & "'s move!"))
|
||||||
|
|
||||||
moveUsed.MoveHits(Not own, BattleScreen)
|
moveUsed.MoveHits(Not own, BattleScreen)
|
||||||
Else
|
Else
|
||||||
@ -2815,6 +2951,20 @@
|
|||||||
End If
|
End If
|
||||||
moveUsed.MoveMisses(own, BattleScreen)
|
moveUsed.MoveMisses(own, BattleScreen)
|
||||||
End If
|
End If
|
||||||
|
''Own Pokémon Encore
|
||||||
|
Dim attackIndex As Integer = -1
|
||||||
|
If own = True AndAlso BattleScreen.FieldEffects.OwnEncore > 0 Then
|
||||||
|
For a = 0 To BattleScreen.OwnPokemon.Attacks.Count - 1
|
||||||
|
If BattleScreen.OwnPokemon.Attacks(a).ID = BattleScreen.FieldEffects.OwnEncoreMove.ID Then
|
||||||
|
attackIndex = a
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If attackIndex <> -1 AndAlso BattleScreen.OwnPokemon.Attacks(attackIndex).CurrentPP = 0 Then
|
||||||
|
BattleScreen.FieldEffects.OwnEncoreMove = Nothing
|
||||||
|
BattleScreen.FieldEffects.OwnEncore = 0
|
||||||
|
BattleScreen.BattleQuery.Add(New TextQueryObject(BattleScreen.OwnPokemon.GetDisplayName() & "'s encore stopped."))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
@ -2876,6 +3026,13 @@
|
|||||||
BattleScreen.BattleQuery.Add(New TextQueryObject(message))
|
BattleScreen.BattleQuery.Add(New TextQueryObject(message))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If own = True AndAlso BattleScreen.FieldEffects.OwnPoisonCounter > 0 Then
|
||||||
|
BattleScreen.FieldEffects.OwnPoisonCounter = 0
|
||||||
|
End If
|
||||||
|
If own = False AndAlso BattleScreen.FieldEffects.OppPoisonCounter > 0 Then
|
||||||
|
BattleScreen.FieldEffects.OppPoisonCounter = 0
|
||||||
|
End If
|
||||||
|
|
||||||
p.Status = Pokemon.StatusProblems.None
|
p.Status = Pokemon.StatusProblems.None
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
@ -3117,7 +3274,7 @@
|
|||||||
End If
|
End If
|
||||||
If safeGuard > 0 AndAlso op.Ability.Name.ToLower() <> "infiltrator" Then
|
If safeGuard > 0 AndAlso op.Ability.Name.ToLower() <> "infiltrator" Then
|
||||||
Me.ChangeCameraAngle(1, own, BattleScreen)
|
Me.ChangeCameraAngle(1, own, BattleScreen)
|
||||||
BattleScreen.BattleQuery.Add(New TextQueryObject("Safeguard prevented the freezing."))
|
BattleScreen.BattleQuery.Add(New TextQueryObject("Safeguard prevented the freeze."))
|
||||||
Return False
|
Return False
|
||||||
Else
|
Else
|
||||||
'Works!
|
'Works!
|
||||||
@ -3610,7 +3767,7 @@
|
|||||||
'Do nothing
|
'Do nothing
|
||||||
Case Else 'Print message given in 'message'
|
Case Else 'Print message given in 'message'
|
||||||
BattleScreen.BattleQuery.Add(New TextQueryObject(message))
|
BattleScreen.BattleQuery.Add(New TextQueryObject(message))
|
||||||
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is poisoned"))
|
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is poisoned!"))
|
||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
If p.Ability.Name.ToLower() = "synchronize" AndAlso from <> own Then
|
If p.Ability.Name.ToLower() = "synchronize" AndAlso from <> own Then
|
||||||
@ -4078,7 +4235,7 @@
|
|||||||
mist = BattleScreen.FieldEffects.OppMist
|
mist = BattleScreen.FieldEffects.OppMist
|
||||||
End If
|
End If
|
||||||
If mist > 0 And op.Ability.Name.ToLower() <> "infiltrator" Then
|
If mist > 0 And op.Ability.Name.ToLower() <> "infiltrator" Then
|
||||||
BattleScreen.BattleQuery.Add(New TextQueryObject("The Mist prevented the status change!"))
|
BattleScreen.BattleQuery.Add(New TextQueryObject("The mist prevented the status change!"))
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@ -4528,13 +4685,21 @@
|
|||||||
End If
|
End If
|
||||||
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject(sound, False, 0.0F))
|
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject(sound, False, 0.0F))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim fly As Integer = BattleScreen.FieldEffects.OwnFlyCounter
|
||||||
|
If own = False Then
|
||||||
|
fly = BattleScreen.FieldEffects.OppFlyCounter
|
||||||
|
End If
|
||||||
|
|
||||||
If Core.Player.ShowBattleAnimations <> 0 AndAlso BattleScreen.IsPVPBattle = False Then
|
If Core.Player.ShowBattleAnimations <> 0 AndAlso BattleScreen.IsPVPBattle = False Then
|
||||||
Dim HitAnimation As AnimationQueryObject = New AnimationQueryObject(pNPC, own)
|
If fly = 0 Then
|
||||||
HitAnimation.AnimationFade(Nothing, False, 1, False, 0, 0, 0)
|
Dim HitAnimation As AnimationQueryObject = New AnimationQueryObject(pNPC, own)
|
||||||
HitAnimation.AnimationFade(Nothing, False, 1, True, 1, 1, 0)
|
HitAnimation.AnimationFade(Nothing, False, 1, False, 0, 0, 0)
|
||||||
HitAnimation.AnimationFade(Nothing, False, 1, False, 0, 2, 0)
|
HitAnimation.AnimationFade(Nothing, False, 1, True, 1, 1, 0)
|
||||||
HitAnimation.AnimationFade(Nothing, False, 1, True, 1, 3, 0)
|
HitAnimation.AnimationFade(Nothing, False, 1, False, 0, 2, 0)
|
||||||
BattleScreen.BattleQuery.Add(HitAnimation)
|
HitAnimation.AnimationFade(Nothing, False, 1, True, 1, 3, 0)
|
||||||
|
BattleScreen.BattleQuery.Add(HitAnimation)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If own = True Then
|
If own = True Then
|
||||||
@ -5014,7 +5179,7 @@
|
|||||||
RaiseStat(own, own, BattleScreen, "Special Attack", 1, "Download analyzed the foe!", "download")
|
RaiseStat(own, own, BattleScreen, "Special Attack", 1, "Download analyzed the foe!", "download")
|
||||||
End If
|
End If
|
||||||
Case "mold breaker"
|
Case "mold breaker"
|
||||||
.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " breakes the mold!"))
|
.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " breaks the mold!"))
|
||||||
Case "turbo blaze"
|
Case "turbo blaze"
|
||||||
.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is radiating a blazing aura!"))
|
.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is radiating a blazing aura!"))
|
||||||
Case "teravolt"
|
Case "teravolt"
|
||||||
@ -5160,7 +5325,7 @@
|
|||||||
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " transformed into " & op.GetName & "!"))
|
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " transformed into " & op.GetName & "!"))
|
||||||
Else
|
Else
|
||||||
'Fails
|
'Fails
|
||||||
BattleScreen.BattleQuery.Add(New TextQueryObject("imposter failed!"))
|
BattleScreen.BattleQuery.Add(New TextQueryObject("Imposter failed!"))
|
||||||
End If
|
End If
|
||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
@ -5692,7 +5857,7 @@
|
|||||||
If .FieldEffects.OwnSafeguard > 0 Then 'Stop safeguard
|
If .FieldEffects.OwnSafeguard > 0 Then 'Stop safeguard
|
||||||
.FieldEffects.OwnSafeguard -= 1
|
.FieldEffects.OwnSafeguard -= 1
|
||||||
If .FieldEffects.OwnSafeguard = 0 Then
|
If .FieldEffects.OwnSafeguard = 0 Then
|
||||||
.BattleQuery.Add(New TextQueryObject("The Safeguard effect wore off!"))
|
.BattleQuery.Add(New TextQueryObject("Own Safeguard effect wore off!"))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -6276,14 +6441,14 @@
|
|||||||
If .FieldEffects.OwnTaunt > 0 And .OwnPokemon.HP > 0 Then 'Taunt
|
If .FieldEffects.OwnTaunt > 0 And .OwnPokemon.HP > 0 Then 'Taunt
|
||||||
.FieldEffects.OwnTaunt -= 1
|
.FieldEffects.OwnTaunt -= 1
|
||||||
If .FieldEffects.OwnTaunt = 0 Then
|
If .FieldEffects.OwnTaunt = 0 Then
|
||||||
.BattleQuery.Add(New TextQueryObject("The Taunt effect wore off."))
|
.BattleQuery.Add(New TextQueryObject("Own Taunt effect wore off."))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If .FieldEffects.OwnMagnetRise > 0 And .OwnPokemon.HP > 0 Then 'Magnetrise
|
If .FieldEffects.OwnMagnetRise > 0 And .OwnPokemon.HP > 0 Then 'Magnetrise
|
||||||
.FieldEffects.OwnMagnetRise -= 1
|
.FieldEffects.OwnMagnetRise -= 1
|
||||||
If .FieldEffects.OwnMagnetRise = 0 Then
|
If .FieldEffects.OwnMagnetRise = 0 Then
|
||||||
.BattleQuery.Add(New TextQueryObject("The Magnet Rise effect faded."))
|
.BattleQuery.Add(New TextQueryObject("Own Magnet Rise effect faded."))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -6587,7 +6752,7 @@
|
|||||||
If .FieldEffects.OppSafeguard > 0 Then 'Stop safeguard
|
If .FieldEffects.OppSafeguard > 0 Then 'Stop safeguard
|
||||||
.FieldEffects.OppSafeguard -= 1
|
.FieldEffects.OppSafeguard -= 1
|
||||||
If .FieldEffects.OppSafeguard = 0 Then
|
If .FieldEffects.OppSafeguard = 0 Then
|
||||||
.BattleQuery.Add(New TextQueryObject("The Safeguard effect wore off!"))
|
.BattleQuery.Add(New TextQueryObject("Opponent's Safeguard effect wore off!"))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -7170,21 +7335,21 @@
|
|||||||
If .FieldEffects.OppTaunt > 0 And .OppPokemon.HP > 0 Then 'Taunt
|
If .FieldEffects.OppTaunt > 0 And .OppPokemon.HP > 0 Then 'Taunt
|
||||||
.FieldEffects.OppTaunt -= 1
|
.FieldEffects.OppTaunt -= 1
|
||||||
If .FieldEffects.OppTaunt = 0 Then
|
If .FieldEffects.OppTaunt = 0 Then
|
||||||
.BattleQuery.Add(New TextQueryObject("The opponent's Taunt effect wore off"))
|
.BattleQuery.Add(New TextQueryObject("Opponent's Taunt effect wore off."))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If .FieldEffects.OppMagnetRise > 0 And .OppPokemon.HP > 0 Then 'Magnetrise
|
If .FieldEffects.OppMagnetRise > 0 And .OppPokemon.HP > 0 Then 'Magnetrise
|
||||||
.FieldEffects.OppMagnetRise -= 1
|
.FieldEffects.OppMagnetRise -= 1
|
||||||
If .FieldEffects.OppMagnetRise = 0 Then
|
If .FieldEffects.OppMagnetRise = 0 Then
|
||||||
.BattleQuery.Add(New TextQueryObject("The opponent's Magnet Rise effect faded."))
|
.BattleQuery.Add(New TextQueryObject("Opponent's Magnet Rise effect faded."))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If .FieldEffects.OppHealBlock > 0 Then 'Healblock
|
If .FieldEffects.OppHealBlock > 0 Then 'Healblock
|
||||||
.FieldEffects.OppHealBlock -= 1
|
.FieldEffects.OppHealBlock -= 1
|
||||||
If .FieldEffects.OppHealBlock = 0 Then
|
If .FieldEffects.OppHealBlock = 0 Then
|
||||||
.BattleQuery.Add(New TextQueryObject("The effect of the opponent's Heal Block faded."))
|
.BattleQuery.Add(New TextQueryObject("The effects of the opponent's Heal Block faded."))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -7700,7 +7865,7 @@
|
|||||||
If spikeAffected = True Then
|
If spikeAffected = True Then
|
||||||
If .FieldEffects.OppStickyWeb > 0 Then
|
If .FieldEffects.OppStickyWeb > 0 Then
|
||||||
|
|
||||||
LowerStat(True, True, BattleScreen, "Speed", 1, "Your pokemon was caught in a Sticky Web!", "stickyweb")
|
LowerStat(True, True, BattleScreen, "Speed", 1, "Your Pokémon was caught in a Sticky Web!", "stickyweb")
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@ -8128,11 +8293,11 @@
|
|||||||
'Sticky Web
|
'Sticky Web
|
||||||
If spikeAffected = True Then
|
If spikeAffected = True Then
|
||||||
If .FieldEffects.OwnStickyWeb > 0 Then
|
If .FieldEffects.OwnStickyWeb > 0 Then
|
||||||
LowerStat(False, False, BattleScreen, "Speed", 1, "The opposing pokemon was caught in a Sticky Web!", "stickyweb")
|
LowerStat(False, False, BattleScreen, "Speed", 1, "The opposing Pokémon was caught in a Sticky Web!", "stickyweb")
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If spikeAffected = True Then
|
If spikeAffected = True Then
|
||||||
If .FieldEffects.OwnToxicSpikes > 0 And p.Status = Pokemon.StatusProblems.None And p.Type1.Type <> Element.Types.Poison And p.Type2.Type <> Element.Types.Poison Then
|
If .FieldEffects.OwnToxicSpikes > 0 And p.Status = Pokemon.StatusProblems.None And p.Type1.Type <> Element.Types.Poison And (p.Type2 IsNot Nothing AndAlso p.Type2.Type <> Element.Types.Poison) Then
|
||||||
Select Case .FieldEffects.OwnToxicSpikes
|
Select Case .FieldEffects.OwnToxicSpikes
|
||||||
Case 1
|
Case 1
|
||||||
InflictPoison(False, True, BattleScreen, False, "The Toxic Spikes hurt " & p.GetDisplayName() & "!", "toxicspikes")
|
InflictPoison(False, True, BattleScreen, False, "The Toxic Spikes hurt " & p.GetDisplayName() & "!", "toxicspikes")
|
||||||
@ -8237,7 +8402,12 @@
|
|||||||
Won = True
|
Won = True
|
||||||
Core.Player.AddPoints(1, "Won against wild Pokémon.")
|
Core.Player.AddPoints(1, "Won against wild Pokémon.")
|
||||||
|
|
||||||
BattleScreen.BattleQuery.Add(New PlayMusicQueryObject("wild_defeat"))
|
Dim musicLoop As String = Screen.Level.CurrentRegion.Split(CChar(","))(0) & "_wild_defeat"
|
||||||
|
If MusicManager.SongExists(musicLoop) = False Then
|
||||||
|
musicLoop = "wild_defeat"
|
||||||
|
End If
|
||||||
|
|
||||||
|
BattleScreen.BattleQuery.Add(New PlayMusicQueryObject(musicLoop))
|
||||||
ChangeCameraAngle(1, True, BattleScreen)
|
ChangeCameraAngle(1, True, BattleScreen)
|
||||||
|
|
||||||
GainEXP(BattleScreen)
|
GainEXP(BattleScreen)
|
||||||
@ -8291,8 +8461,14 @@
|
|||||||
Next
|
Next
|
||||||
|
|
||||||
For i = 0 To Core.Player.Pokemons.Count - 1
|
For i = 0 To Core.Player.Pokemons.Count - 1
|
||||||
If expPokemon.Contains(i) = False And Not Core.Player.Pokemons(i).Item Is Nothing AndAlso Core.Player.Pokemons(i).Item.OriginalName.ToLower() = "exp. share" AndAlso Core.Player.Pokemons(i).Status <> Pokemon.StatusProblems.Fainted AndAlso Core.Player.Pokemons(i).IsEgg() = False Then
|
If Core.Player.Inventory.GetItemAmount(658.ToString) > 0 And Core.Player.EnableExpAll = True Then
|
||||||
expPokemon.Add(i)
|
If expPokemon.Contains(i) = False AndAlso Core.Player.Pokemons(i).Status <> Pokemon.StatusProblems.Fainted AndAlso Core.Player.Pokemons(i).IsEgg() = False Then
|
||||||
|
expPokemon.Add(i)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If expPokemon.Contains(i) = False And Not Core.Player.Pokemons(i).Item Is Nothing AndAlso Core.Player.Pokemons(i).Item.OriginalName.ToLower() = "exp. share" AndAlso Core.Player.Pokemons(i).Status <> Pokemon.StatusProblems.Fainted AndAlso Core.Player.Pokemons(i).IsEgg() = False Then
|
||||||
|
expPokemon.Add(i)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
@ -8306,7 +8482,7 @@
|
|||||||
Dim LevelUpAmount As Integer = 0
|
Dim LevelUpAmount As Integer = 0
|
||||||
Dim originalLevel As Integer = Core.Player.Pokemons(PokeIndex).Level
|
Dim originalLevel As Integer = Core.Player.Pokemons(PokeIndex).Level
|
||||||
If Core.Player.Pokemons(PokeIndex).Level < CInt(GameModeManager.GetGameRuleValue("MaxLevel", "100")) Then
|
If Core.Player.Pokemons(PokeIndex).Level < CInt(GameModeManager.GetGameRuleValue("MaxLevel", "100")) Then
|
||||||
Dim EXP As Integer = BattleCalculation.GainExp(Core.Player.Pokemons(PokeIndex), BattleScreen, expPokemon)
|
Dim EXP As Integer = BattleCalculation.GainExp(Core.Player.Pokemons(PokeIndex), BattleScreen, expPokemon, PokeIndex)
|
||||||
BattleScreen.BattleQuery.Add(New TextQueryObject(Core.Player.Pokemons(PokeIndex).GetDisplayName() & " gained " & EXP & " experience points."))
|
BattleScreen.BattleQuery.Add(New TextQueryObject(Core.Player.Pokemons(PokeIndex).GetDisplayName() & " gained " & EXP & " experience points."))
|
||||||
|
|
||||||
Dim moveLevel As Integer = originalLevel
|
Dim moveLevel As Integer = originalLevel
|
||||||
@ -8314,7 +8490,12 @@
|
|||||||
For e = 1 To EXP
|
For e = 1 To EXP
|
||||||
Dim oldStats() As Integer
|
Dim oldStats() As Integer
|
||||||
With Core.Player.Pokemons(PokeIndex)
|
With Core.Player.Pokemons(PokeIndex)
|
||||||
oldStats = { .MaxHP, .Attack, .Defense, .SpAttack, .SpDefense, .Speed}
|
If .IsTransformed = True Then
|
||||||
|
oldStats = { .MaxHP, .OriginalStats(0), .OriginalStats(1), .OriginalStats(2), .OriginalStats(3), .OriginalStats(4)}
|
||||||
|
Else
|
||||||
|
oldStats = { .MaxHP, .Attack, .Defense, .SpAttack, .SpDefense, .Speed}
|
||||||
|
End If
|
||||||
|
|
||||||
End With
|
End With
|
||||||
Core.Player.Pokemons(PokeIndex).GetExperience(1, False)
|
Core.Player.Pokemons(PokeIndex).GetExperience(1, False)
|
||||||
|
|
||||||
|
@ -991,7 +991,7 @@
|
|||||||
Return CalculateEffectiveness(move, BattleScreen, p, op, own)
|
Return CalculateEffectiveness(move, BattleScreen, p, op, own)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Function GainExp(ByVal p As Pokemon, ByVal BattleScreen As BattleScreen, ByVal PokemonList As List(Of Integer)) As Integer
|
Public Shared Function GainExp(ByVal p As Pokemon, ByVal BattleScreen As BattleScreen, ByVal PokemonList As List(Of Integer), ByVal PokeIndex As Integer) As Integer
|
||||||
Dim op As Pokemon = BattleScreen.OppPokemon
|
Dim op As Pokemon = BattleScreen.OppPokemon
|
||||||
|
|
||||||
Dim a As Double = 1D
|
Dim a As Double = 1D
|
||||||
@ -1002,8 +1002,25 @@
|
|||||||
Dim b As Double = op.BaseExperience
|
Dim b As Double = op.BaseExperience
|
||||||
|
|
||||||
Dim t As Double = 1D
|
Dim t As Double = 1D
|
||||||
If p.OT <> Core.Player.OT Then
|
If Not p.Item Is Nothing AndAlso p.Item.IsGameModeItem = True Then
|
||||||
t = 1.5D
|
If CType(p.Item, GameModeItem).gmExpMultiplier <> -1D AndAlso CType(p.Item, GameModeItem).gmOverrideTradeExp = True Then
|
||||||
|
t = CType(p.Item, GameModeItem).gmExpMultiplier
|
||||||
|
Else
|
||||||
|
If p.OT <> Core.Player.OT Then
|
||||||
|
t = 1.5D
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If p.OT <> Core.Player.OT Then
|
||||||
|
t = 1.5D
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim gm As Double = 1D
|
||||||
|
If Not p.Item Is Nothing AndAlso p.Item.IsGameModeItem = True Then
|
||||||
|
If CType(p.Item, GameModeItem).gmExpMultiplier <> -1D AndAlso CType(p.Item, GameModeItem).gmOverrideTradeExp = False Then
|
||||||
|
gm = CType(p.Item, GameModeItem).gmExpMultiplier
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim e As Double = 1D
|
Dim e As Double = 1D
|
||||||
@ -1019,25 +1036,33 @@
|
|||||||
Dim s As Double = PokemonList.Count
|
Dim s As Double = PokemonList.Count
|
||||||
|
|
||||||
Dim expShares As Integer = 0
|
Dim expShares As Integer = 0
|
||||||
For Each po As Pokemon In Core.Player.Pokemons
|
Dim expAllMultiplier As Single = 1
|
||||||
If Not po.Item Is Nothing Then
|
If Core.Player.Inventory.GetItemAmount(658.ToString) > 0 And Core.Player.EnableExpAll = True Then
|
||||||
If po.Item.OriginalName.ToLower() = "exp. share" Then
|
s = 1D
|
||||||
expShares += 1
|
If BattleScreen.ParticipatedPokemon.Contains(PokeIndex) = False Then
|
||||||
End If
|
expAllMultiplier = 0.5F
|
||||||
End If
|
End If
|
||||||
Next
|
Else
|
||||||
|
For Each po As Pokemon In Core.Player.Pokemons
|
||||||
|
If Not po.Item Is Nothing Then
|
||||||
|
If po.Item.OriginalName.ToLower() = "exp. share" Then
|
||||||
|
expShares += 1
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
If expShares > 0 Then
|
If expShares > 0 Then
|
||||||
If Not p.Item Is Nothing Then
|
If Not p.Item Is Nothing Then
|
||||||
If p.Item.OriginalName.ToLower() = "exp. share" Then
|
If p.Item.OriginalName.ToLower() = "exp. share" Then
|
||||||
s = 2D
|
s = 2D
|
||||||
Else
|
Else
|
||||||
s = (PokemonList.Count * 2D) * expShares
|
s = (PokemonList.Count * 2D) * expShares
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim EXP As Integer = CInt((((a * b * L) / (5 * s)) * (((2 * L + 10) ^ 2.5D) / ((L + Lp + 10) ^ 2.5D)) + 1) * t * e * 1)
|
Dim EXP As Integer = CInt((((a * b * L) / (5 * s)) * (((2 * L + 10) ^ 2.5D) / ((L + Lp + 10) ^ 2.5D)) + 1) * t * e * gm * expAllMultiplier)
|
||||||
|
|
||||||
If EXP < 2 Then
|
If EXP < 2 Then
|
||||||
EXP = 2
|
EXP = 2
|
||||||
@ -1049,6 +1074,10 @@
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
If Core.Player.Inventory.GetItemAmount(656.ToString) > 0 Then 'Exp. Charm
|
||||||
|
EXP = CInt(EXP * 1.5F)
|
||||||
|
End If
|
||||||
|
|
||||||
Return EXP
|
Return EXP
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@
|
|||||||
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Battle\Interface"), New Rectangle(CInt(pos.X) + 14, CInt(pos.Y) + 14, 182, 42), New Rectangle(0, 0, 91, 21), shinyHue)
|
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Battle\Interface"), New Rectangle(CInt(pos.X) + 14, CInt(pos.Y) + 14, 182, 42), New Rectangle(0, 0, 91, 21), shinyHue)
|
||||||
|
|
||||||
'Name:
|
'Name:
|
||||||
Dim nameInformation As String = p.GetDisplayName() & " Lv. " & p.Level.ToString()
|
Dim nameInformation As String = p.GetDisplayName() & " " & Localization.GetString("property_Lv.", "Lv.") & " " & p.Level.ToString()
|
||||||
|
|
||||||
Core.SpriteBatch.DrawString(FontManager.MainFont, nameInformation, New Vector2(pos.X + 2, pos.Y + 2), New Color(0, 0, 0, _moveMenuAlpha))
|
Core.SpriteBatch.DrawString(FontManager.MainFont, nameInformation, New Vector2(pos.X + 2, pos.Y + 2), New Color(0, 0, 0, _moveMenuAlpha))
|
||||||
Core.SpriteBatch.DrawString(FontManager.MainFont, nameInformation, New Vector2(pos.X, pos.Y), shinyHue)
|
Core.SpriteBatch.DrawString(FontManager.MainFont, nameInformation, New Vector2(pos.X, pos.Y), shinyHue)
|
||||||
@ -168,7 +168,7 @@
|
|||||||
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Battle\Interface"), New Rectangle(CInt(pos.X) + 14, CInt(pos.Y) + 14, 182, 32), New Rectangle(0, 21, 91, 16), shinyHue)
|
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Battle\Interface"), New Rectangle(CInt(pos.X) + 14, CInt(pos.Y) + 14, 182, 32), New Rectangle(0, 21, 91, 16), shinyHue)
|
||||||
|
|
||||||
'Name:
|
'Name:
|
||||||
Dim nameInformation As String = p.GetDisplayName() & " Lv. " & p.Level.ToString()
|
Dim nameInformation As String = p.GetDisplayName() & " " & Localization.GetString("property_Lv.", "Lv.") & " " & p.Level.ToString()
|
||||||
|
|
||||||
Core.SpriteBatch.DrawString(FontManager.MainFont, nameInformation, New Vector2(pos.X + 2, pos.Y + 2), New Color(0, 0, 0, _moveMenuAlpha))
|
Core.SpriteBatch.DrawString(FontManager.MainFont, nameInformation, New Vector2(pos.X + 2, pos.Y + 2), New Color(0, 0, 0, _moveMenuAlpha))
|
||||||
Core.SpriteBatch.DrawString(FontManager.MainFont, nameInformation, New Vector2(pos.X, pos.Y), shinyHue)
|
Core.SpriteBatch.DrawString(FontManager.MainFont, nameInformation, New Vector2(pos.X, pos.Y), shinyHue)
|
||||||
@ -317,7 +317,7 @@
|
|||||||
|
|
||||||
Public Sub Update(ByRef BattleScreen As BattleScreen)
|
Public Sub Update(ByRef BattleScreen As BattleScreen)
|
||||||
Dim blockinteractscreen() As Screen.Identifications = {Screen.Identifications.PartyScreen, Screen.Identifications.SummaryScreen, Screen.Identifications.PauseScreen, Screen.Identifications.ChatScreen}
|
Dim blockinteractscreen() As Screen.Identifications = {Screen.Identifications.PartyScreen, Screen.Identifications.SummaryScreen, Screen.Identifications.PauseScreen, Screen.Identifications.ChatScreen}
|
||||||
If blockinteractscreen.Contains(Core.CurrentScreen.Identification) = True Then
|
If blockinteractscreen.Contains(Core.CurrentScreen.Identification) = True OrElse (BattleScreen.BattleQuery.Count > 0 AndAlso BattleScreen.BattleQuery(0).QueryType = QueryObject.QueryTypes.Textbox) Then
|
||||||
CanInteract = False
|
CanInteract = False
|
||||||
Else
|
Else
|
||||||
CanInteract = True
|
CanInteract = True
|
||||||
@ -342,6 +342,7 @@
|
|||||||
|
|
||||||
Private _moveMenuIndex As Integer = 0
|
Private _moveMenuIndex As Integer = 0
|
||||||
Private _moveMenuNextIndex As Integer = 0
|
Private _moveMenuNextIndex As Integer = 0
|
||||||
|
Private _moveMenuLastIndex As Integer = 0
|
||||||
Private _moveMenuItemList As New List(Of MoveMenuItem)
|
Private _moveMenuItemList As New List(Of MoveMenuItem)
|
||||||
Private _moveMenuCreatedID As String = ""
|
Private _moveMenuCreatedID As String = ""
|
||||||
Private _moveMenuAlpha As Integer = 255
|
Private _moveMenuAlpha As Integer = 255
|
||||||
@ -391,20 +392,20 @@
|
|||||||
Public Sub Draw(ByVal AllExtended As Integer, ByVal SelExtended As Integer, ByVal isSelected As Boolean)
|
Public Sub Draw(ByVal AllExtended As Integer, ByVal SelExtended As Integer, ByVal isSelected As Boolean)
|
||||||
Dim extraExtended As Integer = 0
|
Dim extraExtended As Integer = 0
|
||||||
If isSelected = True Then
|
If isSelected = True Then
|
||||||
Canvas.DrawGradient(New Rectangle(Core.ScreenSize.Width - 255, 100 + Index * 96, 255, 112), New Color(42, 167, 198, 0), New Color(42, 167, 198, (SelExtended + AllExtended)), True, -1)
|
Canvas.DrawGradient(New Rectangle(Core.windowSize.Width - 255, 100 + Index * 96, 255, 112), New Color(42, 167, 198, 0), New Color(42, 167, 198, (SelExtended + AllExtended)), True, -1)
|
||||||
|
|
||||||
extraExtended = SelExtended
|
extraExtended = SelExtended
|
||||||
End If
|
End If
|
||||||
Core.SpriteBatch.Draw(Me.Texture, New Rectangle(Core.ScreenSize.Width - (AllExtended + extraExtended), 116 + Index * 96, 80, 80), New Rectangle(16, 16, 16, 16), Color.White)
|
Core.SpriteBatch.Draw(Me.Texture, New Rectangle(Core.windowSize.Width - (AllExtended + extraExtended), 116 + Index * 96, 80, 80), New Rectangle(16, 16, 16, 16), Color.White)
|
||||||
Core.SpriteBatch.Draw(Me.Texture, New Rectangle(Core.ScreenSize.Width - (AllExtended + extraExtended) + 80, 116 + Index * 96, AllExtended + extraExtended - 80, 80), New Rectangle(32, 16, 16, 16), Color.White)
|
Core.SpriteBatch.Draw(Me.Texture, New Rectangle(Core.windowSize.Width - (AllExtended + extraExtended) + 80, 116 + Index * 96, AllExtended + extraExtended - 80, 80), New Rectangle(32, 16, 16, 16), Color.White)
|
||||||
|
|
||||||
Core.SpriteBatch.Draw(Me.IconUnselected, New Rectangle(Core.ScreenSize.Width - (AllExtended + extraExtended) + 28, 132 + Index * 96, 48, 48), Color.White)
|
Core.SpriteBatch.Draw(Me.IconUnselected, New Rectangle(Core.windowSize.Width - (AllExtended + extraExtended) + 28, 132 + Index * 96, 48, 48), Color.White)
|
||||||
If isSelected = True Then
|
If isSelected = True Then
|
||||||
Core.SpriteBatch.Draw(Me.IconSelected, New Rectangle(Core.ScreenSize.Width - (AllExtended + extraExtended) + 28, 132 + Index * 96, 48, 48), New Color(255, 255, 255, (SelExtended + AllExtended)))
|
Core.SpriteBatch.Draw(Me.IconSelected, New Rectangle(Core.windowSize.Width - (AllExtended + extraExtended) + 28, 132 + Index * 96, 48, 48), New Color(255, 255, 255, (SelExtended + AllExtended)))
|
||||||
Core.SpriteBatch.DrawString(FontManager.MainFont, Me.Text, New Vector2(CInt(Core.ScreenSize.Width - (AllExtended + extraExtended) + 86), CInt(144 + Index * 96)), New Color(0, 0, 0, (SelExtended + AllExtended)))
|
Core.SpriteBatch.DrawString(FontManager.MainFont, Me.Text, New Vector2(CInt(Core.windowSize.Width - (AllExtended + extraExtended) + 86), CInt(144 + Index * 96)), New Color(0, 0, 0, (SelExtended + AllExtended)))
|
||||||
Else
|
Else
|
||||||
If IconFading > 0 Then
|
If IconFading > 0 Then
|
||||||
Core.SpriteBatch.Draw(Me.IconSelected, New Rectangle(Core.ScreenSize.Width - (AllExtended) + 28, 132 + Index * 96, 48, 48), New Color(255, 255, 255, IconFading))
|
Core.SpriteBatch.Draw(Me.IconSelected, New Rectangle(Core.windowSize.Width - (AllExtended) + 28, 132 + Index * 96, 48, 48), New Color(255, 255, 255, IconFading))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@ -412,7 +413,7 @@
|
|||||||
Public Sub Update(ByVal BattleScreen As BattleScreen, ByVal AllExtended As Integer, ByVal isSelected As Boolean)
|
Public Sub Update(ByVal BattleScreen As BattleScreen, ByVal AllExtended As Integer, ByVal isSelected As Boolean)
|
||||||
Me.Activate(BattleScreen, AllExtended, isSelected)
|
Me.Activate(BattleScreen, AllExtended, isSelected)
|
||||||
If isSelected = False Then
|
If isSelected = False Then
|
||||||
If MouseHandler.IsInRectangle(New Rectangle(Core.ScreenSize.Width - (AllExtended) + 28, 132 + Index * 96, 48, 48)) = True Then
|
If MouseHandler.IsInRectangle(New Rectangle(Core.windowSize.Width - (AllExtended) + 28, 132 + Index * 96, 48, 48)) = True Then
|
||||||
If IconFading < 255 Then
|
If IconFading < 255 Then
|
||||||
IconFading += 15
|
IconFading += 15
|
||||||
If IconFading > 255 Then
|
If IconFading > 255 Then
|
||||||
@ -439,7 +440,7 @@
|
|||||||
Me.ClickAction(BattleScreen)
|
Me.ClickAction(BattleScreen)
|
||||||
End If
|
End If
|
||||||
If Controls.Accept(True, False, False) = True Then
|
If Controls.Accept(True, False, False) = True Then
|
||||||
If MouseHandler.IsInRectangle(New Rectangle(Core.ScreenSize.Width - 255, 116 + Index * 96, 255, 80)) = True Then
|
If MouseHandler.IsInRectangle(New Rectangle(Core.windowSize.Width - 255, 116 + Index * 96, 255, 80)) = True Then
|
||||||
If isSelected = True Then
|
If isSelected = True Then
|
||||||
SoundManager.PlaySound("select")
|
SoundManager.PlaySound("select")
|
||||||
Me.ClickAction(BattleScreen)
|
Me.ClickAction(BattleScreen)
|
||||||
@ -475,27 +476,31 @@
|
|||||||
|
|
||||||
Dim extraExtended As Integer = 0
|
Dim extraExtended As Integer = 0
|
||||||
If isSelected = True Then
|
If isSelected = True Then
|
||||||
Canvas.DrawGradient(New Rectangle(Core.ScreenSize.Width - 255, 100 + Index * 96, 255, 112), New Color(42, 167, 198, 0), New Color(42, 167, 198, (SelExtended + AllExtended) - deductAlpha), True, -1)
|
Canvas.DrawGradient(New Rectangle(Core.windowSize.Width - 255, 100 + Index * 96, 255, 112), New Color(42, 167, 198, 0), New Color(42, 167, 198, (SelExtended + AllExtended) - deductAlpha), True, -1)
|
||||||
|
|
||||||
extraExtended = SelExtended
|
extraExtended = SelExtended
|
||||||
End If
|
End If
|
||||||
Core.SpriteBatch.Draw(Me.Texture, New Rectangle(Core.ScreenSize.Width - (AllExtended + extraExtended), 116 + Index * 96, 80, 80), New Rectangle(16, 16, 16, 16), New Color(255, 255, 255, 255 - deductAlpha))
|
Dim BackgroundDrawColor As Color = Color.White
|
||||||
Core.SpriteBatch.Draw(Me.Texture, New Rectangle(Core.ScreenSize.Width - (AllExtended + extraExtended) + 80, 116 + Index * 96, AllExtended + extraExtended - 80, 80), New Rectangle(32, 16, 16, 16), New Color(255, 255, 255, 255 - deductAlpha))
|
If Move.Disabled > 0 OrElse BattleScreen.FieldEffects.OwnEncore > 0 AndAlso BattleScreen.FieldEffects.OwnEncoreMove.ID <> Move.ID Then
|
||||||
|
BackgroundDrawColor = New Color(210, 210, 210)
|
||||||
|
End If
|
||||||
|
Core.SpriteBatch.Draw(Me.Texture, New Rectangle(Core.windowSize.Width - (AllExtended + extraExtended), 116 + Index * 96, 80, 80), New Rectangle(16, 16, 16, 16), New Color(BackgroundDrawColor.R, BackgroundDrawColor.G, BackgroundDrawColor.B, 255 - deductAlpha))
|
||||||
|
Core.SpriteBatch.Draw(Me.Texture, New Rectangle(Core.windowSize.Width - (AllExtended + extraExtended) + 80, 116 + Index * 96, AllExtended + extraExtended - 80, 80), New Rectangle(32, 16, 16, 16), New Color(BackgroundDrawColor.R, BackgroundDrawColor.G, BackgroundDrawColor.B, 255 - deductAlpha))
|
||||||
|
|
||||||
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Menus\Types", Me.Move.Type.GetElementImage(), ""), New Rectangle(Core.ScreenSize.Width - (AllExtended + extraExtended) + 28, 132 + Index * 96, 48, 16), New Color(255, 255, 255, 255 - deductAlpha))
|
Core.SpriteBatch.Draw(TextureManager.GetTexture(Element.GetElementTexturePath(), Me.Move.Type.GetElementImage(), ""), New Rectangle(Core.windowSize.Width - (AllExtended + extraExtended) + 28, 132 + Index * 96, 48, 16), New Color(255, 255, 255, 255 - deductAlpha))
|
||||||
|
|
||||||
If isSelected = True Then
|
If isSelected = True Then
|
||||||
If Move.Disabled > 0 Then
|
If Move.Disabled > 0 OrElse BattleScreen.FieldEffects.OwnEncore > 0 AndAlso BattleScreen.FieldEffects.OwnEncoreMove.ID <> Move.ID Then
|
||||||
Core.SpriteBatch.DrawString(FontManager.MainFont, "Disabled!", New Vector2(CInt(Core.ScreenSize.Width - (AllExtended + extraExtended) + 28), CInt(152 + Index * 96)), Color.Black)
|
Core.SpriteBatch.DrawString(FontManager.MainFont, Localization.GetString("battle_MoveDisabled", "Disabled!"), New Vector2(CInt(Core.windowSize.Width - (AllExtended + extraExtended) + 28), CInt(152 + Index * 96)), Color.Black)
|
||||||
Else
|
Else
|
||||||
Dim ppColor As Color = GetPPColor()
|
Dim ppColor As Color = GetPPColor()
|
||||||
ppColor.A = CByte((extraExtended + AllExtended - deductAlpha).Clamp(0, 255))
|
ppColor.A = CByte((extraExtended + AllExtended - deductAlpha).Clamp(0, 255))
|
||||||
|
|
||||||
Core.SpriteBatch.DrawString(FontManager.MainFont, Me.Move.CurrentPP & "/" & Me.Move.MaxPP, New Vector2(CInt(Core.ScreenSize.Width - (AllExtended + extraExtended) + 28), CInt(152 + Index * 96)), ppColor)
|
Core.SpriteBatch.DrawString(FontManager.MainFont, Me.Move.CurrentPP & "/" & Me.Move.MaxPP, New Vector2(CInt(Core.windowSize.Width - (AllExtended + extraExtended) + 28), CInt(152 + Index * 96)), ppColor)
|
||||||
End If
|
End If
|
||||||
Core.SpriteBatch.DrawString(FontManager.MainFont, Me.Move.Name, New Vector2(CInt(Core.ScreenSize.Width - (AllExtended + extraExtended) + 86), CInt(132 + Index * 96)), New Color(0, 0, 0, (SelExtended + AllExtended) - deductAlpha))
|
Core.SpriteBatch.DrawString(FontManager.MainFont, Me.Move.Name, New Vector2(CInt(Core.windowSize.Width - (AllExtended + extraExtended) + 86), CInt(132 + Index * 96)), New Color(0, 0, 0, (SelExtended + AllExtended) - deductAlpha))
|
||||||
Else
|
Else
|
||||||
Core.SpriteBatch.DrawString(FontManager.MainFont, Me.Move.Name, New Vector2(Core.ScreenSize.Width - (AllExtended + extraExtended) + 28, 152 + Index * 96), New Color(0, 0, 0, 255 - (extraExtended + AllExtended) - deductAlpha))
|
Core.SpriteBatch.DrawString(FontManager.MainFont, Me.Move.Name, New Vector2(Core.windowSize.Width - (AllExtended + extraExtended) + 28, 152 + Index * 96), New Color(0, 0, 0, 255 - (extraExtended + AllExtended) - deductAlpha))
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@ -522,19 +527,22 @@
|
|||||||
|
|
||||||
If Controls.Accept(False, True, True) = True And isSelected = True Then
|
If Controls.Accept(False, True, True) = True And isSelected = True Then
|
||||||
SoundManager.PlaySound("select")
|
SoundManager.PlaySound("select")
|
||||||
If Me.Move.Disabled = 0 Then
|
If Me.Move.Disabled = 0 AndAlso BattleScreen.FieldEffects.OwnEncore = 0 OrElse BattleScreen.FieldEffects.OwnEncoreMove.ID = Move.ID Then
|
||||||
|
BattleScreen.BattleMenu._moveMenuLastIndex = Me.Index
|
||||||
Me.ClickAction(BattleScreen)
|
Me.ClickAction(BattleScreen)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If Controls.Accept(True, False, False) = True Then
|
If Controls.Accept(True, False, False) = True Then
|
||||||
If MouseHandler.IsInRectangle(New Rectangle(Core.ScreenSize.Width - 255, 116 + Index * 96, 255, 80)) = True Then
|
If MouseHandler.IsInRectangle(New Rectangle(Core.windowSize.Width - 255, 116 + Index * 96, 255, 80)) = True Then
|
||||||
If isSelected = True Then
|
If isSelected = True Then
|
||||||
SoundManager.PlaySound("select")
|
SoundManager.PlaySound("select")
|
||||||
If Me.Move.Disabled = 0 Then
|
If Me.Move.Disabled = 0 AndAlso BattleScreen.FieldEffects.OwnEncore = 0 OrElse BattleScreen.FieldEffects.OwnEncoreMove IsNot Nothing AndAlso BattleScreen.FieldEffects.OwnEncoreMove.ID = Move.ID Then
|
||||||
|
BattleScreen.BattleMenu._moveMenuLastIndex = Me.Index
|
||||||
Me.ClickAction(BattleScreen)
|
Me.ClickAction(BattleScreen)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
BattleScreen.BattleMenu._moveMenuNextIndex = Me.Index
|
BattleScreen.BattleMenu._moveMenuNextIndex = Me.Index
|
||||||
|
BattleScreen.BattleMenu._moveMenuLastIndex = Me.Index
|
||||||
BattleScreen.BattleMenu._isRetracting = True
|
BattleScreen.BattleMenu._isRetracting = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@ -639,7 +647,7 @@
|
|||||||
TempBattleScreen = BattleScreen
|
TempBattleScreen = BattleScreen
|
||||||
|
|
||||||
Player.Temp.PokemonScreenIndex = BattleScreen.OwnPokemonIndex
|
Player.Temp.PokemonScreenIndex = BattleScreen.OwnPokemonIndex
|
||||||
Dim selScreen = New PartyScreen(Core.CurrentScreen, Item.GetItemByID(5.ToString), AddressOf ShowPokemonMenu, "Choose Pokémon", False) With {.Mode = Screens.UI.ISelectionScreen.ScreenMode.Selection, .CanExit = False}
|
Dim selScreen = New PartyScreen(Core.CurrentScreen, Item.GetItemByID(5.ToString), AddressOf ShowPokemonMenu, Localization.GetString("party_screen_ChoosePokemon", "Choose Pokémon"), False) With {.Mode = Screens.UI.ISelectionScreen.ScreenMode.Selection, .CanExit = False}
|
||||||
AddHandler selScreen.SelectedObject, AddressOf ShowPokemonMenuHandler
|
AddHandler selScreen.SelectedObject, AddressOf ShowPokemonMenuHandler
|
||||||
|
|
||||||
Core.SetScreen(selScreen)
|
Core.SetScreen(selScreen)
|
||||||
@ -659,26 +667,26 @@
|
|||||||
_mainMenuItemList.Clear()
|
_mainMenuItemList.Clear()
|
||||||
Select Case BattleScreen.BattleMode
|
Select Case BattleScreen.BattleMode
|
||||||
Case BattleSystem.BattleScreen.BattleModes.Safari
|
Case BattleSystem.BattleScreen.BattleModes.Safari
|
||||||
Dim safariBallText As String = "Safari Ball x" & Core.Player.Inventory.GetItemAmount(181.ToString).ToString()
|
Dim safariBallText As String = Localization.GetString("item_name_181", "Safari Ball") & " x" & Core.Player.Inventory.GetItemAmount(181.ToString).ToString()
|
||||||
If Core.Player.Inventory.GetItemAmount(181.ToString) = 0 Then
|
If Core.Player.Inventory.GetItemAmount(181.ToString) = 0 Then
|
||||||
safariBallText = "No Safari Balls."
|
safariBallText = Localization.GetString("battle_NoSafariBalls", "No Safari Balls.")
|
||||||
End If
|
End If
|
||||||
_mainMenuItemList.Add(New MainMenuItem(4, safariBallText, 0, AddressOf MainMenuUseSafariBall))
|
_mainMenuItemList.Add(New MainMenuItem(4, safariBallText, 0, AddressOf MainMenuUseSafariBall))
|
||||||
_mainMenuItemList.Add(New MainMenuItem(0, "Throw Mud", 1, AddressOf MainMenuThrowMud))
|
_mainMenuItemList.Add(New MainMenuItem(0, Localization.GetString("battle_action_ThrowMud", "Throw Mud"), 1, AddressOf MainMenuThrowMud))
|
||||||
_mainMenuItemList.Add(New MainMenuItem(0, "Throw Bait", 2, AddressOf MainMenuThrowBait))
|
_mainMenuItemList.Add(New MainMenuItem(0, Localization.GetString("battle_action_ThrowBait", "Throw Bait"), 2, AddressOf MainMenuThrowBait))
|
||||||
|
|
||||||
_mainMenuItemList.Add(New MainMenuItem(3, "Run", 3, AddressOf MainMenuRun))
|
_mainMenuItemList.Add(New MainMenuItem(3, Localization.GetString("battle_action_Run", "Run"), 3, AddressOf MainMenuRun))
|
||||||
|
|
||||||
Case BattleSystem.BattleScreen.BattleModes.BugContest
|
Case BattleSystem.BattleScreen.BattleModes.BugContest
|
||||||
_mainMenuItemList.Add(New MainMenuItem(0, "Battle", 0, AddressOf MainMenuOpenBattleMenu))
|
_mainMenuItemList.Add(New MainMenuItem(0, Localization.GetString("battle_action_Battle", "Battle"), 0, AddressOf MainMenuOpenBattleMenu))
|
||||||
|
|
||||||
Dim sportBallText As String = "Sport Ball x" & Core.Player.Inventory.GetItemAmount(177.ToString).ToString()
|
Dim sportBallText As String = Localization.GetString("item_name_177", "Sport Ball") & " x" & Core.Player.Inventory.GetItemAmount(177.ToString).ToString()
|
||||||
If Core.Player.Inventory.GetItemAmount(177.ToString) = 0 Then
|
If Core.Player.Inventory.GetItemAmount(177.ToString) = 0 Then
|
||||||
sportBallText = "No Sport Balls."
|
sportBallText = Localization.GetString("battle_NoSportBalls", "No Sport Balls.")
|
||||||
End If
|
End If
|
||||||
_mainMenuItemList.Add(New MainMenuItem(4, sportBallText, 1, AddressOf MainMenuUseSportBall))
|
_mainMenuItemList.Add(New MainMenuItem(4, sportBallText, 1, AddressOf MainMenuUseSportBall))
|
||||||
_mainMenuItemList.Add(New MainMenuItem(1, "Pokémon", 2, AddressOf MainMenuOpenPokemon))
|
_mainMenuItemList.Add(New MainMenuItem(1, "Pokémon", 2, AddressOf MainMenuOpenPokemon))
|
||||||
_mainMenuItemList.Add(New MainMenuItem(3, "Run", 3, AddressOf MainMenuRun))
|
_mainMenuItemList.Add(New MainMenuItem(3, Localization.GetString("battle_action_Run", "Run"), 3, AddressOf MainMenuRun))
|
||||||
|
|
||||||
Case BattleSystem.BattleScreen.BattleModes.Standard
|
Case BattleSystem.BattleScreen.BattleModes.Standard
|
||||||
If BattleScreen.OwnFaint Then
|
If BattleScreen.OwnFaint Then
|
||||||
@ -701,12 +709,12 @@
|
|||||||
End If
|
End If
|
||||||
BattleScreen.OppFaint = False
|
BattleScreen.OppFaint = False
|
||||||
Else
|
Else
|
||||||
_mainMenuItemList.Add(New MainMenuItem(0, "Battle", 0, AddressOf MainMenuOpenBattleMenu))
|
_mainMenuItemList.Add(New MainMenuItem(0, Localization.GetString("battle_action_Battle", "Battle"), 0, AddressOf MainMenuOpenBattleMenu))
|
||||||
_mainMenuItemList.Add(New MainMenuItem(1, "Pokémon", 1, AddressOf MainMenuOpenPokemon))
|
_mainMenuItemList.Add(New MainMenuItem(1, "Pokémon", 1, AddressOf MainMenuOpenPokemon))
|
||||||
_mainMenuItemList.Add(New MainMenuItem(2, "Bag", 2, AddressOf MainMenuOpenBag))
|
_mainMenuItemList.Add(New MainMenuItem(2, Localization.GetString("battle_action_Bag", "Bag"), 2, AddressOf MainMenuOpenBag))
|
||||||
|
|
||||||
If BattleScreen.IsTrainerBattle = False Then
|
If BattleScreen.IsTrainerBattle = False Then
|
||||||
_mainMenuItemList.Add(New MainMenuItem(3, "Run", 3, AddressOf MainMenuRun))
|
_mainMenuItemList.Add(New MainMenuItem(3, Localization.GetString("battle_action_Run", "Run"), 3, AddressOf MainMenuRun))
|
||||||
MainMenuAddMegaEvolution(BattleScreen, 4)
|
MainMenuAddMegaEvolution(BattleScreen, 4)
|
||||||
Else
|
Else
|
||||||
MainMenuAddMegaEvolution(BattleScreen, 3)
|
MainMenuAddMegaEvolution(BattleScreen, 3)
|
||||||
@ -714,9 +722,9 @@
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Case BattleSystem.BattleScreen.BattleModes.PVP
|
Case BattleSystem.BattleScreen.BattleModes.PVP
|
||||||
_mainMenuItemList.Add(New MainMenuItem(0, "Battle", 0, AddressOf MainMenuOpenBattleMenu))
|
_mainMenuItemList.Add(New MainMenuItem(0, Localization.GetString("battle_action_Battle", "Battle"), 0, AddressOf MainMenuOpenBattleMenu))
|
||||||
_mainMenuItemList.Add(New MainMenuItem(1, "Pokémon", 1, AddressOf MainMenuOpenPokemon))
|
_mainMenuItemList.Add(New MainMenuItem(1, "Pokémon", 1, AddressOf MainMenuOpenPokemon))
|
||||||
_mainMenuItemList.Add(New MainMenuItem(3, "Surrender", 2, AddressOf MainMenuOpenBag))
|
_mainMenuItemList.Add(New MainMenuItem(3, Localization.GetString("battle_action_Surrender", "Surrender"), 2, AddressOf MainMenuOpenBag))
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@ -750,14 +758,14 @@
|
|||||||
If Core.Player.Pokemons(PokeIndex).Item.IsGameModeItem = True Then
|
If Core.Player.Pokemons(PokeIndex).Item.IsGameModeItem = True Then
|
||||||
If Core.Player.Pokemons(PokeIndex).Item.gmIsMegaStone = True Then
|
If Core.Player.Pokemons(PokeIndex).Item.gmIsMegaStone = True Then
|
||||||
If Core.Player.Pokemons(PokeIndex).Number = CType(Core.Player.Pokemons(PokeIndex).Item, GameModeItem).gmMegaPokemonNumber Then
|
If Core.Player.Pokemons(PokeIndex).Number = CType(Core.Player.Pokemons(PokeIndex).Item, GameModeItem).gmMegaPokemonNumber Then
|
||||||
_mainMenuItemList.Add(New MainMenuItem(5, "Mega Evolve!", Index, AddressOf MainMenuMegaEvolve))
|
_mainMenuItemList.Add(New MainMenuItem(5, Localization.GetString("battle_action_MegaEvolve", "Mega Evolve!"), Index, AddressOf MainMenuMegaEvolve))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If Core.Player.Pokemons(PokeIndex).Item.IsMegaStone = True Then
|
If Core.Player.Pokemons(PokeIndex).Item.IsMegaStone = True Then
|
||||||
Dim megaStone = CType(Core.Player.Pokemons(PokeIndex).Item, Items.MegaStone)
|
Dim megaStone = CType(Core.Player.Pokemons(PokeIndex).Item, Items.MegaStone)
|
||||||
If megaStone.MegaPokemonNumber = Core.Player.Pokemons(PokeIndex).Number Then
|
If megaStone.MegaPokemonNumber = Core.Player.Pokemons(PokeIndex).Number Then
|
||||||
_mainMenuItemList.Add(New MainMenuItem(5, "Mega Evolve!", Index, AddressOf MainMenuMegaEvolve))
|
_mainMenuItemList.Add(New MainMenuItem(5, Localization.GetString("battle_action_MegaEvolve", "Mega Evolve!"), Index, AddressOf MainMenuMegaEvolve))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@ -773,7 +781,10 @@
|
|||||||
_retractMenu = True
|
_retractMenu = True
|
||||||
_nextMenuState = MenuStates.Moves
|
_nextMenuState = MenuStates.Moves
|
||||||
PartyScreen.Selected = -1
|
PartyScreen.Selected = -1
|
||||||
|
If _moveMenuIndex <> _moveMenuLastIndex Then
|
||||||
|
_moveMenuNextIndex = _moveMenuLastIndex
|
||||||
|
_moveMenuIndex = _moveMenuLastIndex
|
||||||
|
End If
|
||||||
BattleScreen.BattleQuery.Clear()
|
BattleScreen.BattleQuery.Clear()
|
||||||
Dim q As New CameraQueryObject(New Vector3(11, 0.5F, 14.0F), New Vector3(11, 0.5F, 14.0F), Screen.Camera.Speed, Screen.Camera.Speed, -(CSng(MathHelper.PiOver4) + 0.3F), -(CSng(MathHelper.PiOver4) + 0.3F), -0.3F, -0.3F, 0.04F, 0.04F)
|
Dim q As New CameraQueryObject(New Vector3(11, 0.5F, 14.0F), New Vector3(11, 0.5F, 14.0F), Screen.Camera.Speed, Screen.Camera.Speed, -(CSng(MathHelper.PiOver4) + 0.3F), -(CSng(MathHelper.PiOver4) + 0.3F), -0.3F, -0.3F, 0.04F, 0.04F)
|
||||||
BattleScreen.BattleQuery.AddRange({q})
|
BattleScreen.BattleQuery.AddRange({q})
|
||||||
@ -783,7 +794,7 @@
|
|||||||
TempBattleScreen = BattleScreen
|
TempBattleScreen = BattleScreen
|
||||||
|
|
||||||
Player.Temp.PokemonScreenIndex = BattleScreen.OwnPokemonIndex
|
Player.Temp.PokemonScreenIndex = BattleScreen.OwnPokemonIndex
|
||||||
Dim selScreen = New PartyScreen(Core.CurrentScreen, Item.GetItemByID(5.ToString), AddressOf ShowPokemonMenu, "Choose Pokémon", True) With {.Mode = Screens.UI.ISelectionScreen.ScreenMode.Selection, .CanExit = True}
|
Dim selScreen = New PartyScreen(Core.CurrentScreen, Item.GetItemByID(5.ToString), AddressOf ShowPokemonMenu, Localization.GetString("party_screen_ChoosePokemon", "Choose Pokémon"), True) With {.Mode = Screens.UI.ISelectionScreen.ScreenMode.Selection, .CanExit = True}
|
||||||
AddHandler selScreen.SelectedObject, AddressOf ShowPokemonMenuHandler
|
AddHandler selScreen.SelectedObject, AddressOf ShowPokemonMenuHandler
|
||||||
|
|
||||||
Core.SetScreen(selScreen)
|
Core.SetScreen(selScreen)
|
||||||
@ -813,10 +824,32 @@
|
|||||||
Battle.Won = True
|
Battle.Won = True
|
||||||
Battle.Fled = True
|
Battle.Fled = True
|
||||||
Else
|
Else
|
||||||
BattleScreen.BattleQuery.Clear()
|
Dim Trapped As Boolean = False
|
||||||
BattleScreen.BattleQuery.Add(BattleScreen.FocusBattle())
|
Dim p As Pokemon = BattleScreen.OwnPokemon
|
||||||
BattleScreen.BattleQuery.Insert(0, New ToggleMenuQueryObject(True))
|
Dim op As Pokemon = BattleScreen.OppPokemon
|
||||||
BattleScreen.Battle.InitializeRound(BattleScreen, New Battle.RoundConst With {.StepType = Battle.RoundConst.StepTypes.Text, .Argument = "Failed to run away."})
|
|
||||||
|
If op.Ability.Name.ToLower() = "shadow tag" And p.Ability.Name.ToLower() <> "shadow tag" And op.HP > 0 Then
|
||||||
|
Trapped = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If op.Ability.Name.ToLower() = "arena trap" And op.HP > 0 And BattleScreen.FieldEffects.IsGrounded(True, BattleScreen) = True Then
|
||||||
|
Trapped = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If op.Ability.Name.ToLower() = "magnet pull" And op.HP > 0 Then
|
||||||
|
If p.Type1.Type = Element.Types.Steel Or p.Type2.Type = Element.Types.Steel Then
|
||||||
|
Trapped = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Trapped = True Then
|
||||||
|
Screen.TextBox.Show(Localization.GetString("battle_cannot_run_ability", "Failed to run away because of~") & Localization.GetString("ability_name_" & op.Ability.ID.ToString, op.Ability.Name) & ".", {}, True, True)
|
||||||
|
Else
|
||||||
|
BattleScreen.BattleQuery.Clear()
|
||||||
|
BattleScreen.BattleQuery.Add(BattleScreen.FocusBattle())
|
||||||
|
BattleScreen.BattleQuery.Insert(0, New ToggleMenuQueryObject(True))
|
||||||
|
BattleScreen.Battle.InitializeRound(BattleScreen, New Battle.RoundConst With {.StepType = Battle.RoundConst.StepTypes.Text, .Argument = Localization.GetString("battle_cannot_run", "Failed to run away.")})
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@ -828,9 +861,11 @@
|
|||||||
BattleScreen.BattleQuery.Insert(0, New ToggleMenuQueryObject(True))
|
BattleScreen.BattleQuery.Insert(0, New ToggleMenuQueryObject(True))
|
||||||
Core.SetScreen(New BattleCatchScreen(BattleScreen, Item.GetItemByID(181.ToString)))
|
Core.SetScreen(New BattleCatchScreen(BattleScreen, Item.GetItemByID(181.ToString)))
|
||||||
|
|
||||||
Dim safariBallText As String = "Safari Ball x" & Core.Player.Inventory.GetItemAmount(181.ToString).ToString()
|
Core.Player.UsedItemsToCheckScriptDelayFor.Add("181")
|
||||||
|
|
||||||
|
Dim safariBallText As String = Localization.GetString("item_name_181", "Safari Ball") & " x" & Core.Player.Inventory.GetItemAmount(181.ToString).ToString()
|
||||||
If Core.Player.Inventory.GetItemAmount(181.ToString) = 0 Then
|
If Core.Player.Inventory.GetItemAmount(181.ToString) = 0 Then
|
||||||
safariBallText = "No Safari Balls."
|
safariBallText = Localization.GetString("battle_NoSafariBalls", "No Safari Balls.")
|
||||||
End If
|
End If
|
||||||
_mainMenuItemList(0).Text = safariBallText
|
_mainMenuItemList(0).Text = safariBallText
|
||||||
End If
|
End If
|
||||||
@ -909,6 +944,10 @@
|
|||||||
_moveMenuItemList.Clear()
|
_moveMenuItemList.Clear()
|
||||||
BattleScreen.ClearMoveMenuTime = False
|
BattleScreen.ClearMoveMenuTime = False
|
||||||
End If
|
End If
|
||||||
|
If _moveMenuIndex > _moveMenuItemList.Count - 1 Then
|
||||||
|
_moveMenuIndex = 0
|
||||||
|
_moveMenuNextIndex = 0
|
||||||
|
End If
|
||||||
|
|
||||||
If _moveMenuChoseMove = True Then
|
If _moveMenuChoseMove = True Then
|
||||||
_moveMenuAlpha -= 15
|
_moveMenuAlpha -= 15
|
||||||
@ -916,7 +955,7 @@
|
|||||||
_moveMenuAlpha = 0
|
_moveMenuAlpha = 0
|
||||||
If BattleScreen.OwnPokemon.Attacks(_moveMenuIndex).SwapsOutOwnPokemon = True Then
|
If BattleScreen.OwnPokemon.Attacks(_moveMenuIndex).SwapsOutOwnPokemon = True Then
|
||||||
If PartyScreen.Selected = -1 Then
|
If PartyScreen.Selected = -1 Then
|
||||||
Dim selScreen = New PartyScreen(Core.CurrentScreen, Item.GetItemByID(5.ToString), Nothing, "Choose Pokémon", False, False, False) With {.Mode = Screens.UI.ISelectionScreen.ScreenMode.Selection, .CanExit = False}
|
Dim selScreen = New PartyScreen(Core.CurrentScreen, Item.GetItemByID(5.ToString), Nothing, Localization.GetString("party_screen_ChoosePokemon", "Choose Pokémon"), False, False, False) With {.Mode = Screens.UI.ISelectionScreen.ScreenMode.Selection, .CanExit = False, .SelectButtonText = Localization.GetString("global_switch", "Switch")}
|
||||||
AddHandler selScreen.SelectedObject, Nothing
|
AddHandler selScreen.SelectedObject, Nothing
|
||||||
|
|
||||||
Core.SetScreen(selScreen)
|
Core.SetScreen(selScreen)
|
||||||
@ -939,11 +978,21 @@
|
|||||||
Else
|
Else
|
||||||
UseStruggle(BattleScreen)
|
UseStruggle(BattleScreen)
|
||||||
|
|
||||||
If _moveMenuItemList.Count = 0 Or _moveMenuCreatedID <> BattleScreen.OwnPokemon.IndividualValue Or BattleScreen.IsChoiced Then
|
If _moveMenuItemList.Count = 0 Or _moveMenuCreatedID <> BattleScreen.OwnPokemon.IndividualValue Then
|
||||||
If _moveMenuCreatedID <> BattleScreen.OwnPokemon.IndividualValue Then
|
If _moveMenuCreatedID <> BattleScreen.OwnPokemon.IndividualValue Then
|
||||||
_moveMenuIndex = 0
|
_moveMenuIndex = 0
|
||||||
End If
|
End If
|
||||||
CreateMoveMenuItems(BattleScreen)
|
CreateMoveMenuItems(BattleScreen)
|
||||||
|
If _moveMenuIndex <> _moveMenuLastIndex Then
|
||||||
|
_moveMenuNextIndex = _moveMenuLastIndex
|
||||||
|
_moveMenuIndex = _moveMenuLastIndex
|
||||||
|
|
||||||
|
If _moveMenuIndex > _moveMenuItemList.Count - 1 Then
|
||||||
|
_moveMenuNextIndex = 0
|
||||||
|
_moveMenuIndex = 0
|
||||||
|
_moveMenuLastIndex = 0
|
||||||
|
End If
|
||||||
|
End If
|
||||||
_moveMenuCreatedID = BattleScreen.OwnPokemon.IndividualValue
|
_moveMenuCreatedID = BattleScreen.OwnPokemon.IndividualValue
|
||||||
End If
|
End If
|
||||||
If _retractMenu = False Then
|
If _retractMenu = False Then
|
||||||
@ -1103,7 +1152,7 @@
|
|||||||
If Item.IsBall = True Then
|
If Item.IsBall = True Then
|
||||||
Core.Player.Inventory.RemoveItem(itemID.ToString, 1)
|
Core.Player.Inventory.RemoveItem(itemID.ToString, 1)
|
||||||
If TempBattleScreen.IsTrainerBattle = False Then
|
If TempBattleScreen.IsTrainerBattle = False Then
|
||||||
If BattleScreen.CanCatch = True Or CBool(GameModeManager.GetGameRuleValue("OnlyCaptureFirst", "0")) = True And Core.Player.PokeFiles.Contains(BattleScreen.TempPokeFile) = True Then
|
If BattleScreen.CanCatch = True Or CBool(GameModeManager.GetGameRuleValue("OnlyCaptureFirst", "0")) = True And Core.Player.PokeFiles.Contains(BattleScreen.TempPokeFile) = False Then
|
||||||
TempBattleScreen.BattleQuery.Clear()
|
TempBattleScreen.BattleQuery.Clear()
|
||||||
TempBattleScreen.BattleQuery.Add(TempBattleScreen.FocusBattle())
|
TempBattleScreen.BattleQuery.Add(TempBattleScreen.FocusBattle())
|
||||||
TempBattleScreen.BattleQuery.Insert(0, New ToggleMenuQueryObject(True))
|
TempBattleScreen.BattleQuery.Insert(0, New ToggleMenuQueryObject(True))
|
||||||
@ -1126,7 +1175,7 @@
|
|||||||
|
|
||||||
If Item.BattleSelectPokemon = True Then
|
If Item.BattleSelectPokemon = True Then
|
||||||
'Core.SetScreen(New PartyScreen(Core.CurrentScreen, Item, AddressOf UseItem, "Use " & Item.Name, True))
|
'Core.SetScreen(New PartyScreen(Core.CurrentScreen, Item, AddressOf UseItem, "Use " & Item.Name, True))
|
||||||
Dim selScreen = New PartyScreen(Core.CurrentScreen, Item, AddressOf Item.UseOnPokemon, "Use " & Item.Name, True) With {.Mode = Screens.UI.ISelectionScreen.ScreenMode.Selection, .CanExit = True}
|
Dim selScreen = New PartyScreen(Core.CurrentScreen, Item, AddressOf Item.UseOnPokemon, Localization.GetString("global_use", "Use") & " " & Item.OneLineName(), True) With {.Mode = Screens.UI.ISelectionScreen.ScreenMode.Selection, .CanExit = True}
|
||||||
AddHandler selScreen.SelectedObject, AddressOf UseItemHandler
|
AddHandler selScreen.SelectedObject, AddressOf UseItemHandler
|
||||||
|
|
||||||
Core.SetScreen(selScreen)
|
Core.SetScreen(selScreen)
|
||||||
|
@ -88,6 +88,9 @@
|
|||||||
|
|
||||||
Public Shared BattleMapOffset As New Vector3(0)
|
Public Shared BattleMapOffset As New Vector3(0)
|
||||||
|
|
||||||
|
Public BackgroundTarget As RenderTarget2D
|
||||||
|
Public NPCTarget As RenderTarget2D
|
||||||
|
|
||||||
Public Overrides Function GetScreenStatus() As String
|
Public Overrides Function GetScreenStatus() As String
|
||||||
Dim pokemonString As String = "OwnPokemon=OWNEMPTY" & Environment.NewLine &
|
Dim pokemonString As String = "OwnPokemon=OWNEMPTY" & Environment.NewLine &
|
||||||
"OppPokemon=OPPEMPTY"
|
"OppPokemon=OPPEMPTY"
|
||||||
@ -177,6 +180,10 @@
|
|||||||
|
|
||||||
Me.BattleMenu = New BattleMenu()
|
Me.BattleMenu = New BattleMenu()
|
||||||
BattleMenu.Reset()
|
BattleMenu.Reset()
|
||||||
|
|
||||||
|
BackgroundTarget = New RenderTarget2D(Core.GraphicsDevice, Core.windowSize.Width, Core.windowSize.Height, False, SurfaceFormat.Color, DepthFormat.Depth24Stencil8)
|
||||||
|
NPCTarget = New RenderTarget2D(Core.GraphicsDevice, Core.windowSize.Width, Core.windowSize.Height, False, SurfaceFormat.Color, DepthFormat.Depth24Stencil8)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub InitializeWild(ByVal WildPokemon As Pokemon, ByVal OverworldScreen As Screen, ByVal defaultMapType As Integer)
|
Public Sub InitializeWild(ByVal WildPokemon As Pokemon, ByVal OverworldScreen As Screen, ByVal defaultMapType As Integer)
|
||||||
@ -254,10 +261,12 @@
|
|||||||
OwnPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(12, OwnEntityOffsetY, 13) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", True, New Vector3(1), 1, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(OwnPokemon), 3, WildPokemon.GetDisplayName(), 0, True, "Still", New List(Of Rectangle)}, 1,,, ownModel), NPC)
|
OwnPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(12, OwnEntityOffsetY, 13) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", True, New Vector3(1), 1, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(OwnPokemon), 3, WildPokemon.GetDisplayName(), 0, True, "Still", New List(Of Rectangle)}, 1,,, ownModel), NPC)
|
||||||
OppPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(15, OppEntityOffsetY, 13) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", True, New Vector3(1), 1, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(WildPokemon), 1, WildPokemon.GetDisplayName(), 1, True, "Still", New List(Of Rectangle)},,,, oppModel), NPC)
|
OppPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(15, OppEntityOffsetY, 13) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", True, New Vector3(1), 1, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(WildPokemon), 1, WildPokemon.GetDisplayName(), 1, True, "Still", New List(Of Rectangle)},,,, oppModel), NPC)
|
||||||
If ownModel <> "" Then
|
If ownModel <> "" Then
|
||||||
OwnPokemonNPC.Scale = New Vector3(OwnPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE
|
OwnPokemonNPC.Scale = New Vector3(OwnPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE * GameModeManager.PokeModelScale
|
||||||
|
OwnPokemonNPC.Rotation = NPC.GetRotationFromInteger(OwnPokemonNPC.faceRotation) + GameModeManager.PokeModelRotation
|
||||||
End If
|
End If
|
||||||
If oppModel <> "" Then
|
If oppModel <> "" Then
|
||||||
OppPokemonNPC.Scale = New Vector3(OppPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE
|
OppPokemonNPC.Scale = New Vector3(OppPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE * GameModeManager.PokeModelScale
|
||||||
|
OppPokemonNPC.Rotation = NPC.GetRotationFromInteger(OppPokemonNPC.faceRotation) + GameModeManager.PokeModelRotation
|
||||||
End If
|
End If
|
||||||
Screen.Level.Entities.Add(OwnPokemonNPC)
|
Screen.Level.Entities.Add(OwnPokemonNPC)
|
||||||
Screen.Level.Entities.Add(OppPokemonNPC)
|
Screen.Level.Entities.Add(OppPokemonNPC)
|
||||||
@ -412,10 +421,12 @@
|
|||||||
OppPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(15, OppEntityOffsetY, 13) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", True, New Vector3(1), 1, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(OppPokemon), 1, OppPokemon.GetDisplayName(), 1, True, "Still", New List(Of Rectangle)}, InitiallyVisibleOpp,,, oppModel), NPC)
|
OppPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(15, OppEntityOffsetY, 13) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", True, New Vector3(1), 1, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(OppPokemon), 1, OppPokemon.GetDisplayName(), 1, True, "Still", New List(Of Rectangle)}, InitiallyVisibleOpp,,, oppModel), NPC)
|
||||||
|
|
||||||
If ownModel <> "" Then
|
If ownModel <> "" Then
|
||||||
OwnPokemonNPC.Scale = New Vector3(OwnPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE
|
OwnPokemonNPC.Scale = New Vector3(OwnPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE * GameModeManager.PokeModelScale
|
||||||
|
OwnPokemonNPC.Rotation = NPC.GetRotationFromInteger(OwnPokemonNPC.faceRotation) + GameModeManager.PokeModelRotation
|
||||||
End If
|
End If
|
||||||
If oppModel <> "" Then
|
If oppModel <> "" Then
|
||||||
OppPokemonNPC.Scale = New Vector3(OppPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE
|
OppPokemonNPC.Scale = New Vector3(OppPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE * GameModeManager.PokeModelScale
|
||||||
|
OppPokemonNPC.Rotation = NPC.GetRotationFromInteger(OppPokemonNPC.faceRotation) + GameModeManager.PokeModelRotation
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Screen.Level.Entities.Add(OwnPokemonNPC)
|
Screen.Level.Entities.Add(OwnPokemonNPC)
|
||||||
@ -598,7 +609,6 @@
|
|||||||
SavedOverworld.SkyDome = Screen.SkyDome
|
SavedOverworld.SkyDome = Screen.SkyDome
|
||||||
|
|
||||||
InitializeScreen()
|
InitializeScreen()
|
||||||
FieldEffects.Weather = BattleWeather.WeatherTypes.Clear
|
|
||||||
|
|
||||||
PlayerStatistics.Track("Safari battles", 1)
|
PlayerStatistics.Track("Safari battles", 1)
|
||||||
|
|
||||||
@ -661,10 +671,12 @@
|
|||||||
OppPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(15, 0 + OppEntityOffsetY, 13) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", True, New Vector3(1), 1, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(WildPokemon), 1, WildPokemon.GetDisplayName(), 1, True, "Still", New List(Of Rectangle)},,,, oppModel), NPC)
|
OppPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(15, 0 + OppEntityOffsetY, 13) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", True, New Vector3(1), 1, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(WildPokemon), 1, WildPokemon.GetDisplayName(), 1, True, "Still", New List(Of Rectangle)},,,, oppModel), NPC)
|
||||||
|
|
||||||
If ownModel <> "" Then
|
If ownModel <> "" Then
|
||||||
OwnPokemonNPC.Scale = New Vector3(OwnPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE
|
OwnPokemonNPC.Scale = New Vector3(OwnPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE * GameModeManager.PokeModelScale
|
||||||
|
OwnPokemonNPC.Rotation = NPC.GetRotationFromInteger(OwnPokemonNPC.faceRotation) + GameModeManager.PokeModelRotation
|
||||||
End If
|
End If
|
||||||
If oppModel <> "" Then
|
If oppModel <> "" Then
|
||||||
OppPokemonNPC.Scale = New Vector3(OppPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE
|
OppPokemonNPC.Scale = New Vector3(OppPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE * GameModeManager.PokeModelScale
|
||||||
|
OppPokemonNPC.Rotation = NPC.GetRotationFromInteger(OppPokemonNPC.faceRotation) + GameModeManager.PokeModelRotation
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Screen.Level.Entities.Add(OwnPokemonNPC)
|
Screen.Level.Entities.Add(OwnPokemonNPC)
|
||||||
@ -784,10 +796,12 @@
|
|||||||
OppPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(15, 0 + OppEntityOffsetY, 13) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", True, New Vector3(1), 1, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(WildPokemon), 1, WildPokemon.GetDisplayName(), 1, True, "Still", New List(Of Rectangle)},,,, oppModel), NPC)
|
OppPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(15, 0 + OppEntityOffsetY, 13) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", True, New Vector3(1), 1, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(WildPokemon), 1, WildPokemon.GetDisplayName(), 1, True, "Still", New List(Of Rectangle)},,,, oppModel), NPC)
|
||||||
|
|
||||||
If ownModel <> "" Then
|
If ownModel <> "" Then
|
||||||
OwnPokemonNPC.Scale = New Vector3(OwnPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE
|
OwnPokemonNPC.Scale = New Vector3(OwnPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE * GameModeManager.PokeModelScale
|
||||||
|
OwnPokemonNPC.Rotation = NPC.GetRotationFromInteger(OwnPokemonNPC.faceRotation) + GameModeManager.PokeModelRotation
|
||||||
End If
|
End If
|
||||||
If oppModel <> "" Then
|
If oppModel <> "" Then
|
||||||
OppPokemonNPC.Scale = New Vector3(OppPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE
|
OppPokemonNPC.Scale = New Vector3(OppPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE * GameModeManager.PokeModelScale
|
||||||
|
OppPokemonNPC.Rotation = NPC.GetRotationFromInteger(OppPokemonNPC.faceRotation) + GameModeManager.PokeModelRotation
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Screen.Level.Entities.Add(OwnPokemonNPC)
|
Screen.Level.Entities.Add(OwnPokemonNPC)
|
||||||
@ -938,6 +952,8 @@
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Public Overrides Sub Draw()
|
Public Overrides Sub Draw()
|
||||||
|
DebugDisplay.MaxVertices = 0
|
||||||
|
DebugDisplay.MaxVisibleVertices = 0
|
||||||
|
|
||||||
Dim ForegroundEntities As New List(Of Entity)
|
Dim ForegroundEntities As New List(Of Entity)
|
||||||
|
|
||||||
@ -1010,7 +1026,6 @@ nextIndexBackground:
|
|||||||
|
|
||||||
cQuery.Reverse()
|
cQuery.Reverse()
|
||||||
|
|
||||||
Dim BackgroundTarget As New RenderTarget2D(Core.GraphicsDevice, Core.windowSize.Width, Core.windowSize.Height, False, SurfaceFormat.Color, DepthFormat.Depth24Stencil8)
|
|
||||||
Core.GraphicsDevice.SetRenderTarget(BackgroundTarget)
|
Core.GraphicsDevice.SetRenderTarget(BackgroundTarget)
|
||||||
GraphicsDevice.Clear(Microsoft.Xna.Framework.Color.Transparent)
|
GraphicsDevice.Clear(Microsoft.Xna.Framework.Color.Transparent)
|
||||||
|
|
||||||
@ -1019,12 +1034,13 @@ nextIndexBackground:
|
|||||||
Next
|
Next
|
||||||
|
|
||||||
Core.GraphicsDevice.SetRenderTarget(Nothing)
|
Core.GraphicsDevice.SetRenderTarget(Nothing)
|
||||||
|
|
||||||
Dim NPCTarget As New RenderTarget2D(Core.GraphicsDevice, Core.windowSize.Width, Core.windowSize.Height, False, SurfaceFormat.Color, DepthFormat.Depth24Stencil8)
|
|
||||||
Core.GraphicsDevice.SetRenderTarget(NPCTarget)
|
Core.GraphicsDevice.SetRenderTarget(NPCTarget)
|
||||||
GraphicsDevice.Clear(Microsoft.Xna.Framework.Color.Transparent)
|
GraphicsDevice.Clear(Microsoft.Xna.Framework.Color.Transparent)
|
||||||
For i = 0 To ForegroundEntities.Count - 1
|
For i = 0 To ForegroundEntities.Count - 1
|
||||||
ForegroundEntities(i).Render()
|
ForegroundEntities(i).Render()
|
||||||
|
If ForegroundEntities(i).Visible = True Then
|
||||||
|
DebugDisplay.MaxVisibleVertices += ForegroundEntities(i).VertexCount
|
||||||
|
End If
|
||||||
DebugDisplay.MaxVertices += ForegroundEntities(i).VertexCount
|
DebugDisplay.MaxVertices += ForegroundEntities(i).VertexCount
|
||||||
Next
|
Next
|
||||||
|
|
||||||
@ -1078,6 +1094,8 @@ nextIndexForeground:
|
|||||||
If DrawColoredScreen = True Then
|
If DrawColoredScreen = True Then
|
||||||
Canvas.DrawRectangle(Core.windowSize, Me.ColorOverlay)
|
Canvas.DrawRectangle(Core.windowSize, Me.ColorOverlay)
|
||||||
End If
|
End If
|
||||||
|
ForegroundAnimationList.Clear()
|
||||||
|
BackgroundAnimationList.Clear()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Overrides Sub Update()
|
Public Overrides Sub Update()
|
||||||
@ -1280,6 +1298,9 @@ nextIndex:
|
|||||||
Else
|
Else
|
||||||
Core.Player.RoamingPokemonData = RoamingPokemon.ReplaceRoamingPokemon(RoamingPokemonStorage)
|
Core.Player.RoamingPokemonData = RoamingPokemon.ReplaceRoamingPokemon(RoamingPokemonStorage)
|
||||||
End If
|
End If
|
||||||
|
If RoamingPokemonStorage.ScriptPath <> "" Then
|
||||||
|
CType(SavedOverworld.OverworldScreen, OverworldScreen).AfterRoamingBattleScript = RoamingPokemonStorage.ScriptPath
|
||||||
|
End If
|
||||||
RoamingPokemon.ShiftRoamingPokemon(RoamingPokemonStorage.WorldID)
|
RoamingPokemon.ShiftRoamingPokemon(RoamingPokemonStorage.WorldID)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -1335,6 +1356,7 @@ nextIndex:
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim hasLevelUp As Boolean = False
|
Dim hasLevelUp As Boolean = False
|
||||||
|
Dim ItemReturnScript As String = "@Text.Show("
|
||||||
For Each p As Pokemon In Core.Player.Pokemons
|
For Each p As Pokemon In Core.Player.Pokemons
|
||||||
If p.hasLeveledUp = True Then
|
If p.hasLeveledUp = True Then
|
||||||
hasLevelUp = True
|
hasLevelUp = True
|
||||||
@ -1348,7 +1370,10 @@ nextIndex:
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
p.Item.AdditionalData = p.OriginalItem.AdditionalData
|
p.Item.AdditionalData = p.OriginalItem.AdditionalData
|
||||||
Screen.TextBox.Show(Core.Player.Name & " received~" & p.OriginalItem.Name & "and gave it back to~" & p.GetDisplayName)
|
If ItemReturnScript <> "" Then
|
||||||
|
ItemReturnScript &= "*"
|
||||||
|
End If
|
||||||
|
ItemReturnScript &= Core.Player.Name & " received~" & p.OriginalItem.Name & "*and gave it back to~" & p.GetDisplayName & "!"
|
||||||
p.OriginalItem = Nothing
|
p.OriginalItem = Nothing
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
@ -1361,7 +1386,12 @@ nextIndex:
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
p.Item.AdditionalData = p.OriginalItem.AdditionalData
|
p.Item.AdditionalData = p.OriginalItem.AdditionalData
|
||||||
Screen.TextBox.Show(Core.Player.Name & " found~" & p.OriginalItem.Name & "*and gave it back to~" & p.GetDisplayName)
|
|
||||||
|
If ItemReturnScript <> "" Then
|
||||||
|
ItemReturnScript &= "*"
|
||||||
|
End If
|
||||||
|
|
||||||
|
ItemReturnScript &= Core.Player.Name & " found~" & p.OriginalItem.Name & "*and gave it back to~" & p.GetDisplayName & "!"
|
||||||
p.OriginalItem = Nothing
|
p.OriginalItem = Nothing
|
||||||
Else
|
Else
|
||||||
If p.OriginalItem.IsGameModeItem = True Then
|
If p.OriginalItem.IsGameModeItem = True Then
|
||||||
@ -1369,15 +1399,28 @@ nextIndex:
|
|||||||
Else
|
Else
|
||||||
Core.Player.Inventory.AddItem(p.OriginalItem.ID.ToString, 1)
|
Core.Player.Inventory.AddItem(p.OriginalItem.ID.ToString, 1)
|
||||||
End If
|
End If
|
||||||
|
If ItemReturnScript <> "" Then
|
||||||
|
ItemReturnScript &= ")" & Environment.NewLine
|
||||||
|
End If
|
||||||
|
ItemReturnScript &= "@Sound.Play(item_found)" & Environment.NewLine & "@Text.Show(" & Core.Player.Name & " found~" & p.OriginalItem.Name & "!*" & Core.Player.Inventory.GetMessageReceive(p.OriginalItem, 1)
|
||||||
|
|
||||||
SoundManager.PlaySound("item_found", True)
|
|
||||||
Screen.TextBox.Show(Core.Player.Name & " found~" & p.OriginalItem.Name & "!*" & Core.Player.Inventory.GetMessageReceive(p.OriginalItem, 1))
|
|
||||||
p.OriginalItem = Nothing
|
p.OriginalItem = Nothing
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
p.ResetTemp()
|
p.ResetTemp()
|
||||||
Next
|
Next
|
||||||
|
If ItemReturnScript <> "@Text.Show(" Then
|
||||||
|
ItemReturnScript &= ")"
|
||||||
|
|
||||||
|
Dim s As String =
|
||||||
|
"version=2" & Environment.NewLine &
|
||||||
|
ItemReturnScript & Environment.NewLine &
|
||||||
|
":end"
|
||||||
|
|
||||||
|
CType(SavedOverworld.OverworldScreen, OverworldScreen).ActionScript.StartScript(s, 2, False)
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
If hasLevelUp = False Then
|
If hasLevelUp = False Then
|
||||||
Core.SetScreen(New TransitionScreen(Me, SavedOverworld.OverworldScreen, New Color(255, 255, 255), False, AddressOf ChangeSavedScreen))
|
Core.SetScreen(New TransitionScreen(Me, SavedOverworld.OverworldScreen, New Color(255, 255, 255), False, AddressOf ChangeSavedScreen))
|
||||||
@ -1418,48 +1461,86 @@ nextIndex:
|
|||||||
FieldEffects.OppRageFistPower = 0
|
FieldEffects.OppRageFistPower = 0
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
Dim ItemReturnScript As String = "@Text.Show("
|
||||||
For Each p As Pokemon In Core.Player.Pokemons
|
For Each p As Pokemon In Core.Player.Pokemons
|
||||||
If IsRemoteBattle = True Then
|
If IsRemoteBattle = True Then
|
||||||
If p.OriginalItem IsNot Nothing Then
|
If p.OriginalItem IsNot Nothing Then
|
||||||
If p.OriginalItem.IsGameModeItem = True Then
|
If p.OriginalItem.IsGameModeItem = True Then
|
||||||
p.Item = P3D.Item.GetItemByID(p.OriginalItem.gmID.ToString)
|
p.Item = P3D.Item.GetItemByID(p.OriginalItem.gmID)
|
||||||
Else
|
Else
|
||||||
p.Item = P3D.Item.GetItemByID(p.OriginalItem.ID.ToString)
|
p.Item = P3D.Item.GetItemByID(p.OriginalItem.ID.ToString)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
p.Item.AdditionalData = p.OriginalItem.AdditionalData
|
p.Item.AdditionalData = p.OriginalItem.AdditionalData
|
||||||
Screen.TextBox.Show(Core.Player.Name & " received~" & p.OriginalItem.Name & "and gave it back to~" & p.GetDisplayName)
|
If ItemReturnScript <> "" Then
|
||||||
|
ItemReturnScript &= "*"
|
||||||
|
End If
|
||||||
|
ItemReturnScript &= Core.Player.Name & " received~" & p.OriginalItem.Name & "*and gave it back to~" & p.GetDisplayName & "!"
|
||||||
|
p.OriginalItem = Nothing
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If Not p.OriginalItem Is Nothing Then
|
If Not p.OriginalItem Is Nothing Then
|
||||||
If p.Item IsNot Nothing Then
|
If p.Item Is Nothing Then
|
||||||
|
If p.OriginalItem.IsGameModeItem = True Then
|
||||||
|
p.Item = P3D.Item.GetItemByID(p.OriginalItem.gmID.ToString)
|
||||||
|
Else
|
||||||
|
p.Item = P3D.Item.GetItemByID(p.OriginalItem.ID.ToString)
|
||||||
|
End If
|
||||||
|
|
||||||
|
p.Item.AdditionalData = p.OriginalItem.AdditionalData
|
||||||
|
|
||||||
|
If ItemReturnScript <> "" Then
|
||||||
|
ItemReturnScript &= "*"
|
||||||
|
End If
|
||||||
|
|
||||||
|
ItemReturnScript &= Core.Player.Name & " found~" & p.OriginalItem.Name & "*and gave it back to~" & p.GetDisplayName & "!"
|
||||||
|
p.OriginalItem = Nothing
|
||||||
|
Else
|
||||||
If p.OriginalItem.IsGameModeItem = True Then
|
If p.OriginalItem.IsGameModeItem = True Then
|
||||||
Core.Player.Inventory.AddItem(p.OriginalItem.gmID, 1)
|
Core.Player.Inventory.AddItem(p.OriginalItem.gmID, 1)
|
||||||
Else
|
Else
|
||||||
Core.Player.Inventory.AddItem(p.OriginalItem.ID.ToString, 1)
|
Core.Player.Inventory.AddItem(p.OriginalItem.ID.ToString, 1)
|
||||||
End If
|
End If
|
||||||
SoundManager.PlaySound("item_found", True)
|
If ItemReturnScript <> "" Then
|
||||||
Screen.TextBox.Show(Core.Player.Name & " found~" & p.OriginalItem.Name & "!*" & Core.Player.Inventory.GetMessageReceive(p.OriginalItem, 1))
|
ItemReturnScript &= ")" & Environment.NewLine
|
||||||
p.OriginalItem = Nothing
|
End If
|
||||||
Else
|
ItemReturnScript &= "@Sound.Play(item_found)" & Environment.NewLine & "@Text.Show(" & Core.Player.Name & " found~" & p.OriginalItem.Name & "!*" & Core.Player.Inventory.GetMessageReceive(p.OriginalItem, 1)
|
||||||
p.Item = P3D.Item.GetItemByID(p.OriginalItem.ID.ToString)
|
|
||||||
p.Item.AdditionalData = p.OriginalItem.AdditionalData
|
|
||||||
Screen.TextBox.Show(Core.Player.Name & " found~" & p.OriginalItem.Name & "*and gave it back to~" & p.GetDisplayName)
|
|
||||||
p.OriginalItem = Nothing
|
p.OriginalItem = Nothing
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
p.ResetTemp()
|
p.ResetTemp()
|
||||||
Next
|
Next
|
||||||
|
If ItemReturnScript <> "@Text.Show(" Then
|
||||||
|
ItemReturnScript &= ")"
|
||||||
|
|
||||||
|
Dim s As String =
|
||||||
|
"version=2" & Environment.NewLine &
|
||||||
|
ItemReturnScript & Environment.NewLine &
|
||||||
|
":end"
|
||||||
|
|
||||||
|
CType(SavedOverworld.OverworldScreen, OverworldScreen).ActionScript.StartScript(s, 2, False)
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
FieldEffects.OwnRageFistPower = 0
|
FieldEffects.OwnRageFistPower = 0
|
||||||
FieldEffects.OppRageFistPower = 0
|
FieldEffects.OppRageFistPower = 0
|
||||||
|
|
||||||
ResetVars()
|
ResetVars()
|
||||||
Core.SetScreen(New TransitionScreen(Me, New BlackOutScreen(Me), Color.Black, False))
|
If SavedOverworld.Level.BlackOutScript <> "" Then
|
||||||
|
CType(SavedOverworld.OverworldScreen, OverworldScreen).ActionScript.StartScript(SavedOverworld.Level.BlackOutScript, 0, False)
|
||||||
|
Core.SetScreen(New TransitionScreen(Me, SavedOverworld.OverworldScreen, Color.Black, False, AddressOf ChangeSavedScreen))
|
||||||
|
Else
|
||||||
|
Core.SetScreen(New TransitionScreen(Me, New BlackOutScreen(Me), Color.Black, False))
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
BattleMapOffset = New Vector3(0)
|
BattleMapOffset = New Vector3(0)
|
||||||
OwnLeadIndex = 0
|
OwnLeadIndex = 0
|
||||||
OppLeadIndex = 0
|
OppLeadIndex = 0
|
||||||
|
|
||||||
|
BackgroundTarget.Dispose()
|
||||||
|
NPCTarget.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub ChangeSavedScreen()
|
Public Sub ChangeSavedScreen()
|
||||||
|
@ -129,6 +129,9 @@
|
|||||||
Public OwnFutureSightTurns As Integer = 0 'Turns until Futuresight hits
|
Public OwnFutureSightTurns As Integer = 0 'Turns until Futuresight hits
|
||||||
Public OwnFutureSightID As Integer = 0 'Move ID for the Futuresight move
|
Public OwnFutureSightID As Integer = 0 'Move ID for the Futuresight move
|
||||||
|
|
||||||
|
Public OwnUsedRandomMove As Boolean = False 'Metronome for example
|
||||||
|
Public OwnUsedMirrorMove As Boolean = False
|
||||||
|
|
||||||
'Opp stuff
|
'Opp stuff
|
||||||
Public OppSpikes As Integer = 0
|
Public OppSpikes As Integer = 0
|
||||||
Public OppStealthRock As Integer = 0
|
Public OppStealthRock As Integer = 0
|
||||||
@ -253,8 +256,14 @@
|
|||||||
Public OppSandTomb As Integer = 0
|
Public OppSandTomb As Integer = 0
|
||||||
Public OppInfestation As Integer = 0
|
Public OppInfestation As Integer = 0
|
||||||
|
|
||||||
|
Public OppUsedRandomMove As Boolean = False
|
||||||
|
Public OppUsedMirrorMove As Boolean = False
|
||||||
|
|
||||||
Public OppUsedMoves As New List(Of Integer)
|
Public OppUsedMoves As New List(Of Integer)
|
||||||
|
|
||||||
|
'Global Temporary Variables
|
||||||
|
Public TempTripleKick As Integer = 0 'If Triple Kick is used, this will be increased every time it's hit
|
||||||
|
|
||||||
'Weather
|
'Weather
|
||||||
Private _weather As BattleWeather.WeatherTypes = BattleWeather.WeatherTypes.Clear
|
Private _weather As BattleWeather.WeatherTypes = BattleWeather.WeatherTypes.Clear
|
||||||
Public WeatherRounds As Integer = 0
|
Public WeatherRounds As Integer = 0
|
||||||
@ -387,7 +396,7 @@
|
|||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
p = BattleScreen.OppPokemon
|
p = BattleScreen.OppPokemon
|
||||||
If p.Type1.Type = Element.Types.Flying Or p.Type2.Type = Element.Types.Flying Or p.Ability.Name.ToLower() = "levitate" And BattleScreen.FieldEffects.CanUseAbility(True, BattleScreen) = True Then
|
If p.Type1.Type = Element.Types.Flying Or (p.Type2 IsNot Nothing AndAlso p.Type2.Type = Element.Types.Flying) Or p.Ability.Name.ToLower() = "levitate" And BattleScreen.FieldEffects.CanUseAbility(False, BattleScreen) = True Then
|
||||||
grounded = False
|
grounded = False
|
||||||
End If
|
End If
|
||||||
If BattleScreen.FieldEffects.Gravity > 0 Or BattleScreen.FieldEffects.OppSmacked > 0 Or BattleScreen.FieldEffects.OppIngrain > 0 Then
|
If BattleScreen.FieldEffects.Gravity > 0 Or BattleScreen.FieldEffects.OppSmacked > 0 Or BattleScreen.FieldEffects.OppIngrain > 0 Then
|
||||||
|
@ -5,44 +5,47 @@ Namespace BattleSystem
|
|||||||
Public Class AnimationQueryObject
|
Public Class AnimationQueryObject
|
||||||
Inherits QueryObject
|
Inherits QueryObject
|
||||||
|
|
||||||
Public AnimationStarted As Boolean = False
|
Dim AnimationStarted As Boolean = False
|
||||||
Public AnimationEnded As Boolean = False
|
Dim AnimationEnded As Boolean = False
|
||||||
Public BattleFlipped As Boolean = Nothing
|
Dim BattleFlipped As Boolean = Nothing
|
||||||
Public AnimationSequence As List(Of BattleAnimation3D)
|
Dim AnimationSequence As List(Of BattleAnimation3D)
|
||||||
Public SpawnedEntities As List(Of Entity)
|
Dim SpawnedEntities As List(Of Entity)
|
||||||
Public CurrentEntity As Entity
|
Dim CurrentEntity As Entity
|
||||||
Public StartPosition As New Vector3(0)
|
|
||||||
Public DrawBeforeEntities As Boolean
|
Public DrawBeforeEntities As Boolean
|
||||||
|
|
||||||
|
Dim Backgrounds As List(Of Entity)
|
||||||
|
Dim RenderObjects As List(Of Entity)
|
||||||
|
|
||||||
Public Overrides ReadOnly Property IsReady As Boolean
|
Public Overrides ReadOnly Property IsReady As Boolean
|
||||||
Get
|
Get
|
||||||
Return AnimationEnded
|
Return AnimationEnded
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public Sub New(ByVal entity As Entity, ByVal BattleFlipped As Boolean, Optional DrawBeforeEntities As Boolean = False)
|
Public Sub New(ByVal Entity As Entity, ByVal BattleFlipped As Boolean, Optional DrawBeforeEntities As Boolean = False)
|
||||||
MyBase.New(QueryTypes.MoveAnimation)
|
MyBase.New(QueryTypes.MoveAnimation)
|
||||||
Me.AnimationSequence = New List(Of BattleAnimation3D)
|
Me.AnimationSequence = New List(Of BattleAnimation3D)
|
||||||
Me.SpawnedEntities = New List(Of Entity)
|
Me.SpawnedEntities = New List(Of Entity)
|
||||||
Me.DrawBeforeEntities = DrawBeforeEntities
|
Me.DrawBeforeEntities = DrawBeforeEntities
|
||||||
Me.BattleFlipped = BattleFlipped
|
Me.BattleFlipped = BattleFlipped
|
||||||
If entity IsNot Nothing Then
|
Me.Backgrounds = New List(Of Entity)
|
||||||
Me.CurrentEntity = entity
|
Me.RenderObjects = New List(Of Entity)
|
||||||
Me.StartPosition = entity.Position
|
|
||||||
|
If Entity IsNot Nothing Then
|
||||||
|
Me.CurrentEntity = Entity
|
||||||
End If
|
End If
|
||||||
AnimationSequenceBegin()
|
AnimationSequenceBegin()
|
||||||
End Sub
|
End Sub
|
||||||
Public Overrides Sub Draw(ByVal BV2Screen As BattleScreen)
|
Public Overrides Sub Draw(ByVal BV2Screen As BattleScreen)
|
||||||
Dim Backgrounds As New List(Of Entity)
|
|
||||||
|
|
||||||
Dim RenderObjects As New List(Of Entity)
|
|
||||||
For Each a As BattleAnimation3D In Me.AnimationSequence
|
For Each a As BattleAnimation3D In Me.AnimationSequence
|
||||||
If a.AnimationType = BattleAnimation3D.AnimationTypes.Background Then
|
If Backgrounds.Contains(a) = False AndAlso a.AnimationType = BattleAnimation3D.AnimationTypes.Background Then
|
||||||
Backgrounds.Add(a)
|
Backgrounds.Add(a)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
For Each entity As BattleAnimation3D In Me.SpawnedEntities
|
For Each entity As BattleAnimation3D In Me.SpawnedEntities
|
||||||
RenderObjects.Add(entity)
|
If RenderObjects.Contains(entity) = False Then
|
||||||
|
RenderObjects.Add(entity)
|
||||||
|
End If
|
||||||
Next
|
Next
|
||||||
If RenderObjects.Count > 0 Then
|
If RenderObjects.Count > 0 Then
|
||||||
RenderObjects = (From r In RenderObjects Order By r.CameraDistance Descending).ToList()
|
RenderObjects = (From r In RenderObjects Order By r.CameraDistance Descending).ToList()
|
||||||
@ -54,6 +57,8 @@ Namespace BattleSystem
|
|||||||
[Object].UpdateModel()
|
[Object].UpdateModel()
|
||||||
[Object].Render()
|
[Object].Render()
|
||||||
Next
|
Next
|
||||||
|
RenderObjects.Clear()
|
||||||
|
Backgrounds.Clear()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Overrides Sub Update(BV2Screen As BattleScreen)
|
Public Overrides Sub Update(BV2Screen As BattleScreen)
|
||||||
@ -98,23 +103,32 @@ Namespace BattleSystem
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub AnimationSequenceEnd()
|
Public Sub AnimationSequenceEnd()
|
||||||
|
SpawnedEntities.Clear()
|
||||||
|
Backgrounds.Clear()
|
||||||
|
RenderObjects.Clear()
|
||||||
AnimationEnded = True
|
AnimationEnded = True
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Function SpawnEntity(ByVal Position As Vector3, ByVal Texture As Texture2D, ByVal Scale As Vector3, ByVal Opacity As Single, Optional ByVal startDelay As Single = 0.0F, Optional ByVal endDelay As Single = 0.0F, Optional ModelPath As String = "") As Entity
|
Public Function SpawnEntity(ByVal Position As Vector3, ByVal Texture As Texture2D, ByVal Scale As Vector3, ByVal Opacity As Single, Optional ByVal startDelay As Single = 0.0F, Optional ByVal endDelay As Single = 0.0F, Optional ModelPath As String = "") As Entity
|
||||||
Dim NewPosition As Vector3
|
Dim NewPosition As Vector3
|
||||||
If Not Position = Nothing Then
|
If Not Position = Nothing Then
|
||||||
If BattleFlipped = True Then
|
|
||||||
Position.X *= -1
|
|
||||||
End If
|
|
||||||
If CurrentEntity IsNot Nothing Then
|
If CurrentEntity IsNot Nothing Then
|
||||||
|
If BattleFlipped = True Then
|
||||||
|
Position.X *= -1
|
||||||
|
End If
|
||||||
NewPosition = CurrentEntity.Position + Position
|
NewPosition = CurrentEntity.Position + Position
|
||||||
|
If CurrentEntity.Model IsNot Nothing Then
|
||||||
|
NewPosition.Y += 0.5F
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
NewPosition = Position
|
NewPosition = Position
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If CurrentEntity IsNot Nothing Then
|
If CurrentEntity IsNot Nothing Then
|
||||||
NewPosition = CurrentEntity.Position
|
NewPosition = CurrentEntity.Position
|
||||||
|
If CurrentEntity.Model IsNot Nothing Then
|
||||||
|
NewPosition.Y += 0.5F
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
NewPosition = New Vector3(0, 0, 0)
|
NewPosition = New Vector3(0, 0, 0)
|
||||||
End If
|
End If
|
||||||
@ -184,12 +198,11 @@ Namespace BattleSystem
|
|||||||
Destination = CurrentEntity.Position + New Vector3(DestinationX, DestinationY, DestinationZ)
|
Destination = CurrentEntity.Position + New Vector3(DestinationX, DestinationY, DestinationZ)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim baEntityMove As BAEntityMove = New BAEntityMove(MoveEntity, RemoveEntityAfter, Destination, Speed, SpinX, SpinZ, startDelay, endDelay, SpinXSpeed, SpinZSpeed, MovementCurve, MoveYSpeed)
|
Dim baEntityMove As BAEntityMove = New BAEntityMove(MoveEntity, RemoveEntityAfter, Destination, Speed, SpinX, SpinZ, startDelay, endDelay, SpinXSpeed, SpinZSpeed, MovementCurve, MoveYSpeed)
|
||||||
AnimationSequence.Add(baEntityMove)
|
AnimationSequence.Add(baEntityMove)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub AnimationOscillateMove(ByRef Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal Distance As Vector3, ByVal Speed As Single, ByVal BothWays As Boolean, ByVal Duration As Single, ByVal startDelay As Single, ByVal endDelay As Single, Optional MovementCurve As Integer = 0, Optional ReturnToStart As Vector3 = Nothing)
|
Public Sub AnimationOscillateMove(ByVal Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal Distance As Vector3, ByVal Speed As Single, ByVal BothWays As Boolean, ByVal Duration As Single, ByVal startDelay As Single, ByVal endDelay As Single, Optional MovementCurve As Integer = 0, Optional ReturnToStart As Vector3 = Nothing)
|
||||||
Dim MoveEntity As Entity
|
Dim MoveEntity As Entity
|
||||||
Dim ReturnPosition As New Vector3(0)
|
Dim ReturnPosition As New Vector3(0)
|
||||||
|
|
||||||
@ -301,7 +314,7 @@ Namespace BattleSystem
|
|||||||
AnimationSequence.Add(BAEntityFaceRotate)
|
AnimationSequence.Add(BAEntityFaceRotate)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub AnimationScale(ByVal Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal Grow As Boolean, ByVal EndSizeX As Single, ByVal EndSizeY As Single, ByVal EndSizeZ As Single, ByVal SizeSpeed As Single, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal Anchors As String = "")
|
Public Sub AnimationScale(ByVal Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal Grow As Boolean, ByVal EndSizeX As Single, ByVal EndSizeY As Single, ByVal EndSizeZ As Single, ByVal SizeSpeed As Single, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal Anchors As String = "", Optional SpeedMultiplier As Vector3 = Nothing)
|
||||||
Dim ScaleEntity As Entity
|
Dim ScaleEntity As Entity
|
||||||
If Entity Is Nothing Then
|
If Entity Is Nothing Then
|
||||||
ScaleEntity = CurrentEntity
|
ScaleEntity = CurrentEntity
|
||||||
@ -317,7 +330,7 @@ Namespace BattleSystem
|
|||||||
|
|
||||||
Dim Scale As Vector3 = ScaleEntity.Scale
|
Dim Scale As Vector3 = ScaleEntity.Scale
|
||||||
Dim EndSize As Vector3 = New Vector3(EndSizeX, EndSizeY, EndSizeZ)
|
Dim EndSize As Vector3 = New Vector3(EndSizeX, EndSizeY, EndSizeZ)
|
||||||
Dim baEntityScale As BAEntityScale = New BAEntityScale(ScaleEntity, RemoveEntityAfter, Scale, Grow, EndSize, SizeSpeed, startDelay, endDelay, Anchors)
|
Dim baEntityScale As BAEntityScale = New BAEntityScale(ScaleEntity, RemoveEntityAfter, Scale, Grow, EndSize, SizeSpeed, startDelay, endDelay, Anchors, SpeedMultiplier)
|
||||||
AnimationSequence.Add(baEntityScale)
|
AnimationSequence.Add(baEntityScale)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
@ -60,11 +60,11 @@
|
|||||||
|
|
||||||
If GamePad.GetState(PlayerIndex.One).IsConnected = True And Core.GameOptions.GamePadEnabled = True And BV2Screen.IsCurrentScreen() = True Then
|
If GamePad.GetState(PlayerIndex.One).IsConnected = True And Core.GameOptions.GamePadEnabled = True And BV2Screen.IsCurrentScreen() = True Then
|
||||||
Dim d As New Dictionary(Of Buttons, String)
|
Dim d As New Dictionary(Of Buttons, String)
|
||||||
d.Add(Buttons.A, "OK")
|
d.Add(Buttons.A, Localization.GetString("global_ok", "OK"))
|
||||||
BV2Screen.DrawGamePadControls(d, New Vector2(rec.X + rec.Width - 100, rec.Y + rec.Height - 40))
|
BV2Screen.DrawGamePadControls(d, New Vector2(rec.X + rec.Width - 100, rec.Y + rec.Height - 40))
|
||||||
Else
|
Else
|
||||||
If TextReady = True Then
|
If TextReady = True Then
|
||||||
Core.SpriteBatch.DrawString(FontManager.InGameFont, "OK", New Vector2(rec.X + rec.Width - FontManager.InGameFont.MeasureString("OK").X - 20, rec.Y + rec.Height - FontManager.InGameFont.MeasureString("OK").Y - 5), Color.White)
|
Core.SpriteBatch.DrawString(FontManager.InGameFont, Localization.GetString("global_ok", "OK"), New Vector2(rec.X + rec.Width - FontManager.InGameFont.MeasureString(Localization.GetString("global_ok", "OK")).X - 20, rec.Y + rec.Height - FontManager.InGameFont.MeasureString(Localization.GetString("global_ok", "OK")).Y - 5), Color.White)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@ -95,14 +95,15 @@
|
|||||||
Core.SetScreen(selScreen)
|
Core.SetScreen(selScreen)
|
||||||
Else
|
Else
|
||||||
SoundManager.PlaySound("select")
|
SoundManager.PlaySound("select")
|
||||||
TempScreen.BattleQuery.Clear()
|
'TempScreen.BattleQuery.Clear()
|
||||||
FinishOppSwitch(TempScreen)
|
'FinishOppSwitchAnimation(TempScreen)
|
||||||
Dim cq1 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, True, 16)
|
'FinishOppSwitchEffects(TempScreen)
|
||||||
Dim cq2 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, False, 16)
|
'Dim cq1 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, True, 16)
|
||||||
cq2.PassThis = True
|
'Dim cq2 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, False, 16)
|
||||||
TempScreen.BattleQuery.AddRange({cq1, cq2})
|
'cq2.PassThis = True
|
||||||
|
'TempScreen.BattleQuery.AddRange({cq1, cq2})
|
||||||
TempScreen.HasSwitchedOwn = False
|
TempScreen.HasSwitchedOwn = False
|
||||||
TempScreen.Battle.StartRound(TempScreen)
|
'TempScreen.Battle.StartRound(TempScreen)
|
||||||
_ready = True
|
_ready = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@ -115,14 +116,15 @@
|
|||||||
Core.SetScreen(selScreen)
|
Core.SetScreen(selScreen)
|
||||||
Else
|
Else
|
||||||
SoundManager.PlaySound("select")
|
SoundManager.PlaySound("select")
|
||||||
TempScreen.BattleQuery.Clear()
|
'TempScreen.BattleQuery.Clear()
|
||||||
FinishOppSwitch(TempScreen)
|
'FinishOppSwitchAnimation(TempScreen)
|
||||||
Dim cq1 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, True, 16)
|
'FinishOppSwitchEffects(TempScreen)
|
||||||
Dim cq2 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, False, 16)
|
'Dim cq1 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, True, 16)
|
||||||
cq2.PassThis = True
|
'Dim cq2 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, False, 16)
|
||||||
TempScreen.BattleQuery.AddRange({cq1, cq2})
|
'cq2.PassThis = True
|
||||||
|
'TempScreen.BattleQuery.AddRange({cq1, cq2})
|
||||||
TempScreen.HasSwitchedOwn = False
|
TempScreen.HasSwitchedOwn = False
|
||||||
TempScreen.Battle.StartRound(TempScreen)
|
'TempScreen.Battle.StartRound(TempScreen)
|
||||||
_ready = True
|
_ready = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@ -137,28 +139,30 @@
|
|||||||
If New Rectangle(Core.windowSize.Width - 213, Core.windowSize.Height - 378, 80, 50).Contains(MouseHandler.MousePosition) Then
|
If New Rectangle(Core.windowSize.Width - 213, Core.windowSize.Height - 378, 80, 50).Contains(MouseHandler.MousePosition) Then
|
||||||
_chooseIndex = 1
|
_chooseIndex = 1
|
||||||
SoundManager.PlaySound("select")
|
SoundManager.PlaySound("select")
|
||||||
TempScreen.BattleQuery.Clear()
|
'TempScreen.BattleQuery.Clear()
|
||||||
FinishOppSwitch(TempScreen)
|
'FinishOppSwitchAnimation(TempScreen)
|
||||||
Dim cq1 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, True, 16)
|
'FinishOppSwitchEffects(TempScreen)
|
||||||
Dim cq2 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, False, 16)
|
'Dim cq1 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, True, 16)
|
||||||
cq2.PassThis = True
|
'Dim cq2 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, False, 16)
|
||||||
TempScreen.BattleQuery.AddRange({cq1, cq2})
|
'cq2.PassThis = True
|
||||||
|
'TempScreen.BattleQuery.AddRange({cq1, cq2})
|
||||||
TempScreen.HasSwitchedOwn = False
|
TempScreen.HasSwitchedOwn = False
|
||||||
TempScreen.Battle.StartRound(TempScreen)
|
'TempScreen.Battle.StartRound(TempScreen)
|
||||||
_ready = True
|
_ready = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If Controls.Dismiss(True, True, True) = True Then
|
If Controls.Dismiss(True, True, True) = True Then
|
||||||
SoundManager.PlaySound("select")
|
SoundManager.PlaySound("select")
|
||||||
TempScreen.BattleQuery.Clear()
|
'TempScreen.BattleQuery.Clear()
|
||||||
FinishOppSwitch(TempScreen)
|
'FinishOppSwitchAnimation(TempScreen)
|
||||||
Dim cq1 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, True, 16)
|
'FinishOppSwitchEffects(TempScreen)
|
||||||
Dim cq2 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, False, 16)
|
'Dim cq1 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, True, 16)
|
||||||
cq2.PassThis = True
|
'Dim cq2 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, False, 16)
|
||||||
TempScreen.BattleQuery.AddRange({cq1, cq2})
|
'cq2.PassThis = True
|
||||||
|
'TempScreen.BattleQuery.AddRange({cq1, cq2})
|
||||||
TempScreen.HasSwitchedOwn = False
|
TempScreen.HasSwitchedOwn = False
|
||||||
TempScreen.Battle.StartRound(TempScreen)
|
'TempScreen.Battle.StartRound(TempScreen)
|
||||||
_ready = True
|
_ready = True
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@ -204,9 +208,9 @@
|
|||||||
TempScreen.OppFaint = False
|
TempScreen.OppFaint = False
|
||||||
TempScreen.OwnStatistics.Switches += 1
|
TempScreen.OwnStatistics.Switches += 1
|
||||||
TempScreen.BattleQuery.Clear()
|
TempScreen.BattleQuery.Clear()
|
||||||
TempScreen.Battle.SwitchOutOwn(TempScreen, PokeIndex, TempScreen.BattleQuery.Count)
|
FinishOppSwitchAnimation(TempScreen)
|
||||||
TempScreen.BattleQuery.Reverse()
|
TempScreen.Battle.SwitchOutOwn(TempScreen, PokeIndex, -1)
|
||||||
FinishOppSwitch(TempScreen)
|
FinishOppSwitchEffects(TempScreen)
|
||||||
Dim cq1 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, True, 16)
|
Dim cq1 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, True, 16)
|
||||||
Dim cq2 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, False, 16)
|
Dim cq2 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, False, 16)
|
||||||
cq2.PassThis = True
|
cq2.PassThis = True
|
||||||
@ -215,9 +219,9 @@
|
|||||||
TempScreen.Battle.StartRound(TempScreen)
|
TempScreen.Battle.StartRound(TempScreen)
|
||||||
Else
|
Else
|
||||||
TempScreen.BattleQuery.Clear()
|
TempScreen.BattleQuery.Clear()
|
||||||
TempScreen.Battle.SwitchOutOwn(TempScreen, PokeIndex, TempScreen.BattleQuery.Count)
|
FinishOppSwitchAnimation(TempScreen)
|
||||||
TempScreen.BattleQuery.Reverse()
|
TempScreen.Battle.SwitchOutOwn(TempScreen, PokeIndex, -1)
|
||||||
FinishOppSwitch(TempScreen)
|
FinishOppSwitchEffects(TempScreen)
|
||||||
Dim cq1 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, True, 16)
|
Dim cq1 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, True, 16)
|
||||||
Dim cq2 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, False, 16)
|
Dim cq2 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, False, 16)
|
||||||
cq2.PassThis = True
|
cq2.PassThis = True
|
||||||
@ -248,7 +252,7 @@
|
|||||||
|
|
||||||
Dim delay As Single = 2.0F
|
Dim delay As Single = 2.0F
|
||||||
|
|
||||||
Public Sub FinishOppSwitch(BattleScreen As BattleScreen)
|
Public Sub FinishOppSwitchAnimation(BattleScreen As BattleScreen)
|
||||||
BattleScreen.OppPokemonNPC.Position.Y = 0 + BattleScreen.BattleMapOffset.Y
|
BattleScreen.OppPokemonNPC.Position.Y = 0 + BattleScreen.BattleMapOffset.Y
|
||||||
BattleScreen.Battle.ChangeCameraAngle(1, False, BattleScreen)
|
BattleScreen.Battle.ChangeCameraAngle(1, False, BattleScreen)
|
||||||
Dim oppModel As String = BattleScreen.GetModelName(False)
|
Dim oppModel As String = BattleScreen.GetModelName(False)
|
||||||
@ -301,6 +305,9 @@
|
|||||||
End If
|
End If
|
||||||
BattleScreen.BattleQuery.Add(BallThrow)
|
BattleScreen.BattleQuery.Add(BallThrow)
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
Public Sub FinishOppSwitchEffects(BattleScreen As BattleScreen)
|
||||||
With BattleScreen
|
With BattleScreen
|
||||||
Dim p As Pokemon = .OppPokemon
|
Dim p As Pokemon = .OppPokemon
|
||||||
Dim op As Pokemon = .OwnPokemon
|
Dim op As Pokemon = .OwnPokemon
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
Dim _ready As Boolean = False
|
Dim _ready As Boolean = False
|
||||||
|
|
||||||
Dim _textIndex As Integer = 0
|
Dim _textIndex As Integer = 0
|
||||||
Dim _textDelay As Single = 0.015F
|
Dim _textDelay As Single = 0.02F
|
||||||
|
|
||||||
Private ReadOnly Property TextReady() As Boolean
|
Private ReadOnly Property TextReady() As Boolean
|
||||||
Get
|
Get
|
||||||
@ -29,6 +29,7 @@
|
|||||||
Me._text = Me._text.Replace("~", " ")
|
Me._text = Me._text.Replace("~", " ")
|
||||||
Me._text = Me._text.Replace("<player.name>", Core.Player.Name)
|
Me._text = Me._text.Replace("<player.name>", Core.Player.Name)
|
||||||
Me._text = Me._text.Replace("<playername>", Core.Player.Name)
|
Me._text = Me._text.Replace("<playername>", Core.Player.Name)
|
||||||
|
Me._text = Me._text.Replace("<rival.name>", Core.Player.RivalName)
|
||||||
Me._text = Me._text.Replace("<rivalname>", Core.Player.RivalName)
|
Me._text = Me._text.Replace("<rivalname>", Core.Player.RivalName)
|
||||||
Me._text = Me._text.Replace("[POKE]", "Poké")
|
Me._text = Me._text.Replace("[POKE]", "Poké")
|
||||||
|
|
||||||
@ -49,9 +50,9 @@
|
|||||||
|
|
||||||
Public Overrides Sub Update(BV2Screen As BattleScreen)
|
Public Overrides Sub Update(BV2Screen As BattleScreen)
|
||||||
If Me.TextReady = False Then
|
If Me.TextReady = False Then
|
||||||
Me._textDelay -= 0.01F
|
Me._textDelay -= 0.1F
|
||||||
If Me._textDelay <= 0.0F Then
|
If Me._textDelay <= 0.0F Then
|
||||||
Me._textDelay = 0.015F
|
Me._textDelay = GetTextSpeed()
|
||||||
Me._textIndex += 1
|
Me._textIndex += 1
|
||||||
End If
|
End If
|
||||||
If Controls.Accept(True, True) = True And Me._textIndex > 2 Then
|
If Controls.Accept(True, True) = True And Me._textIndex > 2 Then
|
||||||
@ -66,7 +67,19 @@
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
Private Function GetTextSpeed() As Single
|
||||||
|
Select Case TextBox.TextSpeed
|
||||||
|
Case 1
|
||||||
|
Return 0.3F
|
||||||
|
Case 2
|
||||||
|
Return 0.2F
|
||||||
|
Case 3
|
||||||
|
Return 0.1F
|
||||||
|
Case 4
|
||||||
|
Return 0.0F
|
||||||
|
End Select
|
||||||
|
Return 0.2F
|
||||||
|
End Function
|
||||||
Public Overrides Sub Draw(BV2Screen As BattleScreen)
|
Public Overrides Sub Draw(BV2Screen As BattleScreen)
|
||||||
Dim rec As New Rectangle(100, Core.windowSize.Height - 250, Core.windowSize.Width - 200, 200)
|
Dim rec As New Rectangle(100, Core.windowSize.Height - 250, Core.windowSize.Width - 200, 200)
|
||||||
Dim text As String = Me._text.Substring(0, _textIndex)
|
Dim text As String = Me._text.Substring(0, _textIndex)
|
||||||
@ -79,11 +92,11 @@
|
|||||||
|
|
||||||
If GamePad.GetState(PlayerIndex.One).IsConnected = True And Core.GameOptions.GamePadEnabled = True And BV2Screen.IsCurrentScreen() = True Then
|
If GamePad.GetState(PlayerIndex.One).IsConnected = True And Core.GameOptions.GamePadEnabled = True And BV2Screen.IsCurrentScreen() = True Then
|
||||||
Dim d As New Dictionary(Of Buttons, String)
|
Dim d As New Dictionary(Of Buttons, String)
|
||||||
d.Add(Buttons.A, "OK")
|
d.Add(Buttons.A, Localization.GetString("global_ok", "OK"))
|
||||||
BV2Screen.DrawGamePadControls(d, New Vector2(rec.X + rec.Width - 100, rec.Y + rec.Height - 40))
|
BV2Screen.DrawGamePadControls(d, New Vector2(rec.X + rec.Width - 100, rec.Y + rec.Height - 40))
|
||||||
Else
|
Else
|
||||||
If TextReady = True Then
|
If TextReady = True Then
|
||||||
Core.SpriteBatch.DrawString(FontManager.TextFont, "OK", New Vector2(rec.X + rec.Width - (FontManager.TextFont.MeasureString("OK").X * 2.0F) - 20, rec.Y + rec.Height - (FontManager.TextFont.MeasureString("OK").Y * 2.0F) - 5), Color.White, 0.0F, Vector2.Zero, 2.0F, SpriteEffects.None, 0.0F)
|
Core.SpriteBatch.DrawString(FontManager.TextFont, Localization.GetString("global_ok", "OK"), New Vector2(rec.X + rec.Width - (FontManager.TextFont.MeasureString(Localization.GetString("global_ok", "OK")).X * 2.0F) - 20, rec.Y + rec.Height - (FontManager.TextFont.MeasureString(Localization.GetString("global_ok", "OK")).Y * 2.0F) - 5), Color.White, 0.0F, Vector2.Zero, 2.0F, SpriteEffects.None, 0.0F)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
@ -112,11 +112,13 @@
|
|||||||
Case 2
|
Case 2
|
||||||
Select Case Me._entity
|
Select Case Me._entity
|
||||||
Case BattleEntities.OwnPokemon
|
Case BattleEntities.OwnPokemon
|
||||||
BV2Screen.OwnPokemonNPC.Scale = New Vector3(BV2Screen.OwnPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE
|
BV2Screen.OwnPokemonNPC.Scale = New Vector3(BV2Screen.OwnPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE * GameModeManager.PokeModelScale
|
||||||
|
BV2Screen.OwnPokemonNPC.Rotation = NPC.GetRotationFromInteger(BV2Screen.OwnPokemonNPC.faceRotation) + GameModeManager.PokeModelRotation
|
||||||
BV2Screen.OwnPokemonNPC.ModelPath = _newTexture
|
BV2Screen.OwnPokemonNPC.ModelPath = _newTexture
|
||||||
BV2Screen.OwnPokemonNPC.Model = ModelManager.GetModel(BV2Screen.OwnPokemonNPC.ModelPath)
|
BV2Screen.OwnPokemonNPC.Model = ModelManager.GetModel(BV2Screen.OwnPokemonNPC.ModelPath)
|
||||||
Case BattleEntities.OppPokemon
|
Case BattleEntities.OppPokemon
|
||||||
BV2Screen.OppPokemonNPC.Scale = New Vector3(BV2Screen.OppPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE
|
BV2Screen.OppPokemonNPC.Scale = New Vector3(BV2Screen.OppPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE * GameModeManager.PokeModelScale
|
||||||
|
BV2Screen.OppPokemonNPC.Rotation = NPC.GetRotationFromInteger(BV2Screen.OppPokemonNPC.faceRotation) + GameModeManager.PokeModelRotation
|
||||||
BV2Screen.OppPokemonNPC.ModelPath = _newTexture
|
BV2Screen.OppPokemonNPC.ModelPath = _newTexture
|
||||||
BV2Screen.OppPokemonNPC.Model = ModelManager.GetModel(BV2Screen.OppPokemonNPC.ModelPath)
|
BV2Screen.OppPokemonNPC.Model = ModelManager.GetModel(BV2Screen.OppPokemonNPC.ModelPath)
|
||||||
End Select
|
End Select
|
||||||
|
@ -5,15 +5,15 @@ Namespace BattleSystem
|
|||||||
Public Class TrainerAI
|
Public Class TrainerAI
|
||||||
|
|
||||||
'Trainer AI Levels:---------------------------------------------------------------------------------------------------------------------
|
'Trainer AI Levels:---------------------------------------------------------------------------------------------------------------------
|
||||||
'Normal Trainers: 0-20 (0 being not very smart trainers like Bugcatchers, 20 being Cooltrainers, get higher levels when rematches occur)
|
'Normal Trainers: 0-1 (0 being not very smart trainers like Bugcatchers, 1 being Cooltrainers, get higher levels when rematches occur)
|
||||||
'(Johto) Gym Leaders: 10-40 (10 for Falkner, 40 for Clair)
|
'(Johto) Gym Leaders: 0-2 (0 for Falkner, 2 for Clair)
|
||||||
'(Kanto) Gym Leaders: All 60
|
'(Kanto) Gym Leaders: All 2
|
||||||
'Elite 4: 60
|
'Elite 4: 2
|
||||||
'Lance: 100
|
'Lance: 2
|
||||||
'Elder Li: 10
|
'Elder Li: 0
|
||||||
'Rival: 40
|
'Rival: 2
|
||||||
'Team Rocket Grunts: 5
|
'Team Rocket Grunts: 0
|
||||||
'Team Rocket Admins: 20
|
'Team Rocket Admins: 1
|
||||||
|
|
||||||
Public Shared Function GetAIMove(ByVal BattleScreen As BattleScreen, ByVal OwnStep As Battle.RoundConst) As Battle.RoundConst
|
Public Shared Function GetAIMove(ByVal BattleScreen As BattleScreen, ByVal OwnStep As Battle.RoundConst) As Battle.RoundConst
|
||||||
Dim p As Pokemon = BattleScreen.OppPokemon
|
Dim p As Pokemon = BattleScreen.OppPokemon
|
||||||
@ -123,8 +123,8 @@ Namespace BattleSystem
|
|||||||
|
|
||||||
'-------------------------------------Random move depending on difficulty---------------------------------------------------------'
|
'-------------------------------------Random move depending on difficulty---------------------------------------------------------'
|
||||||
|
|
||||||
'Only applies if trainer has an AI level below 20:
|
'Only applies if trainer has an AI level of 0:
|
||||||
If BattleScreen.Trainer.AILevel < 20 Then
|
If BattleScreen.Trainer.AILevel <= 0 Then
|
||||||
Dim AvailableAttacks As List(Of Integer) = New List(Of Integer)
|
Dim AvailableAttacks As List(Of Integer) = New List(Of Integer)
|
||||||
For i = 0 To m.Count - 1
|
For i = 0 To m.Count - 1
|
||||||
AvailableAttacks.Add(i)
|
AvailableAttacks.Add(i)
|
||||||
@ -143,150 +143,143 @@ Namespace BattleSystem
|
|||||||
Ready = True
|
Ready = True
|
||||||
End If
|
End If
|
||||||
End While
|
End While
|
||||||
If Core.Player.DifficultyMode = 0 Then
|
'Chance of 35% that the trainer is using a random move:
|
||||||
'Chance of 35% that the trainer is using a random move:
|
If Core.Random.Next(0, 100) < 35 Then
|
||||||
If Core.Random.Next(0, 100) < 35 Then
|
Return ProduceOppStep(m, OppAttackChoice)
|
||||||
Return ProduceOppStep(m, OppAttackChoice)
|
|
||||||
End If
|
|
||||||
ElseIf Core.Player.DifficultyMode = 1 Then
|
|
||||||
'Chance of 18% that the trainer is using a random move:
|
|
||||||
If Core.Random.Next(0, 100) < 18 Then
|
|
||||||
Return ProduceOppStep(m, OppAttackChoice)
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'-------------------------------------Switching-----------------------------------------------------------------------------------'
|
'-------------------------------------Switching-----------------------------------------------------------------------------------'
|
||||||
|
|
||||||
'Only applies if trainer has an AI level above or equal 40:
|
'Only applies if trainer has an AI level above or equal to 2:
|
||||||
'If BattleScreen.Trainer.AILevel >= 40 Then
|
If BattleScreen.Trainer.AILevel >= 2 Then
|
||||||
' If BattleCalculation.CanSwitch(BattleScreen, False) = True Then
|
If BattleCalculation.CanSwitch(BattleScreen, False) = True Then
|
||||||
' If BattleScreen.Trainer.Pokemons.Count > 0 Then
|
If BattleScreen.Trainer.Pokemons.Count > 0 Then
|
||||||
' Dim living As Integer = 0
|
Dim living As Integer = 0
|
||||||
' For Each cP As Pokemon In BattleScreen.Trainer.Pokemons
|
For Each cP As Pokemon In BattleScreen.Trainer.Pokemons
|
||||||
' If cP.HP > 0 And cP.Status <> Pokemon.StatusProblems.Fainted Then
|
If cP.HP > 0 And cP.Status <> Pokemon.StatusProblems.Fainted Then
|
||||||
' living += 1
|
living += 1
|
||||||
' End If
|
End If
|
||||||
' Next
|
Next
|
||||||
' If living > 1 Then
|
If living > 1 Then
|
||||||
' 'check for opponent moves: if super effective: 1.5x: 25%, 2x: 50%, 4x: 75%: check for pokemon in party that reacts to every move with less the detected effectiveness
|
'check for opponent moves: if super effective: 1.5x: 25%, 2x: 50%, 4x: 75%: check for pokemon in party that reacts to every move with less the detected effectiveness
|
||||||
' Dim maxOpponentEff As Single = 0.0F
|
Dim maxOpponentEff As Single = 0.0F
|
||||||
' For Each Attack As BattleSystem.Attack In op.Attacks
|
For Each Attack As BattleSystem.Attack In op.Attacks
|
||||||
' Dim effectiveness As Single = BattleCalculation.CalculateEffectiveness(Attack.GetAttackByID(Attack.ID), BattleScreen, op, p, True)
|
Dim effectiveness As Single = BattleCalculation.CalculateEffectiveness(Attack.GetAttackByID(Attack.ID), BattleScreen, op, p, True)
|
||||||
' If effectiveness > maxOpponentEff Then
|
If effectiveness > maxOpponentEff Then
|
||||||
' maxOpponentEff = effectiveness
|
maxOpponentEff = effectiveness
|
||||||
' End If
|
End If
|
||||||
' Next
|
Next
|
||||||
' If maxOpponentEff > 1.0F Then
|
If maxOpponentEff > 1.0F Then
|
||||||
' Dim chance As Integer = 0
|
Dim chance As Integer = 0
|
||||||
|
|
||||||
' Select Case maxOpponentEff
|
Select Case maxOpponentEff
|
||||||
' Case 1.25F
|
Case 1.25F
|
||||||
' chance = 10
|
chance = 10
|
||||||
' Case 1.5F
|
Case 1.5F
|
||||||
' chance = 25
|
chance = 25
|
||||||
' Case 2.0F
|
Case 2.0F
|
||||||
' chance = 35
|
chance = 35
|
||||||
' Case 4.0F
|
Case 4.0F
|
||||||
' chance = 50
|
chance = 50
|
||||||
' End Select
|
End Select
|
||||||
|
|
||||||
' If RPercent(chance) = True Then
|
If RPercent(chance) = True Then
|
||||||
' Dim lessTeamPs As New List(Of Integer)
|
Dim lessTeamPs As New List(Of Integer)
|
||||||
|
|
||||||
' For i = 0 To BattleScreen.Trainer.Pokemons.Count - 1
|
For i = 0 To BattleScreen.Trainer.Pokemons.Count - 1
|
||||||
' If i <> BattleScreen.OppPokemonIndex Then
|
If i <> BattleScreen.OppPokemonIndex Then
|
||||||
' Dim TeamP As Pokemon = BattleScreen.Trainer.Pokemons(i)
|
Dim TeamP As Pokemon = BattleScreen.Trainer.Pokemons(i)
|
||||||
' If TeamP.HP > 0 And TeamP.Status <> Pokemon.StatusProblems.Fainted Then
|
If TeamP.HP > 0 And TeamP.Status <> Pokemon.StatusProblems.Fainted Then
|
||||||
' Dim alwaysLess As Boolean = True
|
Dim alwaysLess As Boolean = True
|
||||||
' For Each Attack As BattleSystem.Attack In op.Attacks
|
For Each Attack As BattleSystem.Attack In op.Attacks
|
||||||
' Dim effectiveness As Single = BattleCalculation.CalculateEffectiveness(Attack.GetAttackByID(Attack.ID), BattleScreen, op, TeamP, True)
|
Dim effectiveness As Single = BattleCalculation.CalculateEffectiveness(Attack.GetAttackByID(Attack.ID), BattleScreen, op, TeamP, True)
|
||||||
|
|
||||||
' If effectiveness >= maxOpponentEff Then
|
If effectiveness >= maxOpponentEff Then
|
||||||
' alwaysLess = False
|
alwaysLess = False
|
||||||
' Exit For
|
Exit For
|
||||||
' End If
|
End If
|
||||||
' Next
|
Next
|
||||||
' If alwaysLess = True Then
|
If alwaysLess = True Then
|
||||||
' lessTeamPs.Add(i)
|
lessTeamPs.Add(i)
|
||||||
' End If
|
End If
|
||||||
' End If
|
End If
|
||||||
' End If
|
End If
|
||||||
' Next
|
Next
|
||||||
|
|
||||||
' If lessTeamPs.Count > 0 Then
|
If lessTeamPs.Count > 0 Then
|
||||||
' Return ProduceOppStep(lessTeamPs(Core.Random.Next(0, lessTeamPs.Count)))
|
Return ProduceOppStep(lessTeamPs(Core.Random.Next(0, lessTeamPs.Count)))
|
||||||
' End If
|
End If
|
||||||
' End If
|
End If
|
||||||
' End If
|
End If
|
||||||
|
|
||||||
' 'check for own moves: if only 0x: check for other pokemon in party (best fitting) and switch in
|
'check for own moves: if only 0x: check for other pokemon in party (best fitting) and switch in
|
||||||
' Dim only0 As Boolean = True
|
Dim only0 As Boolean = True
|
||||||
' For Each Attack As BattleSystem.Attack In p.Attacks
|
For Each Attack As BattleSystem.Attack In p.Attacks
|
||||||
' Dim effectiveness As Single = BattleCalculation.CalculateEffectiveness(Attack.GetAttackByID(Attack.ID), BattleScreen, p, op, False)
|
Dim effectiveness As Single = BattleCalculation.CalculateEffectiveness(Attack.GetAttackByID(Attack.ID), BattleScreen, p, op, False)
|
||||||
' If effectiveness <> 0.0F Then
|
If effectiveness <> 0.0F Then
|
||||||
' only0 = False
|
only0 = False
|
||||||
' Exit For
|
Exit For
|
||||||
' End If
|
End If
|
||||||
' Next
|
Next
|
||||||
' If only0 = True Then
|
If only0 = True Then
|
||||||
' Dim switchList As New List(Of Integer)
|
Dim switchList As New List(Of Integer)
|
||||||
' For i = 0 To BattleScreen.Trainer.Pokemons.Count - 1
|
For i = 0 To BattleScreen.Trainer.Pokemons.Count - 1
|
||||||
' If i <> BattleScreen.OppPokemonIndex Then
|
If i <> BattleScreen.OppPokemonIndex Then
|
||||||
' Dim TeamP As Pokemon = BattleScreen.Trainer.Pokemons(i)
|
Dim TeamP As Pokemon = BattleScreen.Trainer.Pokemons(i)
|
||||||
' If TeamP.HP > 0 And TeamP.Status <> Pokemon.StatusProblems.Fainted Then
|
If TeamP.HP > 0 And TeamP.Status <> Pokemon.StatusProblems.Fainted Then
|
||||||
' switchList.Add(i)
|
switchList.Add(i)
|
||||||
' End If
|
End If
|
||||||
' End If
|
End If
|
||||||
' Next
|
Next
|
||||||
' If switchList.Count > 0 Then
|
If switchList.Count > 0 Then
|
||||||
' Return ProduceOppStep(switchList(Core.Random.Next(0, switchList.Count)))
|
Return ProduceOppStep(switchList(Core.Random.Next(0, switchList.Count)))
|
||||||
' End If
|
End If
|
||||||
' End If
|
End If
|
||||||
|
|
||||||
' 'own pokemon got cursed: 75%
|
'own pokemon got cursed: 75%
|
||||||
' If BattleScreen.FieldEffects.OppCurse > 0 Then
|
If BattleScreen.FieldEffects.OppCurse > 0 Then
|
||||||
' If RPercent(75) = True Then
|
If RPercent(75) = True Then
|
||||||
' Dim newSwitchIndex As Integer = 0
|
Dim newSwitchIndex As Integer = 0
|
||||||
' Dim canSwitchTo As New List(Of Integer)
|
Dim canSwitchTo As New List(Of Integer)
|
||||||
' For i = 0 To BattleScreen.Trainer.Pokemons.Count - 1
|
For i = 0 To BattleScreen.Trainer.Pokemons.Count - 1
|
||||||
' Dim TeamP As Pokemon = BattleScreen.Trainer.Pokemons(i)
|
Dim TeamP As Pokemon = BattleScreen.Trainer.Pokemons(i)
|
||||||
' If TeamP.HP > 0 And TeamP.Status <> Pokemon.StatusProblems.Fainted And i <> BattleScreen.OppPokemonIndex Then
|
If TeamP.HP > 0 And TeamP.Status <> Pokemon.StatusProblems.Fainted And i <> BattleScreen.OppPokemonIndex Then
|
||||||
' canSwitchTo.Add(i)
|
canSwitchTo.Add(i)
|
||||||
' End If
|
End If
|
||||||
' Next
|
Next
|
||||||
|
|
||||||
' If canSwitchTo.Count > 0 Then
|
If canSwitchTo.Count > 0 Then
|
||||||
' newSwitchIndex = canSwitchTo(Core.Random.Next(0, canSwitchTo.Count))
|
newSwitchIndex = canSwitchTo(Core.Random.Next(0, canSwitchTo.Count))
|
||||||
|
|
||||||
' Return ProduceOppStep(newSwitchIndex)
|
Return ProduceOppStep(newSwitchIndex)
|
||||||
' End If
|
End If
|
||||||
' End If
|
End If
|
||||||
' End If
|
End If
|
||||||
|
|
||||||
' 'own pokemon got confused: 50%
|
'own pokemon got confused: 50%
|
||||||
' If p.HasVolatileStatus(Pokemon.VolatileStatus.Confusion) = True Then
|
If p.HasVolatileStatus(Pokemon.VolatileStatus.Confusion) = True Then
|
||||||
' If RPercent(50) = True Then
|
If RPercent(50) = True Then
|
||||||
' Dim newSwitchIndex As Integer = 0
|
Dim newSwitchIndex As Integer = 0
|
||||||
' Dim canSwitchTo As New List(Of Integer)
|
Dim canSwitchTo As New List(Of Integer)
|
||||||
' For i = 0 To BattleScreen.Trainer.Pokemons.Count - 1
|
For i = 0 To BattleScreen.Trainer.Pokemons.Count - 1
|
||||||
' Dim TeamP As Pokemon = BattleScreen.Trainer.Pokemons(i)
|
Dim TeamP As Pokemon = BattleScreen.Trainer.Pokemons(i)
|
||||||
' If TeamP.HP > 0 And TeamP.Status <> Pokemon.StatusProblems.Fainted And i <> BattleScreen.OppPokemonIndex Then
|
If TeamP.HP > 0 And TeamP.Status <> Pokemon.StatusProblems.Fainted And i <> BattleScreen.OppPokemonIndex Then
|
||||||
' canSwitchTo.Add(i)
|
canSwitchTo.Add(i)
|
||||||
' End If
|
End If
|
||||||
' Next
|
Next
|
||||||
|
|
||||||
' If canSwitchTo.Count > 0 Then
|
If canSwitchTo.Count > 0 Then
|
||||||
' newSwitchIndex = canSwitchTo(Core.Random.Next(0, canSwitchTo.Count))
|
newSwitchIndex = canSwitchTo(Core.Random.Next(0, canSwitchTo.Count))
|
||||||
|
|
||||||
' Return ProduceOppStep(newSwitchIndex)
|
Return ProduceOppStep(newSwitchIndex)
|
||||||
' End If
|
End If
|
||||||
' End If
|
End If
|
||||||
' End If
|
End If
|
||||||
' End If
|
End If
|
||||||
' End If
|
End If
|
||||||
' End If
|
End If
|
||||||
'End If
|
End If
|
||||||
|
|
||||||
'-------------------------------------Items---------------------------------------------------------------------------------------'
|
'-------------------------------------Items---------------------------------------------------------------------------------------'
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ Public Class Trainer
|
|||||||
|
|
||||||
Public VSImageOrigin As String = "VSIntro"
|
Public VSImageOrigin As String = "VSIntro"
|
||||||
Public VSImagePosition As Vector2 = New Vector2(0, 0)
|
Public VSImagePosition As Vector2 = New Vector2(0, 0)
|
||||||
Public VSImageSize As Size = New Size(61, 54)
|
Public VSImageSize As Size = New Size(64, 64)
|
||||||
Public BarImagePosition As Vector2 = New Vector2(0, 0)
|
Public BarImagePosition As Vector2 = New Vector2(0, 0)
|
||||||
|
|
||||||
Public OutroMessage As String = "TRAINER_DEFAULT_MESSAGE"
|
Public OutroMessage As String = "TRAINER_DEFAULT_MESSAGE"
|
||||||
@ -212,23 +212,30 @@ Public Class Trainer
|
|||||||
If PokeData.StartsWith("{") = True And PokeData.EndsWith("}") = True Then
|
If PokeData.StartsWith("{") = True And PokeData.EndsWith("}") = True Then
|
||||||
Dim p As Pokemon = Pokemon.GetPokemonByData(PokeData)
|
Dim p As Pokemon = Pokemon.GetPokemonByData(PokeData)
|
||||||
|
|
||||||
If Core.Player.DifficultyMode > 0 Then
|
Dim level As Integer = p.Level
|
||||||
Dim level As Integer = p.Level
|
|
||||||
|
|
||||||
Dim addLevel As Integer = 0
|
Dim addLevel As Integer = 0
|
||||||
If Core.Player.DifficultyMode = 1 Then
|
If Core.Player.DifficultyMode = 0 Then
|
||||||
addLevel = CInt(Math.Ceiling(level / 10))
|
addLevel = CInt(Math.Ceiling(level * CSng(GameModeManager.GetGameRuleValue("LevelMultiplier", "1.0").InsertDecSeparator) - level))
|
||||||
ElseIf Core.Player.DifficultyMode = 2 Then
|
ElseIf Core.Player.DifficultyMode = 1 Then
|
||||||
addLevel = CInt(Math.Ceiling(level / 5))
|
addLevel = CInt(Math.Ceiling(level * CSng(GameModeManager.GetGameRuleValue("LevelMultiplier", "1.1").InsertDecSeparator) - level))
|
||||||
End If
|
ElseIf Core.Player.DifficultyMode = 2 Then
|
||||||
|
addLevel = CInt(Math.Ceiling(level * CSng(GameModeManager.GetGameRuleValue("LevelMultiplier", "1.2").InsertDecSeparator) - level))
|
||||||
While level + addLevel > p.Level
|
|
||||||
p.LevelUp(False)
|
|
||||||
p.Experience = p.NeedExperience(p.Level)
|
|
||||||
End While
|
|
||||||
p.HP = p.MaxHP
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If level + addLevel > CInt(GameModeManager.GetGameRuleValue("MaxLevel", "100")) Then
|
||||||
|
addLevel = CInt(GameModeManager.GetGameRuleValue("MaxLevel", "100")) - level
|
||||||
|
End If
|
||||||
|
If addLevel <= 0 Then
|
||||||
|
addLevel = 0
|
||||||
|
End If
|
||||||
|
|
||||||
|
While level + addLevel > p.Level
|
||||||
|
p.LevelUp(False)
|
||||||
|
p.Experience = p.NeedExperience(p.Level)
|
||||||
|
End While
|
||||||
|
p.HP = p.MaxHP
|
||||||
|
|
||||||
Pokemons.Add(p)
|
Pokemons.Add(p)
|
||||||
Else
|
Else
|
||||||
Dim firstPart As String = ""
|
Dim firstPart As String = ""
|
||||||
@ -271,11 +278,20 @@ Public Class Trainer
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim addLevel As Integer = 0
|
Dim addLevel As Integer = 0
|
||||||
If Core.Player.DifficultyMode = 1 Then
|
If Core.Player.DifficultyMode = 0 Then
|
||||||
addLevel = CInt(Math.Ceiling(Level / 10))
|
addLevel = CInt(Math.Ceiling(Level * CSng(GameModeManager.GetGameRuleValue("LevelMultiplier", "1.0").InsertDecSeparator) - Level))
|
||||||
|
ElseIf Core.Player.DifficultyMode = 1 Then
|
||||||
|
addLevel = CInt(Math.Ceiling(Level * CSng(GameModeManager.GetGameRuleValue("LevelMultiplier", "1.1").InsertDecSeparator) - Level))
|
||||||
ElseIf Core.Player.DifficultyMode = 2 Then
|
ElseIf Core.Player.DifficultyMode = 2 Then
|
||||||
addLevel = CInt(Math.Ceiling(Level / 5))
|
addLevel = CInt(Math.Ceiling(Level * CSng(GameModeManager.GetGameRuleValue("LevelMultiplier", "1.2").InsertDecSeparator) - Level))
|
||||||
End If
|
End If
|
||||||
|
If Level + addLevel > CInt(GameModeManager.GetGameRuleValue("MaxLevel", "100")) Then
|
||||||
|
addLevel = CInt(GameModeManager.GetGameRuleValue("MaxLevel", "100")) - Level
|
||||||
|
End If
|
||||||
|
If addLevel <= 0 Then
|
||||||
|
addLevel = 0
|
||||||
|
End If
|
||||||
|
|
||||||
Level += addLevel
|
Level += addLevel
|
||||||
|
|
||||||
Dim maxLevel As Integer = CInt(GameModeManager.GetGameRuleValue("MaxLevel", "100"))
|
Dim maxLevel As Integer = CInt(GameModeManager.GetGameRuleValue("MaxLevel", "100"))
|
||||||
@ -332,25 +348,25 @@ Public Class Trainer
|
|||||||
Me.VSImagePosition = New Vector2(0, 0)
|
Me.VSImagePosition = New Vector2(0, 0)
|
||||||
Case "orange", "1"
|
Case "orange", "1"
|
||||||
Me.VSImagePosition = New Vector2(1, 0)
|
Me.VSImagePosition = New Vector2(1, 0)
|
||||||
Case "green", "2"
|
Case "lightgreen", "2"
|
||||||
Me.VSImagePosition = New Vector2(0, 1)
|
Me.VSImagePosition = New Vector2(0, 1)
|
||||||
Case "3"
|
Case "gray", "3"
|
||||||
Me.VSImagePosition = New Vector2(1, 1)
|
Me.VSImagePosition = New Vector2(1, 1)
|
||||||
Case "4"
|
Case "violet", "4"
|
||||||
Me.VSImagePosition = New Vector2(0, 2)
|
Me.VSImagePosition = New Vector2(0, 2)
|
||||||
Case "5"
|
Case "green", "5"
|
||||||
Me.VSImagePosition = New Vector2(1, 2)
|
Me.VSImagePosition = New Vector2(1, 2)
|
||||||
Case "6"
|
Case "yellow", "6"
|
||||||
Me.VSImagePosition = New Vector2(0, 3)
|
Me.VSImagePosition = New Vector2(0, 3)
|
||||||
Case "7"
|
Case "brown", "7"
|
||||||
Me.VSImagePosition = New Vector2(1, 3)
|
Me.VSImagePosition = New Vector2(1, 3)
|
||||||
Case "8"
|
Case "lightblue", "8"
|
||||||
Me.VSImagePosition = New Vector2(0, 4)
|
Me.VSImagePosition = New Vector2(0, 4)
|
||||||
Case "9"
|
Case "lightgray", "9"
|
||||||
Me.VSImagePosition = New Vector2(1, 4)
|
Me.VSImagePosition = New Vector2(1, 4)
|
||||||
Case "red", "10"
|
Case "red", "10"
|
||||||
Me.VSImagePosition = New Vector2(0, 5)
|
Me.VSImagePosition = New Vector2(0, 5)
|
||||||
Case "11"
|
Case "empty", "11"
|
||||||
Me.VSImagePosition = New Vector2(1, 5)
|
Me.VSImagePosition = New Vector2(1, 5)
|
||||||
Case "battlefrontier"
|
Case "battlefrontier"
|
||||||
Me.VSImagePosition = New Vector2(0, 0)
|
Me.VSImagePosition = New Vector2(0, 0)
|
||||||
@ -392,7 +408,7 @@ Public Class Trainer
|
|||||||
Me.BarImagePosition = New Vector2(1, 4)
|
Me.BarImagePosition = New Vector2(1, 4)
|
||||||
Case "red", "10"
|
Case "red", "10"
|
||||||
Me.BarImagePosition = New Vector2(0, 5)
|
Me.BarImagePosition = New Vector2(0, 5)
|
||||||
Case "11"
|
Case "empty", "11"
|
||||||
Me.BarImagePosition = New Vector2(1, 5)
|
Me.BarImagePosition = New Vector2(1, 5)
|
||||||
Case Else
|
Case Else
|
||||||
If StringHelper.IsNumeric(barType) = True Then
|
If StringHelper.IsNumeric(barType) = True Then
|
||||||
|
Binary file not shown.
BIN
P3D/Content/Data/Scripts/alph/AlphHouse_MapScript.dat
Normal file
BIN
P3D/Content/Data/Scripts/alph/AlphHouse_MapScript.dat
Normal file
Binary file not shown.
BIN
P3D/Content/Data/Scripts/alph/AlphHouse_UnownDexScientist.dat
Normal file
BIN
P3D/Content/Data/Scripts/alph/AlphHouse_UnownDexScientist.dat
Normal file
Binary file not shown.
BIN
P3D/Content/Data/Scripts/alph/RuinsOfAlph_MapScript.dat
Normal file
BIN
P3D/Content/Data/Scripts/alph/RuinsOfAlph_MapScript.dat
Normal file
Binary file not shown.
BIN
P3D/Content/Data/Scripts/alph/RuinsOfAlph_UnownDexScientist.dat
Normal file
BIN
P3D/Content/Data/Scripts/alph/RuinsOfAlph_UnownDexScientist.dat
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
P3D/Content/Data/Scripts/celadon/main_map.dat
Normal file
BIN
P3D/Content/Data/Scripts/celadon/main_map.dat
Normal file
Binary file not shown.
BIN
P3D/Content/Data/Scripts/celadon/rgc/rgc_map.dat
Normal file
BIN
P3D/Content/Data/Scripts/celadon/rgc/rgc_map.dat
Normal file
Binary file not shown.
BIN
P3D/Content/Data/Scripts/celadon/rgc/rocketposter.dat
Normal file
BIN
P3D/Content/Data/Scripts/celadon/rgc/rocketposter.dat
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
P3D/Content/Data/Scripts/eusine/enteibattle.dat
Normal file
BIN
P3D/Content/Data/Scripts/eusine/enteibattle.dat
Normal file
Binary file not shown.
BIN
P3D/Content/Data/Scripts/eusine/raikoubattle.dat
Normal file
BIN
P3D/Content/Data/Scripts/eusine/raikoubattle.dat
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
P3D/Content/Data/Scripts/frontier/battlepike/challenge/lost.dat
Normal file
BIN
P3D/Content/Data/Scripts/frontier/battlepike/challenge/lost.dat
Normal file
Binary file not shown.
@ -0,0 +1,7 @@
|
|||||||
|
version=2
|
||||||
|
:if:<register.value(pike_room_count_temp)>=28
|
||||||
|
@text.show(...That's all there is... Disappear already...)
|
||||||
|
:else
|
||||||
|
@text.show(...You, I won't forget...~...Ever...)
|
||||||
|
:endif
|
||||||
|
:end
|
BIN
P3D/Content/Data/Scripts/frontier/battlepike/challenge/main.dat
Normal file
BIN
P3D/Content/Data/Scripts/frontier/battlepike/challenge/main.dat
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
P3D/Content/Data/Scripts/frontier/battlepike/challenge/won.dat
Normal file
BIN
P3D/Content/Data/Scripts/frontier/battlepike/challenge/won.dat
Normal file
Binary file not shown.
BIN
P3D/Content/Data/Scripts/frontier/battlepike/chatter.dat
Normal file
BIN
P3D/Content/Data/Scripts/frontier/battlepike/chatter.dat
Normal file
Binary file not shown.
BIN
P3D/Content/Data/Scripts/frontier/battlepike/endless/checkin.dat
Normal file
BIN
P3D/Content/Data/Scripts/frontier/battlepike/endless/checkin.dat
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
P3D/Content/Data/Scripts/frontier/battlepike/endless/lost.dat
Normal file
BIN
P3D/Content/Data/Scripts/frontier/battlepike/endless/lost.dat
Normal file
Binary file not shown.
BIN
P3D/Content/Data/Scripts/frontier/battlepike/endless/main.dat
Normal file
BIN
P3D/Content/Data/Scripts/frontier/battlepike/endless/main.dat
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
32
P3D/Content/Data/Scripts/frontier/battlepike/hint.dat
Normal file
32
P3D/Content/Data/Scripts/frontier/battlepike/hint.dat
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
version=2
|
||||||
|
:if:<register.registered(pikelucynext)>=true
|
||||||
|
@text.show(From every path I sense a dreadful presence...)
|
||||||
|
:end
|
||||||
|
:endif
|
||||||
|
|
||||||
|
I beg your pardon, but...~Are you perhaps finding it difficult to choose your path?
|
||||||
|
@options.show(Yes,No)
|
||||||
|
:when:No
|
||||||
|
@text.show(I See...~I apologize for my~impertinence...)
|
||||||
|
:end
|
||||||
|
:when:Yes
|
||||||
|
:select:<register.value(pikehintspot)>
|
||||||
|
:when:0
|
||||||
|
@text.show(Ah, let me see...*There is something about~the path on the left...)
|
||||||
|
:when:1
|
||||||
|
@text.show(Ah, let me see...*There is something about~the path in the center...)
|
||||||
|
:when:2
|
||||||
|
@text.show(Ah, let me see...*There is something about~the path on the right...)
|
||||||
|
:endwhen
|
||||||
|
:select:<register.value(pikehint)>
|
||||||
|
:when:0
|
||||||
|
@text.show(For some odd reason,~I felt a wave of nostalgia~coming from it...)
|
||||||
|
:when:1
|
||||||
|
@text.show(Is it...~A Trainer?*I sense the presence~of people...)
|
||||||
|
:when:2
|
||||||
|
@text.show(It seems to have the distinct~aroma of Pokémon wafting~around it...)
|
||||||
|
:when:3
|
||||||
|
@text.show(I seem to have heard~something...*It may have been~whispering...)
|
||||||
|
:endwhen
|
||||||
|
:endwhen
|
||||||
|
:end
|
73
P3D/Content/Data/Scripts/frontier/battlepike/oldmanheal.dat
Normal file
73
P3D/Content/Data/Scripts/frontier/battlepike/oldmanheal.dat
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
version=2
|
||||||
|
@storage.set(integer,potheals,0)
|
||||||
|
|
||||||
|
:if:<pokemon.fullyhealed(0)>=false
|
||||||
|
@storage.set(integer,potheals,<storage.get(integer,potheals)>+1)
|
||||||
|
:endif
|
||||||
|
:if:<pokemon.fullyhealed(1)>=false
|
||||||
|
@storage.set(integer,potheals,<storage.get(integer,potheals)>+1)
|
||||||
|
:endif
|
||||||
|
:if:<pokemon.fullyhealed(2)>=false
|
||||||
|
@storage.set(integer,potheals,<storage.get(integer,potheals)>+1)
|
||||||
|
:endif
|
||||||
|
|
||||||
|
:select:<storage.get(integer,potheals)>
|
||||||
|
:when:0
|
||||||
|
@text.show(You are already fully healed!)
|
||||||
|
:when:1
|
||||||
|
@text.show(Ah, you're a lucky one.~I'm in somewhat-good~spirits now.*I will restore one of your~Pokémon to full health.)
|
||||||
|
@pokemon.heal
|
||||||
|
:when:2
|
||||||
|
:select:<system.random(1,2)>
|
||||||
|
:when:1
|
||||||
|
@text.show(Ah, you're a lucky one.~I'm in somewhat-good~spirits now.*I will restore one of your~Pokémon to full health.)
|
||||||
|
:select:<system.random(0,2)>
|
||||||
|
:when:0
|
||||||
|
:if:<pokemon.fullyhealed(0)>=false
|
||||||
|
@pokemon.heal(0)
|
||||||
|
:else
|
||||||
|
@pokemon.heal(<system.random(1,2)>)
|
||||||
|
:endif
|
||||||
|
:when:1
|
||||||
|
:if:<pokemon.fullyhealed(1)>=false
|
||||||
|
@pokemon.heal(1)
|
||||||
|
:else
|
||||||
|
:select:<system.random(0,1)>
|
||||||
|
:when:0
|
||||||
|
@pokemon.heal(0)
|
||||||
|
:when:1
|
||||||
|
@pokemon.heal(2)
|
||||||
|
:endwhen
|
||||||
|
:endif
|
||||||
|
:when:2
|
||||||
|
:if:<pokemon.fullyhealed(2)>=false
|
||||||
|
@pokemon.heal(2)
|
||||||
|
:else
|
||||||
|
@pokemon.heal(<system.random(0,1)>)
|
||||||
|
:endif
|
||||||
|
:endwhen
|
||||||
|
:when:2
|
||||||
|
@text.show(Ah, you're a lucky one.~I'm in somewhat-good~spirits now.*I will restore two of your~Pokémon to full health.)
|
||||||
|
@pokemon.heal
|
||||||
|
:endwhen
|
||||||
|
:when:3
|
||||||
|
:select:<system.random(1,2)>
|
||||||
|
:when:1
|
||||||
|
@text.show(Ah, you're a lucky one.~I'm in somewhat-good~spirits now.*I will restore one of your~Pokémon to full health.)
|
||||||
|
@pokemon.heal(<system.random(0,2)>)
|
||||||
|
:when:2
|
||||||
|
@text.show(Ah, you're a lucky one.~I'm in somewhat-good~spirits now.*I will restore two of your~Pokémon to full health.)
|
||||||
|
:select:<system.random(0,2)>
|
||||||
|
:when:0
|
||||||
|
@pokemon.heal(1,2)
|
||||||
|
:when:1
|
||||||
|
@pokemon.heal(0,2)
|
||||||
|
:when:2
|
||||||
|
@pokemon.heal(0,1)
|
||||||
|
:endwhen
|
||||||
|
:endwhen
|
||||||
|
:endwhen
|
||||||
|
@text.show(The best of luck to you.~Farewell.)
|
||||||
|
@npc.turn(11,0)
|
||||||
|
@npc.move(11,2)
|
||||||
|
:end
|
125
P3D/Content/Data/Scripts/frontier/battlepike/roomchooser.dat
Normal file
125
P3D/Content/Data/Scripts/frontier/battlepike/roomchooser.dat
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
version=2
|
||||||
|
#0 = status Condition - skip if all status or faint
|
||||||
|
#1 = partial recovery - skip if fully healed
|
||||||
|
#2 = single battle
|
||||||
|
#3 = full recovery - Skip if fully healed
|
||||||
|
#4 = Wild Pokemon
|
||||||
|
#5 = Hard Battle+heal - not hinted if no healing needed
|
||||||
|
#6 = no event
|
||||||
|
#7 = Double Battle - skip if only one mon
|
||||||
|
#8 = Lucy
|
||||||
|
:if:<register.registered(pikelucynext)>=true
|
||||||
|
@register.change(pikehintspot,3)
|
||||||
|
@register.change(pikehint,4)
|
||||||
|
@register.change(pikehinted,8)
|
||||||
|
@player.move(0)
|
||||||
|
@text.show(I am sorry to say...*A terrifying event,~yes, a horrible one,~is about to befall you...*I urge you to pay the utmost~care and prepare for~the worst...)
|
||||||
|
:else
|
||||||
|
@register.change(pikehintspot,<system.random(0,2)>)
|
||||||
|
@register.change(pikehint,<system.random(0,3)>)
|
||||||
|
|
||||||
|
:select:<register.value(pikehint)>
|
||||||
|
:when:0
|
||||||
|
:if:<pokemon.status(0)> = none <and> <pokemon.status(1)> = none <and> <pokemon.status(2)> = none
|
||||||
|
:if:<pokemon.fullyhealed>=true
|
||||||
|
@register.change(pikehinted,0)
|
||||||
|
:else
|
||||||
|
@register.change(pikehinted,<system.random(0,1)>)
|
||||||
|
:endif
|
||||||
|
:else
|
||||||
|
@register.change(pikehinted,1)
|
||||||
|
:endif
|
||||||
|
:when:1
|
||||||
|
:if:<pokemon.fullyhealed>=true
|
||||||
|
@register.change(pikehinted,2)
|
||||||
|
:else
|
||||||
|
@register.change(pikehinted,<system.random(2,3)>)
|
||||||
|
:endif
|
||||||
|
:when:2
|
||||||
|
:if:<pokemon.fullyhealed>=true
|
||||||
|
@register.change(pikehinted,4)
|
||||||
|
:else
|
||||||
|
@register.change(pikehinted,<system.random(4,5)>)
|
||||||
|
:endif
|
||||||
|
:when:3
|
||||||
|
:if:<pokemon.countbattle>=1
|
||||||
|
@register.change(pikehinted,6)
|
||||||
|
:else
|
||||||
|
:if:<system.random(0,3)>=0
|
||||||
|
@register.change(pikehinted,7)
|
||||||
|
:else
|
||||||
|
@register.change(pikehinted,6)
|
||||||
|
:endif
|
||||||
|
:endif
|
||||||
|
:when:4
|
||||||
|
@register.change(pikehinted,8)
|
||||||
|
:endwhen
|
||||||
|
@storage.set(integer,potentialrooms,0)
|
||||||
|
@storage.set(integer,roomcounter,0)
|
||||||
|
:while:<storage.get(integer,roomcounter)><8
|
||||||
|
:select:<storage.get(integer,roomcounter)>
|
||||||
|
:when:0
|
||||||
|
:if:<not><register.value(pikehint)>=0
|
||||||
|
:if:<pokemon.status(0)> = none <and> <pokemon.status(1)> = none <and> <pokemon.status(2)> = none
|
||||||
|
@storage.set(integer,potroom<storage.get(integer,potentialrooms)>,0)
|
||||||
|
@storage.update(integer,potentialrooms,+,1)
|
||||||
|
:endif
|
||||||
|
:endif
|
||||||
|
:when:1
|
||||||
|
:if:<not><register.value(pikehint)>=0
|
||||||
|
:if:<pokemon.fullyhealed>=false
|
||||||
|
@storage.set(integer,potroom<storage.get(integer,potentialrooms)>,1)
|
||||||
|
@storage.update(integer,potentialrooms,+,1)
|
||||||
|
:endif
|
||||||
|
:endif
|
||||||
|
:when:2
|
||||||
|
:if:<not><register.value(pikehint)>=1
|
||||||
|
@storage.set(integer,potroom<storage.get(integer,potentialrooms)>,2)
|
||||||
|
@storage.update(integer,potentialrooms,+,1)
|
||||||
|
:endif
|
||||||
|
:when:3
|
||||||
|
:if:<not><register.value(pikehint)>=1
|
||||||
|
:if:<pokemon.fullyhealed>=false
|
||||||
|
@storage.set(integer,potroom<storage.get(integer,potentialrooms)>,3)
|
||||||
|
@storage.update(integer,potentialrooms,+,1)
|
||||||
|
:endif
|
||||||
|
:endif
|
||||||
|
:when:4
|
||||||
|
:if:<not><register.value(pikehint)>=2
|
||||||
|
@storage.set(integer,potroom<storage.get(integer,potentialrooms)>,4)
|
||||||
|
@storage.update(integer,potentialrooms,+,1)
|
||||||
|
:endif
|
||||||
|
:when:5
|
||||||
|
:if:<not><register.value(pikehint)>=2
|
||||||
|
@storage.set(integer,potroom<storage.get(integer,potentialrooms)>,5)
|
||||||
|
@storage.update(integer,potentialrooms,+,1)
|
||||||
|
:endif
|
||||||
|
:when:6
|
||||||
|
:if:<not><register.value(pikehint)>=3
|
||||||
|
@storage.set(integer,potroom<storage.get(integer,potentialrooms)>,6)
|
||||||
|
@storage.update(integer,potentialrooms,+,1)
|
||||||
|
:endif
|
||||||
|
:when:7
|
||||||
|
:if:<not><register.value(pikehint)>=3
|
||||||
|
:if:<pokemon.countbattle>=1
|
||||||
|
@storage.set(integer,potroom<storage.get(integer,potentialrooms)>,7)
|
||||||
|
@storage.update(integer,potentialrooms,+,1)
|
||||||
|
:endif
|
||||||
|
:endif
|
||||||
|
:endwhen
|
||||||
|
@storage.update(integer,roomcounter,+,1)
|
||||||
|
:endwhile
|
||||||
|
:endif
|
||||||
|
@storage.set(integer,roomsset,0)
|
||||||
|
:while:<storage.get(integer,roomsset)><3
|
||||||
|
:if:<register.registered(pikelucynext)>=true
|
||||||
|
@register.change(pikeroom<storage.get(integer,roomsset)>,8)
|
||||||
|
:else
|
||||||
|
:if:<storage.get(integer,roomsset)> = <register.value(pikehintspot)>
|
||||||
|
@register.change(pikeroom<storage.get(integer,roomsset)>,<register.value(pikehinted)>)
|
||||||
|
:else
|
||||||
|
@register.change(pikeroom<storage.get(integer,roomsset)>,<storage.get(integer,potroom<system.random(0,<math.int(<storage.get(integer,potentialrooms)>-1)>)>)>)
|
||||||
|
:endif
|
||||||
|
:endif
|
||||||
|
@storage.update(integer,roomsset,+,1)
|
||||||
|
:endwhile
|
BIN
P3D/Content/Data/Scripts/frontier/battlepike/ruleboard.dat
Normal file
BIN
P3D/Content/Data/Scripts/frontier/battlepike/ruleboard.dat
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
28
P3D/Content/Data/Scripts/frontier/teamcheck.dat
Normal file
28
P3D/Content/Data/Scripts/frontier/teamcheck.dat
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
version=2
|
||||||
|
@storage.set(integer,checked,0)
|
||||||
|
@storage.set(string,pokedupe,0)
|
||||||
|
@storage.set(string,itemdupe,0)
|
||||||
|
:while:<storage.get(integer,checked)><<storage.get(integer,tocheck)>
|
||||||
|
:select:<pokemon.number(<storage.get(integer,checked)>)>
|
||||||
|
:when:150;151;249;250;251;382;383;384;385;386;483;484;487;489;490;491;492;493;494;643;644;646;647;648;649;716;717;718;719;720;721;789;790;791;792;800;801;802;807;808;809;888;889;890;893;898;1007;1008
|
||||||
|
@text.show(You have a restricted Pokémon on your team, please choose a different Pokémon.)
|
||||||
|
:endscript
|
||||||
|
:when:<storage.get(string,pokedupe)>
|
||||||
|
@text.show(Duplicate Pokémon are not allowed, please choose a different Pokémon.)
|
||||||
|
:endscript
|
||||||
|
:endwhen
|
||||||
|
|
||||||
|
:if:<pokemon.isegg(<storage.get(integer,checked)>)=true
|
||||||
|
@text.show(Eggs are not allowed, please choose a different Pokémon.)
|
||||||
|
:endscript
|
||||||
|
:endif
|
||||||
|
:select:<pokemon.itemid(<storage.get(integer,checked)>)>
|
||||||
|
:when:<storage.get(string,itemdupe)>
|
||||||
|
@text.show(Duplicate held items are not allowed, please choose a different Pokémon.)
|
||||||
|
:endscript
|
||||||
|
:endwhen
|
||||||
|
|
||||||
|
@storage.set(string,pokedupe,<storage.get(string,pokedupe)>;<pokemon.number(<storage.get(integer,checked)>)>)
|
||||||
|
@storage.set(string,itemdupe,<storage.get(string,itemdupe)>;<pokemon.itemid(<storage.get(integer,checked)>)>)
|
||||||
|
@storage.set(integer,checked,<storage.get(integer,checked)>+1)
|
||||||
|
:endwhile
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
P3D/Content/Data/Scripts/league/eventresets.dat
Normal file
BIN
P3D/Content/Data/Scripts/league/eventresets.dat
Normal file
Binary file not shown.
Binary file not shown.
@ -5,6 +5,9 @@ version=2
|
|||||||
:else
|
:else
|
||||||
@battle.wild(494,70,0,,12)
|
@battle.wild(494,70,0,,12)
|
||||||
:endif
|
:endif
|
||||||
|
:if:<battle.caught>=true
|
||||||
|
@register.register(caughtvictini)
|
||||||
|
:endif
|
||||||
@register.register(battlevictini)
|
@register.register(battlevictini)
|
||||||
@npc.register(liberty\room.dat|0|remove|0)
|
@npc.register(liberty\room.dat|0|remove|0)
|
||||||
@npc.remove(0)
|
@npc.remove(0)
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -4,7 +4,7 @@ version=2
|
|||||||
:endif
|
:endif
|
||||||
|
|
||||||
:if:<register.registered(postblueoak)>=false <and> <player.badges>=16
|
:if:<register.registered(postblueoak)>=false <and> <player.badges>=16
|
||||||
@text.show(Hello, you are begining~to hold the air of~a great Champion,~<player.name>.*It is time for your~Pokédex to match~who you are.*Let me see your~Pokédex for a moment.*I will upgrade your~Pokédex with the~National Mode.)
|
@text.show(Hello, you are beginning~to hold the air of~a great Champion,~<player.name>.*It is time for your~Pokédex to match~who you are.*Let me see your~Pokédex for a moment.*I will upgrade your~Pokédex with the~National Mode.)
|
||||||
@sound.play(success,1)
|
@sound.play(success,1)
|
||||||
@text.color(playercolor)
|
@text.color(playercolor)
|
||||||
@text.show(<player.name> received~the National Pokédex!)
|
@text.show(<player.name> received~the National Pokédex!)
|
||||||
@ -43,6 +43,14 @@ version=2
|
|||||||
:end
|
:end
|
||||||
:endif
|
:endif
|
||||||
|
|
||||||
|
:if:<Register.Registered(pokedex_sevii)>=true <and> <Register.Registered(ReceivedCatchingCharm)>=false
|
||||||
|
@Text.show(Oh, by the way, my Aide~was supposed to give you~this, but I suppose he~forgot to do so.*Here you go!)
|
||||||
|
@Item.Give(657,1)
|
||||||
|
@Item.MessageGive(657,1)
|
||||||
|
@Register.Register(ReceivedCatchingCharm)
|
||||||
|
@text.show(Having this charm on you~increases the chance to~get a critical catch and~thus your odds of~catching a Pokémon.)
|
||||||
|
:endif
|
||||||
|
|
||||||
#This sets a flag for the evaldist script so that it knows where the call came from:
|
#This sets a flag for the evaldist script so that it knows where the call came from:
|
||||||
@storage.set(str,pallet_oak_scriptcaller,flag)
|
@storage.set(str,pallet_oak_scriptcaller,flag)
|
||||||
@script.start(pallet\evaldist)
|
@script.start(pallet\evaldist)
|
||||||
|
Binary file not shown.
@ -33,7 +33,7 @@ version=2
|
|||||||
:if:<system.scripttrigger>=phonereceiving
|
:if:<system.scripttrigger>=phonereceiving
|
||||||
@text.notification(Day-Care Man*Receiving call.......,500,5,5,phone,phone\012)
|
@text.notification(Day-Care Man*Receiving call.......,500,5,5,phone,phone\012)
|
||||||
:else
|
:else
|
||||||
@text.show(Hello <player.name>!*We were raising your~Pokémon, and my goodness,~we were surprised!*Your Pokémon was holding~an Egg!*We don't know how it~got there, but your~Pokémon had it.*If you want to have it~visit us on Route 34.)
|
@text.show(Hello <player.name>!*We were raising your~Pokémon, and my goodness,~we were surprised!*Your Pokémon was holding~an Egg!*We don't know how it~got there, but your~Pokémon had it.*If you want to have it~visit us on Four Island.)
|
||||||
:endif
|
:endif
|
||||||
:endif
|
:endif
|
||||||
|
|
||||||
|
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user