mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-04-08 18:35:09 +02:00
Compare commits
435 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
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>
|
||||
<packageRestore>
|
||||
<add key="enabled" value="True" />
|
||||
<add key="automatic" value="True" />
|
||||
</packageRestore>
|
||||
<packageSources>
|
||||
<add key="monogame-dev" value="http://teamcity.monogame.net/guestAuth/app/nuget/v1/FeedService.svc/" />
|
||||
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
|
||||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
|
||||
</packageSources>
|
||||
</configuration>
|
||||
|
@ -2,23 +2,20 @@
|
||||
|
||||
Inherits BattleAnimation3D
|
||||
|
||||
Public Duration As Single = 2.0F
|
||||
Public FadeInSpeed As Single = 0.01F
|
||||
Public FadeOutSpeed As Single = 0.01F
|
||||
Public BackgroundOpacity As Single = 0.0F
|
||||
Public Texture As Texture2D
|
||||
Public DoTile As Boolean = False
|
||||
Public AnimationWidth As Integer = -1
|
||||
Public AnimationLength As Integer = 1
|
||||
Public AnimationSpeed As Integer = 16
|
||||
Public AfterFadeInOpacity As Single = 1.0F
|
||||
Public FadeProgress As FadeSteps = FadeSteps.FadeIn
|
||||
Private DurationDate As Date
|
||||
Private DurationWhole As Single
|
||||
Private DurationFraction As Single
|
||||
Private BackgroundAnimation As Animation
|
||||
Private CurrentRectangle As New Rectangle(0, 0, 0, 0)
|
||||
Private TextureScale As Integer = 4
|
||||
Dim FadeInSpeed As Single = 0.01F
|
||||
Dim FadeOutSpeed As Single = 0.01F
|
||||
Dim BackgroundOpacity As Single = 0.0F
|
||||
Dim Texture As Texture2D
|
||||
Dim DoTile As Boolean = False
|
||||
Dim AnimationWidth As Integer = -1
|
||||
Dim AfterFadeInOpacity As Single = 1.0F
|
||||
Dim FadeProgress As FadeSteps = FadeSteps.FadeIn
|
||||
Dim DurationDate As Date
|
||||
Dim DurationWhole As Single
|
||||
Dim DurationFraction As Single
|
||||
Dim BackgroundAnimation As Animation
|
||||
Dim CurrentRectangle As New Rectangle(0, 0, 0, 0)
|
||||
Dim TextureScale As Integer = 4
|
||||
|
||||
Public Enum FadeSteps As Integer
|
||||
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)
|
||||
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
|
||||
Me.Texture = Texture
|
||||
Me.Duration = Duration
|
||||
Me.AfterFadeInOpacity = AfterFadeInOpacity
|
||||
Me.FadeInSpeed = FadeInSpeed
|
||||
Me.FadeOutSpeed = FadeOutSpeed
|
||||
Me.DoTile = DoTile
|
||||
Me.AnimationWidth = CInt(Texture.Width / AnimationLength)
|
||||
Me.AnimationLength = AnimationLength
|
||||
DurationWhole = CSng(Math.Truncate(CDbl(Duration / 6.0F)))
|
||||
DurationFraction = CSng((Duration / 6.0F - DurationWhole) * 1000)
|
||||
Me.TextureScale = TextureScale
|
||||
|
@ -4,8 +4,8 @@ Public Class BACameraChangeAngle
|
||||
|
||||
Inherits BattleAnimation3D
|
||||
|
||||
Public CameraAngleID As Integer
|
||||
Public BV2Screen As BattleSystem.BattleScreen
|
||||
Dim CameraAngleID As Integer
|
||||
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)
|
||||
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
|
||||
|
@ -2,20 +2,19 @@
|
||||
|
||||
Inherits BattleAnimation3D
|
||||
|
||||
Public StartPosition As Vector3
|
||||
Public ReturnToStart As Vector3
|
||||
Public HalfDistance As New Vector3(0.0F)
|
||||
Public DestinationDistance As New Vector3(0.0F)
|
||||
Public CurrentDistance As New Vector3(0.0F)
|
||||
Public MoveSpeed As Single
|
||||
Public MoveBothWays As Boolean = True
|
||||
Public MovementCurve As Integer = 0
|
||||
Public RemoveEntityAfter As Boolean
|
||||
Public Duration As TimeSpan
|
||||
Public ReadyTime As Date
|
||||
Public ReadyAxis As New Vector3(0)
|
||||
Public InterpolationSpeed As Vector3
|
||||
Public InterpolationDirection As Boolean = True
|
||||
Dim StartPosition As Vector3
|
||||
Dim ReturnToStart As Vector3
|
||||
Dim HalfDistance As New Vector3(0.0F)
|
||||
Dim DestinationDistance As New Vector3(0.0F)
|
||||
Dim CurrentDistance As New Vector3(0.0F)
|
||||
Dim MoveSpeed As Single
|
||||
Dim MoveBothWays As Boolean = True
|
||||
Dim MovementCurve As Integer = 0
|
||||
Dim Duration As TimeSpan
|
||||
Dim ReadyTime As Date
|
||||
Dim ReadyAxis As New Vector3(0)
|
||||
Dim InterpolationSpeed As Vector3
|
||||
Dim InterpolationDirection As Boolean = True
|
||||
Public Enum Curves As Integer
|
||||
Linear
|
||||
Smooth
|
||||
|
@ -2,18 +2,17 @@
|
||||
|
||||
Inherits BattleAnimation3D
|
||||
|
||||
Public TargetEntity As Entity
|
||||
Public TransitionSpeed As Single = 0.01F
|
||||
Public TransitionSpeedOut As Single = 0.01F
|
||||
Public FadeIn As Boolean = False
|
||||
Public ReturnToFromWhenDone As Boolean = False
|
||||
Public RemoveEntityAfter As Boolean = False
|
||||
Public InitialColorSet As Boolean = False
|
||||
Public IsReturning As Boolean = False
|
||||
Public ColorTo As Vector3 = New Vector3(1.0F, 1.0F, 1.0F)
|
||||
Public ColorFrom As Vector3 = New Vector3(1.0F, 1.0F, 1.0F)
|
||||
Dim TargetEntity As Entity
|
||||
Dim TransitionSpeed As Single = 0.01F
|
||||
Dim TransitionSpeedOut As Single = 0.01F
|
||||
Dim ReturnToFromWhenDone As Boolean = False
|
||||
Dim RemoveEntityAfter As Boolean = False
|
||||
Dim InitialColorSet As Boolean = False
|
||||
Dim IsReturning As Boolean = False
|
||||
Dim ColorTo As Vector3 = New Vector3(1.0F, 1.0F, 1.0F)
|
||||
Dim 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)
|
||||
Me.RemoveEntityAfter = RemoveEntityAfter
|
||||
If TransitionSpeedOut = -1 Then
|
||||
|
@ -9,7 +9,7 @@
|
||||
Dim TurnTime 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)
|
||||
If EndFaceRotation = -1 Then
|
||||
Me.EndFaceRotation = TargetEntity.faceRotation
|
||||
|
@ -2,21 +2,21 @@
|
||||
|
||||
Inherits BattleAnimation3D
|
||||
|
||||
Public StartPosition As Vector3
|
||||
Public TargetEntity As Entity
|
||||
Public Destination As Vector3
|
||||
Public MoveDistance As New Vector3(0.0F)
|
||||
Public MoveSpeed As Single
|
||||
Public MoveYSpeed As Single
|
||||
Public InterpolationSpeed As Single
|
||||
Public InterpolationYSpeed As Single
|
||||
Public SpinX As Boolean = False
|
||||
Public SpinZ As Boolean = False
|
||||
Public SpinSpeedX As Single = 0.1F
|
||||
Public SpinSpeedZ As Single = 0.1F
|
||||
Public MovementCurve As Integer = 3
|
||||
Private EasedIn As Boolean = False
|
||||
Private EasedOut As Boolean = False
|
||||
Dim StartPosition As Vector3
|
||||
Dim TargetEntity As Entity
|
||||
Dim Destination As Vector3
|
||||
Dim MoveDistance As New Vector3(0.0F)
|
||||
Dim MoveSpeed As Single
|
||||
Dim MoveYSpeed As Single
|
||||
Dim InterpolationSpeed As Single
|
||||
Dim InterpolationYSpeed As Single
|
||||
Dim SpinX As Boolean = False
|
||||
Dim SpinZ As Boolean = False
|
||||
Dim SpinSpeedX As Single = 0.1F
|
||||
Dim SpinSpeedZ As Single = 0.1F
|
||||
Dim MovementCurve As Integer = 3
|
||||
Dim EasedIn As Boolean = False
|
||||
Dim EasedOut As Boolean = False
|
||||
Public RemoveEntityAfter As Boolean
|
||||
Dim ReadyAxis As Vector3 = New Vector3(0.0F)
|
||||
Public Enum Curves As Integer
|
||||
@ -93,11 +93,6 @@
|
||||
|
||||
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
|
||||
Case Curves.EaseIn
|
||||
If EasedIn = False Then
|
||||
@ -195,17 +190,17 @@
|
||||
End If
|
||||
|
||||
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
|
||||
|
||||
If TargetEntity.Position.Y >= Me.Destination.Y + DestinationOffset.Y - 0.05 Then
|
||||
TargetEntity.Position.Y = Me.Destination.Y + DestinationOffset.Y
|
||||
If TargetEntity.Position.Y >= Me.Destination.Y - 0.05 Then
|
||||
TargetEntity.Position.Y = Me.Destination.Y
|
||||
End If
|
||||
ElseIf StartPosition.Y > Me.Destination.Y + DestinationOffset.Y Then
|
||||
ElseIf StartPosition.Y > Me.Destination.Y Then
|
||||
TargetEntity.Position.Y -= Me.MoveYSpeed
|
||||
|
||||
If TargetEntity.Position.Y <= Me.Destination.Y + DestinationOffset.Y + 0.05 Then
|
||||
TargetEntity.Position.Y = Me.Destination.Y + DestinationOffset.Y
|
||||
If TargetEntity.Position.Y <= Me.Destination.Y + 0.05 Then
|
||||
TargetEntity.Position.Y = Me.Destination.Y
|
||||
End If
|
||||
End If
|
||||
MoveDistance.Y -= Me.MoveYSpeed
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
Inherits BattleAnimation3D
|
||||
|
||||
Public TargetEntity As Entity
|
||||
Public TransitionSpeed As Single = 0.01F
|
||||
Public FadeIn As Boolean = False
|
||||
Public EndState As Single = 0.0F
|
||||
Public RemoveEntityAfter As Boolean
|
||||
Dim TargetEntity As Entity
|
||||
Dim TransitionSpeed As Single = 0.01F
|
||||
Dim FadeIn As Boolean = False
|
||||
Dim EndState As Single = 0.0F
|
||||
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)
|
||||
Me.RemoveEntityAfter = RemoveEntityAfter
|
||||
Me.EndState = EndState
|
||||
|
@ -2,21 +2,21 @@
|
||||
|
||||
Inherits BattleAnimation3D
|
||||
|
||||
Public StartPosition As Vector3
|
||||
Public ReturnToStart As Vector3
|
||||
Public TargetEntity As Entity
|
||||
Public HalfDistance As New Vector3(0.0F)
|
||||
Public DestinationDistance As New Vector3(0.0F)
|
||||
Public CurrentDistance As New Vector3(0.0F)
|
||||
Public MoveSpeed As Single
|
||||
Public MoveBothWays As Boolean = True
|
||||
Public MovementCurve As Integer = 0
|
||||
Public RemoveEntityAfter As Boolean
|
||||
Public Duration As TimeSpan
|
||||
Public ReadyTime As Date
|
||||
Public ReadyAxis As New Vector3(0)
|
||||
Public InterpolationSpeed As Vector3
|
||||
Public InterpolationDirection As Boolean = True
|
||||
Dim StartPosition As Vector3
|
||||
Dim ReturnToStart As Vector3
|
||||
Dim TargetEntity As Entity
|
||||
Dim HalfDistance As New Vector3(0.0F)
|
||||
Dim DestinationDistance As New Vector3(0.0F)
|
||||
Dim CurrentDistance As New Vector3(0.0F)
|
||||
Dim MoveSpeed As Single
|
||||
Dim MoveBothWays As Boolean = True
|
||||
Dim MovementCurve As Integer = 0
|
||||
Dim RemoveEntityAfter As Boolean
|
||||
Dim Duration As TimeSpan
|
||||
Dim ReadyTime As Date
|
||||
Dim ReadyAxis As New Vector3(0)
|
||||
Dim InterpolationSpeed As Vector3
|
||||
Dim InterpolationDirection As Boolean = True
|
||||
Public Enum Curves As Integer
|
||||
Linear
|
||||
Smooth
|
||||
|
@ -11,9 +11,9 @@
|
||||
Dim DoRotation As Vector3 = New Vector3(1.0F)
|
||||
Dim AmountRotated 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)
|
||||
Me.RemoveEntityAfter = RemoveEntityAfter
|
||||
Me.RotationSpeedVector = RotationSpeedVector
|
||||
@ -24,7 +24,7 @@
|
||||
Me.AnimationType = AnimationTypes.Rotation
|
||||
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)
|
||||
|
||||
If DoXRotation = False Then
|
||||
@ -41,7 +41,7 @@
|
||||
End If
|
||||
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.DoReturn = DoReturn
|
||||
|
@ -2,16 +2,16 @@
|
||||
|
||||
Inherits BattleAnimation3D
|
||||
|
||||
Public Grow As Boolean = False
|
||||
Public EndSize As Vector3
|
||||
Public SizeSpeed As Single = 0.01F
|
||||
Public TargetEntity As Entity
|
||||
Public Anchors As String '1 = Bottom, 2 = Top, 3 = Left, 4 = Right. Combinations are possible.
|
||||
Dim Grow As Boolean = False
|
||||
Dim EndSize As Vector3
|
||||
Dim SizeSpeed As Single = 0.01F
|
||||
Dim TargetEntity As Entity
|
||||
Dim Anchors As String '1 = Bottom, 2 = Top, 3 = Left, 4 = Right. Combinations are possible.
|
||||
|
||||
Public Change As New Vector3(1)
|
||||
Public RemoveEntityAfter As Boolean
|
||||
Dim SpeedMultiplier As Vector3
|
||||
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)
|
||||
Me.RemoveEntityAfter = RemoveEntityAfter
|
||||
Me.Anchors = Anchors
|
||||
@ -19,6 +19,11 @@
|
||||
Me.EndSize = EndSize
|
||||
Me.SizeSpeed = SizeSpeed
|
||||
Me.TargetEntity = Entity
|
||||
If SpeedMultiplier <> Nothing Then
|
||||
Me.SpeedMultiplier = SpeedMultiplier
|
||||
Else
|
||||
Me.SpeedMultiplier = New Vector3(1)
|
||||
End If
|
||||
|
||||
Me.AnimationType = AnimationTypes.Size
|
||||
End Sub
|
||||
@ -26,9 +31,9 @@
|
||||
Public Overrides Sub DoActionActive()
|
||||
Dim saveScale As Vector3 = TargetEntity.Scale
|
||||
|
||||
Dim changeX As Single = SizeSpeed * Change.X
|
||||
Dim changeY As Single = SizeSpeed * Change.Y
|
||||
Dim changeZ As Single = SizeSpeed * Change.Z
|
||||
Dim changeX As Single = SizeSpeed * SpeedMultiplier.X
|
||||
Dim changeY As Single = SizeSpeed * SpeedMultiplier.Y
|
||||
Dim changeZ As Single = SizeSpeed * SpeedMultiplier.Z
|
||||
|
||||
If Grow = True Then
|
||||
If TargetEntity.Scale.X < Me.EndSize.X Then
|
||||
@ -102,9 +107,6 @@
|
||||
End If
|
||||
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()
|
||||
If Me.RemoveEntityAfter = True Then
|
||||
TargetEntity.CanBeRemoved = True
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
Inherits BattleAnimation3D
|
||||
|
||||
Public TargetEntity As Entity
|
||||
Public SetPosition As Vector3
|
||||
Public RemoveEntityAfter As Boolean
|
||||
Dim TargetEntity As Entity
|
||||
Dim SetPosition As Vector3
|
||||
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)
|
||||
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
Inherits BattleAnimation3D
|
||||
|
||||
Public Texture As Texture2D
|
||||
Public TargetEntity As Entity
|
||||
Public RemoveEntityAfter As Boolean
|
||||
Dim Texture As Texture2D
|
||||
Dim TargetEntity As Entity
|
||||
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)
|
||||
Me.RemoveEntityAfter = RemoveEntityAfter
|
||||
Me.TargetEntity = Entity
|
||||
|
@ -2,10 +2,10 @@
|
||||
|
||||
Inherits BattleAnimation3D
|
||||
|
||||
Private soundfile As String
|
||||
Private stopMusic As Boolean
|
||||
Private IsPokemon As Boolean
|
||||
Private CrySuffix As String = ""
|
||||
Dim soundfile As String
|
||||
Dim stopMusic As Boolean
|
||||
Dim IsPokemon As Boolean
|
||||
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 = "")
|
||||
|
@ -24,14 +24,14 @@
|
||||
Public Ready As Boolean = False
|
||||
Public startDelay As Date
|
||||
Public endDelay As Date
|
||||
Public SpawnedEntity As Boolean = False
|
||||
Public Started As Boolean = False
|
||||
Private DelayDivide As Single = 6.0F
|
||||
Private StartDelayWhole As Single
|
||||
Private StartDelayFraction As Single
|
||||
Private EndDelayWhole As Single
|
||||
Private EndDelayFraction As Single
|
||||
Private hasStartedEndDelay As Boolean = False
|
||||
Dim SpawnedEntity As Boolean = False
|
||||
Dim Started As Boolean = False
|
||||
Dim DelayDivide As Single = 6.0F
|
||||
Dim StartDelayWhole As Single
|
||||
Dim StartDelayFraction As Single
|
||||
Dim EndDelayWhole As Single
|
||||
Dim EndDelayFraction As Single
|
||||
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)
|
||||
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
|
||||
End Select
|
||||
|
||||
Return TextureManager.GetTexture("GUI\Menus\Types", r, "")
|
||||
Return TextureManager.GetTexture(Element.GetElementTexturePath(), r, "")
|
||||
End Function
|
||||
|
||||
Public Shared Function GetStatColor(ByVal Status As Pokemon.StatusProblems) As Color
|
||||
|
@ -24,13 +24,63 @@
|
||||
Dim Argument As Object
|
||||
End Structure
|
||||
|
||||
Public OwnStep As RoundConst
|
||||
Public OppStep As RoundConst
|
||||
Public Shared OwnStep As RoundConst
|
||||
Public Shared OppStep As RoundConst
|
||||
|
||||
''' <summary>
|
||||
''' Returns the move of a Pokémon with a specified ID.
|
||||
''' </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
|
||||
If a.ID = MoveID Then
|
||||
Return a
|
||||
@ -56,7 +106,7 @@
|
||||
If BattleScreen.FieldEffects.OwnRolloutCounter > 0 Then
|
||||
SelectedMoveOwn = False
|
||||
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
|
||||
End If
|
||||
|
||||
@ -64,7 +114,7 @@
|
||||
If BattleScreen.FieldEffects.OwnIceBallCounter > 0 Then
|
||||
SelectedMoveOwn = False
|
||||
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
|
||||
End If
|
||||
|
||||
@ -72,7 +122,7 @@
|
||||
If BattleScreen.FieldEffects.OwnFlyCounter >= 1 Then
|
||||
SelectedMoveOwn = False
|
||||
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
|
||||
End If
|
||||
|
||||
@ -80,7 +130,7 @@
|
||||
If BattleScreen.FieldEffects.OwnDigCounter >= 1 Then
|
||||
SelectedMoveOwn = False
|
||||
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
|
||||
End If
|
||||
|
||||
@ -88,7 +138,7 @@
|
||||
If BattleScreen.FieldEffects.OwnOutrage >= 1 Then
|
||||
SelectedMoveOwn = False
|
||||
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
|
||||
End If
|
||||
|
||||
@ -96,7 +146,7 @@
|
||||
If BattleScreen.FieldEffects.OwnThrash >= 1 Then
|
||||
SelectedMoveOwn = False
|
||||
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
|
||||
End If
|
||||
|
||||
@ -104,7 +154,7 @@
|
||||
If BattleScreen.FieldEffects.OwnPetalDance >= 1 Then
|
||||
SelectedMoveOwn = False
|
||||
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
|
||||
End If
|
||||
|
||||
@ -112,7 +162,7 @@
|
||||
If BattleScreen.FieldEffects.OwnBounceCounter >= 1 Then
|
||||
SelectedMoveOwn = False
|
||||
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
|
||||
End If
|
||||
|
||||
@ -120,7 +170,7 @@
|
||||
If BattleScreen.FieldEffects.OwnDiveCounter >= 1 Then
|
||||
SelectedMoveOwn = False
|
||||
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
|
||||
End If
|
||||
|
||||
@ -128,7 +178,7 @@
|
||||
If BattleScreen.FieldEffects.OwnShadowForceCounter = 1 Then
|
||||
SelectedMoveOwn = False
|
||||
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
|
||||
End If
|
||||
|
||||
@ -136,13 +186,13 @@
|
||||
If BattleScreen.FieldEffects.OwnPhantomForceCounter = 1 Then
|
||||
SelectedMoveOwn = False
|
||||
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
|
||||
End If
|
||||
|
||||
'If Sky Drop gets programmed, put this in.
|
||||
'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
|
||||
'End If
|
||||
|
||||
@ -150,7 +200,7 @@
|
||||
If BattleScreen.FieldEffects.OwnGeomancyCounter = 1 Then
|
||||
SelectedMoveOwn = False
|
||||
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
|
||||
End If
|
||||
|
||||
@ -158,7 +208,7 @@
|
||||
If BattleScreen.FieldEffects.OwnSolarBeam >= 1 Then
|
||||
SelectedMoveOwn = False
|
||||
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
|
||||
End If
|
||||
|
||||
@ -166,7 +216,7 @@
|
||||
If BattleScreen.FieldEffects.OwnSolarBlade >= 1 Then
|
||||
SelectedMoveOwn = False
|
||||
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
|
||||
End If
|
||||
|
||||
@ -174,7 +224,7 @@
|
||||
If BattleScreen.FieldEffects.OwnSkyAttackCounter >= 1 Then
|
||||
SelectedMoveOwn = False
|
||||
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
|
||||
End If
|
||||
|
||||
@ -182,7 +232,7 @@
|
||||
If BattleScreen.FieldEffects.OwnSkullBashCounter >= 1 Then
|
||||
SelectedMoveOwn = False
|
||||
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
|
||||
End If
|
||||
|
||||
@ -190,7 +240,7 @@
|
||||
If BattleScreen.FieldEffects.OwnRazorWindCounter >= 1 Then
|
||||
SelectedMoveOwn = False
|
||||
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
|
||||
End If
|
||||
|
||||
@ -198,7 +248,7 @@
|
||||
If BattleScreen.FieldEffects.OwnUproar >= 1 Then
|
||||
SelectedMoveOwn = False
|
||||
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
|
||||
End If
|
||||
|
||||
@ -206,7 +256,7 @@
|
||||
If BattleScreen.FieldEffects.OwnBideCounter > 0 Then
|
||||
SelectedMoveOwn = False
|
||||
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
|
||||
End If
|
||||
|
||||
@ -279,120 +329,120 @@
|
||||
'Rollout
|
||||
If BattleScreen.FieldEffects.OppRolloutCounter > 0 Then
|
||||
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
|
||||
|
||||
'IceBall
|
||||
If BattleScreen.FieldEffects.OppIceBallCounter > 0 Then
|
||||
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
|
||||
|
||||
'Fly:
|
||||
If BattleScreen.FieldEffects.OppFlyCounter >= 1 Then
|
||||
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
|
||||
|
||||
'Dig:
|
||||
If BattleScreen.FieldEffects.OppDigCounter >= 1 Then
|
||||
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
|
||||
|
||||
'Outrage:
|
||||
If BattleScreen.FieldEffects.OppOutrage >= 1 Then
|
||||
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
|
||||
|
||||
'Thrash:
|
||||
If BattleScreen.FieldEffects.OppThrash >= 1 Then
|
||||
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
|
||||
|
||||
'Petal Dance:
|
||||
If BattleScreen.FieldEffects.OppPetalDance >= 1 Then
|
||||
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
|
||||
|
||||
'Bounce:
|
||||
If BattleScreen.FieldEffects.OppBounceCounter >= 1 Then
|
||||
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
|
||||
|
||||
'Dive:
|
||||
If BattleScreen.FieldEffects.OppDiveCounter = 1 Then
|
||||
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
|
||||
|
||||
'Shadow Force:
|
||||
If BattleScreen.FieldEffects.OppShadowForceCounter = 1 Then
|
||||
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
|
||||
|
||||
'Phantom Force:
|
||||
If BattleScreen.FieldEffects.OppPhantomForceCounter = 1 Then
|
||||
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
|
||||
|
||||
''Sky Drop:
|
||||
'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
|
||||
|
||||
'Geomancy:
|
||||
If BattleScreen.FieldEffects.OppGeomancyCounter = 1 Then
|
||||
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
|
||||
|
||||
'Solar Beam:
|
||||
If BattleScreen.FieldEffects.OppSolarBeam >= 1 Then
|
||||
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
|
||||
|
||||
'Solar Blade:
|
||||
If BattleScreen.FieldEffects.OppSolarBlade >= 1 Then
|
||||
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
|
||||
|
||||
'Sky Attack:
|
||||
If BattleScreen.FieldEffects.OppSkyAttackCounter >= 1 Then
|
||||
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
|
||||
|
||||
'Skull Bash:
|
||||
If BattleScreen.FieldEffects.OppSkullBashCounter >= 1 Then
|
||||
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
|
||||
|
||||
'RazorWind:
|
||||
If BattleScreen.FieldEffects.OppRazorWindCounter >= 1 Then
|
||||
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
|
||||
|
||||
'Uproar:
|
||||
If BattleScreen.FieldEffects.OppUproar >= 1 Then
|
||||
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
|
||||
|
||||
'Bide:
|
||||
If BattleScreen.FieldEffects.OppBideCounter > 0 Then
|
||||
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
|
||||
|
||||
@ -417,7 +467,7 @@
|
||||
moveID = CInt(inputString)
|
||||
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
|
||||
BattleScreen.OppStatistics.Switches += 1
|
||||
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
|
||||
'TODO: Reset rage counters
|
||||
|
||||
Select Case move.Name.ToLower()
|
||||
Case "metronome"
|
||||
If move.CurrentPP > 0 Then
|
||||
move.CurrentPP -= 1
|
||||
End If
|
||||
If own = True Then
|
||||
If BattleScreen.FieldEffects.OwnUsedRandomMove = True AndAlso (move.Name.ToLower() <> "metronome" OrElse move.IsGameModeMove = True AndAlso move.gmUseRandomMove = False) Then
|
||||
BattleScreen.FieldEffects.OwnUsedRandomMove = False
|
||||
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()}
|
||||
Case "mirror move"
|
||||
If move.CurrentPP > 0 Then
|
||||
move.CurrentPP -= 1
|
||||
End If
|
||||
|
||||
Dim id As Integer = -1
|
||||
If own = True Then
|
||||
If Not BattleScreen.FieldEffects.OppLastMove Is Nothing AndAlso BattleScreen.FieldEffects.OppLastMove.MirrorMoveAffected = True Then
|
||||
id = BattleScreen.FieldEffects.OppLastMove.ID
|
||||
If move.IsGameModeMove = True AndAlso move.gmUseRandomMove = True Then
|
||||
If move.CurrentPP > 0 Then
|
||||
move.CurrentPP -= 1
|
||||
End If
|
||||
If own = True Then
|
||||
BattleScreen.FieldEffects.OwnUsedRandomMove = True
|
||||
Else
|
||||
BattleScreen.FieldEffects.OppUsedRandomMove = True
|
||||
End If
|
||||
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
|
||||
Else
|
||||
If Not BattleScreen.FieldEffects.OwnLastMove Is Nothing AndAlso BattleScreen.FieldEffects.OwnLastMove.MirrorMoveAffected = True Then
|
||||
id = BattleScreen.FieldEffects.OwnLastMove.ID
|
||||
If own = True Then
|
||||
BattleScreen.FieldEffects.OwnUsedRandomMove = True
|
||||
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
|
||||
|
||||
If id <> -1 Then
|
||||
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
|
||||
Dim id As Integer = -1
|
||||
If own = True Then
|
||||
If Not BattleScreen.FieldEffects.OppLastMove Is Nothing AndAlso BattleScreen.FieldEffects.OppLastMove.MirrorMoveAffected = True Then
|
||||
id = BattleScreen.FieldEffects.OppLastMove.ID
|
||||
End If
|
||||
Else
|
||||
If Not BattleScreen.FieldEffects.OwnLastMove Is Nothing AndAlso BattleScreen.FieldEffects.OwnLastMove.MirrorMoveAffected = True Then
|
||||
id = BattleScreen.FieldEffects.OwnLastMove.ID
|
||||
End If
|
||||
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
|
||||
|
||||
Public SelectedMoveOwn As Boolean = True
|
||||
@ -631,8 +718,8 @@
|
||||
Exit Sub
|
||||
End If
|
||||
Dim OppStep = GetOppStep(BattleScreen, OwnStep)
|
||||
Me.OwnStep = OwnStep
|
||||
Me.OppStep = OppStep
|
||||
Battle.OwnStep = OwnStep
|
||||
Battle.OppStep = OppStep
|
||||
BattleScreen.OwnFaint = False '''
|
||||
BattleScreen.OppFaint = False '''
|
||||
If OwnStep.StepType = RoundConst.StepTypes.Move Then
|
||||
@ -856,8 +943,8 @@
|
||||
ChangeCameraAngle(0, True, BattleScreen)
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(BattleScreen.OwnPokemon.GetDisplayName() & " is trapped!"))
|
||||
|
||||
BattleScreen.FieldEffects.OppUsedMoves.Add(CInt(OppStep.Argument))
|
||||
Dim oppMove As Attack = Attack.GetAttackByID(CInt(OppStep.Argument))
|
||||
Dim oppMove As Attack = CType(OppStep.Argument, Attack)
|
||||
BattleScreen.FieldEffects.OppUsedMoves.Add(oppMove.ID)
|
||||
If SelectedMoveOpp = True Then oppMove.MoveSelected(False, BattleScreen)
|
||||
DoAttackRound(BattleScreen, False, oppMove)
|
||||
EndRound(BattleScreen, 2)
|
||||
@ -1054,6 +1141,7 @@
|
||||
p.RemoveVolatileStatus(Pokemon.VolatileStatus.Confusion)
|
||||
Case 38 'Full Heal
|
||||
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
|
||||
Me.CureStatusProblem(False, False, BattleScreen, BattleScreen.Trainer.Name & " used an Antidote on " & p.GetDisplayName() & "!", "item:antidote")
|
||||
Case 10 'Burn Heal
|
||||
@ -1212,15 +1300,19 @@
|
||||
op = BattleScreen.OppPokemon
|
||||
pNPC = BattleScreen.OwnPokemonNPC
|
||||
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
|
||||
p = BattleScreen.OppPokemon
|
||||
op = BattleScreen.OwnPokemon
|
||||
pNPC = BattleScreen.OppPokemonNPC
|
||||
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
|
||||
If WildHasEscaped Then
|
||||
If WildHasEscaped Then
|
||||
WildHasEscaped = False
|
||||
Exit Sub
|
||||
End If
|
||||
@ -1351,6 +1443,7 @@
|
||||
Exit Sub
|
||||
End If
|
||||
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 Then
|
||||
BattleScreen.FieldEffects.OwnLastMove = moveUsed
|
||||
@ -1358,30 +1451,34 @@
|
||||
BattleScreen.FieldEffects.OppLastMove = moveUsed
|
||||
End If
|
||||
Else
|
||||
If sleepTurns > 0 Then
|
||||
ChangeCameraAngle(1, own, BattleScreen)
|
||||
'Sleep Animation
|
||||
If Core.Player.ShowBattleAnimations <> 0 AndAlso BattleScreen.IsPVPBattle = False Then
|
||||
Dim SleepAnimation As New AnimationQueryObject(pNPC, Not own)
|
||||
' If the used move is not Snore, do sleep animation or wake up
|
||||
If Not (sleepTurns > 0 AndAlso moveUsed.ID = 173) Then
|
||||
|
||||
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)
|
||||
If sleepTurns > 0 Then
|
||||
ChangeCameraAngle(1, own, BattleScreen)
|
||||
'Sleep Animation
|
||||
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)
|
||||
SleepAnimation.AnimationMove(SleepEntity2, True, 0, 0.5, 0.25, 0.01, False, False, 2, 0)
|
||||
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)
|
||||
|
||||
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
|
||||
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Asleep", False))
|
||||
CureStatusProblem(own, own, BattleScreen, p.GetDisplayName() & " woke up!", "sleepturns")
|
||||
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
|
||||
@ -1550,8 +1647,6 @@
|
||||
End If
|
||||
End If
|
||||
|
||||
moveUsed.PreAttack(own, BattleScreen)
|
||||
|
||||
If p.HasVolatileStatus(Pokemon.VolatileStatus.Flinch) = True Then
|
||||
p.RemoveVolatileStatus(Pokemon.VolatileStatus.Flinch)
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " flinched and couldn't move!"))
|
||||
@ -1576,6 +1671,15 @@
|
||||
Dim gravity As Integer = BattleScreen.FieldEffects.Gravity
|
||||
If gravity > 0 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!"))
|
||||
Exit Sub
|
||||
End If
|
||||
@ -1598,6 +1702,7 @@
|
||||
BattleScreen.BattleQuery.Add(HeartAnimation)
|
||||
End If
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is in love with " & op.GetDisplayName() & "!"))
|
||||
moveUsed.IsAttracted(own, BattleScreen)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
@ -1637,6 +1742,7 @@
|
||||
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Paralyzed", False))
|
||||
End If
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is fully paralyzed!" & Environment.NewLine & "It cannot move!"))
|
||||
moveUsed.IsParalyzed(own, BattleScreen)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
@ -1698,6 +1804,8 @@
|
||||
End If
|
||||
End If
|
||||
|
||||
moveUsed.PreAttack(own, BattleScreen)
|
||||
|
||||
Dim substitute As Integer = BattleScreen.FieldEffects.OppSubstitute
|
||||
If own = False Then
|
||||
substitute = BattleScreen.FieldEffects.OwnSubstitute
|
||||
@ -1711,9 +1819,15 @@
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " used " & moveUsed.Name & "!"))
|
||||
|
||||
If moveUsed.DeductPP(own, BattleScreen) = True Then
|
||||
moveUsed.CurrentPP -= 1
|
||||
If op.Ability.Name.ToLower() = "pressure" And moveUsed.CurrentPP > 0 Then
|
||||
If moveUsed.CurrentPP > 0 Then
|
||||
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
|
||||
|
||||
@ -2036,6 +2150,7 @@
|
||||
|
||||
If protectWorks = True Then
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(op.GetDisplayName() & " protected itself!"))
|
||||
moveUsed.MoveProtectedDetected(own, BattleScreen)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
@ -2054,6 +2169,7 @@
|
||||
|
||||
If detectWorks = True Then
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(op.GetDisplayName() & " protected itself!"))
|
||||
moveUsed.MoveProtectedDetected(own, BattleScreen)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
@ -2076,7 +2192,7 @@
|
||||
If moveUsed.MakesContact = True Then
|
||||
Me.LowerStat(own, Not own, BattleScreen, "Attack", 1, "", "move:kingsshield")
|
||||
End If
|
||||
|
||||
moveUsed.MoveProtectedDetected(own, BattleScreen)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
@ -2102,6 +2218,14 @@
|
||||
'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)
|
||||
|
||||
'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
|
||||
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
|
||||
@ -2408,7 +2532,7 @@
|
||||
|
||||
op.Type1 = moveUsed.GetAttackType(own, BattleScreen)
|
||||
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
|
||||
Case "rough skin"
|
||||
@ -2815,6 +2939,20 @@
|
||||
End If
|
||||
moveUsed.MoveMisses(own, BattleScreen)
|
||||
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
|
||||
|
||||
''' <summary>
|
||||
@ -2876,6 +3014,13 @@
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(message))
|
||||
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
|
||||
Return True
|
||||
End Function
|
||||
@ -4528,13 +4673,21 @@
|
||||
End If
|
||||
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject(sound, False, 0.0F))
|
||||
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
|
||||
Dim HitAnimation As AnimationQueryObject = New AnimationQueryObject(pNPC, own)
|
||||
HitAnimation.AnimationFade(Nothing, False, 1, False, 0, 0, 0)
|
||||
HitAnimation.AnimationFade(Nothing, False, 1, True, 1, 1, 0)
|
||||
HitAnimation.AnimationFade(Nothing, False, 1, False, 0, 2, 0)
|
||||
HitAnimation.AnimationFade(Nothing, False, 1, True, 1, 3, 0)
|
||||
BattleScreen.BattleQuery.Add(HitAnimation)
|
||||
If fly = 0 Then
|
||||
Dim HitAnimation As AnimationQueryObject = New AnimationQueryObject(pNPC, own)
|
||||
HitAnimation.AnimationFade(Nothing, False, 1, False, 0, 0, 0)
|
||||
HitAnimation.AnimationFade(Nothing, False, 1, True, 1, 1, 0)
|
||||
HitAnimation.AnimationFade(Nothing, False, 1, False, 0, 2, 0)
|
||||
HitAnimation.AnimationFade(Nothing, False, 1, True, 1, 3, 0)
|
||||
BattleScreen.BattleQuery.Add(HitAnimation)
|
||||
End If
|
||||
End If
|
||||
|
||||
If own = True Then
|
||||
@ -5014,7 +5167,7 @@
|
||||
RaiseStat(own, own, BattleScreen, "Special Attack", 1, "Download analyzed the foe!", "download")
|
||||
End If
|
||||
Case "mold breaker"
|
||||
.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " breakes the mold!"))
|
||||
.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " breaks the mold!"))
|
||||
Case "turbo blaze"
|
||||
.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is radiating a blazing aura!"))
|
||||
Case "teravolt"
|
||||
@ -8132,7 +8285,7 @@
|
||||
End If
|
||||
End If
|
||||
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
|
||||
Case 1
|
||||
InflictPoison(False, True, BattleScreen, False, "The Toxic Spikes hurt " & p.GetDisplayName() & "!", "toxicspikes")
|
||||
@ -8291,8 +8444,14 @@
|
||||
Next
|
||||
|
||||
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
|
||||
expPokemon.Add(i)
|
||||
If Core.Player.Inventory.GetItemAmount(658.ToString) > 0 And Core.Player.EnableExpAll = True Then
|
||||
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
|
||||
Next
|
||||
|
||||
@ -8306,7 +8465,7 @@
|
||||
Dim LevelUpAmount As Integer = 0
|
||||
Dim originalLevel As Integer = Core.Player.Pokemons(PokeIndex).Level
|
||||
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."))
|
||||
|
||||
Dim moveLevel As Integer = originalLevel
|
||||
@ -8314,7 +8473,12 @@
|
||||
For e = 1 To EXP
|
||||
Dim oldStats() As Integer
|
||||
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
|
||||
Core.Player.Pokemons(PokeIndex).GetExperience(1, False)
|
||||
|
||||
|
@ -991,7 +991,7 @@
|
||||
Return CalculateEffectiveness(move, BattleScreen, p, op, own)
|
||||
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 a As Double = 1D
|
||||
@ -1002,8 +1002,25 @@
|
||||
Dim b As Double = op.BaseExperience
|
||||
|
||||
Dim t As Double = 1D
|
||||
If p.OT <> Core.Player.OT Then
|
||||
t = 1.5D
|
||||
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 = 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
|
||||
|
||||
Dim e As Double = 1D
|
||||
@ -1019,25 +1036,33 @@
|
||||
Dim s As Double = PokemonList.Count
|
||||
|
||||
Dim expShares As Integer = 0
|
||||
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
|
||||
Dim expAllMultiplier As Single = 1
|
||||
If Core.Player.Inventory.GetItemAmount(658.ToString) > 0 And Core.Player.EnableExpAll = True Then
|
||||
s = 1D
|
||||
If BattleScreen.ParticipatedPokemon.Contains(PokeIndex) = False Then
|
||||
expAllMultiplier = 0.5F
|
||||
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 Not p.Item Is Nothing Then
|
||||
If p.Item.OriginalName.ToLower() = "exp. share" Then
|
||||
s = 2D
|
||||
Else
|
||||
s = (PokemonList.Count * 2D) * expShares
|
||||
If expShares > 0 Then
|
||||
If Not p.Item Is Nothing Then
|
||||
If p.Item.OriginalName.ToLower() = "exp. share" Then
|
||||
s = 2D
|
||||
Else
|
||||
s = (PokemonList.Count * 2D) * expShares
|
||||
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
|
||||
EXP = 2
|
||||
@ -1049,6 +1074,10 @@
|
||||
End If
|
||||
Next
|
||||
|
||||
If Core.Player.Inventory.GetItemAmount(656.ToString) > 0 Then 'Exp. Charm
|
||||
EXP = CInt(EXP * 1.5F)
|
||||
End If
|
||||
|
||||
Return EXP
|
||||
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)
|
||||
|
||||
'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, 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)
|
||||
|
||||
'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, pos.Y), shinyHue)
|
||||
@ -317,7 +317,7 @@
|
||||
|
||||
Public Sub Update(ByRef BattleScreen As BattleScreen)
|
||||
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
|
||||
Else
|
||||
CanInteract = True
|
||||
@ -342,6 +342,7 @@
|
||||
|
||||
Private _moveMenuIndex As Integer = 0
|
||||
Private _moveMenuNextIndex As Integer = 0
|
||||
Private _moveMenuLastIndex As Integer = 0
|
||||
Private _moveMenuItemList As New List(Of MoveMenuItem)
|
||||
Private _moveMenuCreatedID As String = ""
|
||||
Private _moveMenuAlpha As Integer = 255
|
||||
@ -391,20 +392,20 @@
|
||||
Public Sub Draw(ByVal AllExtended As Integer, ByVal SelExtended As Integer, ByVal isSelected As Boolean)
|
||||
Dim extraExtended As Integer = 0
|
||||
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
|
||||
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.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), 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) + 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
|
||||
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.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.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.windowSize.Width - (AllExtended + extraExtended) + 86), CInt(144 + Index * 96)), New Color(0, 0, 0, (SelExtended + AllExtended)))
|
||||
Else
|
||||
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 Sub
|
||||
@ -412,7 +413,7 @@
|
||||
Public Sub Update(ByVal BattleScreen As BattleScreen, ByVal AllExtended As Integer, ByVal isSelected As Boolean)
|
||||
Me.Activate(BattleScreen, AllExtended, isSelected)
|
||||
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
|
||||
IconFading += 15
|
||||
If IconFading > 255 Then
|
||||
@ -439,7 +440,7 @@
|
||||
Me.ClickAction(BattleScreen)
|
||||
End If
|
||||
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
|
||||
SoundManager.PlaySound("select")
|
||||
Me.ClickAction(BattleScreen)
|
||||
@ -475,27 +476,31 @@
|
||||
|
||||
Dim extraExtended As Integer = 0
|
||||
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
|
||||
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))
|
||||
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))
|
||||
Dim BackgroundDrawColor As Color = Color.White
|
||||
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 Move.Disabled > 0 Then
|
||||
Core.SpriteBatch.DrawString(FontManager.MainFont, "Disabled!", New Vector2(CInt(Core.ScreenSize.Width - (AllExtended + extraExtended) + 28), CInt(152 + Index * 96)), Color.Black)
|
||||
If Move.Disabled > 0 OrElse BattleScreen.FieldEffects.OwnEncore > 0 AndAlso BattleScreen.FieldEffects.OwnEncoreMove.ID <> Move.ID Then
|
||||
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
|
||||
Dim ppColor As Color = GetPPColor()
|
||||
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
|
||||
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
|
||||
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 Sub
|
||||
|
||||
@ -522,19 +527,22 @@
|
||||
|
||||
If Controls.Accept(False, True, True) = True And isSelected = True Then
|
||||
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)
|
||||
End If
|
||||
End If
|
||||
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
|
||||
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)
|
||||
End If
|
||||
Else
|
||||
BattleScreen.BattleMenu._moveMenuNextIndex = Me.Index
|
||||
BattleScreen.BattleMenu._moveMenuLastIndex = Me.Index
|
||||
BattleScreen.BattleMenu._isRetracting = True
|
||||
End If
|
||||
End If
|
||||
@ -639,7 +647,7 @@
|
||||
TempBattleScreen = BattleScreen
|
||||
|
||||
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
|
||||
|
||||
Core.SetScreen(selScreen)
|
||||
@ -659,26 +667,26 @@
|
||||
_mainMenuItemList.Clear()
|
||||
Select Case BattleScreen.BattleMode
|
||||
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
|
||||
safariBallText = "No Safari Balls."
|
||||
safariBallText = Localization.GetString("battle_NoSafariBalls", "No Safari Balls.")
|
||||
End If
|
||||
_mainMenuItemList.Add(New MainMenuItem(4, safariBallText, 0, AddressOf MainMenuUseSafariBall))
|
||||
_mainMenuItemList.Add(New MainMenuItem(0, "Throw Mud", 1, AddressOf MainMenuThrowMud))
|
||||
_mainMenuItemList.Add(New MainMenuItem(0, "Throw Bait", 2, AddressOf MainMenuThrowBait))
|
||||
_mainMenuItemList.Add(New MainMenuItem(0, Localization.GetString("battle_action_ThrowMud", "Throw Mud"), 1, AddressOf MainMenuThrowMud))
|
||||
_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
|
||||
_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
|
||||
sportBallText = "No Sport Balls."
|
||||
sportBallText = Localization.GetString("battle_NoSportBalls", "No Sport Balls.")
|
||||
End If
|
||||
_mainMenuItemList.Add(New MainMenuItem(4, sportBallText, 1, AddressOf MainMenuUseSportBall))
|
||||
_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
|
||||
If BattleScreen.OwnFaint Then
|
||||
@ -701,12 +709,12 @@
|
||||
End If
|
||||
BattleScreen.OppFaint = False
|
||||
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(2, "Bag", 2, AddressOf MainMenuOpenBag))
|
||||
_mainMenuItemList.Add(New MainMenuItem(2, Localization.GetString("battle_action_Bag", "Bag"), 2, AddressOf MainMenuOpenBag))
|
||||
|
||||
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)
|
||||
Else
|
||||
MainMenuAddMegaEvolution(BattleScreen, 3)
|
||||
@ -714,9 +722,9 @@
|
||||
End If
|
||||
|
||||
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(3, "Surrender", 2, AddressOf MainMenuOpenBag))
|
||||
_mainMenuItemList.Add(New MainMenuItem(3, Localization.GetString("battle_action_Surrender", "Surrender"), 2, AddressOf MainMenuOpenBag))
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@ -750,14 +758,14 @@
|
||||
If Core.Player.Pokemons(PokeIndex).Item.IsGameModeItem = 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
|
||||
_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
|
||||
Else
|
||||
If Core.Player.Pokemons(PokeIndex).Item.IsMegaStone = True Then
|
||||
Dim megaStone = CType(Core.Player.Pokemons(PokeIndex).Item, Items.MegaStone)
|
||||
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
|
||||
@ -773,7 +781,10 @@
|
||||
_retractMenu = True
|
||||
_nextMenuState = MenuStates.Moves
|
||||
PartyScreen.Selected = -1
|
||||
|
||||
If _moveMenuIndex <> _moveMenuLastIndex Then
|
||||
_moveMenuNextIndex = _moveMenuLastIndex
|
||||
_moveMenuIndex = _moveMenuLastIndex
|
||||
End If
|
||||
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)
|
||||
BattleScreen.BattleQuery.AddRange({q})
|
||||
@ -783,7 +794,7 @@
|
||||
TempBattleScreen = BattleScreen
|
||||
|
||||
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
|
||||
|
||||
Core.SetScreen(selScreen)
|
||||
@ -813,10 +824,32 @@
|
||||
Battle.Won = True
|
||||
Battle.Fled = 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 = "Failed to run away."})
|
||||
Dim Trapped As Boolean = False
|
||||
Dim p As Pokemon = BattleScreen.OwnPokemon
|
||||
Dim op As Pokemon = BattleScreen.OppPokemon
|
||||
|
||||
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 Sub
|
||||
|
||||
@ -828,9 +861,11 @@
|
||||
BattleScreen.BattleQuery.Insert(0, New ToggleMenuQueryObject(True))
|
||||
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
|
||||
safariBallText = "No Safari Balls."
|
||||
safariBallText = Localization.GetString("battle_NoSafariBalls", "No Safari Balls.")
|
||||
End If
|
||||
_mainMenuItemList(0).Text = safariBallText
|
||||
End If
|
||||
@ -909,6 +944,10 @@
|
||||
_moveMenuItemList.Clear()
|
||||
BattleScreen.ClearMoveMenuTime = False
|
||||
End If
|
||||
If _moveMenuIndex > _moveMenuItemList.Count - 1 Then
|
||||
_moveMenuIndex = 0
|
||||
_moveMenuNextIndex = 0
|
||||
End If
|
||||
|
||||
If _moveMenuChoseMove = True Then
|
||||
_moveMenuAlpha -= 15
|
||||
@ -916,7 +955,7 @@
|
||||
_moveMenuAlpha = 0
|
||||
If BattleScreen.OwnPokemon.Attacks(_moveMenuIndex).SwapsOutOwnPokemon = True 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
|
||||
|
||||
Core.SetScreen(selScreen)
|
||||
@ -939,11 +978,21 @@
|
||||
Else
|
||||
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
|
||||
_moveMenuIndex = 0
|
||||
End If
|
||||
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
|
||||
End If
|
||||
If _retractMenu = False Then
|
||||
@ -1103,7 +1152,7 @@
|
||||
If Item.IsBall = True Then
|
||||
Core.Player.Inventory.RemoveItem(itemID.ToString, 1)
|
||||
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.Add(TempBattleScreen.FocusBattle())
|
||||
TempBattleScreen.BattleQuery.Insert(0, New ToggleMenuQueryObject(True))
|
||||
@ -1126,7 +1175,7 @@
|
||||
|
||||
If Item.BattleSelectPokemon = True Then
|
||||
'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
|
||||
|
||||
Core.SetScreen(selScreen)
|
||||
|
@ -88,6 +88,9 @@
|
||||
|
||||
Public Shared BattleMapOffset As New Vector3(0)
|
||||
|
||||
Public BackgroundTarget As RenderTarget2D
|
||||
Public NPCTarget As RenderTarget2D
|
||||
|
||||
Public Overrides Function GetScreenStatus() As String
|
||||
Dim pokemonString As String = "OwnPokemon=OWNEMPTY" & Environment.NewLine &
|
||||
"OppPokemon=OPPEMPTY"
|
||||
@ -177,6 +180,10 @@
|
||||
|
||||
Me.BattleMenu = New BattleMenu()
|
||||
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
|
||||
|
||||
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)
|
||||
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
|
||||
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
|
||||
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
|
||||
Screen.Level.Entities.Add(OwnPokemonNPC)
|
||||
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)
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
Screen.Level.Entities.Add(OwnPokemonNPC)
|
||||
@ -598,7 +609,6 @@
|
||||
SavedOverworld.SkyDome = Screen.SkyDome
|
||||
|
||||
InitializeScreen()
|
||||
FieldEffects.Weather = BattleWeather.WeatherTypes.Clear
|
||||
|
||||
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)
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
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)
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
Screen.Level.Entities.Add(OwnPokemonNPC)
|
||||
@ -938,6 +952,8 @@
|
||||
#End Region
|
||||
|
||||
Public Overrides Sub Draw()
|
||||
DebugDisplay.MaxVertices = 0
|
||||
DebugDisplay.MaxVisibleVertices = 0
|
||||
|
||||
Dim ForegroundEntities As New List(Of Entity)
|
||||
|
||||
@ -1010,7 +1026,6 @@ nextIndexBackground:
|
||||
|
||||
cQuery.Reverse()
|
||||
|
||||
Dim BackgroundTarget As New RenderTarget2D(Core.GraphicsDevice, Core.windowSize.Width, Core.windowSize.Height, False, SurfaceFormat.Color, DepthFormat.Depth24Stencil8)
|
||||
Core.GraphicsDevice.SetRenderTarget(BackgroundTarget)
|
||||
GraphicsDevice.Clear(Microsoft.Xna.Framework.Color.Transparent)
|
||||
|
||||
@ -1019,12 +1034,13 @@ nextIndexBackground:
|
||||
Next
|
||||
|
||||
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)
|
||||
GraphicsDevice.Clear(Microsoft.Xna.Framework.Color.Transparent)
|
||||
For i = 0 To ForegroundEntities.Count - 1
|
||||
ForegroundEntities(i).Render()
|
||||
If ForegroundEntities(i).Visible = True Then
|
||||
DebugDisplay.MaxVisibleVertices += ForegroundEntities(i).VertexCount
|
||||
End If
|
||||
DebugDisplay.MaxVertices += ForegroundEntities(i).VertexCount
|
||||
Next
|
||||
|
||||
@ -1078,6 +1094,8 @@ nextIndexForeground:
|
||||
If DrawColoredScreen = True Then
|
||||
Canvas.DrawRectangle(Core.windowSize, Me.ColorOverlay)
|
||||
End If
|
||||
ForegroundAnimationList.Clear()
|
||||
BackgroundAnimationList.Clear()
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub Update()
|
||||
@ -1280,6 +1298,9 @@ nextIndex:
|
||||
Else
|
||||
Core.Player.RoamingPokemonData = RoamingPokemon.ReplaceRoamingPokemon(RoamingPokemonStorage)
|
||||
End If
|
||||
If RoamingPokemonStorage.ScriptPath <> "" Then
|
||||
CType(SavedOverworld.OverworldScreen, OverworldScreen).AfterRoamingBattleScript = RoamingPokemonStorage.ScriptPath
|
||||
End If
|
||||
RoamingPokemon.ShiftRoamingPokemon(RoamingPokemonStorage.WorldID)
|
||||
End If
|
||||
|
||||
@ -1335,6 +1356,7 @@ nextIndex:
|
||||
End If
|
||||
|
||||
Dim hasLevelUp As Boolean = False
|
||||
Dim ItemReturnScript As String = "@Text.Show("
|
||||
For Each p As Pokemon In Core.Player.Pokemons
|
||||
If p.hasLeveledUp = True Then
|
||||
hasLevelUp = True
|
||||
@ -1348,7 +1370,10 @@ nextIndex:
|
||||
End If
|
||||
|
||||
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
|
||||
Else
|
||||
@ -1361,7 +1386,12 @@ nextIndex:
|
||||
End If
|
||||
|
||||
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
|
||||
Else
|
||||
If p.OriginalItem.IsGameModeItem = True Then
|
||||
@ -1369,15 +1399,28 @@ nextIndex:
|
||||
Else
|
||||
Core.Player.Inventory.AddItem(p.OriginalItem.ID.ToString, 1)
|
||||
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
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
p.ResetTemp()
|
||||
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
|
||||
Core.SetScreen(New TransitionScreen(Me, SavedOverworld.OverworldScreen, New Color(255, 255, 255), False, AddressOf ChangeSavedScreen))
|
||||
@ -1418,38 +1461,68 @@ nextIndex:
|
||||
FieldEffects.OppRageFistPower = 0
|
||||
|
||||
Else
|
||||
Dim ItemReturnScript As String = "@Text.Show("
|
||||
For Each p As Pokemon In Core.Player.Pokemons
|
||||
If IsRemoteBattle = True Then
|
||||
If p.OriginalItem IsNot Nothing 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
|
||||
p.Item = P3D.Item.GetItemByID(p.OriginalItem.ID.ToString)
|
||||
End If
|
||||
|
||||
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
|
||||
Else
|
||||
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
|
||||
Core.Player.Inventory.AddItem(p.OriginalItem.gmID, 1)
|
||||
Else
|
||||
Core.Player.Inventory.AddItem(p.OriginalItem.ID.ToString, 1)
|
||||
End If
|
||||
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
|
||||
Else
|
||||
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)
|
||||
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)
|
||||
|
||||
p.OriginalItem = Nothing
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
p.ResetTemp()
|
||||
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.OppRageFistPower = 0
|
||||
@ -1460,6 +1533,9 @@ nextIndex:
|
||||
BattleMapOffset = New Vector3(0)
|
||||
OwnLeadIndex = 0
|
||||
OppLeadIndex = 0
|
||||
|
||||
BackgroundTarget.Dispose()
|
||||
NPCTarget.Dispose()
|
||||
End Sub
|
||||
|
||||
Public Sub ChangeSavedScreen()
|
||||
|
@ -129,6 +129,9 @@
|
||||
Public OwnFutureSightTurns As Integer = 0 'Turns until Futuresight hits
|
||||
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
|
||||
Public OppSpikes As Integer = 0
|
||||
Public OppStealthRock As Integer = 0
|
||||
@ -253,6 +256,9 @@
|
||||
Public OppSandTomb 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)
|
||||
|
||||
'Weather
|
||||
@ -387,7 +393,7 @@
|
||||
End If
|
||||
Else
|
||||
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
|
||||
End If
|
||||
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
|
||||
Inherits QueryObject
|
||||
|
||||
Public AnimationStarted As Boolean = False
|
||||
Public AnimationEnded As Boolean = False
|
||||
Public BattleFlipped As Boolean = Nothing
|
||||
Public AnimationSequence As List(Of BattleAnimation3D)
|
||||
Public SpawnedEntities As List(Of Entity)
|
||||
Public CurrentEntity As Entity
|
||||
Public StartPosition As New Vector3(0)
|
||||
Dim AnimationStarted As Boolean = False
|
||||
Dim AnimationEnded As Boolean = False
|
||||
Dim BattleFlipped As Boolean = Nothing
|
||||
Dim AnimationSequence As List(Of BattleAnimation3D)
|
||||
Dim SpawnedEntities As List(Of Entity)
|
||||
Dim CurrentEntity As Entity
|
||||
Public DrawBeforeEntities As Boolean
|
||||
|
||||
Dim Backgrounds As List(Of Entity)
|
||||
Dim RenderObjects As List(Of Entity)
|
||||
|
||||
Public Overrides ReadOnly Property IsReady As Boolean
|
||||
Get
|
||||
Return AnimationEnded
|
||||
End Get
|
||||
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)
|
||||
Me.AnimationSequence = New List(Of BattleAnimation3D)
|
||||
Me.SpawnedEntities = New List(Of Entity)
|
||||
Me.DrawBeforeEntities = DrawBeforeEntities
|
||||
Me.BattleFlipped = BattleFlipped
|
||||
If entity IsNot Nothing Then
|
||||
Me.CurrentEntity = entity
|
||||
Me.StartPosition = entity.Position
|
||||
Me.Backgrounds = New List(Of Entity)
|
||||
Me.RenderObjects = New List(Of Entity)
|
||||
|
||||
If Entity IsNot Nothing Then
|
||||
Me.CurrentEntity = Entity
|
||||
End If
|
||||
AnimationSequenceBegin()
|
||||
End Sub
|
||||
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
|
||||
If a.AnimationType = BattleAnimation3D.AnimationTypes.Background Then
|
||||
If Backgrounds.Contains(a) = False AndAlso a.AnimationType = BattleAnimation3D.AnimationTypes.Background Then
|
||||
Backgrounds.Add(a)
|
||||
End If
|
||||
Next
|
||||
For Each entity As BattleAnimation3D In Me.SpawnedEntities
|
||||
RenderObjects.Add(entity)
|
||||
If RenderObjects.Contains(entity) = False Then
|
||||
RenderObjects.Add(entity)
|
||||
End If
|
||||
Next
|
||||
If RenderObjects.Count > 0 Then
|
||||
RenderObjects = (From r In RenderObjects Order By r.CameraDistance Descending).ToList()
|
||||
@ -54,6 +57,8 @@ Namespace BattleSystem
|
||||
[Object].UpdateModel()
|
||||
[Object].Render()
|
||||
Next
|
||||
RenderObjects.Clear()
|
||||
Backgrounds.Clear()
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub Update(BV2Screen As BattleScreen)
|
||||
@ -98,23 +103,32 @@ Namespace BattleSystem
|
||||
End Sub
|
||||
|
||||
Public Sub AnimationSequenceEnd()
|
||||
SpawnedEntities.Clear()
|
||||
Backgrounds.Clear()
|
||||
RenderObjects.Clear()
|
||||
AnimationEnded = True
|
||||
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
|
||||
Dim NewPosition As Vector3
|
||||
If Not Position = Nothing Then
|
||||
If BattleFlipped = True Then
|
||||
Position.X *= -1
|
||||
End If
|
||||
If CurrentEntity IsNot Nothing Then
|
||||
If BattleFlipped = True Then
|
||||
Position.X *= -1
|
||||
End If
|
||||
NewPosition = CurrentEntity.Position + Position
|
||||
If CurrentEntity.Model IsNot Nothing Then
|
||||
NewPosition.Y += 0.5F
|
||||
End If
|
||||
Else
|
||||
NewPosition = Position
|
||||
End If
|
||||
Else
|
||||
If CurrentEntity IsNot Nothing Then
|
||||
NewPosition = CurrentEntity.Position
|
||||
If CurrentEntity.Model IsNot Nothing Then
|
||||
NewPosition.Y += 0.5F
|
||||
End If
|
||||
Else
|
||||
NewPosition = New Vector3(0, 0, 0)
|
||||
End If
|
||||
@ -184,12 +198,11 @@ Namespace BattleSystem
|
||||
Destination = CurrentEntity.Position + New Vector3(DestinationX, DestinationY, DestinationZ)
|
||||
End If
|
||||
|
||||
|
||||
Dim baEntityMove As BAEntityMove = New BAEntityMove(MoveEntity, RemoveEntityAfter, Destination, Speed, SpinX, SpinZ, startDelay, endDelay, SpinXSpeed, SpinZSpeed, MovementCurve, MoveYSpeed)
|
||||
AnimationSequence.Add(baEntityMove)
|
||||
|
||||
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 ReturnPosition As New Vector3(0)
|
||||
|
||||
@ -301,7 +314,7 @@ Namespace BattleSystem
|
||||
AnimationSequence.Add(BAEntityFaceRotate)
|
||||
|
||||
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
|
||||
If Entity Is Nothing Then
|
||||
ScaleEntity = CurrentEntity
|
||||
@ -317,7 +330,7 @@ Namespace BattleSystem
|
||||
|
||||
Dim Scale As Vector3 = ScaleEntity.Scale
|
||||
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)
|
||||
End Sub
|
||||
|
||||
|
@ -60,11 +60,11 @@
|
||||
|
||||
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)
|
||||
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))
|
||||
Else
|
||||
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 Sub
|
||||
@ -96,7 +96,8 @@
|
||||
Else
|
||||
SoundManager.PlaySound("select")
|
||||
TempScreen.BattleQuery.Clear()
|
||||
FinishOppSwitch(TempScreen)
|
||||
FinishOppSwitchAnimation(TempScreen)
|
||||
FinishOppSwitchEffects(TempScreen)
|
||||
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)
|
||||
cq2.PassThis = True
|
||||
@ -116,7 +117,8 @@
|
||||
Else
|
||||
SoundManager.PlaySound("select")
|
||||
TempScreen.BattleQuery.Clear()
|
||||
FinishOppSwitch(TempScreen)
|
||||
FinishOppSwitchAnimation(TempScreen)
|
||||
FinishOppSwitchEffects(TempScreen)
|
||||
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)
|
||||
cq2.PassThis = True
|
||||
@ -138,7 +140,8 @@
|
||||
_chooseIndex = 1
|
||||
SoundManager.PlaySound("select")
|
||||
TempScreen.BattleQuery.Clear()
|
||||
FinishOppSwitch(TempScreen)
|
||||
FinishOppSwitchAnimation(TempScreen)
|
||||
FinishOppSwitchEffects(TempScreen)
|
||||
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)
|
||||
cq2.PassThis = True
|
||||
@ -152,7 +155,8 @@
|
||||
If Controls.Dismiss(True, True, True) = True Then
|
||||
SoundManager.PlaySound("select")
|
||||
TempScreen.BattleQuery.Clear()
|
||||
FinishOppSwitch(TempScreen)
|
||||
FinishOppSwitchAnimation(TempScreen)
|
||||
FinishOppSwitchEffects(TempScreen)
|
||||
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)
|
||||
cq2.PassThis = True
|
||||
@ -204,9 +208,9 @@
|
||||
TempScreen.OppFaint = False
|
||||
TempScreen.OwnStatistics.Switches += 1
|
||||
TempScreen.BattleQuery.Clear()
|
||||
TempScreen.Battle.SwitchOutOwn(TempScreen, PokeIndex, TempScreen.BattleQuery.Count)
|
||||
TempScreen.BattleQuery.Reverse()
|
||||
FinishOppSwitch(TempScreen)
|
||||
FinishOppSwitchAnimation(TempScreen)
|
||||
TempScreen.Battle.SwitchOutOwn(TempScreen, PokeIndex, -1)
|
||||
FinishOppSwitchEffects(TempScreen)
|
||||
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)
|
||||
cq2.PassThis = True
|
||||
@ -215,9 +219,9 @@
|
||||
TempScreen.Battle.StartRound(TempScreen)
|
||||
Else
|
||||
TempScreen.BattleQuery.Clear()
|
||||
TempScreen.Battle.SwitchOutOwn(TempScreen, PokeIndex, TempScreen.BattleQuery.Count)
|
||||
TempScreen.BattleQuery.Reverse()
|
||||
FinishOppSwitch(TempScreen)
|
||||
FinishOppSwitchAnimation(TempScreen)
|
||||
TempScreen.Battle.SwitchOutOwn(TempScreen, PokeIndex, -1)
|
||||
FinishOppSwitchEffects(TempScreen)
|
||||
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)
|
||||
cq2.PassThis = True
|
||||
@ -248,7 +252,7 @@
|
||||
|
||||
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.Battle.ChangeCameraAngle(1, False, BattleScreen)
|
||||
Dim oppModel As String = BattleScreen.GetModelName(False)
|
||||
@ -301,6 +305,9 @@
|
||||
End If
|
||||
BattleScreen.BattleQuery.Add(BallThrow)
|
||||
|
||||
|
||||
End Sub
|
||||
Public Sub FinishOppSwitchEffects(BattleScreen As BattleScreen)
|
||||
With BattleScreen
|
||||
Dim p As Pokemon = .OppPokemon
|
||||
Dim op As Pokemon = .OwnPokemon
|
||||
|
@ -29,6 +29,7 @@
|
||||
Me._text = Me._text.Replace("~", " ")
|
||||
Me._text = Me._text.Replace("<player.name>", 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("[POKE]", "Poké")
|
||||
|
||||
@ -79,11 +80,11 @@
|
||||
|
||||
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)
|
||||
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))
|
||||
Else
|
||||
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 Sub
|
||||
|
@ -112,11 +112,13 @@
|
||||
Case 2
|
||||
Select Case Me._entity
|
||||
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.Model = ModelManager.GetModel(BV2Screen.OwnPokemonNPC.ModelPath)
|
||||
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.Model = ModelManager.GetModel(BV2Screen.OppPokemonNPC.ModelPath)
|
||||
End Select
|
||||
|
@ -5,15 +5,15 @@ Namespace BattleSystem
|
||||
Public Class TrainerAI
|
||||
|
||||
'Trainer AI Levels:---------------------------------------------------------------------------------------------------------------------
|
||||
'Normal Trainers: 0-20 (0 being not very smart trainers like Bugcatchers, 20 being Cooltrainers, get higher levels when rematches occur)
|
||||
'(Johto) Gym Leaders: 10-40 (10 for Falkner, 40 for Clair)
|
||||
'(Kanto) Gym Leaders: All 60
|
||||
'Elite 4: 60
|
||||
'Lance: 100
|
||||
'Elder Li: 10
|
||||
'Rival: 40
|
||||
'Team Rocket Grunts: 5
|
||||
'Team Rocket Admins: 20
|
||||
'Normal Trainers: 0-1 (0 being not very smart trainers like Bugcatchers, 1 being Cooltrainers, get higher levels when rematches occur)
|
||||
'(Johto) Gym Leaders: 0-2 (0 for Falkner, 2 for Clair)
|
||||
'(Kanto) Gym Leaders: All 2
|
||||
'Elite 4: 2
|
||||
'Lance: 2
|
||||
'Elder Li: 0
|
||||
'Rival: 2
|
||||
'Team Rocket Grunts: 0
|
||||
'Team Rocket Admins: 1
|
||||
|
||||
Public Shared Function GetAIMove(ByVal BattleScreen As BattleScreen, ByVal OwnStep As Battle.RoundConst) As Battle.RoundConst
|
||||
Dim p As Pokemon = BattleScreen.OppPokemon
|
||||
@ -123,8 +123,8 @@ Namespace BattleSystem
|
||||
|
||||
'-------------------------------------Random move depending on difficulty---------------------------------------------------------'
|
||||
|
||||
'Only applies if trainer has an AI level below 20:
|
||||
If BattleScreen.Trainer.AILevel < 20 Then
|
||||
'Only applies if trainer has an AI level of 0:
|
||||
If BattleScreen.Trainer.AILevel <= 0 Then
|
||||
Dim AvailableAttacks As List(Of Integer) = New List(Of Integer)
|
||||
For i = 0 To m.Count - 1
|
||||
AvailableAttacks.Add(i)
|
||||
@ -143,150 +143,143 @@ Namespace BattleSystem
|
||||
Ready = True
|
||||
End If
|
||||
End While
|
||||
If Core.Player.DifficultyMode = 0 Then
|
||||
'Chance of 35% that the trainer is using a random move:
|
||||
If Core.Random.Next(0, 100) < 35 Then
|
||||
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
|
||||
'Chance of 35% that the trainer is using a random move:
|
||||
If Core.Random.Next(0, 100) < 35 Then
|
||||
Return ProduceOppStep(m, OppAttackChoice)
|
||||
End If
|
||||
End If
|
||||
|
||||
'-------------------------------------Switching-----------------------------------------------------------------------------------'
|
||||
|
||||
'Only applies if trainer has an AI level above or equal 40:
|
||||
'If BattleScreen.Trainer.AILevel >= 40 Then
|
||||
' If BattleCalculation.CanSwitch(BattleScreen, False) = True Then
|
||||
' If BattleScreen.Trainer.Pokemons.Count > 0 Then
|
||||
' Dim living As Integer = 0
|
||||
' For Each cP As Pokemon In BattleScreen.Trainer.Pokemons
|
||||
' If cP.HP > 0 And cP.Status <> Pokemon.StatusProblems.Fainted Then
|
||||
' living += 1
|
||||
' End If
|
||||
' Next
|
||||
' 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
|
||||
' Dim maxOpponentEff As Single = 0.0F
|
||||
' For Each Attack As BattleSystem.Attack In op.Attacks
|
||||
' Dim effectiveness As Single = BattleCalculation.CalculateEffectiveness(Attack.GetAttackByID(Attack.ID), BattleScreen, op, p, True)
|
||||
' If effectiveness > maxOpponentEff Then
|
||||
' maxOpponentEff = effectiveness
|
||||
' End If
|
||||
' Next
|
||||
' If maxOpponentEff > 1.0F Then
|
||||
' Dim chance As Integer = 0
|
||||
'Only applies if trainer has an AI level above or equal to 2:
|
||||
If BattleScreen.Trainer.AILevel >= 2 Then
|
||||
If BattleCalculation.CanSwitch(BattleScreen, False) = True Then
|
||||
If BattleScreen.Trainer.Pokemons.Count > 0 Then
|
||||
Dim living As Integer = 0
|
||||
For Each cP As Pokemon In BattleScreen.Trainer.Pokemons
|
||||
If cP.HP > 0 And cP.Status <> Pokemon.StatusProblems.Fainted Then
|
||||
living += 1
|
||||
End If
|
||||
Next
|
||||
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
|
||||
Dim maxOpponentEff As Single = 0.0F
|
||||
For Each Attack As BattleSystem.Attack In op.Attacks
|
||||
Dim effectiveness As Single = BattleCalculation.CalculateEffectiveness(Attack.GetAttackByID(Attack.ID), BattleScreen, op, p, True)
|
||||
If effectiveness > maxOpponentEff Then
|
||||
maxOpponentEff = effectiveness
|
||||
End If
|
||||
Next
|
||||
If maxOpponentEff > 1.0F Then
|
||||
Dim chance As Integer = 0
|
||||
|
||||
' Select Case maxOpponentEff
|
||||
' Case 1.25F
|
||||
' chance = 10
|
||||
' Case 1.5F
|
||||
' chance = 25
|
||||
' Case 2.0F
|
||||
' chance = 35
|
||||
' Case 4.0F
|
||||
' chance = 50
|
||||
' End Select
|
||||
Select Case maxOpponentEff
|
||||
Case 1.25F
|
||||
chance = 10
|
||||
Case 1.5F
|
||||
chance = 25
|
||||
Case 2.0F
|
||||
chance = 35
|
||||
Case 4.0F
|
||||
chance = 50
|
||||
End Select
|
||||
|
||||
' If RPercent(chance) = True Then
|
||||
' Dim lessTeamPs As New List(Of Integer)
|
||||
If RPercent(chance) = True Then
|
||||
Dim lessTeamPs As New List(Of Integer)
|
||||
|
||||
' For i = 0 To BattleScreen.Trainer.Pokemons.Count - 1
|
||||
' If i <> BattleScreen.OppPokemonIndex Then
|
||||
' Dim TeamP As Pokemon = BattleScreen.Trainer.Pokemons(i)
|
||||
' If TeamP.HP > 0 And TeamP.Status <> Pokemon.StatusProblems.Fainted Then
|
||||
' Dim alwaysLess As Boolean = True
|
||||
' For Each Attack As BattleSystem.Attack In op.Attacks
|
||||
' Dim effectiveness As Single = BattleCalculation.CalculateEffectiveness(Attack.GetAttackByID(Attack.ID), BattleScreen, op, TeamP, True)
|
||||
For i = 0 To BattleScreen.Trainer.Pokemons.Count - 1
|
||||
If i <> BattleScreen.OppPokemonIndex Then
|
||||
Dim TeamP As Pokemon = BattleScreen.Trainer.Pokemons(i)
|
||||
If TeamP.HP > 0 And TeamP.Status <> Pokemon.StatusProblems.Fainted Then
|
||||
Dim alwaysLess As Boolean = True
|
||||
For Each Attack As BattleSystem.Attack In op.Attacks
|
||||
Dim effectiveness As Single = BattleCalculation.CalculateEffectiveness(Attack.GetAttackByID(Attack.ID), BattleScreen, op, TeamP, True)
|
||||
|
||||
' If effectiveness >= maxOpponentEff Then
|
||||
' alwaysLess = False
|
||||
' Exit For
|
||||
' End If
|
||||
' Next
|
||||
' If alwaysLess = True Then
|
||||
' lessTeamPs.Add(i)
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' Next
|
||||
If effectiveness >= maxOpponentEff Then
|
||||
alwaysLess = False
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If alwaysLess = True Then
|
||||
lessTeamPs.Add(i)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
' If lessTeamPs.Count > 0 Then
|
||||
' Return ProduceOppStep(lessTeamPs(Core.Random.Next(0, lessTeamPs.Count)))
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
If lessTeamPs.Count > 0 Then
|
||||
Return ProduceOppStep(lessTeamPs(Core.Random.Next(0, lessTeamPs.Count)))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
' 'check for own moves: if only 0x: check for other pokemon in party (best fitting) and switch in
|
||||
' Dim only0 As Boolean = True
|
||||
' For Each Attack As BattleSystem.Attack In p.Attacks
|
||||
' Dim effectiveness As Single = BattleCalculation.CalculateEffectiveness(Attack.GetAttackByID(Attack.ID), BattleScreen, p, op, False)
|
||||
' If effectiveness <> 0.0F Then
|
||||
' only0 = False
|
||||
' Exit For
|
||||
' End If
|
||||
' Next
|
||||
' If only0 = True Then
|
||||
' Dim switchList As New List(Of Integer)
|
||||
' For i = 0 To BattleScreen.Trainer.Pokemons.Count - 1
|
||||
' If i <> BattleScreen.OppPokemonIndex Then
|
||||
' Dim TeamP As Pokemon = BattleScreen.Trainer.Pokemons(i)
|
||||
' If TeamP.HP > 0 And TeamP.Status <> Pokemon.StatusProblems.Fainted Then
|
||||
' switchList.Add(i)
|
||||
' End If
|
||||
' End If
|
||||
' Next
|
||||
' If switchList.Count > 0 Then
|
||||
' Return ProduceOppStep(switchList(Core.Random.Next(0, switchList.Count)))
|
||||
' End If
|
||||
' End If
|
||||
'check for own moves: if only 0x: check for other pokemon in party (best fitting) and switch in
|
||||
Dim only0 As Boolean = True
|
||||
For Each Attack As BattleSystem.Attack In p.Attacks
|
||||
Dim effectiveness As Single = BattleCalculation.CalculateEffectiveness(Attack.GetAttackByID(Attack.ID), BattleScreen, p, op, False)
|
||||
If effectiveness <> 0.0F Then
|
||||
only0 = False
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If only0 = True Then
|
||||
Dim switchList As New List(Of Integer)
|
||||
For i = 0 To BattleScreen.Trainer.Pokemons.Count - 1
|
||||
If i <> BattleScreen.OppPokemonIndex Then
|
||||
Dim TeamP As Pokemon = BattleScreen.Trainer.Pokemons(i)
|
||||
If TeamP.HP > 0 And TeamP.Status <> Pokemon.StatusProblems.Fainted Then
|
||||
switchList.Add(i)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
If switchList.Count > 0 Then
|
||||
Return ProduceOppStep(switchList(Core.Random.Next(0, switchList.Count)))
|
||||
End If
|
||||
End If
|
||||
|
||||
' 'own pokemon got cursed: 75%
|
||||
' If BattleScreen.FieldEffects.OppCurse > 0 Then
|
||||
' If RPercent(75) = True Then
|
||||
' Dim newSwitchIndex As Integer = 0
|
||||
' Dim canSwitchTo As New List(Of Integer)
|
||||
' For i = 0 To BattleScreen.Trainer.Pokemons.Count - 1
|
||||
' Dim TeamP As Pokemon = BattleScreen.Trainer.Pokemons(i)
|
||||
' If TeamP.HP > 0 And TeamP.Status <> Pokemon.StatusProblems.Fainted And i <> BattleScreen.OppPokemonIndex Then
|
||||
' canSwitchTo.Add(i)
|
||||
' End If
|
||||
' Next
|
||||
'own pokemon got cursed: 75%
|
||||
If BattleScreen.FieldEffects.OppCurse > 0 Then
|
||||
If RPercent(75) = True Then
|
||||
Dim newSwitchIndex As Integer = 0
|
||||
Dim canSwitchTo As New List(Of Integer)
|
||||
For i = 0 To BattleScreen.Trainer.Pokemons.Count - 1
|
||||
Dim TeamP As Pokemon = BattleScreen.Trainer.Pokemons(i)
|
||||
If TeamP.HP > 0 And TeamP.Status <> Pokemon.StatusProblems.Fainted And i <> BattleScreen.OppPokemonIndex Then
|
||||
canSwitchTo.Add(i)
|
||||
End If
|
||||
Next
|
||||
|
||||
' If canSwitchTo.Count > 0 Then
|
||||
' newSwitchIndex = canSwitchTo(Core.Random.Next(0, canSwitchTo.Count))
|
||||
If canSwitchTo.Count > 0 Then
|
||||
newSwitchIndex = canSwitchTo(Core.Random.Next(0, canSwitchTo.Count))
|
||||
|
||||
' Return ProduceOppStep(newSwitchIndex)
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
Return ProduceOppStep(newSwitchIndex)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
' 'own pokemon got confused: 50%
|
||||
' If p.HasVolatileStatus(Pokemon.VolatileStatus.Confusion) = True Then
|
||||
' If RPercent(50) = True Then
|
||||
' Dim newSwitchIndex As Integer = 0
|
||||
' Dim canSwitchTo As New List(Of Integer)
|
||||
' For i = 0 To BattleScreen.Trainer.Pokemons.Count - 1
|
||||
' Dim TeamP As Pokemon = BattleScreen.Trainer.Pokemons(i)
|
||||
' If TeamP.HP > 0 And TeamP.Status <> Pokemon.StatusProblems.Fainted And i <> BattleScreen.OppPokemonIndex Then
|
||||
' canSwitchTo.Add(i)
|
||||
' End If
|
||||
' Next
|
||||
'own pokemon got confused: 50%
|
||||
If p.HasVolatileStatus(Pokemon.VolatileStatus.Confusion) = True Then
|
||||
If RPercent(50) = True Then
|
||||
Dim newSwitchIndex As Integer = 0
|
||||
Dim canSwitchTo As New List(Of Integer)
|
||||
For i = 0 To BattleScreen.Trainer.Pokemons.Count - 1
|
||||
Dim TeamP As Pokemon = BattleScreen.Trainer.Pokemons(i)
|
||||
If TeamP.HP > 0 And TeamP.Status <> Pokemon.StatusProblems.Fainted And i <> BattleScreen.OppPokemonIndex Then
|
||||
canSwitchTo.Add(i)
|
||||
End If
|
||||
Next
|
||||
|
||||
' If canSwitchTo.Count > 0 Then
|
||||
' newSwitchIndex = canSwitchTo(Core.Random.Next(0, canSwitchTo.Count))
|
||||
If canSwitchTo.Count > 0 Then
|
||||
newSwitchIndex = canSwitchTo(Core.Random.Next(0, canSwitchTo.Count))
|
||||
|
||||
' Return ProduceOppStep(newSwitchIndex)
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
'End If
|
||||
Return ProduceOppStep(newSwitchIndex)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'-------------------------------------Items---------------------------------------------------------------------------------------'
|
||||
|
||||
|
@ -23,7 +23,7 @@ Public Class Trainer
|
||||
|
||||
Public VSImageOrigin As String = "VSIntro"
|
||||
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 OutroMessage As String = "TRAINER_DEFAULT_MESSAGE"
|
||||
@ -212,23 +212,30 @@ Public Class Trainer
|
||||
If PokeData.StartsWith("{") = True And PokeData.EndsWith("}") = True Then
|
||||
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
|
||||
If Core.Player.DifficultyMode = 1 Then
|
||||
addLevel = CInt(Math.Ceiling(level / 10))
|
||||
ElseIf Core.Player.DifficultyMode = 2 Then
|
||||
addLevel = CInt(Math.Ceiling(level / 5))
|
||||
End If
|
||||
|
||||
While level + addLevel > p.Level
|
||||
p.LevelUp(False)
|
||||
p.Experience = p.NeedExperience(p.Level)
|
||||
End While
|
||||
p.HP = p.MaxHP
|
||||
Dim addLevel As Integer = 0
|
||||
If Core.Player.DifficultyMode = 0 Then
|
||||
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
|
||||
addLevel = CInt(Math.Ceiling(level * CSng(GameModeManager.GetGameRuleValue("LevelMultiplier", "1.2").InsertDecSeparator) - level))
|
||||
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)
|
||||
Else
|
||||
Dim firstPart As String = ""
|
||||
@ -271,11 +278,20 @@ Public Class Trainer
|
||||
End If
|
||||
|
||||
Dim addLevel As Integer = 0
|
||||
If Core.Player.DifficultyMode = 1 Then
|
||||
addLevel = CInt(Math.Ceiling(Level / 10))
|
||||
If Core.Player.DifficultyMode = 0 Then
|
||||
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
|
||||
addLevel = CInt(Math.Ceiling(Level / 5))
|
||||
addLevel = CInt(Math.Ceiling(Level * CSng(GameModeManager.GetGameRuleValue("LevelMultiplier", "1.2").InsertDecSeparator) - Level))
|
||||
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
|
||||
|
||||
Dim maxLevel As Integer = CInt(GameModeManager.GetGameRuleValue("MaxLevel", "100"))
|
||||
@ -332,25 +348,25 @@ Public Class Trainer
|
||||
Me.VSImagePosition = New Vector2(0, 0)
|
||||
Case "orange", "1"
|
||||
Me.VSImagePosition = New Vector2(1, 0)
|
||||
Case "green", "2"
|
||||
Case "lightgreen", "2"
|
||||
Me.VSImagePosition = New Vector2(0, 1)
|
||||
Case "3"
|
||||
Case "gray", "3"
|
||||
Me.VSImagePosition = New Vector2(1, 1)
|
||||
Case "4"
|
||||
Case "violet", "4"
|
||||
Me.VSImagePosition = New Vector2(0, 2)
|
||||
Case "5"
|
||||
Case "green", "5"
|
||||
Me.VSImagePosition = New Vector2(1, 2)
|
||||
Case "6"
|
||||
Case "yellow", "6"
|
||||
Me.VSImagePosition = New Vector2(0, 3)
|
||||
Case "7"
|
||||
Case "brown", "7"
|
||||
Me.VSImagePosition = New Vector2(1, 3)
|
||||
Case "8"
|
||||
Case "lightblue", "8"
|
||||
Me.VSImagePosition = New Vector2(0, 4)
|
||||
Case "9"
|
||||
Case "lightgray", "9"
|
||||
Me.VSImagePosition = New Vector2(1, 4)
|
||||
Case "red", "10"
|
||||
Me.VSImagePosition = New Vector2(0, 5)
|
||||
Case "11"
|
||||
Case "empty", "11"
|
||||
Me.VSImagePosition = New Vector2(1, 5)
|
||||
Case "battlefrontier"
|
||||
Me.VSImagePosition = New Vector2(0, 0)
|
||||
@ -392,7 +408,7 @@ Public Class Trainer
|
||||
Me.BarImagePosition = New Vector2(1, 4)
|
||||
Case "red", "10"
|
||||
Me.BarImagePosition = New Vector2(0, 5)
|
||||
Case "11"
|
||||
Case "empty", "11"
|
||||
Me.BarImagePosition = New Vector2(1, 5)
|
||||
Case Else
|
||||
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.
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
|
||||
@battle.wild(494,70,0,,12)
|
||||
:endif
|
||||
:if:<battle.caught>=true
|
||||
@register.register(caughtvictini)
|
||||
:endif
|
||||
@register.register(battlevictini)
|
||||
@npc.register(liberty\room.dat|0|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
|
||||
|
||||
: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)
|
||||
@text.color(playercolor)
|
||||
@text.show(<player.name> received~the National Pokédex!)
|
||||
@ -43,6 +43,14 @@ version=2
|
||||
:end
|
||||
: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:
|
||||
@storage.set(str,pallet_oak_scriptcaller,flag)
|
||||
@script.start(pallet\evaldist)
|
||||
|
Binary file not shown.
@ -33,7 +33,7 @@ version=2
|
||||
:if:<system.scripttrigger>=phonereceiving
|
||||
@text.notification(Day-Care Man*Receiving call.......,500,5,5,phone,phone\012)
|
||||
: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
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
P3D/Content/Data/Scripts/quest/sevault/puzzesc.dat
Normal file
BIN
P3D/Content/Data/Scripts/quest/sevault/puzzesc.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.
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.
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