mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-04-08 18:35:09 +02:00
Compare commits
1419 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 | ||
|
6ed27c3721 | ||
|
344b65fe7e | ||
|
32be5bbb67 | ||
|
2551f0d5c7 | ||
|
bb78bb3543 | ||
|
50dd29d601 | ||
|
d546c7348d | ||
|
20b2ac35ea | ||
|
542d1084e0 | ||
|
86d6f706e9 | ||
|
48af8b91d7 | ||
|
b36a1f2bd3 | ||
|
29a790c477 | ||
|
e2933f78e7 | ||
|
e4cb8dfc91 | ||
|
67b2d55e85 | ||
|
af0b31b567 | ||
|
6f62a77d0f | ||
|
8661684927 | ||
|
69e8455cda | ||
|
0091704f4c | ||
|
f56dba35cc | ||
|
290d400823 | ||
|
8b483a636b | ||
|
1d26954eab | ||
|
f49eba341e | ||
|
fcac15b0bd | ||
|
dcfe88a811 | ||
|
8fb00475af | ||
|
0a218527b3 | ||
|
ac07ee10ea | ||
|
0b23cfb63e | ||
|
513bcd61a2 | ||
|
5df626dbfc | ||
|
4d629139aa | ||
|
1fbe0a14ad | ||
|
3e7f2f1cd3 | ||
|
dc8df01e3f | ||
|
b96f38c8a2 | ||
|
03dfdfeadd | ||
|
582500171e | ||
|
2394117aba | ||
|
5db9814099 | ||
|
0d26a24826 | ||
|
f2a68b20fd | ||
|
9850a9b888 | ||
|
3d7dbe2156 | ||
|
6932819c21 | ||
|
5f2d815e42 | ||
|
beff99d985 | ||
|
dff7a0ae49 | ||
|
27b130914e | ||
|
cbda6172bf | ||
|
50c7125f71 | ||
|
c50c645654 | ||
|
8ab0da3f38 | ||
|
7a1ab528aa | ||
|
27410cb283 | ||
|
be184a85ed | ||
|
28ec2aa1ab | ||
|
07bc005c47 | ||
|
f685dd5506 | ||
|
87ad7562f7 | ||
|
83318c4607 | ||
|
c21d040dc1 | ||
|
6b0a6cbab1 | ||
|
2874b71aac | ||
|
1f23b95827 | ||
|
e9a234d30c | ||
|
7663f5eb21 | ||
|
d329e00af5 | ||
|
dc3281dcb7 | ||
|
acb37ab7c3 | ||
|
16a83441d9 | ||
|
9129ae0675 | ||
|
d1656f8f22 | ||
|
d5b62e90b3 | ||
|
507b9216d9 | ||
|
9335cf64a4 | ||
|
da660052c8 | ||
|
3d046255d5 | ||
|
af390034b9 | ||
|
2a96fa4d7d | ||
|
e8da25f6bd | ||
|
85bcb52780 | ||
|
35f321bf7a | ||
|
3f1b7ffc0c | ||
|
845464f03c | ||
|
168255e1a0 | ||
|
5eefdf9d1c | ||
|
65e711f15c | ||
|
46026e8de0 | ||
|
c1cadd3078 | ||
|
8a3a9dbe9b | ||
|
8e13910d57 | ||
|
92f3832416 | ||
|
2538b835b9 | ||
|
8e47716c06 | ||
|
2c14eef239 | ||
|
f655939510 | ||
|
26ea58df47 | ||
|
10b6587ac5 | ||
|
60e86c41c3 | ||
|
f4d3a717fe | ||
|
6f40767147 | ||
|
4325351320 | ||
|
da7339cd79 | ||
|
ee6fa0d67a | ||
|
b2b34966db | ||
|
830a11d696 | ||
|
40e7fe2a34 | ||
|
4c91360cd5 | ||
|
a1c3c6f9da | ||
|
b40dde8904 | ||
|
0dad856a14 | ||
|
459ce005d0 | ||
|
09051e0cba | ||
|
5857a05eb9 | ||
|
13fa3f52d2 | ||
|
63c7f96cb8 | ||
|
bd2d2f2c3d | ||
|
58eba766ac | ||
|
3c01312fd6 | ||
|
84df4d7ccc | ||
|
a5e68a153a | ||
|
705e0b9725 | ||
|
0e5c260f42 | ||
|
2c3ca27c2d | ||
|
68a64fde7d | ||
|
250bc9899f | ||
|
58d438f179 | ||
|
e2d0996ffd | ||
|
5e87f04d73 | ||
|
8295bbffcc | ||
|
b8941b92a1 | ||
|
3e9c1cde9c | ||
|
453c041199 | ||
|
f6447b5552 | ||
|
4b2bd53e36 | ||
|
4e2068949a | ||
|
168a442855 | ||
|
2a869e0b4b | ||
|
1c7ce33a73 | ||
|
bd36bbfad0 | ||
|
34a856e1a3 | ||
|
860241e774 | ||
|
48c7d9b214 | ||
|
cf8e3c63b2 | ||
|
76dcb2a9a1 | ||
|
4f1a940d9e | ||
|
f3777e3130 | ||
|
d9c26c8550 | ||
|
bc8ad24353 | ||
|
864fa7f508 | ||
|
a8b022c613 | ||
|
cb5b6bb63a | ||
|
79f2662e6f | ||
|
a4f3268b6c | ||
|
e4e8c06119 | ||
|
926f0dac9b | ||
|
22edf29445 | ||
|
53304990f8 | ||
|
571aa11310 | ||
|
5d34878932 | ||
|
5616eb87a5 | ||
|
aeaddf3f79 | ||
|
dc5627e85f | ||
|
bc88f130d0 | ||
|
94f03e833a | ||
|
a7e723f720 | ||
|
6a33432cdd | ||
|
03df3e36a0 | ||
|
3bd6f1af5b | ||
|
d516a1e152 | ||
|
fef6b689ea | ||
|
1e8c1bf9b8 | ||
|
5019a59c0d | ||
|
96a47d3418 | ||
|
a8c8479ead | ||
|
1e16a5dcc4 | ||
|
6d83167a8d | ||
|
c0101a122a | ||
|
dae406f887 | ||
|
c76ee70b08 | ||
|
30d3929154 | ||
|
0860f3b63c | ||
|
7b7b23260a | ||
|
7136346b18 | ||
|
30d89a4b42 | ||
|
0119103942 | ||
|
5543a70c84 | ||
|
fce1309183 | ||
|
bc4e42d1f3 | ||
|
8a39146e3e | ||
|
721b7d992c | ||
|
5c3adbcb2a | ||
|
3d44bf61f3 | ||
|
f7fd221ce9 | ||
|
d2673ed435 | ||
|
de2c6c829e | ||
|
30ea882315 | ||
|
3468db7f21 | ||
|
ecc0b8400a | ||
|
241cb8af9c | ||
|
eff7029411 | ||
|
f55f910f3b | ||
|
d08b472b35 | ||
|
f0a9a9359b | ||
|
6bb8d2107f | ||
|
25bda8826a | ||
|
ca3ddfa441 | ||
|
dce892eda9 | ||
|
e87f7953e0 | ||
|
61b92076c9 | ||
|
ecb644b974 | ||
|
4460ac9f52 | ||
|
135f0cdd4e | ||
|
3d13d90b63 | ||
|
b5668f2f23 | ||
|
863e77508a | ||
|
04f971e8df | ||
|
8d2eb864c1 | ||
|
5b18669000 | ||
|
b66be1637c | ||
|
eccda481b9 | ||
|
5747c2f1ce | ||
|
552548b5ad | ||
|
d9eb12d341 | ||
|
d878559df2 | ||
|
062b14220c | ||
|
0eddb70011 | ||
|
5429ad9e15 | ||
|
18e020bfdf | ||
|
4a4a2133ee | ||
|
e23ba807eb | ||
|
12c7068bd6 | ||
|
ecd46961e2 | ||
|
fa8c8cef74 | ||
|
888371c914 | ||
|
0b183bb5f8 | ||
|
03bdf93468 | ||
|
944e42cadd | ||
|
c007d0d6f4 | ||
|
f5d2f66c75 | ||
|
13493287ba | ||
|
6b4e8941d2 | ||
|
464c317d2f | ||
|
b7a045e37c | ||
|
edf225189d | ||
|
f92373d447 | ||
|
cbce5512cc | ||
|
35c8e8f4c5 | ||
|
15f57d8bc5 | ||
|
49f54471b6 | ||
|
4b399a1892 | ||
|
e3c3a53e85 | ||
|
3ff8161a7b | ||
|
d7b08ca349 | ||
|
59b2205418 | ||
|
152422903d | ||
|
128556196e | ||
|
9ffd923e56 | ||
|
f8c63948d4 | ||
|
e8650f8d18 | ||
|
a5c6144ebf | ||
|
39017d57bf | ||
|
8d8e02a274 | ||
|
78cd53d745 | ||
|
d9473e5454 | ||
|
28070fa083 | ||
|
4e23c9f9da | ||
|
593c5731a1 | ||
|
73edefdd4b | ||
|
36294f8647 | ||
|
915293431e | ||
|
e2320d8f07 | ||
|
c68b55de91 | ||
|
a3f7bcaef0 | ||
|
e576f50c19 | ||
|
6e8067b30b | ||
|
5a7304c6fd | ||
|
3ba2ef6b58 | ||
|
14d284bb1e | ||
|
02f627b6d6 | ||
|
9ab54ac8ff | ||
|
f336731d0e | ||
|
8f396d0a7a | ||
|
acee085383 | ||
|
43f66368b9 | ||
|
f128382597 | ||
|
694acb7730 | ||
|
d504a4961e | ||
|
e8e27c727e | ||
|
2e85705bf8 | ||
|
ac18f79d99 | ||
|
0cdd7445c3 | ||
|
cbd8bc5046 | ||
|
7aa38cd921 | ||
|
df17680e97 | ||
|
3273b44315 | ||
|
c9b2bdfe62 | ||
|
783e401c39 | ||
|
3e51436c0e | ||
|
1419419d65 | ||
|
66a9ea8eec | ||
|
6fc78444f4 | ||
|
8a478fa3c8 | ||
|
e497776ecd | ||
|
d66da7f1e8 | ||
|
5c13283445 | ||
|
7cd60cc3ad | ||
|
84313dc429 | ||
|
3076bf5bc5 | ||
|
0a2324b12a | ||
|
ce565d7925 | ||
|
191fc26cae | ||
|
b42add2307 | ||
|
93bf259edb | ||
|
73e5cb97f8 | ||
|
d911935dfb | ||
|
6fe581dff9 | ||
|
d23fc9a37d | ||
|
49b0ad9103 | ||
|
bded481df8 | ||
|
d5bcb336dd | ||
|
5c3cbe89c1 | ||
|
41e4889e10 | ||
|
66fea25d44 | ||
|
339b7ae277 | ||
|
a02c4e3405 | ||
|
8c27ec5fba | ||
|
e9dc031b68 | ||
|
e78cabb598 | ||
|
6305acfdb5 | ||
|
3d50fe8059 | ||
|
5a447b8f01 | ||
|
5b464af881 | ||
|
1c27620e13 | ||
|
02475bb24a | ||
|
93a0a2a76d | ||
|
3c21a672c0 | ||
|
bda8fbc833 | ||
|
72bdc2976a | ||
|
52696d0fa3 | ||
|
32b5092aa2 | ||
|
ff6cff82d6 | ||
|
b7d2aef787 | ||
|
3848cd7e96 | ||
|
e8530768df | ||
|
8371dd72eb | ||
|
20dba9e218 | ||
|
9468972e78 | ||
|
7d81b96679 | ||
|
12927f986b | ||
|
8ea0371e5e | ||
|
bb72f7ab6d | ||
|
120eaceb12 | ||
|
5c80210e77 | ||
|
1b7565849f | ||
|
92ab5f2ccd | ||
|
96284cf40e | ||
|
07a388dd31 | ||
|
7263509579 | ||
|
abe69efb07 | ||
|
3761524fba | ||
|
d390e72c69 | ||
|
af2831673e | ||
|
fdcbdfa62b | ||
|
9c861fc0b4 | ||
|
80428d0751 | ||
|
8bb162ff13 | ||
|
72d7c311bb | ||
|
2ff0e8d1e8 | ||
|
4939a715c1 | ||
|
20a173874b | ||
|
bd522ffcff | ||
|
f78c739f9b | ||
|
e25bcace3e | ||
|
76de1152a9 | ||
|
f04332016e | ||
|
ecbd410e5b | ||
|
e44441df9a | ||
|
260c3a3b06 | ||
|
3d4bef33ff | ||
|
8adf5a1079 | ||
|
970feaefbc | ||
|
7c245946f0 | ||
|
25b3d620b6 | ||
|
5893036e92 | ||
|
7d1ffba691 | ||
|
b6924b8a6c | ||
|
cf10f54515 | ||
|
9749ba72bc | ||
|
3d11732bfb | ||
|
db93909252 | ||
|
0e37e99016 | ||
|
77a322360c | ||
|
716d3a9f8f | ||
|
5ed44da99b | ||
|
a1b1df55c6 | ||
|
da19fb4571 | ||
|
6032fbb6f4 | ||
|
c4fd9f19a7 | ||
|
36d14ec3d3 | ||
|
5b537f9631 | ||
|
b73023e416 | ||
|
22cedcd6c7 | ||
|
5e4f5d830c | ||
|
bf2a8aebc6 | ||
|
bce86162ef | ||
|
7b06b2571a | ||
|
25e850ccd5 | ||
|
7691d33a65 | ||
|
ea558ae187 | ||
|
0e9623c557 | ||
|
71bd0eaaef | ||
|
916c69d2b0 | ||
|
d200669998 | ||
|
c353b9c396 | ||
|
fab813c799 | ||
|
d9fe5cdb09 | ||
|
c3fb81a4c4 | ||
|
cc60a782f4 | ||
|
d44bc8fd11 | ||
|
859e3d27fd | ||
|
201108ae53 | ||
|
a514d4bd61 | ||
|
a6f02a71ea | ||
|
bd67179e6d | ||
|
3176c6b9cb | ||
|
3f6f42bd8c | ||
|
0d66848c27 | ||
|
1ad3aefb54 | ||
|
7163093bbc | ||
|
51359c7233 | ||
|
7f530ab8b7 | ||
|
1a4de5bc97 | ||
|
19cea35bed | ||
|
338b22fdfd | ||
|
de6001a97d | ||
|
47e0594bb5 | ||
|
fdfc952ac8 | ||
|
e6898945e6 | ||
|
64b54feb76 | ||
|
3cadf51c31 | ||
|
a6129051da | ||
|
b3d0ef87d4 | ||
|
1c5d45b7ee | ||
|
dae28c537a | ||
|
d80a9170c1 | ||
|
06a76218c7 | ||
|
104a504c13 | ||
|
ec06fce779 | ||
|
6520377758 | ||
|
7699621036 | ||
|
6440ff0466 | ||
|
4b6057332f | ||
|
29a9ec6ebb | ||
|
3065c1960a | ||
|
0b69b854b9 | ||
|
fad33eaa4a | ||
|
d2d937e336 | ||
|
6764062c79 | ||
|
4b97c2ca24 | ||
|
cb37645746 | ||
|
e1be26284f | ||
|
a90ef6e6d8 | ||
|
d88974c617 | ||
|
8a962136cf | ||
|
51636194f8 | ||
|
9aec7b9161 | ||
|
8b0a91dfa0 | ||
|
c8c748ad1a | ||
|
0ff7969ba2 | ||
|
18d7ed6f35 | ||
|
b6ba893a5d | ||
|
4a7c89cf53 | ||
|
d190ef524d | ||
|
ba4a377d23 | ||
|
7112b7cdf1 | ||
|
581a2c696c | ||
|
7e35801db0 | ||
|
20e456ead8 | ||
|
9035d28a1b | ||
|
f1aeb43b75 | ||
|
4d65d4bbc8 | ||
|
df992888a2 | ||
|
a005b60ad9 | ||
|
af937955b9 | ||
|
9d024c93df | ||
|
e0f17269c8 | ||
|
698d367285 | ||
|
7a4b03ad3b | ||
|
d96152d133 | ||
|
030f5a5c74 | ||
|
a24568cd41 | ||
|
4b2138d3b2 | ||
|
1d535bc14d | ||
|
ab55d4d1d7 | ||
|
3200dd9d15 | ||
|
a386be5eb6 | ||
|
62fea61236 | ||
|
a6d9a21b72 | ||
|
5d8ae1b1b9 | ||
|
592420abac | ||
|
f93fc668c6 | ||
|
83aa835341 | ||
|
8de3030558 | ||
|
7b41b1fa16 | ||
|
9971ed1d5f | ||
|
0e8170a449 | ||
|
3c5f5ee889 | ||
|
ec7392aa22 | ||
|
5617e94f6f | ||
|
db35572eb1 | ||
|
cda0c79160 | ||
|
a0aa947c5c | ||
|
7bffd5df72 | ||
|
31834572b0 | ||
|
c287e2ce36 | ||
|
7be2275050 | ||
|
3074bb8285 | ||
|
16b8b030eb | ||
|
a69f5b3f49 | ||
|
2e0966dd04 | ||
|
b91a5f586f | ||
|
71e34ea4c0 | ||
|
09be466c3c | ||
|
f627d9dd55 | ||
|
2e26b2d0c8 | ||
|
4de02d4b67 | ||
|
512dad9529 | ||
|
a9ab50f472 | ||
|
92e611adcb | ||
|
dc744ea02a | ||
|
f9602e0a07 | ||
|
741e0c1442 | ||
|
ee2a304be2 | ||
|
fb63697ebd | ||
|
c6caf0dbbb | ||
|
ef0e2709f4 | ||
|
228cc77755 | ||
|
840bd17aba | ||
|
67f1f9afcd | ||
|
bc69bb36ac | ||
|
00341dff77 | ||
|
4805bb2836 | ||
|
5b6c902f65 | ||
|
65ca21139b | ||
|
63b2134ef6 | ||
|
aee6d641b1 | ||
|
0600eb4d35 | ||
|
9aa43a95a4 | ||
|
90810667c9 | ||
|
3cc76934e9 | ||
|
6e1d409a9d | ||
|
522196367a | ||
|
315d250405 | ||
|
098feb8e0d | ||
|
771540a4a0 | ||
|
36b4800690 | ||
|
1467b907f4 | ||
|
ac4e5801c2 | ||
|
319ad9b231 | ||
|
4e4b1bac73 | ||
|
a6170d0e01 | ||
|
094b90d4c0 | ||
|
57e0bf2f15 | ||
|
bb68e96bd5 | ||
|
551a1f3659 | ||
|
2d0ad05048 | ||
|
451115d7aa | ||
|
9b702bd1bc | ||
|
5363db90cf | ||
|
e30d5b017d | ||
|
a5a8162f5f | ||
|
5cd5e00587 | ||
|
a2718ac639 | ||
|
37e1c62ff5 | ||
|
8808c8f9f8 | ||
|
5bacef9eee | ||
|
a11f46dcd6 | ||
|
ddbbd21043 | ||
|
2e1b66a45d | ||
|
40b844e4d9 | ||
|
d13b5eb8d3 | ||
|
ba98f40394 | ||
|
ca29595d25 | ||
|
b8535774aa | ||
|
2a3579f684 | ||
|
efba920dda | ||
|
45cc53a6ef | ||
|
a0e04eda44 | ||
|
13c0c56f2b | ||
|
21fef0dca0 | ||
|
6d3b35a831 | ||
|
66bdbe5b7f | ||
|
e5a1a7d1f0 | ||
|
3b1f3075e8 | ||
|
24f47ebbbf | ||
|
02824d1609 | ||
|
37580a3336 | ||
|
630cf4f9c9 | ||
|
1a1e8bcf9b | ||
|
088bb1ceb2 | ||
|
7d9db111d2 | ||
|
348ba89b15 | ||
|
e2793e6a03 | ||
|
39ce4458f1 | ||
|
966525b14d | ||
|
2314ce6834 | ||
|
4aeecc99d1 | ||
|
bd38e5c2ab | ||
|
99bf455a6e | ||
|
50c102fe89 | ||
|
f071823869 | ||
|
046df24c43 | ||
|
791104ee49 | ||
|
e9013a9371 | ||
|
8bf3c7daf3 | ||
|
8747596a60 | ||
|
7afa1a916c | ||
|
0a9e7f07e7 | ||
|
732103bab8 | ||
|
5656e75778 | ||
|
ce4261445b | ||
|
68c210b344 | ||
|
e25295ae48 | ||
|
ce6d8344a6 | ||
|
6e0dd748d8 | ||
|
bbacf12cd5 | ||
|
20d52471ad | ||
|
d5c3e33947 | ||
|
4b48b8104f | ||
|
c2d6d70d43 | ||
|
956c6147cd | ||
|
5ab3fe7d5b | ||
|
ff0111ecdc | ||
|
0fef783154 | ||
|
148be15388 | ||
|
4363f3f4ed | ||
|
333873fdae | ||
|
c8cf5caeac | ||
|
ba2a970b11 | ||
|
a7013a19bc | ||
|
5a296234f4 | ||
|
b3becd5653 | ||
|
a62c78e9ee | ||
|
afb5271e34 | ||
|
d14ec56323 | ||
|
cf437a1e88 | ||
|
77cfefd598 | ||
|
b23c0455e6 | ||
|
9c9ae00f39 | ||
|
52ee3da1a2 | ||
|
b02542ff67 | ||
|
2689467a7c | ||
|
fc1ff4854d | ||
|
09da089212 | ||
|
cec5c0c172 | ||
|
489af57626 | ||
|
46c814410c | ||
|
2dcd9a69b9 | ||
|
f82f001026 | ||
|
80468415f2 | ||
|
76648bd5ba | ||
|
9988993c54 | ||
|
1bdd6e1c55 | ||
|
ccad3e1f21 | ||
|
11cd9432db | ||
|
e93ee4a2f8 | ||
|
f34ddccb94 | ||
|
54215c80ea | ||
|
b12ae2026d | ||
|
17ef30605c | ||
|
ba07491069 | ||
|
aa105b38a2 | ||
|
f90152c506 | ||
|
ae5a26f8e3 | ||
|
f1484c77ca | ||
|
cc582b21fd | ||
|
779fda3885 | ||
|
b2f6c98f8e | ||
|
734ab3f4e9 | ||
|
88fdeffdd1 | ||
|
ce165c1e57 | ||
|
774125da9e | ||
|
b9f6637365 | ||
|
5819ca30fe | ||
|
a806284149 | ||
|
390d8086dd | ||
|
2987cbb177 | ||
|
66046800d3 | ||
|
9a7543fb33 | ||
|
ad6c008a98 | ||
|
7ccfe3184f | ||
|
e5ee6cb145 | ||
|
628528b018 | ||
|
0ae62ceaef | ||
|
19d88a3bda | ||
|
734ece683c | ||
|
ffefa421c4 | ||
|
611e9688b9 | ||
|
1114c3ae36 | ||
|
f5143a710a | ||
|
2d92359734 | ||
|
0670fb54d7 | ||
|
9e991c88e4 | ||
|
2f0cccb052 | ||
|
022597262c | ||
|
daef33a886 | ||
|
94247a7754 | ||
|
bd647ef071 | ||
|
a371268441 | ||
|
4a38a43e1f | ||
|
6dd4750770 | ||
|
ec5f551bd2 | ||
|
42e625b5f4 | ||
|
f50a62d3fc | ||
|
36a5ebf936 | ||
|
5a6711f126 | ||
|
d9e21e0b6d | ||
|
b75de6fe5e | ||
|
75378268c0 | ||
|
ca410ee53b | ||
|
de45805b89 | ||
|
e75edaa7ff | ||
|
91fc1bd1b9 | ||
|
a3444d53e0 | ||
|
cf0ec7f69d | ||
|
c39f834ff9 | ||
|
24ba4b4378 | ||
|
300aa87738 | ||
|
10a2faa62c | ||
|
f77c45d102 | ||
|
9c7b511be4 | ||
|
940cfb91ad | ||
|
3414d31b62 | ||
|
96f6bc2a42 | ||
|
15a34ad711 | ||
|
72d653f65f | ||
|
b27136d6bf | ||
|
614c5fcdac | ||
|
1c0ba6b803 | ||
|
fabab5e32e | ||
|
f30ed7af8f | ||
|
4042783c4c | ||
|
628f379a28 | ||
|
4d1899037b | ||
|
74d5981c22 | ||
|
1503cecb1a | ||
|
09fec864e7 | ||
|
4464766202 | ||
|
5b7147c720 | ||
|
9b7e52e9e6 | ||
|
32bd5ed36e | ||
|
a15414bf24 | ||
|
7d300c93d5 | ||
|
f95034531b | ||
|
8f372b16f2 | ||
|
cf5ee111be | ||
|
55106f8450 | ||
|
48d3a0505b | ||
|
c94f7a2b1b | ||
|
d3bde7eef0 | ||
|
4f2513dac9 | ||
|
72fceebcb0 | ||
|
2b0531ed8a | ||
|
4c165742b9 | ||
|
ed20fd14e8 | ||
|
b8ffdb73c3 | ||
|
7e7dae0d20 | ||
|
686cef84fe | ||
|
02aef02183 | ||
|
6d5c798321 | ||
|
d839b64689 | ||
|
f77961afff | ||
|
074ee8bbfe | ||
|
7dedbb7ec2 | ||
|
15b974fe3f | ||
|
a494f19dbb | ||
|
529e95ad2e | ||
|
aa982addbe | ||
|
6562aba3de | ||
|
4b0cfde2fc | ||
|
2e9d7bdd26 | ||
|
0d3041d1d7 | ||
|
724ddabc88 | ||
|
748a6e8bcc | ||
|
d5e46df65e | ||
|
cdccbfcc67 | ||
|
678cd35fde | ||
|
94541ab68e | ||
|
cc2d46153d | ||
|
ffdc28dd85 | ||
|
89d074e1e5 | ||
|
2ce18dbc97 | ||
|
3a4a4693be | ||
|
d0ea913902 | ||
|
e14e4c660c | ||
|
229b36a90b | ||
|
88807bf0aa | ||
|
77271a4b67 | ||
|
5a8fdf1058 | ||
|
3273cf8edc | ||
|
4054e7bcaa | ||
|
2de791ab2b | ||
|
53e77a1c98 | ||
|
7723db708b | ||
|
594addda47 | ||
|
dfbaaf2b33 | ||
|
9970d892de | ||
|
f2e093072e | ||
|
450b060271 | ||
|
dc454d2a68 | ||
|
7ae9ebaa50 | ||
|
342f3924b1 | ||
|
2feb3052db | ||
|
554569d45d | ||
|
f260ec0900 | ||
|
3ea6b65cac | ||
|
9d65d60d30 | ||
|
0719deb7c2 | ||
|
d8bd964b3f | ||
|
728739760d | ||
|
a1a84bbe40 | ||
|
260ff56150 | ||
|
7c74e541be | ||
|
353224f269 | ||
|
add7f4ac6f | ||
|
30c368f9be | ||
|
ca6d063e2c | ||
|
1456f6e71a | ||
|
65e9fddb6d | ||
|
73727edb6c | ||
|
2328ca5c67 | ||
|
eeae37a495 | ||
|
3db8b79528 | ||
|
3a4adda6ba | ||
|
6c6eba362f | ||
|
33a9d0ad5b | ||
|
e95de32ad9 | ||
|
0432aff0e7 | ||
|
68a9d197e5 | ||
|
8338c385ee | ||
|
a0ee905c85 | ||
|
f7c97ec7c9 | ||
|
b3422ba82a | ||
|
8547c26a3e | ||
|
ce1b178a2c | ||
|
fe8ef2351d | ||
|
f2ca0927e0 | ||
|
b538376a1e | ||
|
e5b1242384 | ||
|
ca5b22a143 | ||
|
44ccaa20f9 | ||
|
d5dbac8ec3 | ||
|
92a3e62520 | ||
|
1c9c0ef5ba | ||
|
f92b2962dc | ||
|
3cad814d5d | ||
|
e25d67384a | ||
|
7a0b4a6a21 | ||
|
f9e5f32382 | ||
|
6d3667be9f | ||
|
49ff0f8827 | ||
|
01ada51a96 | ||
|
040f876c94 | ||
|
86f5334aff | ||
|
f103145780 | ||
|
9e0407d48d | ||
|
35a3861c9f | ||
|
d230d55456 | ||
|
9d370f269b | ||
|
627bb7eb2b | ||
|
423375f4a6 | ||
|
58fd846cc9 | ||
|
654c498025 | ||
|
8463977303 | ||
|
5618b0c4db | ||
|
7468fb38b1 | ||
|
9d9045218c | ||
|
cef17ea173 | ||
|
96f9c056b1 | ||
|
ac34e0cab2 | ||
|
35422b758a | ||
|
6e106a28fa | ||
|
da107320cc | ||
|
e65ec432ec | ||
|
935dd6fcd0 | ||
|
790e8ec382 | ||
|
f3633cc0d8 | ||
|
9d5411986f | ||
|
52f900291f | ||
|
ee3244d554 | ||
|
ebe7094f50 | ||
|
37bee3ef38 | ||
|
b494c54dc1 | ||
|
b49606c616 | ||
|
6866fd496e | ||
|
3dba6774d4 | ||
|
cc4b50f059 | ||
|
05de30faed | ||
|
7c2f360dbe | ||
|
55412e3286 | ||
|
7dcc423480 | ||
|
b3b719e5c0 | ||
|
f3028d475d | ||
|
75a71fbe7b | ||
|
bdb0278280 | ||
|
c0c4146607 | ||
|
a86e478342 | ||
|
56f9670e0d | ||
|
dcf25a4817 | ||
|
4473b706a4 | ||
|
4ed95f00c1 | ||
|
6e2f925ba8 | ||
|
4511946f27 | ||
|
8ea37604eb | ||
|
3bea96a5ea | ||
|
714869290c | ||
|
7d1931abd1 | ||
|
da637a85af | ||
|
61e35007ad | ||
|
ac5fa28483 | ||
|
9312aa18c3 | ||
|
f5eff34304 | ||
|
39d8e1b59f | ||
|
8f7c725b95 | ||
|
b015a3632d | ||
|
b52e01e19a | ||
|
afe35786a5 | ||
|
c6b3a97885 | ||
|
37fd285ca4 | ||
|
3855f806bd | ||
|
b5282dd9f9 | ||
|
57e145b668 | ||
|
d74103073d | ||
|
33fa45afe6 | ||
|
e9b4234add | ||
|
69a9586f31 | ||
|
169ce4c709 | ||
|
7ca13b1a8d | ||
|
683c21ba09 | ||
|
470ccdff4f | ||
|
bbaeeaaa95 | ||
|
269b7c3721 | ||
|
dc38071637 | ||
|
653fc249d1 | ||
|
d4d53ba0ea | ||
|
b14277a91d | ||
|
d2d4736039 | ||
|
d2860b15a8 | ||
|
6bb3f596ca | ||
|
62d4dc3523 | ||
|
d84bec2fbf | ||
|
90a9f56a25 | ||
|
ff35093697 | ||
|
f40413e4b2 | ||
|
da2242b24b | ||
|
c695a8c57d | ||
|
8a61b2ba14 | ||
|
b392894461 | ||
|
43bfc04eff | ||
|
f8b74bf86d | ||
|
4785492836 | ||
|
dba1e721d6 | ||
|
a4b88fb463 | ||
|
397ae27832 | ||
|
3f3836cb6f | ||
|
b9a7183166 | ||
|
5209a6e768 | ||
|
315c1063df | ||
|
95a88b5bc8 | ||
|
fd93f96cbc | ||
|
0392d7f0fe | ||
|
24832a346b | ||
|
4c92f343d7 | ||
|
8f1eb6795f | ||
|
d8d993959f | ||
|
d3c7c07a18 | ||
|
3cd4b43c4b | ||
|
964fceda68 | ||
|
e37268ffb5 | ||
|
9c611b9339 | ||
|
f9c2b98c30 | ||
|
9e86665e58 | ||
|
45d168a2ba | ||
|
0fe37c71b6 | ||
|
3dbede9988 | ||
|
6d43b3f4ee | ||
|
3e9f61470e | ||
|
c55e2b55eb | ||
|
1f325a006b | ||
|
0fb77176d5 | ||
|
b6ad6adffa | ||
|
01ef42930e | ||
|
aef944812a | ||
|
abdd6d5ce5 | ||
|
09d55d58e3 | ||
|
3d41783c71 | ||
|
936368b322 | ||
|
5614e05e4e | ||
|
8bf24306f6 | ||
|
dbe22c3e17 | ||
|
9d85a79f65 | ||
|
1e2af514b2 | ||
|
21937ffcf9 | ||
|
0e32b45b6c | ||
|
d4ad4e2e45 | ||
|
cbf3e2c30f | ||
|
9ebfb0c491 | ||
|
336bbf4f12 | ||
|
cceea5684b | ||
|
531137c157 | ||
|
00f78d5728 | ||
|
b14ce0a33f |
NuGet.config
P3D
Battle
BattleAnimations
BABackground.vbBACameraChangeAngle.vbBACameraOscillateMove.vbBAEntityColor.vbBAEntityFaceRotate.vbBAEntityMove.vbBAEntityOpacity.vbBAEntityOscillateMove.vbBAEntityRotate.vbBAEntityScale.vbBAEntitySetPosition.vbBAEntityTextureChange.vbBAPlaySound.vbBattleAnimation3D.vb
BattleStats.vbBattleSystemV2
Battle.vbBattleCalculation.vbBattleCameraV2.vbBattleMenu.vbBattleScreen.vbFieldEffects.vb
Trainer.vbQueryObjects
AnimationQueryObject.vbPlaySoundQueryObject.vbSwitchPokemonQueryObject.vbTextQueryObject.vbToggleEntityQueryObject.vbTriggerNewRoundPVPQueryObject.vb
TrainerAI.vbContent/Data
Items
Moves
Scripts
alph
AlphHouse_MapScript.datAlphHouse_UnownDexScientist.datRuinsOfAlph_MapScript.datRuinsOfAlph_UnownDexScientist.datalph_oldman.datcomputer.dat
barktown
blackthorn
celadon
center_script.datceruleancave
cherrygrove
chrono
cianwood
computer_choose.datdiamonddive
dungeon
ecruteak
elmlab
embtower
eusine
faraway
floe
fortune/dot
frontier
@ -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,59 +2,108 @@
|
||||
|
||||
Inherits BattleAnimation3D
|
||||
|
||||
Public TransitionSpeed As Single = 0.01F
|
||||
Public FadeIn As Boolean = False
|
||||
Public FadeOut As Boolean = False
|
||||
Public BackgroundOpacity As Single = 1.0F
|
||||
Public EndState As Single = 0.0F
|
||||
Public Texture As Texture2D
|
||||
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 Sub New(ByVal Texture As Texture2D, ByVal TransitionSpeed As Single, ByVal FadeIn As Boolean, FadeOut As Boolean, ByVal EndState As Single, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal StartState As Single = 0.0F)
|
||||
Public Enum FadeSteps As Integer
|
||||
FadeIn
|
||||
Duration
|
||||
FadeOut
|
||||
End Enum
|
||||
|
||||
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.EndState = EndState
|
||||
Me.FadeIn = FadeIn
|
||||
Me.FadeOut = FadeOut
|
||||
Me.TransitionSpeed = TransitionSpeed
|
||||
Me.AfterFadeInOpacity = AfterFadeInOpacity
|
||||
Me.FadeInSpeed = FadeInSpeed
|
||||
Me.FadeOutSpeed = FadeOutSpeed
|
||||
Me.DoTile = DoTile
|
||||
Me.AnimationWidth = CInt(Texture.Width / AnimationLength)
|
||||
DurationWhole = CSng(Math.Truncate(CDbl(Duration / 6.0F)))
|
||||
DurationFraction = CSng((Duration / 6.0F - DurationWhole) * 1000)
|
||||
Me.TextureScale = TextureScale
|
||||
|
||||
Me.BackgroundOpacity = StartState
|
||||
If Me.AnimationWidth <> -1 OrElse Me.AnimationWidth <> Nothing Then
|
||||
BackgroundAnimation = New Animation(Me.Texture, 1, AnimationLength, Me.AnimationWidth, Me.Texture.Height, AnimationSpeed * 24, 0, 0)
|
||||
CurrentRectangle = BackgroundAnimation.TextureRectangle
|
||||
Else
|
||||
Me.AnimationWidth = Texture.Width
|
||||
End If
|
||||
Me.Visible = False
|
||||
|
||||
Me.AnimationType = AnimationTypes.Background
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub Render()
|
||||
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)
|
||||
|
||||
If Date.Now >= startDelay AndAlso Me.BackgroundOpacity > 0.0F Then
|
||||
Core.SpriteBatch.Draw(Me.Texture, New Rectangle(0, 0, windowSize.Width, windowSize.Height), New Color(255, 255, 255, CInt(255 * Me.BackgroundOpacity)))
|
||||
If DoTile = False Then
|
||||
Core.SpriteBatch.Draw(Texture, New Rectangle(0, 0, windowSize.Width, windowSize.Height), CurrentRectangle, New Color(255, 255, 255, CInt(255 * Me.BackgroundOpacity)))
|
||||
Else
|
||||
For Dx = 0 To Core.windowSize.Width Step AnimationWidth
|
||||
For Dy = 0 To Core.windowSize.Height Step Texture.Height
|
||||
Core.SpriteBatch.Draw(Texture, New Rectangle(Dx * TextureScale, Dy * TextureScale, AnimationWidth * TextureScale, Texture.Height * TextureScale), CurrentRectangle, New Color(255, 255, 255, CInt(255 * Me.BackgroundOpacity)))
|
||||
Next
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
Core.GraphicsDevice.SetRenderTarget(Nothing)
|
||||
Core.SpriteBatch.Draw(BackgroundTarget, windowSize, New Color(255, 255, 255, CInt(255 * Me.BackgroundOpacity)))
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub DoActionActive()
|
||||
If Me.FadeIn = True Then
|
||||
If Me.EndState > Me.BackgroundOpacity Then
|
||||
Me.BackgroundOpacity += Me.TransitionSpeed
|
||||
If Me.BackgroundOpacity >= Me.EndState Then
|
||||
Me.BackgroundOpacity = Me.EndState
|
||||
Me.FadeIn = False
|
||||
Me.EndState = 0
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If Me.FadeOut = True Then
|
||||
If Me.EndState < Me.BackgroundOpacity Then
|
||||
Me.BackgroundOpacity -= Me.TransitionSpeed
|
||||
If Me.BackgroundOpacity <= Me.EndState Then
|
||||
Me.BackgroundOpacity = Me.EndState
|
||||
End If
|
||||
End If
|
||||
If Me.BackgroundOpacity = Me.EndState Then
|
||||
Me.Ready = True
|
||||
End If
|
||||
Else
|
||||
Me.BackgroundOpacity = Me.EndState
|
||||
Me.Ready = True
|
||||
If BackgroundAnimation IsNot Nothing Then
|
||||
BackgroundAnimation.Update(0.005)
|
||||
If CurrentRectangle <> BackgroundAnimation.TextureRectangle Then
|
||||
CurrentRectangle = BackgroundAnimation.TextureRectangle
|
||||
End If
|
||||
End If
|
||||
Select Case Me.FadeProgress
|
||||
Case FadeSteps.FadeIn
|
||||
If Me.AfterFadeInOpacity > Me.BackgroundOpacity Then
|
||||
Me.BackgroundOpacity += Me.FadeInSpeed
|
||||
If Me.BackgroundOpacity >= Me.AfterFadeInOpacity Then
|
||||
DurationDate = Date.Now + New TimeSpan(0, 0, 0, CInt(DurationWhole), CInt(DurationFraction))
|
||||
FadeProgress = FadeSteps.Duration
|
||||
Me.BackgroundOpacity = Me.AfterFadeInOpacity
|
||||
End If
|
||||
Else
|
||||
FadeProgress = FadeSteps.Duration
|
||||
Me.BackgroundOpacity = Me.AfterFadeInOpacity
|
||||
End If
|
||||
Case FadeSteps.Duration
|
||||
If Date.Now >= DurationDate Then
|
||||
FadeProgress = FadeSteps.FadeOut
|
||||
End If
|
||||
Case FadeSteps.FadeOut
|
||||
If Me.BackgroundOpacity > 0.0F Then
|
||||
Me.BackgroundOpacity -= Me.FadeOutSpeed
|
||||
If Me.BackgroundOpacity <= 0.0F Then
|
||||
Me.BackgroundOpacity = 0.0F
|
||||
Me.Ready = True
|
||||
End If
|
||||
Else
|
||||
Me.BackgroundOpacity = 0.0F
|
||||
Me.Ready = True
|
||||
End If
|
||||
|
||||
End Select
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
34
P3D/Battle/BattleAnimations/BACameraChangeAngle.vb
Normal file
34
P3D/Battle/BattleAnimations/BACameraChangeAngle.vb
Normal file
@ -0,0 +1,34 @@
|
||||
Imports P3D.Screen
|
||||
|
||||
Public Class BACameraChangeAngle
|
||||
|
||||
Inherits BattleAnimation3D
|
||||
|
||||
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)
|
||||
Me.BV2Screen = Battlescreen
|
||||
Me.CameraAngleID = CameraAngleID
|
||||
|
||||
Me.Visible = False
|
||||
|
||||
Me.AnimationType = AnimationTypes.Camera
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub DoActionActive()
|
||||
Select Case CameraAngleID
|
||||
Case 0
|
||||
Me.BV2Screen.Battle.ChangeCameraAngle(0, True, Me.BV2Screen)
|
||||
Case 1
|
||||
Me.BV2Screen.Battle.ChangeCameraAngle(1, True, Me.BV2Screen)
|
||||
Case 2
|
||||
Me.BV2Screen.Battle.ChangeCameraAngle(2, True, Me.BV2Screen)
|
||||
End Select
|
||||
Me.Ready = True
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
313
P3D/Battle/BattleAnimations/BACameraOscillateMove.vb
Normal file
313
P3D/Battle/BattleAnimations/BACameraOscillateMove.vb
Normal file
@ -0,0 +1,313 @@
|
||||
Public Class BACameraOscillateMove
|
||||
|
||||
Inherits BattleAnimation3D
|
||||
|
||||
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
|
||||
End Enum
|
||||
|
||||
Public Sub New(ByVal Distance As Vector3, ByVal Speed As Single, ByVal BothWays As Boolean, ByVal Duration As TimeSpan, ByVal startDelay As Single, ByVal endDelay As Single, Optional MovementCurve As Integer = 0, Optional ReturnToStart As Vector3 = Nothing)
|
||||
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
|
||||
Me.HalfDistance = Distance
|
||||
Me.DestinationDistance = Me.HalfDistance
|
||||
Me.MoveSpeed = Speed
|
||||
Me.MoveBothWays = BothWays
|
||||
Me.Duration = Duration
|
||||
Me.MovementCurve = CType(MovementCurve, Curves)
|
||||
|
||||
Me.Visible = False
|
||||
Select Case MovementCurve
|
||||
Case Curves.Linear
|
||||
InterpolationSpeed = New Vector3(MoveSpeed)
|
||||
Case Curves.Smooth
|
||||
InterpolationSpeed = New Vector3(0.0F)
|
||||
End Select
|
||||
If ReturnToStart <> Nothing Then
|
||||
Me.ReturnToStart = ReturnToStart
|
||||
End If
|
||||
Me.AnimationType = AnimationTypes.Move
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub DoActionActive()
|
||||
Move()
|
||||
End Sub
|
||||
|
||||
Private Sub Move()
|
||||
If StartPosition = Nothing Then
|
||||
StartPosition = Screen.Camera.Position
|
||||
End If
|
||||
If ReadyTime = Nothing Then
|
||||
ReadyTime = Date.Now + Duration
|
||||
End If
|
||||
If MovementCurve = Curves.Smooth Then
|
||||
If InterpolationDirection = True Then
|
||||
If InterpolationSpeed.X < MoveSpeed Then
|
||||
InterpolationSpeed.X += MoveSpeed / 10
|
||||
Else
|
||||
InterpolationSpeed.X = MoveSpeed
|
||||
End If
|
||||
If InterpolationSpeed.Y < MoveSpeed Then
|
||||
InterpolationSpeed.Y += MoveSpeed / 10
|
||||
Else
|
||||
InterpolationSpeed.Y = MoveSpeed
|
||||
End If
|
||||
If InterpolationSpeed.Z < MoveSpeed Then
|
||||
InterpolationSpeed.Z += MoveSpeed / 10
|
||||
Else
|
||||
InterpolationSpeed.Z = MoveSpeed
|
||||
End If
|
||||
Else
|
||||
If Date.Now < ReadyTime Then
|
||||
If InterpolationSpeed.X > 0 Then
|
||||
InterpolationSpeed.X -= MoveSpeed / 10
|
||||
Else
|
||||
InterpolationSpeed.X = 0
|
||||
End If
|
||||
If InterpolationSpeed.Y > 0 Then
|
||||
InterpolationSpeed.Y -= MoveSpeed / 10
|
||||
Else
|
||||
InterpolationSpeed.Y = 0
|
||||
End If
|
||||
If InterpolationSpeed.Z > 0 Then
|
||||
InterpolationSpeed.Z -= MoveSpeed / 10
|
||||
Else
|
||||
InterpolationSpeed.Z = 0
|
||||
End If
|
||||
Else
|
||||
If InterpolationSpeed.X > MoveSpeed / 10 * 3 Then
|
||||
InterpolationSpeed.X -= MoveSpeed / 10
|
||||
Else
|
||||
InterpolationSpeed.X = MoveSpeed / 10 * 3
|
||||
End If
|
||||
If InterpolationSpeed.Y > MoveSpeed / 10 * 3 Then
|
||||
InterpolationSpeed.Y -= MoveSpeed / 10
|
||||
Else
|
||||
InterpolationSpeed.Y = MoveSpeed / 10 * 3
|
||||
End If
|
||||
If InterpolationSpeed.Z > MoveSpeed / 10 * 3 Then
|
||||
InterpolationSpeed.Z -= MoveSpeed / 10
|
||||
Else
|
||||
InterpolationSpeed.Z = MoveSpeed / 10 * 3
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If CurrentDistance.X <> DestinationDistance.X Then
|
||||
If CurrentDistance.X < DestinationDistance.X Then
|
||||
CurrentDistance.X += InterpolationSpeed.X
|
||||
Else
|
||||
CurrentDistance.X -= InterpolationSpeed.X
|
||||
End If
|
||||
|
||||
If Math.Abs(CurrentDistance.X) / Math.Abs(HalfDistance.X) > 0.75F Then
|
||||
InterpolationDirection = False
|
||||
End If
|
||||
|
||||
If DestinationDistance.X > 0.0F Then
|
||||
If CurrentDistance.X >= DestinationDistance.X Then
|
||||
CurrentDistance.X = DestinationDistance.X
|
||||
End If
|
||||
ElseIf DestinationDistance.X < 0.0F Then
|
||||
If CurrentDistance.X <= DestinationDistance.X Then
|
||||
CurrentDistance.X = DestinationDistance.X
|
||||
End If
|
||||
Else
|
||||
If CurrentDistance.X > DestinationDistance.X Then
|
||||
If CurrentDistance.X - InterpolationSpeed.X <= DestinationDistance.X Then
|
||||
CurrentDistance.X = DestinationDistance.X
|
||||
End If
|
||||
Else
|
||||
If CurrentDistance.X + InterpolationSpeed.X >= DestinationDistance.X Then
|
||||
CurrentDistance.X = DestinationDistance.X
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If Date.Now < ReadyTime Then
|
||||
If MoveBothWays = True Then
|
||||
If DestinationDistance.X > 0.0F Then
|
||||
DestinationDistance.X = 0.0F - Math.Abs(HalfDistance.X) * 2
|
||||
Else
|
||||
DestinationDistance.X = 0.0F + Math.Abs(HalfDistance.X) * 2
|
||||
End If
|
||||
Else
|
||||
If DestinationDistance.X > 0.0F Then
|
||||
DestinationDistance.X = 0.0F
|
||||
Else
|
||||
DestinationDistance.X = HalfDistance.X
|
||||
End If
|
||||
End If
|
||||
InterpolationDirection = True
|
||||
Else
|
||||
If ReturnToStart.X = 0.0F Then
|
||||
ReadyAxis.X = 1.0F
|
||||
Else
|
||||
If DestinationDistance.X <> 0.0F Then
|
||||
DestinationDistance.X = 0.0F
|
||||
InterpolationDirection = True
|
||||
End If
|
||||
If CurrentDistance.X = 0.0F Then
|
||||
ReadyAxis.X = 1.0F
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If CurrentDistance.Y <> DestinationDistance.Y Then
|
||||
If CurrentDistance.Y < DestinationDistance.Y Then
|
||||
CurrentDistance.Y += InterpolationSpeed.Y
|
||||
Else
|
||||
CurrentDistance.Y -= InterpolationSpeed.Y
|
||||
End If
|
||||
|
||||
If Math.Abs(CurrentDistance.Y) / Math.Abs(HalfDistance.Y) > 0.75F Then
|
||||
InterpolationDirection = False
|
||||
End If
|
||||
|
||||
If DestinationDistance.Y > 0.0F Then
|
||||
If CurrentDistance.Y >= DestinationDistance.Y Then
|
||||
CurrentDistance.Y = DestinationDistance.Y
|
||||
End If
|
||||
ElseIf DestinationDistance.Y < 0.0F Then
|
||||
If CurrentDistance.Y <= DestinationDistance.Y Then
|
||||
CurrentDistance.Y = DestinationDistance.Y
|
||||
End If
|
||||
Else
|
||||
If CurrentDistance.Y > DestinationDistance.Y Then
|
||||
If CurrentDistance.Y - InterpolationSpeed.Y <= DestinationDistance.Y Then
|
||||
CurrentDistance.Y = DestinationDistance.Y
|
||||
End If
|
||||
Else
|
||||
If CurrentDistance.Y + InterpolationSpeed.Y >= DestinationDistance.Y Then
|
||||
CurrentDistance.Y = DestinationDistance.Y
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If Date.Now < ReadyTime Then
|
||||
If MoveBothWays = True Then
|
||||
If DestinationDistance.Y > 0.0F Then
|
||||
DestinationDistance.Y = 0.0F - Math.Abs(HalfDistance.Y) * 2
|
||||
Else
|
||||
DestinationDistance.Y = 0.0F + Math.Abs(HalfDistance.Y) * 2
|
||||
End If
|
||||
Else
|
||||
If DestinationDistance.Y > 0.0F Then
|
||||
DestinationDistance.Y = 0.0F
|
||||
Else
|
||||
DestinationDistance.Y = HalfDistance.Y
|
||||
End If
|
||||
End If
|
||||
InterpolationDirection = True
|
||||
Else
|
||||
If ReturnToStart.Y = 0.0F Then
|
||||
ReadyAxis.Y = 1.0F
|
||||
Else
|
||||
If DestinationDistance.Y <> 0.0F Then
|
||||
DestinationDistance.Y = 0.0F
|
||||
InterpolationDirection = True
|
||||
End If
|
||||
If CurrentDistance.Y = 0.0F Then
|
||||
ReadyAxis.Y = 1.0F
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If CurrentDistance.Z <> DestinationDistance.Z Then
|
||||
If CurrentDistance.Z < DestinationDistance.Z Then
|
||||
CurrentDistance.Z += InterpolationSpeed.Z
|
||||
Else
|
||||
CurrentDistance.Z -= InterpolationSpeed.Z
|
||||
End If
|
||||
|
||||
If Math.Abs(CurrentDistance.Y) / Math.Abs(HalfDistance.Y) > 0.75F Then
|
||||
InterpolationDirection = False
|
||||
End If
|
||||
|
||||
If DestinationDistance.Z > 0.0F Then
|
||||
If CurrentDistance.Z >= DestinationDistance.Z Then
|
||||
CurrentDistance.Z = DestinationDistance.Z
|
||||
End If
|
||||
ElseIf DestinationDistance.Z < 0.0F Then
|
||||
If CurrentDistance.Z <= DestinationDistance.Z Then
|
||||
CurrentDistance.Z = DestinationDistance.Z
|
||||
End If
|
||||
Else
|
||||
If CurrentDistance.Z > DestinationDistance.Z Then
|
||||
If CurrentDistance.Z - InterpolationSpeed.Z <= DestinationDistance.Z Then
|
||||
CurrentDistance.Z = DestinationDistance.Z
|
||||
End If
|
||||
Else
|
||||
If CurrentDistance.Z + InterpolationSpeed.Z >= DestinationDistance.Z Then
|
||||
CurrentDistance.Z = DestinationDistance.Z
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If Date.Now < ReadyTime Then
|
||||
If MoveBothWays = True Then
|
||||
If DestinationDistance.Z > 0.0F Then
|
||||
DestinationDistance.Z = 0.0F - Math.Abs(HalfDistance.Z) * 2
|
||||
Else
|
||||
DestinationDistance.Z = 0.0F + Math.Abs(HalfDistance.Z) * 2
|
||||
End If
|
||||
Else
|
||||
If DestinationDistance.Z > 0.0F Then
|
||||
DestinationDistance.Z = 0.0F
|
||||
Else
|
||||
DestinationDistance.Z = HalfDistance.Z
|
||||
End If
|
||||
End If
|
||||
InterpolationDirection = True
|
||||
Else
|
||||
If ReturnToStart.Z = 0.0F Then
|
||||
ReadyAxis.Z = 1.0F
|
||||
Else
|
||||
If DestinationDistance.Z <> 0.0F Then
|
||||
DestinationDistance.Z = 0.0F
|
||||
InterpolationDirection = True
|
||||
End If
|
||||
If CurrentDistance.Z = 0.0F Then
|
||||
ReadyAxis.Z = 1.0F
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If HalfDistance.X <> 0.0F Then
|
||||
Screen.Camera.Position.X = StartPosition.X + Me.CurrentDistance.X
|
||||
Else
|
||||
ReadyAxis.X = 1.0F
|
||||
End If
|
||||
If HalfDistance.Y <> 0.0F Then
|
||||
Screen.Camera.Position.Y = StartPosition.Y + Me.CurrentDistance.Y
|
||||
Else
|
||||
ReadyAxis.Y = 1.0F
|
||||
End If
|
||||
If HalfDistance.Z <> 0.0F Then
|
||||
Screen.Camera.Position.Z = StartPosition.Z + Me.CurrentDistance.Z
|
||||
Else
|
||||
ReadyAxis.Z = 1.0F
|
||||
End If
|
||||
|
||||
If Date.Now > ReadyTime AndAlso ReadyAxis.X = 1.0F AndAlso ReadyAxis.Y = 1.0F AndAlso ReadyAxis.Z = 1.0F Then
|
||||
Me.Ready = True
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
@ -2,21 +2,34 @@
|
||||
|
||||
Inherits BattleAnimation3D
|
||||
|
||||
Public TargetEntity As Entity
|
||||
Public TransitionSpeed As Single = 0.01F
|
||||
Public FadeIn As Boolean = False
|
||||
Public ColorTo 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 TransitionSpeed As Single, ByVal startDelay As Single, ByVal endDelay As Single, ByVal ColorTo As Color, Optional ByVal ColorFrom As Color = Nothing)
|
||||
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.TransitionSpeed = TransitionSpeed
|
||||
Me.RemoveEntityAfter = RemoveEntityAfter
|
||||
If TransitionSpeedOut = -1 Then
|
||||
Me.TransitionSpeedOut = TransitionSpeedIn
|
||||
Else
|
||||
Me.TransitionSpeedOut = TransitionSpeedOut
|
||||
End If
|
||||
Me.TransitionSpeed = TransitionSpeedIn
|
||||
Me.TargetEntity = Entity
|
||||
Me.ReturnToFromWhenDone = ReturnToFromWhenDone
|
||||
|
||||
If Not ColorFrom = Nothing Then
|
||||
TargetEntity.Color = ColorFrom.ToVector3
|
||||
Me.ColorFrom = ColorFrom
|
||||
Else
|
||||
Me.ColorFrom = TargetEntity.Color
|
||||
End If
|
||||
Me.ColorTo = ColorTo.ToVector3
|
||||
Me.ColorTo = ColorTo
|
||||
|
||||
Me.Visible = False
|
||||
|
||||
@ -24,44 +37,62 @@
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub DoActionActive()
|
||||
If InitialColorSet = False Then
|
||||
TargetEntity.Color = ColorFrom
|
||||
InitialColorSet = True
|
||||
End If
|
||||
|
||||
If TargetEntity.Color.X > ColorTo.X Then
|
||||
TargetEntity.Color.X -= CByte(Me.TransitionSpeed)
|
||||
TargetEntity.Color.X -= Me.TransitionSpeed
|
||||
If TargetEntity.Color.X <= ColorTo.X Then
|
||||
TargetEntity.Color.X = ColorTo.X
|
||||
End If
|
||||
ElseIf TargetEntity.Color.X < ColorTo.X Then
|
||||
TargetEntity.Color.X += CByte(Me.TransitionSpeed)
|
||||
TargetEntity.Color.X += Me.TransitionSpeed
|
||||
If TargetEntity.Color.X >= ColorTo.X Then
|
||||
TargetEntity.Color.X = ColorTo.X
|
||||
End If
|
||||
End If
|
||||
If TargetEntity.Color.Y > ColorTo.Y Then
|
||||
TargetEntity.Color.Y -= CByte(Me.TransitionSpeed)
|
||||
TargetEntity.Color.Y -= Me.TransitionSpeed
|
||||
If TargetEntity.Color.Y <= ColorTo.Y Then
|
||||
TargetEntity.Color.Y = ColorTo.Y
|
||||
End If
|
||||
ElseIf TargetEntity.Color.Y < ColorTo.Y Then
|
||||
TargetEntity.Color.Y += CByte(Me.TransitionSpeed)
|
||||
TargetEntity.Color.Y += Me.TransitionSpeed
|
||||
If TargetEntity.Color.Y >= ColorTo.Y Then
|
||||
TargetEntity.Color.Y = ColorTo.Y
|
||||
End If
|
||||
End If
|
||||
If TargetEntity.Color.Z > ColorTo.Z Then
|
||||
TargetEntity.Color.Z -= CByte(Me.TransitionSpeed)
|
||||
TargetEntity.Color.Z -= Me.TransitionSpeed
|
||||
If TargetEntity.Color.Z <= ColorTo.Z Then
|
||||
TargetEntity.Color.Z = ColorTo.Z
|
||||
End If
|
||||
ElseIf TargetEntity.Color.Z < ColorTo.Z Then
|
||||
TargetEntity.Color.Z += CByte(Me.TransitionSpeed)
|
||||
TargetEntity.Color.Z += Me.TransitionSpeed
|
||||
If TargetEntity.Color.Z >= ColorTo.Z Then
|
||||
TargetEntity.Color.Z = ColorTo.Z
|
||||
End If
|
||||
End If
|
||||
|
||||
If TargetEntity.Color = ColorTo Then
|
||||
Me.Ready = True
|
||||
If ReturnToFromWhenDone = False Then
|
||||
Me.Ready = True
|
||||
Else
|
||||
If IsReturning = False Then
|
||||
ColorTo = ColorFrom
|
||||
TransitionSpeed = TransitionSpeedOut
|
||||
IsReturning = True
|
||||
Else
|
||||
Me.Ready = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Public Overrides Sub DoRemoveEntity()
|
||||
If Me.RemoveEntityAfter = True Then
|
||||
TargetEntity.CanBeRemoved = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
@ -3,25 +3,25 @@
|
||||
Inherits BattleAnimation3D
|
||||
|
||||
Dim TargetEntity As NPC
|
||||
Dim TargetModel As Entity = Nothing
|
||||
Dim EndFaceRotation As Integer
|
||||
Dim TurnSteps As Integer = 0
|
||||
Dim TurnSpeed As Integer = 1
|
||||
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, Optional TargetModel As Entity = Nothing)
|
||||
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
|
||||
Else
|
||||
Me.EndFaceRotation = EndFaceRotation
|
||||
End If
|
||||
Me.TargetModel = TargetModel
|
||||
Me.TurnSteps = TurnSteps
|
||||
Me.TargetEntity = TargetEntity
|
||||
Me.TurnSpeed = TurnSpeed
|
||||
Me.TurnDelay = TurnDelay
|
||||
|
||||
Me.AnimationType = AnimationTypes.Rotation
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub DoActionActive()
|
||||
@ -34,9 +34,6 @@
|
||||
If Me.TargetEntity.faceRotation < 0 Then
|
||||
Me.TargetEntity.faceRotation += 4
|
||||
End If
|
||||
If Me.TargetModel IsNot Nothing Then
|
||||
Me.TargetModel.Rotation = Entity.GetRotationFromInteger(Me.TargetEntity.faceRotation)
|
||||
End If
|
||||
Me.TurnSteps -= TurnSpeed.ToPositive()
|
||||
Me.TurnTime = TurnDelay
|
||||
Else
|
||||
@ -45,9 +42,6 @@
|
||||
Else
|
||||
If Me.TargetEntity.faceRotation <> Me.EndFaceRotation Then
|
||||
Me.TargetEntity.faceRotation = Me.EndFaceRotation
|
||||
If Me.TargetModel IsNot Nothing Then
|
||||
Me.TargetModel.Rotation = Entity.GetRotationFromInteger(Me.EndFaceRotation)
|
||||
End If
|
||||
End If
|
||||
Me.Ready = True
|
||||
End If
|
||||
|
@ -2,19 +2,23 @@
|
||||
|
||||
Inherits BattleAnimation3D
|
||||
|
||||
Public TargetEntity As Entity
|
||||
Public Destination As Vector3
|
||||
Public MoveSpeed As Single
|
||||
Public MoveYSpeed As Single
|
||||
Public InterpolationSpeed 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
|
||||
EaseIn
|
||||
EaseOut
|
||||
@ -24,7 +28,6 @@
|
||||
|
||||
Public Sub New(ByRef Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal Destination As Vector3, ByVal Speed As Single, ByVal SpinX As Boolean, ByVal SpinZ As Boolean, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal SpinXSpeed As Single = 0.1F, Optional ByVal SpinZSpeed As Single = 0.1F, Optional MovementCurve As Integer = 3, Optional MoveYSpeed As Single = 0.0F)
|
||||
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
|
||||
|
||||
Me.RemoveEntityAfter = RemoveEntityAfter
|
||||
Me.Destination = Destination
|
||||
Me.MoveSpeed = Speed
|
||||
@ -43,15 +46,29 @@
|
||||
Me.Visible = False
|
||||
Me.TargetEntity = Entity
|
||||
|
||||
Me.StartPosition = TargetEntity.Position
|
||||
Me.MoveDistance.X = Math.Abs(Me.StartPosition.X - Me.Destination.X)
|
||||
|
||||
If TargetEntity.Model IsNot Nothing Then
|
||||
Me.MoveDistance.Y = Math.Abs(Me.StartPosition.Y - Me.Destination.Y - 0.5F)
|
||||
Else
|
||||
Me.MoveDistance.Y = Math.Abs(Me.StartPosition.Y - Me.Destination.Y)
|
||||
End If
|
||||
Me.MoveDistance.Z = Math.Abs(Me.StartPosition.Z - Me.Destination.Z)
|
||||
|
||||
Select Case MovementCurve
|
||||
Case Curves.EaseIn
|
||||
InterpolationSpeed = 0.0F
|
||||
InterpolationYSpeed = 0.0F
|
||||
Case Curves.EaseOut
|
||||
InterpolationSpeed = MoveSpeed
|
||||
InterpolationYSpeed = MoveYSpeed
|
||||
Case Curves.EaseInAndOut
|
||||
InterpolationSpeed = 0.0F
|
||||
InterpolationYSpeed = 0.0F
|
||||
Case Curves.Linear
|
||||
InterpolationSpeed = MoveSpeed
|
||||
InterpolationYSpeed = MoveYSpeed
|
||||
End Select
|
||||
|
||||
Me.AnimationType = AnimationTypes.Move
|
||||
@ -75,121 +92,142 @@
|
||||
End Sub
|
||||
|
||||
Private Sub Move()
|
||||
|
||||
Select Case MovementCurve
|
||||
Case Curves.EaseIn
|
||||
If EasedIn = False Then
|
||||
If InterpolationSpeed < MoveSpeed Then
|
||||
InterpolationSpeed += MoveSpeed / 10
|
||||
If InterpolationSpeed < MoveSpeed - 0.05F OrElse InterpolationYSpeed < MoveYSpeed - 0.05F Then
|
||||
If InterpolationSpeed < MoveSpeed - 0.05F Then
|
||||
InterpolationSpeed = MathHelper.Lerp(InterpolationSpeed, MoveSpeed, 0.9F)
|
||||
End If
|
||||
If InterpolationYSpeed < MoveYSpeed - 0.05F Then
|
||||
InterpolationYSpeed = MathHelper.Lerp(InterpolationYSpeed, MoveYSpeed, 0.9F)
|
||||
End If
|
||||
Else
|
||||
EasedIn = True
|
||||
InterpolationSpeed = MoveSpeed
|
||||
InterpolationYSpeed = MoveYSpeed
|
||||
EasedIn = True
|
||||
End If
|
||||
End If
|
||||
Case Curves.EaseOut
|
||||
If EasedOut = False Then
|
||||
If InterpolationSpeed > 0 Then
|
||||
InterpolationSpeed -= MoveSpeed / 10
|
||||
If InterpolationSpeed > 0.05F OrElse InterpolationYSpeed > 0.05F Then
|
||||
If InterpolationSpeed > 0.05F Then
|
||||
InterpolationSpeed = MathHelper.Lerp(InterpolationSpeed, 0.0F, 0.9F)
|
||||
End If
|
||||
If InterpolationYSpeed > 0.05F Then
|
||||
InterpolationYSpeed = MathHelper.Lerp(InterpolationYSpeed, 0.0F, 0.9F)
|
||||
End If
|
||||
Else
|
||||
EasedOut = True
|
||||
InterpolationYSpeed = 0
|
||||
InterpolationSpeed = 0
|
||||
EasedOut = True
|
||||
End If
|
||||
End If
|
||||
Case Curves.EaseInAndOut
|
||||
If EasedIn = False Then
|
||||
If InterpolationSpeed < MoveSpeed Then
|
||||
InterpolationSpeed += MoveSpeed / 10
|
||||
If InterpolationSpeed < MoveSpeed - 0.05F OrElse InterpolationYSpeed < MoveYSpeed - 0.05F Then
|
||||
If InterpolationSpeed < MoveSpeed - 0.05F Then
|
||||
InterpolationSpeed = MathHelper.Lerp(InterpolationSpeed, MoveSpeed, 0.9F)
|
||||
End If
|
||||
If InterpolationYSpeed < MoveYSpeed - 0.05F Then
|
||||
InterpolationYSpeed = MathHelper.Lerp(InterpolationYSpeed, MoveYSpeed, 0.9F)
|
||||
End If
|
||||
Else
|
||||
EasedIn = True
|
||||
InterpolationSpeed = MoveSpeed
|
||||
InterpolationYSpeed = MoveYSpeed
|
||||
EasedIn = True
|
||||
End If
|
||||
Else
|
||||
If EasedOut = False Then
|
||||
If InterpolationSpeed > 0 Then
|
||||
InterpolationSpeed -= MoveSpeed / 10
|
||||
If MoveDistance.X <= 0.05F AndAlso MoveDistance.Y <= 0.05F AndAlso MoveDistance.Z <= 0.05F Then
|
||||
If InterpolationSpeed > 0.05F OrElse InterpolationYSpeed > 0.05F Then
|
||||
If InterpolationSpeed > 0.05F Then
|
||||
InterpolationSpeed = MathHelper.Lerp(InterpolationSpeed, 0.0F, 0.9F)
|
||||
End If
|
||||
If InterpolationYSpeed > 0.05F Then
|
||||
InterpolationYSpeed = MathHelper.Lerp(InterpolationYSpeed, 0.0F, 0.9F)
|
||||
End If
|
||||
Else
|
||||
InterpolationYSpeed = 0
|
||||
InterpolationSpeed = 0
|
||||
EasedOut = True
|
||||
End If
|
||||
Else
|
||||
EasedOut = True
|
||||
InterpolationSpeed = 0
|
||||
If InterpolationSpeed > 0.05F + MoveSpeed / 10 * 3 OrElse InterpolationYSpeed > 0.05F + MoveYSpeed / 10 * 3 Then
|
||||
If InterpolationSpeed > 0.05F + MoveSpeed / 10 * 3 Then
|
||||
InterpolationSpeed = MathHelper.Lerp(InterpolationSpeed, 0.0F, 0.9F)
|
||||
End If
|
||||
If InterpolationYSpeed > 0.05F + MoveYSpeed / 10 * 3 Then
|
||||
InterpolationYSpeed = MathHelper.Lerp(InterpolationYSpeed, 0.0F, 0.9F)
|
||||
End If
|
||||
Else
|
||||
InterpolationYSpeed = MoveSpeed / 10 * 3
|
||||
InterpolationSpeed = MoveSpeed / 10 * 3
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Select
|
||||
|
||||
If MovementCurve = Curves.Linear Then
|
||||
If TargetEntity.Position.X < Me.Destination.X Then
|
||||
TargetEntity.Position.X += Me.MoveSpeed
|
||||
If MoveDistance.X > 0.05F Then
|
||||
If StartPosition.X < Me.Destination.X Then
|
||||
TargetEntity.Position.X += Me.InterpolationSpeed
|
||||
|
||||
If TargetEntity.Position.X >= Me.Destination.X - 0.05 Then
|
||||
If TargetEntity.Position.X >= Me.Destination.X + 0.05 Then
|
||||
TargetEntity.Position.X = Me.Destination.X
|
||||
End If
|
||||
ElseIf TargetEntity.Position.X > Me.Destination.X Then
|
||||
TargetEntity.Position.X -= Me.MoveSpeed
|
||||
ElseIf StartPosition.X > Me.Destination.X Then
|
||||
TargetEntity.Position.X -= Me.InterpolationSpeed
|
||||
|
||||
If TargetEntity.Position.X <= Me.Destination.X + 0.05 Then
|
||||
TargetEntity.Position.X = Me.Destination.X
|
||||
End If
|
||||
End If
|
||||
If TargetEntity.Position.Y < Me.Destination.Y Then
|
||||
MoveDistance.X -= Me.InterpolationSpeed
|
||||
Else
|
||||
ReadyAxis.X = 1.0F
|
||||
End If
|
||||
|
||||
If MoveDistance.Y > 0.05F Then
|
||||
If StartPosition.Y < Me.Destination.Y Then
|
||||
TargetEntity.Position.Y += Me.MoveYSpeed
|
||||
|
||||
If TargetEntity.Position.Y >= Me.Destination.Y - 0.05 Then
|
||||
TargetEntity.Position.Y = Me.Destination.Y
|
||||
End If
|
||||
ElseIf TargetEntity.Position.Y > Me.Destination.Y Then
|
||||
ElseIf StartPosition.Y > Me.Destination.Y Then
|
||||
TargetEntity.Position.Y -= Me.MoveYSpeed
|
||||
|
||||
If TargetEntity.Position.Y <= Me.Destination.Y + 0.05 Then
|
||||
TargetEntity.Position.Y = Me.Destination.Y
|
||||
End If
|
||||
End If
|
||||
If TargetEntity.Position.Z < Me.Destination.Z Then
|
||||
TargetEntity.Position.Z += Me.MoveSpeed
|
||||
MoveDistance.Y -= Me.MoveYSpeed
|
||||
Else
|
||||
ReadyAxis.Y = 1.0F
|
||||
End If
|
||||
|
||||
If MoveDistance.Z > 0.05F Then
|
||||
If StartPosition.Z < Me.Destination.Z Then
|
||||
TargetEntity.Position.Z += Me.InterpolationSpeed
|
||||
|
||||
If TargetEntity.Position.Z >= Me.Destination.Z - 0.05 Then
|
||||
TargetEntity.Position.Z = Me.Destination.Z
|
||||
End If
|
||||
ElseIf TargetEntity.Position.Z > Me.Destination.Z Then
|
||||
TargetEntity.Position.Z -= Me.MoveSpeed
|
||||
ElseIf StartPosition.Z > Me.Destination.Z Then
|
||||
TargetEntity.Position.Z -= Me.InterpolationSpeed
|
||||
|
||||
If TargetEntity.Position.Z <= Me.Destination.Z + 0.05 Then
|
||||
TargetEntity.Position.Z = Me.Destination.Z
|
||||
End If
|
||||
End If
|
||||
MoveDistance.Z -= Me.MoveYSpeed
|
||||
Else
|
||||
If TargetEntity.Position.X < Me.Destination.X Then
|
||||
TargetEntity.Position.X = MathHelper.Lerp(TargetEntity.Position.X, Me.Destination.X, Me.InterpolationSpeed)
|
||||
If TargetEntity.Position.X > Me.Destination.X - 0.05 Then
|
||||
TargetEntity.Position.X = Me.Destination.X
|
||||
End If
|
||||
ElseIf TargetEntity.Position.X > Me.Destination.X Then
|
||||
TargetEntity.Position.X = MathHelper.Lerp(TargetEntity.Position.X, Me.Destination.X, Me.InterpolationSpeed)
|
||||
If TargetEntity.Position.X < Me.Destination.X + 0.05 Then
|
||||
TargetEntity.Position.X = Me.Destination.X
|
||||
End If
|
||||
End If
|
||||
If TargetEntity.Position.Y < Me.Destination.Y Then
|
||||
TargetEntity.Position.Y = MathHelper.Lerp(TargetEntity.Position.Y, Me.Destination.Y, Me.InterpolationSpeed)
|
||||
If TargetEntity.Position.Y > Me.Destination.Y - 0.05 Then
|
||||
TargetEntity.Position.Y = Me.Destination.Y
|
||||
End If
|
||||
ElseIf TargetEntity.Position.Y > Me.Destination.Y Then
|
||||
TargetEntity.Position.Y = MathHelper.Lerp(TargetEntity.Position.Y, Me.Destination.Y, Me.InterpolationSpeed)
|
||||
If TargetEntity.Position.Y < Me.Destination.Y + 0.05 Then
|
||||
TargetEntity.Position.Y = Me.Destination.Y
|
||||
End If
|
||||
End If
|
||||
If TargetEntity.Position.Z < Me.Destination.Z Then
|
||||
TargetEntity.Position.Z = MathHelper.Lerp(TargetEntity.Position.Z, Me.Destination.Z, Me.InterpolationSpeed)
|
||||
If TargetEntity.Position.Z > Me.Destination.Z - 0.05 Then
|
||||
TargetEntity.Position.Z = Me.Destination.Z
|
||||
End If
|
||||
ElseIf TargetEntity.Position.Z > Me.Destination.Z Then
|
||||
TargetEntity.Position.Z = MathHelper.Lerp(TargetEntity.Position.Z, Me.Destination.Z, Me.InterpolationSpeed)
|
||||
If TargetEntity.Position.Z < Me.Destination.Z + 0.05 Then
|
||||
TargetEntity.Position.Z = Me.Destination.Z
|
||||
End If
|
||||
End If
|
||||
ReadyAxis.Z = 1.0F
|
||||
End If
|
||||
If TargetEntity.Position = Destination Then
|
||||
|
||||
If ReadyAxis.X = 1.0F AndAlso ReadyAxis.Y = 1.0F AndAlso ReadyAxis.Z = 1.0F Then
|
||||
Me.Ready = True
|
||||
End If
|
||||
End Sub
|
||||
|
@ -2,20 +2,19 @@
|
||||
|
||||
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
|
||||
Me.FadeIn = FadeIn
|
||||
Me.TransitionSpeed = TransitionSpeed
|
||||
Me.TargetEntity = entity
|
||||
|
||||
Me.TargetEntity.NormalOpacity = StartState
|
||||
Me.Visible = False
|
||||
|
||||
|
323
P3D/Battle/BattleAnimations/BAEntityOscillateMove.vb
Normal file
323
P3D/Battle/BattleAnimations/BAEntityOscillateMove.vb
Normal file
@ -0,0 +1,323 @@
|
||||
Public Class BAEntityOscillateMove
|
||||
|
||||
Inherits BattleAnimation3D
|
||||
|
||||
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
|
||||
End Enum
|
||||
|
||||
Public Sub New(ByRef Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal Distance As Vector3, ByVal Speed As Single, ByVal BothWays As Boolean, ByVal Duration As TimeSpan, ByVal startDelay As Single, ByVal endDelay As Single, Optional MovementCurve As Integer = 0, Optional ReturnToStart As Vector3 = Nothing)
|
||||
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
|
||||
Me.RemoveEntityAfter = RemoveEntityAfter
|
||||
Me.HalfDistance = Distance
|
||||
Me.DestinationDistance = Me.HalfDistance
|
||||
Me.MoveSpeed = Speed
|
||||
Me.MoveBothWays = BothWays
|
||||
Me.Duration = Duration
|
||||
Me.MovementCurve = CType(MovementCurve, Curves)
|
||||
|
||||
Me.Visible = False
|
||||
Me.TargetEntity = Entity
|
||||
Select Case MovementCurve
|
||||
Case Curves.Linear
|
||||
InterpolationSpeed = New Vector3(MoveSpeed)
|
||||
Case Curves.Smooth
|
||||
InterpolationSpeed = New Vector3(0.0F)
|
||||
End Select
|
||||
If ReturnToStart <> Nothing Then
|
||||
Me.ReturnToStart = ReturnToStart
|
||||
End If
|
||||
Me.AnimationType = AnimationTypes.Move
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub DoActionActive()
|
||||
Move()
|
||||
End Sub
|
||||
|
||||
Private Sub Move()
|
||||
If StartPosition = Nothing Then
|
||||
StartPosition = TargetEntity.Position
|
||||
End If
|
||||
If ReadyTime = Nothing Then
|
||||
ReadyTime = Date.Now + Duration
|
||||
End If
|
||||
If MovementCurve = Curves.Smooth Then
|
||||
If InterpolationDirection = True Then
|
||||
If InterpolationSpeed.X < MoveSpeed Then
|
||||
InterpolationSpeed.X += MoveSpeed / 10
|
||||
Else
|
||||
InterpolationSpeed.X = MoveSpeed
|
||||
End If
|
||||
If InterpolationSpeed.Y < MoveSpeed Then
|
||||
InterpolationSpeed.Y += MoveSpeed / 10
|
||||
Else
|
||||
InterpolationSpeed.Y = MoveSpeed
|
||||
End If
|
||||
If InterpolationSpeed.Z < MoveSpeed Then
|
||||
InterpolationSpeed.Z += MoveSpeed / 10
|
||||
Else
|
||||
InterpolationSpeed.Z = MoveSpeed
|
||||
End If
|
||||
Else
|
||||
If Date.Now < ReadyTime Then
|
||||
If InterpolationSpeed.X > 0 Then
|
||||
InterpolationSpeed.X -= MoveSpeed / 10
|
||||
Else
|
||||
InterpolationSpeed.X = 0
|
||||
End If
|
||||
If InterpolationSpeed.Y > 0 Then
|
||||
InterpolationSpeed.Y -= MoveSpeed / 10
|
||||
Else
|
||||
InterpolationSpeed.Y = 0
|
||||
End If
|
||||
If InterpolationSpeed.Z > 0 Then
|
||||
InterpolationSpeed.Z -= MoveSpeed / 10
|
||||
Else
|
||||
InterpolationSpeed.Z = 0
|
||||
End If
|
||||
Else
|
||||
If InterpolationSpeed.X > MoveSpeed / 10 * 3 Then
|
||||
InterpolationSpeed.X -= MoveSpeed / 10
|
||||
Else
|
||||
InterpolationSpeed.X = MoveSpeed / 10 * 3
|
||||
End If
|
||||
If InterpolationSpeed.Y > MoveSpeed / 10 * 3 Then
|
||||
InterpolationSpeed.Y -= MoveSpeed / 10
|
||||
Else
|
||||
InterpolationSpeed.Y = MoveSpeed / 10 * 3
|
||||
End If
|
||||
If InterpolationSpeed.Z > MoveSpeed / 10 * 3 Then
|
||||
InterpolationSpeed.Z -= MoveSpeed / 10
|
||||
Else
|
||||
InterpolationSpeed.Z = MoveSpeed / 10 * 3
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If CurrentDistance.X <> DestinationDistance.X Then
|
||||
If CurrentDistance.X < DestinationDistance.X Then
|
||||
CurrentDistance.X += InterpolationSpeed.X
|
||||
Else
|
||||
CurrentDistance.X -= InterpolationSpeed.X
|
||||
End If
|
||||
|
||||
If Math.Abs(CurrentDistance.X) / Math.Abs(HalfDistance.X) > 0.75F Then
|
||||
InterpolationDirection = False
|
||||
End If
|
||||
|
||||
If DestinationDistance.X > 0.0F Then
|
||||
If CurrentDistance.X >= DestinationDistance.X Then
|
||||
CurrentDistance.X = DestinationDistance.X
|
||||
End If
|
||||
ElseIf DestinationDistance.x < 0.0F Then
|
||||
If CurrentDistance.X <= DestinationDistance.X Then
|
||||
CurrentDistance.X = DestinationDistance.X
|
||||
End If
|
||||
Else
|
||||
If CurrentDistance.X > DestinationDistance.X Then
|
||||
If CurrentDistance.X - InterpolationSpeed.X <= DestinationDistance.X Then
|
||||
CurrentDistance.X = DestinationDistance.X
|
||||
End If
|
||||
Else
|
||||
If CurrentDistance.X + InterpolationSpeed.X >= DestinationDistance.X Then
|
||||
CurrentDistance.X = DestinationDistance.X
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If Date.Now < ReadyTime Then
|
||||
If MoveBothWays = True Then
|
||||
If DestinationDistance.X > 0.0F Then
|
||||
DestinationDistance.X = 0.0F - Math.Abs(HalfDistance.X) * 2
|
||||
Else
|
||||
DestinationDistance.X = 0.0F + Math.Abs(HalfDistance.X) * 2
|
||||
End If
|
||||
Else
|
||||
If DestinationDistance.X > 0.0F Then
|
||||
DestinationDistance.X = 0.0F
|
||||
Else
|
||||
DestinationDistance.X = HalfDistance.X
|
||||
End If
|
||||
End If
|
||||
InterpolationDirection = True
|
||||
Else
|
||||
If ReturnToStart.X = 0.0F Then
|
||||
ReadyAxis.X = 1.0F
|
||||
Else
|
||||
If DestinationDistance.X <> 0.0F Then
|
||||
DestinationDistance.X = 0.0F
|
||||
InterpolationDirection = True
|
||||
End If
|
||||
If CurrentDistance.X = 0.0F Then
|
||||
ReadyAxis.X = 1.0F
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If CurrentDistance.Y <> DestinationDistance.Y Then
|
||||
If CurrentDistance.Y < DestinationDistance.Y Then
|
||||
CurrentDistance.Y += InterpolationSpeed.Y
|
||||
Else
|
||||
CurrentDistance.Y -= InterpolationSpeed.Y
|
||||
End If
|
||||
|
||||
If Math.Abs(CurrentDistance.Y) / Math.Abs(HalfDistance.Y) > 0.75F Then
|
||||
InterpolationDirection = False
|
||||
End If
|
||||
|
||||
If DestinationDistance.Y > 0.0F Then
|
||||
If CurrentDistance.Y >= DestinationDistance.Y Then
|
||||
CurrentDistance.Y = DestinationDistance.Y
|
||||
End If
|
||||
ElseIf DestinationDistance.Y < 0.0F Then
|
||||
If CurrentDistance.Y <= DestinationDistance.Y Then
|
||||
CurrentDistance.Y = DestinationDistance.Y
|
||||
End If
|
||||
Else
|
||||
If CurrentDistance.Y > DestinationDistance.Y Then
|
||||
If CurrentDistance.Y - InterpolationSpeed.Y <= DestinationDistance.Y Then
|
||||
CurrentDistance.Y = DestinationDistance.Y
|
||||
End If
|
||||
Else
|
||||
If CurrentDistance.Y + InterpolationSpeed.Y >= DestinationDistance.Y Then
|
||||
CurrentDistance.Y = DestinationDistance.Y
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If Date.Now < ReadyTime Then
|
||||
If MoveBothWays = True Then
|
||||
If DestinationDistance.Y > 0.0F Then
|
||||
DestinationDistance.Y = 0.0F - Math.Abs(HalfDistance.Y) * 2
|
||||
Else
|
||||
DestinationDistance.Y = 0.0F + Math.Abs(HalfDistance.Y) * 2
|
||||
End If
|
||||
Else
|
||||
If DestinationDistance.Y > 0.0F Then
|
||||
DestinationDistance.Y = 0.0F
|
||||
Else
|
||||
DestinationDistance.Y = HalfDistance.Y
|
||||
End If
|
||||
End If
|
||||
InterpolationDirection = True
|
||||
Else
|
||||
If ReturnToStart.Y = 0.0F Then
|
||||
ReadyAxis.Y = 1.0F
|
||||
Else
|
||||
If DestinationDistance.Y <> 0.0F Then
|
||||
DestinationDistance.Y = 0.0F
|
||||
InterpolationDirection = True
|
||||
End If
|
||||
If CurrentDistance.Y = 0.0F Then
|
||||
ReadyAxis.Y = 1.0F
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If CurrentDistance.Z <> DestinationDistance.Z Then
|
||||
If CurrentDistance.Z < DestinationDistance.Z Then
|
||||
CurrentDistance.Z += InterpolationSpeed.Z
|
||||
Else
|
||||
CurrentDistance.Z -= InterpolationSpeed.Z
|
||||
End If
|
||||
|
||||
If Math.Abs(CurrentDistance.Y) / Math.Abs(HalfDistance.Y) > 0.75F Then
|
||||
InterpolationDirection = False
|
||||
End If
|
||||
|
||||
If DestinationDistance.Z > 0.0F Then
|
||||
If CurrentDistance.Z >= DestinationDistance.Z Then
|
||||
CurrentDistance.Z = DestinationDistance.Z
|
||||
End If
|
||||
ElseIf DestinationDistance.z < 0.0F Then
|
||||
If CurrentDistance.Z <= DestinationDistance.Z Then
|
||||
CurrentDistance.Z = DestinationDistance.Z
|
||||
End If
|
||||
Else
|
||||
If CurrentDistance.Z > DestinationDistance.Z Then
|
||||
If CurrentDistance.Z - InterpolationSpeed.Z <= DestinationDistance.Z Then
|
||||
CurrentDistance.Z = DestinationDistance.Z
|
||||
End If
|
||||
Else
|
||||
If CurrentDistance.Z + InterpolationSpeed.Z >= DestinationDistance.Z Then
|
||||
CurrentDistance.Z = DestinationDistance.Z
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If Date.Now < ReadyTime Then
|
||||
If MoveBothWays = True Then
|
||||
If DestinationDistance.Z > 0.0F Then
|
||||
DestinationDistance.Z = 0.0F - Math.Abs(HalfDistance.Z) * 2
|
||||
Else
|
||||
DestinationDistance.Z = 0.0F + Math.Abs(HalfDistance.Z) * 2
|
||||
End If
|
||||
Else
|
||||
If DestinationDistance.Z > 0.0F Then
|
||||
DestinationDistance.Z = 0.0F
|
||||
Else
|
||||
DestinationDistance.Z = HalfDistance.Z
|
||||
End If
|
||||
End If
|
||||
InterpolationDirection = True
|
||||
Else
|
||||
If ReturnToStart.Z = 0.0F Then
|
||||
ReadyAxis.Z = 1.0F
|
||||
Else
|
||||
If DestinationDistance.Z <> 0.0F Then
|
||||
DestinationDistance.Z = 0.0F
|
||||
InterpolationDirection = True
|
||||
End If
|
||||
If CurrentDistance.Z = 0.0F Then
|
||||
ReadyAxis.Z = 1.0F
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If HalfDistance.X <> 0.0F Then
|
||||
TargetEntity.Position.X = StartPosition.X + Me.CurrentDistance.X
|
||||
Else
|
||||
ReadyAxis.X = 1.0F
|
||||
End If
|
||||
If HalfDistance.Y <> 0.0F Then
|
||||
TargetEntity.Position.Y = StartPosition.Y + Me.CurrentDistance.Y
|
||||
Else
|
||||
ReadyAxis.Y = 1.0F
|
||||
End If
|
||||
If HalfDistance.Z <> 0.0F Then
|
||||
TargetEntity.Position.Z = StartPosition.Z + Me.CurrentDistance.Z
|
||||
Else
|
||||
ReadyAxis.Z = 1.0F
|
||||
End If
|
||||
|
||||
If Date.Now > ReadyTime AndAlso ReadyAxis.X = 1.0F AndAlso ReadyAxis.Y = 1.0F AndAlso ReadyAxis.Z = 1.0F Then
|
||||
Me.Ready = True
|
||||
End If
|
||||
End Sub
|
||||
Public Overrides Sub DoRemoveEntity()
|
||||
If Me.RemoveEntityAfter = True Then
|
||||
TargetEntity.CanBeRemoved = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
@ -9,41 +9,47 @@
|
||||
Dim ReturnVector As Vector3
|
||||
Dim hasReturned As Boolean = False
|
||||
Dim DoRotation As Vector3 = New Vector3(1.0F)
|
||||
Public RemoveEntityAfter As Boolean = False
|
||||
Dim AmountRotated As Vector3 = New Vector3(0.0F)
|
||||
Dim ReadyAxis As Vector3 = New Vector3(0.0F)
|
||||
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
|
||||
Me.EndRotation = EndRotation
|
||||
Me.TargetEntity = Entity
|
||||
Me.ReturnVector = TargetEntity.Rotation
|
||||
|
||||
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
|
||||
DoRotation.X = 0.0F
|
||||
ReadyAxis.X = 1.0F
|
||||
End If
|
||||
If DoYRotation = False Then
|
||||
DoRotation.Y = 0.0F
|
||||
ReadyAxis.Y = 1.0F
|
||||
End If
|
||||
If DoZRotation = False Then
|
||||
DoRotation.Z = 0.0F
|
||||
ReadyAxis.Z = 1.0F
|
||||
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
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub DoActionActive()
|
||||
If VectorReached() = False Then
|
||||
|
||||
If DoRotation.X = 1.0F Then
|
||||
If DoRotation.X = 1.0F Then
|
||||
If AmountRotated.X < Math.Abs(EndRotation.X) Then
|
||||
If TargetEntity.Rotation.X > Me.EndRotation.X Then
|
||||
TargetEntity.Rotation.X += Me.RotationSpeedVector.X
|
||||
|
||||
@ -57,9 +63,13 @@
|
||||
TargetEntity.Rotation.X = Me.EndRotation.X
|
||||
End If
|
||||
End If
|
||||
AmountRotated.X += Math.Abs(Me.RotationSpeedVector.X)
|
||||
Else
|
||||
ReadyAxis.X = 1.0F
|
||||
End If
|
||||
|
||||
If DoRotation.Y = 1.0F Then
|
||||
End If
|
||||
If DoRotation.Y = 1.0F Then
|
||||
If AmountRotated.Y < Math.Abs(EndRotation.Y) Then
|
||||
If TargetEntity.Rotation.Y > Me.EndRotation.Y Then
|
||||
TargetEntity.Rotation.Y += Me.RotationSpeedVector.Y
|
||||
|
||||
@ -73,9 +83,15 @@
|
||||
TargetEntity.Rotation.Y = Me.EndRotation.Y
|
||||
End If
|
||||
End If
|
||||
AmountRotated.Y += Math.Abs(Me.RotationSpeedVector.Y)
|
||||
Else
|
||||
ReadyAxis.y = 1.0F
|
||||
End If
|
||||
End If
|
||||
|
||||
If DoRotation.Z = 1.0F Then
|
||||
If AmountRotated.Z < Math.Abs(EndRotation.Z) Then
|
||||
|
||||
If DoRotation.Z = 1.0F Then
|
||||
If TargetEntity.Rotation.Z > Me.EndRotation.Z Then
|
||||
TargetEntity.Rotation.Z += Me.RotationSpeedVector.Z
|
||||
|
||||
@ -89,42 +105,40 @@
|
||||
TargetEntity.Rotation.Z = Me.EndRotation.Z
|
||||
End If
|
||||
End If
|
||||
AmountRotated.Z += Math.Abs(Me.RotationSpeedVector.Z)
|
||||
Else
|
||||
ReadyAxis.Z = 1.0F
|
||||
End If
|
||||
Else
|
||||
End If
|
||||
|
||||
If ReadyAxis.X = 1.0F AndAlso ReadyAxis.Y = 1.0F AndAlso ReadyAxis.Z = 1.0F Then
|
||||
RotationReady()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub RotationReady()
|
||||
|
||||
If Me.DoReturn = True And Me.hasReturned = False Then
|
||||
Me.hasReturned = True
|
||||
Me.EndRotation = Me.ReturnVector
|
||||
Me.RotationSpeedVector = New Vector3(Me.RotationSpeedVector.X * -1, Me.RotationSpeedVector.Y * -1, Me.RotationSpeedVector.Z * -1)
|
||||
If DoRotation.X = 1.0F Then
|
||||
ReadyAxis.X = 0.0F
|
||||
AmountRotated.X -= AmountRotated.X * 2
|
||||
End If
|
||||
If DoRotation.Y = 1.0F Then
|
||||
ReadyAxis.Y = 0.0F
|
||||
AmountRotated.Y -= AmountRotated.Y * 2
|
||||
End If
|
||||
If DoRotation.Z = 1.0F Then
|
||||
ReadyAxis.Z = 0.0F
|
||||
AmountRotated.Z -= AmountRotated.Z * 2
|
||||
End If
|
||||
Else
|
||||
Me.Ready = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function VectorReached() As Boolean
|
||||
If DoRotation.X = 1.0F Then
|
||||
If EndRotation.X <> TargetEntity.Rotation.X Then
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
If DoRotation.Y = 1.0F Then
|
||||
If EndRotation.Y <> TargetEntity.Rotation.Y Then
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
If DoRotation.Z = 1.0F Then
|
||||
If EndRotation.Z <> TargetEntity.Rotation.Z Then
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Public Overrides Sub DoRemoveEntity()
|
||||
If Me.RemoveEntityAfter = True Then
|
||||
TargetEntity.CanBeRemoved = True
|
||||
|
@ -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
|
||||
|
36
P3D/Battle/BattleAnimations/BAEntitySetPosition.vb
Normal file
36
P3D/Battle/BattleAnimations/BAEntitySetPosition.vb
Normal file
@ -0,0 +1,36 @@
|
||||
Public Class BAEntitySetPosition
|
||||
|
||||
Inherits BattleAnimation3D
|
||||
|
||||
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)
|
||||
|
||||
Me.RemoveEntityAfter = RemoveEntityAfter
|
||||
Me.SetPosition = SetPosition
|
||||
|
||||
Me.Visible = False
|
||||
Me.TargetEntity = Entity
|
||||
|
||||
Me.AnimationType = AnimationTypes.Move
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub DoActionActive()
|
||||
Dim SetPositionOffset As Vector3 = New Vector3(0)
|
||||
If TargetEntity.Model IsNot Nothing Then
|
||||
SetPositionOffset = New Vector3(0, -0.5, 0)
|
||||
End If
|
||||
TargetEntity.Position = Me.SetPosition + SetPositionOffset
|
||||
Me.Ready = True
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub DoRemoveEntity()
|
||||
If Me.RemoveEntityAfter = True Then
|
||||
TargetEntity.CanBeRemoved = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
@ -2,15 +2,16 @@
|
||||
|
||||
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
|
||||
Me.Texture = Texture
|
||||
|
||||
Me.AnimationType = AnimationTypes.Texture
|
||||
End Sub
|
||||
|
||||
|
@ -2,24 +2,27 @@
|
||||
|
||||
Inherits BattleAnimation3D
|
||||
|
||||
Private soundfile As String
|
||||
Private stopMusic As Boolean
|
||||
Private IsPokemon As Boolean
|
||||
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)
|
||||
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 = "")
|
||||
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
|
||||
Me.Scale = New Vector3(1.0F)
|
||||
soundfile = sound
|
||||
Me.Visible = False
|
||||
Me.stopMusic = stopMusic
|
||||
Me.IsPokemon = IsPokemon
|
||||
Me.CrySuffix = CrySuffix
|
||||
|
||||
AnimationType = AnimationTypes.Sound
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub DoActionActive()
|
||||
If IsPokemon = True Then
|
||||
SoundManager.PlayPokemonCry(CInt(soundfile))
|
||||
SoundManager.PlayPokemonCry(CInt(soundfile), Me.CrySuffix)
|
||||
Else
|
||||
SoundManager.PlaySound(soundfile, stopMusic)
|
||||
End If
|
||||
|
@ -14,10 +14,9 @@
|
||||
Size
|
||||
Rotation
|
||||
Texture
|
||||
Wait
|
||||
ViewPokeBill
|
||||
Sound
|
||||
Background
|
||||
Camera
|
||||
End Enum
|
||||
|
||||
Public AnimationType As AnimationTypes = AnimationTypes.Nothing
|
||||
@ -25,13 +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
|
||||
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))
|
||||
@ -48,16 +48,21 @@
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub Update()
|
||||
|
||||
If Started = False Then
|
||||
Me.startDelay = Date.Now + New TimeSpan(0, 0, 0, CInt(StartDelayWhole), CInt(StartDelayFraction * 1000))
|
||||
Me.endDelay = Date.Now + New TimeSpan(0, 0, 0, CInt(EndDelayWhole), CInt(EndDelayFraction * 1000))
|
||||
hasStartedEndDelay = False
|
||||
Started = True
|
||||
End If
|
||||
If CanRemove = False Then
|
||||
If Ready = True Then
|
||||
If hasStartedEndDelay = False Then
|
||||
Me.endDelay = Date.Now + New TimeSpan(0, 0, 0, CInt(EndDelayWhole), CInt(EndDelayFraction * 1000))
|
||||
hasStartedEndDelay = True
|
||||
End If
|
||||
If Date.Now >= endDelay Then
|
||||
CanRemove = True
|
||||
DoRemoveEntity()
|
||||
CanRemove = True
|
||||
End If
|
||||
Else
|
||||
If Date.Now >= startDelay Then
|
||||
|
@ -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
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -12,7 +12,7 @@
|
||||
End If
|
||||
Dim ability As String = p.Ability.Name.ToLower()
|
||||
If p.Item IsNot Nothing AndAlso BattleScreen.FieldEffects.CanUseItem(own) = True Then
|
||||
Select Case p.Item.Name.ToLower()
|
||||
Select Case p.Item.OriginalName.ToLower()
|
||||
Case "damp rock"
|
||||
If ability = "drizzle" Or moveName = "rain dance" Then
|
||||
turns = 8
|
||||
@ -242,7 +242,7 @@
|
||||
End If
|
||||
|
||||
Dim SlowDownItems As List(Of String) = {"iron ball", "macho brace", "power bracer", "power belt", "power lens", "power band", "power anklet", "power weight"}.ToList()
|
||||
If SlowDownItems.Contains(p.Item.Name.ToLower()) = True And BattleScreen.FieldEffects.CanUseItem(own) = True Then
|
||||
If SlowDownItems.Contains(p.Item.OriginalName.ToLower()) = True And BattleScreen.FieldEffects.CanUseItem(own) = True Then
|
||||
speed = CInt(speed / 2)
|
||||
End If
|
||||
|
||||
@ -505,13 +505,13 @@
|
||||
result = INIT * ACCM
|
||||
|
||||
If Not op.Item Is Nothing And BattleScreen.FieldEffects.CanUseItem(Not own) = True Then
|
||||
If op.Item.Name.ToLower() = "bright powder" Or op.Item.Name.ToLower() = "lax incense" Then
|
||||
If op.Item.OriginalName.ToLower() = "bright powder" Or op.Item.OriginalName.ToLower() = "lax incense" Then
|
||||
result *= 0.9F
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not p.Item Is Nothing And BattleScreen.FieldEffects.CanUseItem(own) = True Then
|
||||
Select Case p.Item.Name.ToLower()
|
||||
Select Case p.Item.OriginalName.ToLower()
|
||||
Case "wide lens"
|
||||
result *= 1.1F
|
||||
Case "zoom lens"
|
||||
@ -633,7 +633,7 @@
|
||||
End If
|
||||
|
||||
If Not p.Item Is Nothing And BattleScreen.FieldEffects.CanUseItem(own) = True Then
|
||||
Select Case p.Item.Name.ToLower()
|
||||
Select Case p.Item.OriginalName.ToLower()
|
||||
Case "lucky punch"
|
||||
If p.Number = 113 Then
|
||||
C += 2
|
||||
@ -676,7 +676,7 @@
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Shared Function CanRun(ByVal own As Boolean, ByVal BattleScreen As BattleScreen) As Boolean
|
||||
Public Shared Function CanRun(ByVal own As Boolean, ByVal BattleScreen As BattleScreen, Optional ByVal IsEscapeMove As Boolean = False) As Boolean
|
||||
If BattleScreen.BattleMode = BattleScreen.BattleModes.Safari Then
|
||||
Return True
|
||||
End If
|
||||
@ -697,7 +697,7 @@
|
||||
End If
|
||||
|
||||
If Not p.Item Is Nothing Then
|
||||
If p.Item.Name.ToLower() = "smoke ball" And BattleScreen.FieldEffects.CanUseItem(own) = True And BattleScreen.FieldEffects.CanUseOwnItem(own, BattleScreen) = True Then
|
||||
If p.Item.OriginalName.ToLower() = "smoke ball" And BattleScreen.FieldEffects.CanUseItem(own) = True And BattleScreen.FieldEffects.CanUseOwnItem(own, BattleScreen) = True Then
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
@ -736,6 +736,10 @@
|
||||
Return False
|
||||
End If
|
||||
|
||||
If IsEscapeMove = True Then
|
||||
Return True
|
||||
End If
|
||||
|
||||
If p.Speed > op.Speed Then
|
||||
Return True
|
||||
Else
|
||||
@ -876,7 +880,7 @@
|
||||
End If
|
||||
|
||||
If Not op.Item Is Nothing Then
|
||||
If op.Item.Name.ToLower() = "ring target" And BattleScreen.FieldEffects.CanUseItem(Not own) = True And BattleScreen.FieldEffects.CanUseOwnItem(Not own, BattleScreen) = True Then
|
||||
If op.Item.OriginalName.ToLower() = "ring target" And BattleScreen.FieldEffects.CanUseItem(Not own) = True And BattleScreen.FieldEffects.CanUseOwnItem(Not own, BattleScreen) = True Then
|
||||
If Type1 = 0 Then
|
||||
effectiveness = Type2
|
||||
End If
|
||||
@ -987,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
|
||||
@ -998,13 +1002,30 @@
|
||||
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
|
||||
If Not p.Item Is Nothing Then
|
||||
If p.Item.Name.ToLower() = "lucky egg" Then
|
||||
If p.Item.OriginalName.ToLower() = "lucky egg" Then
|
||||
e = 1.5D
|
||||
End If
|
||||
End If
|
||||
@ -1015,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.Name.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.Name.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
|
||||
@ -1045,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
|
||||
|
||||
@ -1106,7 +1139,7 @@
|
||||
|
||||
With BattleScreen
|
||||
If Not .OwnPokemon.Item Is Nothing Then
|
||||
If .OwnPokemon.Item.Name.ToLower() = "shed shell" And .FieldEffects.CanUseItem(True) = True And .FieldEffects.CanUseOwnItem(True, BattleScreen) = True Then
|
||||
If .OwnPokemon.Item.OriginalName.ToLower() = "shed shell" And .FieldEffects.CanUseItem(True) = True And .FieldEffects.CanUseOwnItem(True, BattleScreen) = True Then
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
@ -1154,7 +1187,7 @@
|
||||
|
||||
With BattleScreen
|
||||
If Not .OppPokemon.Item Is Nothing Then
|
||||
If .OppPokemon.Item.Name.ToLower() = "shed shell" And .FieldEffects.CanUseItem(False) = True And .FieldEffects.CanUseOwnItem(False, BattleScreen) = True Then
|
||||
If .OppPokemon.Item.OriginalName.ToLower() = "shed shell" And .FieldEffects.CanUseItem(False) = True And .FieldEffects.CanUseOwnItem(False, BattleScreen) = True Then
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
@ -1222,7 +1255,7 @@
|
||||
|
||||
'IT (Item attack power modifier)
|
||||
If Not p.Item Is Nothing And BattleScreen.FieldEffects.CanUseItem(Own) = True And BattleScreen.FieldEffects.CanUseOwnItem(Own, BattleScreen) = True Then
|
||||
Select Case p.Item.Name.ToLower()
|
||||
Select Case p.Item.OriginalName.ToLower()
|
||||
Case "muscle band"
|
||||
If Attack.Category = Attack.Categories.Physical Then
|
||||
IT = 1.1F
|
||||
@ -1686,7 +1719,7 @@
|
||||
End Select
|
||||
|
||||
If Not p.Item Is Nothing And BattleScreen.FieldEffects.CanUseItem(Own) = True And BattleScreen.FieldEffects.CanUseOwnItem(Own, BattleScreen) = True Then
|
||||
Select Case p.Item.Name.ToLower()
|
||||
Select Case p.Item.OriginalName.ToLower()
|
||||
Case "choice band"
|
||||
IM = 1.5F
|
||||
Case "light ball"
|
||||
@ -1731,7 +1764,7 @@
|
||||
End Select
|
||||
|
||||
If Not p.Item Is Nothing And BattleScreen.FieldEffects.CanUseItem(Own) = True And BattleScreen.FieldEffects.CanUseOwnItem(Own, BattleScreen) = True Then
|
||||
Select Case p.Item.Name.ToLower()
|
||||
Select Case p.Item.OriginalName.ToLower()
|
||||
Case "choice specs"
|
||||
IM = 1.5F
|
||||
Case "light ball"
|
||||
@ -1814,7 +1847,7 @@
|
||||
End If
|
||||
|
||||
If Not Op.Item Is Nothing And BattleScreen.FieldEffects.CanUseItem(Not Own) = True And BattleScreen.FieldEffects.CanUseOwnItem(Not Own, BattleScreen) = True Then
|
||||
Select Case Op.Item.Name.ToLower()
|
||||
Select Case Op.Item.OriginalName.ToLower()
|
||||
Case "metal powder"
|
||||
If Op.Number = 132 Then
|
||||
DMod = 1.5F
|
||||
@ -1857,7 +1890,7 @@
|
||||
End If
|
||||
|
||||
If Not Op.Item Is Nothing And BattleScreen.FieldEffects.CanUseItem(Not Own) = True And BattleScreen.FieldEffects.CanUseOwnItem(Not Own, BattleScreen) = True Then
|
||||
Select Case Op.Item.Name.ToLower()
|
||||
Select Case Op.Item.OriginalName.ToLower()
|
||||
Case "metal powder"
|
||||
If Op.Number = 132 Then
|
||||
DMod = 1.5F
|
||||
@ -1963,15 +1996,15 @@
|
||||
End If
|
||||
Case Element.Types.Electric
|
||||
If BattleScreen.FieldEffects.ElectricTerrain > 0 And BattleScreen.FieldEffects.IsGrounded(Own, BattleScreen) = True Then
|
||||
SR = 1.5F
|
||||
SR = 1.3F
|
||||
End If
|
||||
Case Element.Types.Grass
|
||||
If BattleScreen.FieldEffects.GrassyTerrain > 0 And BattleScreen.FieldEffects.IsGrounded(Own, BattleScreen) = True Then
|
||||
SR = 1.5F
|
||||
SR = 1.3F
|
||||
End If
|
||||
Case Element.Types.Psychic
|
||||
If BattleScreen.FieldEffects.PsychicTerrain > 0 And BattleScreen.FieldEffects.IsGrounded(Own, BattleScreen) = True Then
|
||||
SR = 1.5F
|
||||
SR = 1.3F
|
||||
End If
|
||||
End Select
|
||||
|
||||
@ -2022,7 +2055,7 @@
|
||||
Dim Mod2 As Single = 1.0F
|
||||
|
||||
If Not p.Item Is Nothing And BattleScreen.FieldEffects.CanUseItem(Own) = True And BattleScreen.FieldEffects.CanUseOwnItem(Own, BattleScreen) = True Then
|
||||
If p.Item.Name.ToLower() = "life orb" Then
|
||||
If p.Item.OriginalName.ToLower() = "life orb" Then
|
||||
Mod2 = 1.3F
|
||||
End If
|
||||
End If
|
||||
@ -2066,14 +2099,14 @@
|
||||
End If
|
||||
|
||||
If Not p.Item Is Nothing And BattleScreen.FieldEffects.CanUseItem(Own) = True And BattleScreen.FieldEffects.CanUseOwnItem(Own, BattleScreen) = True Then
|
||||
If p.Item.Name.ToLower() = "expert belt" Then
|
||||
If p.Item.OriginalName.ToLower() = "expert belt" Then
|
||||
EB = 1.2F
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not Op.Item Is Nothing Then
|
||||
If BattleScreen.FieldEffects.CanUseItem(Not Own) = True And BattleScreen.FieldEffects.CanUseOwnItem(Not Own, BattleScreen) = True Then
|
||||
Select Case Op.Item.Name.ToLower()
|
||||
Select Case Op.Item.OriginalName.ToLower()
|
||||
Case "occa"
|
||||
If Attack.Type.Type = Element.Types.Fire Then
|
||||
If BattleScreen.Battle.RemoveHeldItem(Not Own, Not Own, BattleScreen, "The Occa Berry weakened the effect of " & Attack.Name & " on " & Op.GetDisplayName() & "!", "berry:occa") = True Then
|
||||
@ -2183,7 +2216,7 @@
|
||||
|
||||
If Not Op.Item Is Nothing Then
|
||||
If BattleScreen.FieldEffects.CanUseItem(Not Own) = True And BattleScreen.FieldEffects.CanUseOwnItem(Not Own, BattleScreen) = True Then
|
||||
If Op.Item.Name.ToLower() = "chilan" Then
|
||||
If Op.Item.OriginalName.ToLower() = "chilan" Then
|
||||
If Attack.Type.Type = Element.Types.Normal Then
|
||||
If BattleScreen.Battle.RemoveHeldItem(Not Own, Not Own, BattleScreen, "The Chilan Berry weakened the effect of " & Attack.Name & " on " & Op.GetDisplayName() & "!", "berry:chilan") = True Then
|
||||
TRB = 0.5F
|
||||
|
@ -214,15 +214,7 @@
|
||||
End Function
|
||||
|
||||
Private Function GetBattleMapOffset() As Vector3
|
||||
Dim v As New Vector3(0)
|
||||
Dim s As Screen = Core.CurrentScreen
|
||||
While s.Identification <> Screen.Identifications.BattleScreen And Not s.PreScreen Is Nothing
|
||||
s = s.PreScreen
|
||||
End While
|
||||
If s.Identification = Screen.Identifications.BattleScreen Then
|
||||
v = CType(s, BattleScreen).BattleMapOffset
|
||||
End If
|
||||
Return v
|
||||
Return BattleScreen.BattleMapOffset
|
||||
End Function
|
||||
|
||||
Public Overrides ReadOnly Property CPosition() As Vector3
|
||||
|
@ -7,11 +7,18 @@
|
||||
Moves
|
||||
End Enum
|
||||
|
||||
Public CanInteract As Boolean = True
|
||||
Public MenuState As MenuStates = MenuStates.Main
|
||||
Public Visible As Boolean = False
|
||||
|
||||
Public Sub New()
|
||||
Me.Reset()
|
||||
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
|
||||
CanInteract = False
|
||||
Else
|
||||
CanInteract = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub Reset()
|
||||
@ -50,7 +57,7 @@
|
||||
|
||||
If y > -1 Then
|
||||
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Battle\WeatherIcons"), New Rectangle(22, Core.windowSize.Height - 90, 176, 68), New Rectangle(x, y, 88, 34), Color.White)
|
||||
Core.SpriteBatch.DrawString(FontManager.MiniFont, t, New Vector2(110 - FontManager.MiniFont.MeasureString(t).X / 2, Core.windowSize.Height - 44), Color.Black)
|
||||
Core.SpriteBatch.DrawString(FontManager.MainFont, t, New Vector2(110 - FontManager.MainFont.MeasureString(t).X / 2, Core.windowSize.Height - 44), Color.Black)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@ -84,7 +91,7 @@
|
||||
|
||||
If y > -1 Then
|
||||
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Battle\WeatherIcons"), New Rectangle(222, Core.windowSize.Height - 90, 176, 68), New Rectangle(x, y, 88, 34), Color.White)
|
||||
Core.SpriteBatch.DrawString(FontManager.MiniFont, t, New Vector2(310 - FontManager.MiniFont.MeasureString(t).X / 2, Core.windowSize.Height - 44), Color.Black)
|
||||
Core.SpriteBatch.DrawString(FontManager.MainFont, t, New Vector2(310 - FontManager.MainFont.MeasureString(t).X / 2, Core.windowSize.Height - 44), Color.Black)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@ -104,21 +111,21 @@
|
||||
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.MiniFont, nameInformation, New Vector2(pos.X + 2, pos.Y + 2), New Color(0, 0, 0, _moveMenuAlpha))
|
||||
Core.SpriteBatch.DrawString(FontManager.MiniFont, nameInformation, New Vector2(pos.X, pos.Y), shinyHue)
|
||||
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)
|
||||
|
||||
'Gender:
|
||||
If p.Gender = Pokemon.Genders.Male Then
|
||||
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Battle\Interface"), New Rectangle(CInt(pos.X + 6 + FontManager.MiniFont.MeasureString(nameInformation).X), CInt(pos.Y), 12, 20), New Rectangle(0, 104, 6, 10), New Color(255, 255, 255, _moveMenuAlpha))
|
||||
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Battle\Interface"), New Rectangle(CInt(pos.X + 6 + FontManager.MainFont.MeasureString(nameInformation).X), CInt(pos.Y), 12, 20), New Rectangle(0, 104, 6, 10), New Color(255, 255, 255, _moveMenuAlpha))
|
||||
ElseIf p.Gender = Pokemon.Genders.Female Then
|
||||
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Battle\Interface"), New Rectangle(CInt(pos.X + 6 + FontManager.MiniFont.MeasureString(nameInformation).X), CInt(pos.Y), 12, 20), New Rectangle(6, 104, 6, 10), New Color(255, 255, 255, _moveMenuAlpha))
|
||||
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Battle\Interface"), New Rectangle(CInt(pos.X + 6 + FontManager.MainFont.MeasureString(nameInformation).X), CInt(pos.Y), 12, 20), New Rectangle(6, 104, 6, 10), New Color(255, 255, 255, _moveMenuAlpha))
|
||||
End If
|
||||
|
||||
'HP indicator:
|
||||
Core.SpriteBatch.DrawString(FontManager.MiniFont, p.HP & "/" & p.MaxHP, New Vector2(pos.X + 102, pos.Y + 37 + 3), New Color(0, 0, 0, _moveMenuAlpha))
|
||||
Core.SpriteBatch.DrawString(FontManager.MiniFont, p.HP & "/" & p.MaxHP, New Vector2(pos.X + 100, pos.Y + 35 + 3), shinyHue)
|
||||
Core.SpriteBatch.DrawString(FontManager.MainFont, p.HP & "/" & p.MaxHP, New Vector2(pos.X + 102, pos.Y + 37 + 3), New Color(0, 0, 0, _moveMenuAlpha))
|
||||
Core.SpriteBatch.DrawString(FontManager.MainFont, p.HP & "/" & p.MaxHP, New Vector2(pos.X + 100, pos.Y + 35 + 3), shinyHue)
|
||||
|
||||
'EXP Bar:
|
||||
If BattleScreen.CanReceiveEXP = True Then
|
||||
@ -151,7 +158,7 @@
|
||||
|
||||
Dim t = TextureManager.GetTexture("GUI\Battle\Interface")
|
||||
For dX As Integer = 0 To EXPlength Step 4
|
||||
Core.SpriteBatch.Draw(t, New Rectangle(CInt(pos.X) + 50 + dX, CInt(pos.Y) + 54, 4, 6), New Rectangle(0, 43, 2, 3), New Color(255, 255, 255, _moveMenuAlpha))
|
||||
Core.SpriteBatch.Draw(t, New Rectangle(CInt(pos.X) + 50 + dX, CInt(pos.Y) + 64, 4, 6), New Rectangle(0, 43, 2, 3), New Color(255, 255, 255, _moveMenuAlpha))
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
@ -161,16 +168,16 @@
|
||||
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.MiniFont, nameInformation, New Vector2(pos.X + 2, pos.Y + 2), New Color(0, 0, 0, _moveMenuAlpha))
|
||||
Core.SpriteBatch.DrawString(FontManager.MiniFont, nameInformation, New Vector2(pos.X, pos.Y), shinyHue)
|
||||
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)
|
||||
|
||||
'Gender:
|
||||
If p.Gender = Pokemon.Genders.Male Then
|
||||
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Battle\Interface"), New Rectangle(CInt(pos.X + 6 + FontManager.MiniFont.MeasureString(nameInformation).X), CInt(pos.Y), 12, 20), New Rectangle(0, 104, 6, 10), New Color(255, 255, 255, _moveMenuAlpha))
|
||||
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Battle\Interface"), New Rectangle(CInt(pos.X + 6 + FontManager.MainFont.MeasureString(nameInformation).X), CInt(pos.Y), 12, 20), New Rectangle(0, 104, 6, 10), New Color(255, 255, 255, _moveMenuAlpha))
|
||||
ElseIf p.Gender = Pokemon.Genders.Female Then
|
||||
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Battle\Interface"), New Rectangle(CInt(pos.X + 6 + FontManager.MiniFont.MeasureString(nameInformation).X), CInt(pos.Y), 12, 20), New Rectangle(6, 104, 6, 10), New Color(255, 255, 255, _moveMenuAlpha))
|
||||
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Battle\Interface"), New Rectangle(CInt(pos.X + 6 + FontManager.MainFont.MeasureString(nameInformation).X), CInt(pos.Y), 12, 20), New Rectangle(6, 104, 6, 10), New Color(255, 255, 255, _moveMenuAlpha))
|
||||
End If
|
||||
End If
|
||||
|
||||
@ -193,9 +200,9 @@
|
||||
End If
|
||||
|
||||
Dim cX As Integer = 0
|
||||
If HPpercentage <= 50.0F And HPpercentage > 15.0F Then
|
||||
If HPpercentage <= 75.0F And HPpercentage > 25.0F Then
|
||||
cX = 2
|
||||
ElseIf HPpercentage <= 15.0F Then
|
||||
ElseIf HPpercentage <= 25.0F Then
|
||||
cX = 4
|
||||
End If
|
||||
|
||||
@ -213,7 +220,9 @@
|
||||
End If
|
||||
|
||||
If DrawCaught = True Then
|
||||
If Pokedex.GetEntryType(Core.Player.PokedexData, p.Number) > 1 Then
|
||||
Dim dexID As String = PokemonForms.GetPokemonDataFileName(p.Number, p.AdditionalData, True)
|
||||
|
||||
If Pokedex.GetEntryType(Core.Player.PokedexData, dexID) > 1 Then
|
||||
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Battle\Interface"), New Rectangle(CInt(pos.X) + caughtX, CInt(pos.Y) + 22, 20, 20), New Rectangle(0, 46, 10, 10), New Color(255, 255, 255, _moveMenuAlpha))
|
||||
End If
|
||||
End If
|
||||
@ -307,12 +316,20 @@
|
||||
End Sub
|
||||
|
||||
Public Sub Update(ByRef BattleScreen As BattleScreen)
|
||||
Select Case MenuState
|
||||
Case MenuStates.Main
|
||||
UpdateMainMenu(BattleScreen)
|
||||
Case MenuStates.Moves
|
||||
UpdateMoveMenu(BattleScreen)
|
||||
End Select
|
||||
Dim blockinteractscreen() As Screen.Identifications = {Screen.Identifications.PartyScreen, Screen.Identifications.SummaryScreen, Screen.Identifications.PauseScreen, Screen.Identifications.ChatScreen}
|
||||
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
|
||||
End If
|
||||
If CanInteract = True Then
|
||||
Select Case MenuState
|
||||
Case MenuStates.Main
|
||||
UpdateMainMenu(BattleScreen)
|
||||
Case MenuStates.Moves
|
||||
UpdateMoveMenu(BattleScreen)
|
||||
End Select
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private _allItemsExtended As Integer = 0
|
||||
@ -325,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
|
||||
@ -374,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
|
||||
@ -395,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
|
||||
@ -422,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)
|
||||
@ -458,23 +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
|
||||
Dim ppColor As Color = GetPPColor()
|
||||
ppColor.A = CByte((extraExtended + AllExtended - deductAlpha).Clamp(0, 255))
|
||||
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.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.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.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
|
||||
|
||||
@ -498,21 +524,30 @@
|
||||
Public Sub Activate(ByVal BattleScreen As BattleScreen, ByVal AllExtended As Integer, ByVal isSelected As Boolean)
|
||||
If BattleScreen.BattleMenu._isExtracting = False And BattleScreen.BattleMenu._isRetracting = False Then
|
||||
If Me.Move.CurrentPP > 0 Or isSelected = False Then
|
||||
|
||||
If Controls.Accept(False, True, True) = True And isSelected = True Then
|
||||
SoundManager.PlaySound("select")
|
||||
Me.ClickAction(BattleScreen)
|
||||
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")
|
||||
Me.ClickAction(BattleScreen)
|
||||
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
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
@ -612,7 +647,7 @@
|
||||
TempBattleScreen = BattleScreen
|
||||
|
||||
Player.Temp.PokemonScreenIndex = BattleScreen.OwnPokemonIndex
|
||||
Dim selScreen = New PartyScreen(Core.CurrentScreen, Item.GetItemByID(5), 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)
|
||||
@ -632,33 +667,33 @@
|
||||
_mainMenuItemList.Clear()
|
||||
Select Case BattleScreen.BattleMode
|
||||
Case BattleSystem.BattleScreen.BattleModes.Safari
|
||||
Dim safariBallText As String = "Safari Ball x" & Core.Player.Inventory.GetItemAmount(181).ToString()
|
||||
If Core.Player.Inventory.GetItemAmount(181) = 0 Then
|
||||
safariBallText = "No Safari Balls."
|
||||
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 = 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()
|
||||
If Core.Player.Inventory.GetItemAmount(177) = 0 Then
|
||||
sportBallText = "No Sport Balls."
|
||||
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 = 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
|
||||
_mainMenuIndex = 0
|
||||
_mainMenuNextIndex = 0
|
||||
_mainMenuItemList.Add(New MainMenuItem(1, "Pokémon", 0, AddressOf MainMenuOpenPokemon))
|
||||
If BattleScreen.IsRemoteBattle AndAlso Not BattleScreen.IsHost Then
|
||||
_mainMenuItemList.Add(New MainMenuItem(1, "Pokémon", 0, AddressOf MainMenuOpenPokemon))
|
||||
BattleScreen.OwnFaint = False
|
||||
End If
|
||||
ElseIf BattleScreen.OppFaint And BattleScreen.IsRemoteBattle Then
|
||||
@ -674,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)
|
||||
@ -687,16 +722,16 @@
|
||||
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
|
||||
|
||||
Private Sub MainMenuAddMegaEvolution(ByVal BattleScreen As BattleScreen, ByVal Index As Integer)
|
||||
|
||||
'Checks if the player has the Mega Bracelet.
|
||||
If Not (Core.Player.Inventory.GetItemAmount(576) > 0) Then
|
||||
If Not (Core.Player.Inventory.GetItemAmount(576.ToString) > 0) Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
@ -719,12 +754,19 @@
|
||||
'Next
|
||||
Dim PokeIndex As Integer = BattleScreen.OwnPokemonIndex
|
||||
If BattleScreen.FieldEffects.OwnMegaEvolved = False Then
|
||||
If Not Core.Player.Pokemons(PokeIndex).Item Is Nothing Then
|
||||
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))
|
||||
If Core.Player.Pokemons(PokeIndex).Item IsNot Nothing Then
|
||||
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, 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, Localization.GetString("battle_action_MegaEvolve", "Mega Evolve!"), Index, AddressOf MainMenuMegaEvolve))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@ -738,7 +780,11 @@
|
||||
Private Sub MainMenuOpenBattleMenu(ByVal BattleScreen As BattleScreen)
|
||||
_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})
|
||||
@ -748,7 +794,7 @@
|
||||
TempBattleScreen = BattleScreen
|
||||
|
||||
Player.Temp.PokemonScreenIndex = BattleScreen.OwnPokemonIndex
|
||||
Dim selScreen = New PartyScreen(Core.CurrentScreen, Item.GetItemByID(5), 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)
|
||||
@ -778,39 +824,63 @@
|
||||
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
|
||||
|
||||
Private Sub MainMenuUseSafariBall(ByVal BattleScreen As BattleScreen)
|
||||
If Core.Player.Inventory.GetItemAmount(181) > 0 Then
|
||||
Core.Player.Inventory.RemoveItem(181, 1)
|
||||
If Core.Player.Inventory.GetItemAmount(181.ToString) > 0 Then
|
||||
Core.Player.Inventory.RemoveItem(181.ToString, 1)
|
||||
BattleScreen.BattleQuery.Clear()
|
||||
BattleScreen.BattleQuery.Add(BattleScreen.FocusBattle())
|
||||
BattleScreen.BattleQuery.Insert(0, New ToggleMenuQueryObject(True))
|
||||
Core.SetScreen(New BattleCatchScreen(BattleScreen, Item.GetItemByID(181)))
|
||||
Core.SetScreen(New BattleCatchScreen(BattleScreen, Item.GetItemByID(181.ToString)))
|
||||
|
||||
Dim safariBallText As String = "Safari Ball x" & Core.Player.Inventory.GetItemAmount(181).ToString()
|
||||
If Core.Player.Inventory.GetItemAmount(181) = 0 Then
|
||||
safariBallText = "No Safari Balls."
|
||||
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 = Localization.GetString("battle_NoSafariBalls", "No Safari Balls.")
|
||||
End If
|
||||
_mainMenuItemList(0).Text = safariBallText
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub MainMenuUseSportBall(ByVal BattleScreen As BattleScreen)
|
||||
If Core.Player.Inventory.GetItemAmount(177) > 0 Then
|
||||
Core.Player.Inventory.RemoveItem(177, 1)
|
||||
If Core.Player.Inventory.GetItemAmount(177.ToString) > 0 Then
|
||||
Core.Player.Inventory.RemoveItem(177.ToString, 1)
|
||||
BattleScreen.BattleQuery.Clear()
|
||||
BattleScreen.BattleQuery.Add(BattleScreen.FocusBattle())
|
||||
BattleScreen.BattleQuery.Insert(0, New ToggleMenuQueryObject(True))
|
||||
Core.SetScreen(New BattleCatchScreen(BattleScreen, Item.GetItemByID(177)))
|
||||
Core.SetScreen(New BattleCatchScreen(BattleScreen, Item.GetItemByID(177.ToString)))
|
||||
|
||||
Dim sportBallText As String = "Sport Ball x" & Core.Player.Inventory.GetItemAmount(177).ToString()
|
||||
If Core.Player.Inventory.GetItemAmount(177) = 0 Then
|
||||
Dim sportBallText As String = "Sport Ball x" & Core.Player.Inventory.GetItemAmount(177.ToString).ToString()
|
||||
If Core.Player.Inventory.GetItemAmount(177.ToString) = 0 Then
|
||||
sportBallText = "No Sport Balls."
|
||||
End If
|
||||
_mainMenuItemList(0).Text = sportBallText
|
||||
@ -874,22 +944,55 @@
|
||||
_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
|
||||
If _moveMenuAlpha <= 0 Then
|
||||
_moveMenuAlpha = 0
|
||||
MoveMenuStartRound(BattleScreen)
|
||||
Visible = False
|
||||
If BattleScreen.OwnPokemon.Attacks(_moveMenuIndex).SwapsOutOwnPokemon = True Then
|
||||
If PartyScreen.Selected = -1 Then
|
||||
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)
|
||||
End If
|
||||
If CurrentScreen.Identification <> Screen.Identifications.PartyScreen AndAlso PartyScreen.Selected <> -1 Then
|
||||
If BattleScreen.OwnPokemon.Attacks(_moveMenuIndex).ID = 226 Then
|
||||
BattleScreen.FieldEffects.OwnBatonPassIndex = PartyScreen.Selected
|
||||
Else
|
||||
BattleScreen.FieldEffects.OwnSwapIndex = PartyScreen.Selected
|
||||
End If
|
||||
PartyScreen.Selected = -1
|
||||
MoveMenuStartRound(BattleScreen)
|
||||
Visible = False
|
||||
End If
|
||||
Else
|
||||
MoveMenuStartRound(BattleScreen)
|
||||
Visible = False
|
||||
End If
|
||||
End If
|
||||
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
|
||||
@ -946,12 +1049,18 @@
|
||||
BattleScreen.BattleQuery.Clear()
|
||||
BattleScreen.BattleQuery.Add(BattleScreen.FocusBattle())
|
||||
BattleScreen.BattleQuery.Insert(0, New ToggleMenuQueryObject(True))
|
||||
Dim SwitchPokeSuffix As String = ""
|
||||
If BattleScreen.FieldEffects.OwnBatonPassIndex <> -1 Then
|
||||
SwitchPokeSuffix = ";BATON;" & BattleScreen.FieldEffects.OwnBatonPassIndex
|
||||
ElseIf BattleScreen.FieldEffects.OwnSwapIndex <> -1 Then
|
||||
SwitchPokeSuffix = ";SWAP;" & BattleScreen.FieldEffects.OwnSwapIndex
|
||||
End If
|
||||
If BattleScreen.IsMegaEvolvingOwn Then
|
||||
BattleScreen.SendClientCommand("MEGA|" & BattleScreen.OwnPokemon.Attacks(_moveMenuIndex).ID.ToString())
|
||||
BattleScreen.SendClientCommand("MEGA|" & BattleScreen.OwnPokemon.Attacks(_moveMenuIndex).ID.ToString() & SwitchPokeSuffix)
|
||||
BattleScreen.IsMegaEvolvingOwn = False
|
||||
BattleScreen.FieldEffects.OwnMegaEvolved = True
|
||||
Else
|
||||
BattleScreen.SendClientCommand("MOVE|" & BattleScreen.OwnPokemon.Attacks(_moveMenuIndex).ID.ToString())
|
||||
BattleScreen.SendClientCommand("MOVE|" & BattleScreen.OwnPokemon.Attacks(_moveMenuIndex).ID.ToString() & SwitchPokeSuffix)
|
||||
End If
|
||||
Else
|
||||
If BattleScreen.IsMegaEvolvingOwn Then
|
||||
@ -994,34 +1103,36 @@
|
||||
Dim Pokemon As Pokemon = Core.Player.Pokemons(PokeIndex)
|
||||
|
||||
If PokeIndex = TempBattleScreen.OwnPokemonIndex Then
|
||||
Screen.TextBox.Show(Pokemon.GetDisplayName() & " is already~in battle!", {}, True, False)
|
||||
If Pokemon.Status <> P3D.Pokemon.StatusProblems.Fainted Then
|
||||
Screen.TextBox.Show(Pokemon.GetDisplayName() & " " & Localization.GetString("battle_switch_already_in_battle", "is already~in battle!"), {}, True, False)
|
||||
Else
|
||||
Screen.TextBox.Show(Pokemon.GetDisplayName() & " " & Localization.GetString("battle_switch_fainted", "is fainted!"), {}, True, False)
|
||||
End If
|
||||
Else
|
||||
If Pokemon.IsEgg() = False Then
|
||||
If Pokemon.Status <> P3D.Pokemon.StatusProblems.Fainted Then
|
||||
If BattleCalculation.CanSwitch(TempBattleScreen, True) = False Then
|
||||
Screen.TextBox.Show("Cannot switch out.", {}, True, False)
|
||||
Screen.TextBox.Show(Localization.GetString("battle_cannot_switch", "Cannot switch out."), {}, True, False)
|
||||
Else
|
||||
If TempBattleScreen.OwnPokemonIndex <> PokeIndex Then
|
||||
If TempBattleScreen.IsRemoteBattle = True And TempBattleScreen.IsHost = False Then
|
||||
TempBattleScreen.OppFaint = False
|
||||
TempBattleScreen.OwnStatistics.Switches += 1
|
||||
TempBattleScreen.BattleQuery.Clear()
|
||||
TempBattleScreen.BattleQuery.Add(TempBattleScreen.FocusBattle())
|
||||
TempBattleScreen.BattleQuery.Insert(0, New ToggleMenuQueryObject(True))
|
||||
TempBattleScreen.SendClientCommand("SWITCH|" & PokeIndex.ToString())
|
||||
Else
|
||||
TempBattleScreen.BattleQuery.Clear()
|
||||
TempBattleScreen.BattleQuery.Add(TempBattleScreen.FocusBattle())
|
||||
TempBattleScreen.BattleQuery.Insert(0, New ToggleMenuQueryObject(True))
|
||||
TempBattleScreen.Battle.InitializeRound(TempBattleScreen, New Battle.RoundConst With {.StepType = Battle.RoundConst.StepTypes.Switch, .Argument = PokeIndex.ToString()})
|
||||
End If
|
||||
If TempBattleScreen.IsRemoteBattle = True And TempBattleScreen.IsHost = False Then
|
||||
TempBattleScreen.OppFaint = False
|
||||
TempBattleScreen.OwnStatistics.Switches += 1
|
||||
TempBattleScreen.BattleQuery.Clear()
|
||||
TempBattleScreen.BattleQuery.Add(TempBattleScreen.FocusBattle())
|
||||
TempBattleScreen.BattleQuery.Insert(0, New ToggleMenuQueryObject(True))
|
||||
TempBattleScreen.SendClientCommand("SWITCH|" & PokeIndex.ToString())
|
||||
Else
|
||||
TempBattleScreen.BattleQuery.Clear()
|
||||
TempBattleScreen.BattleQuery.Add(TempBattleScreen.FocusBattle())
|
||||
TempBattleScreen.BattleQuery.Insert(0, New ToggleMenuQueryObject(True))
|
||||
TempBattleScreen.Battle.InitializeRound(TempBattleScreen, New Battle.RoundConst With {.StepType = Battle.RoundConst.StepTypes.Switch, .Argument = PokeIndex.ToString()})
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
Screen.TextBox.Show(Pokemon.GetDisplayName() & " is fainted!", {}, True, False)
|
||||
Screen.TextBox.Show(Pokemon.GetDisplayName() & " " & Localization.GetString("battle_switch_fainted", "is fainted!"), {}, True, False)
|
||||
End If
|
||||
Else
|
||||
Screen.TextBox.Show("Cannot switch in~the egg!", {}, True, False)
|
||||
Screen.TextBox.Show(Localization.GetString("battle_switch_egg", "Cannot switch in~the egg!"), {}, True, False)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
@ -1031,21 +1142,21 @@
|
||||
#Region "UseItem"
|
||||
|
||||
Private Shared Sub SelectedItemHandler(ByVal params As Object())
|
||||
SelectedItem(CInt(params(0)))
|
||||
SelectedItem(CStr(params(0)))
|
||||
End Sub
|
||||
|
||||
Private Shared Sub SelectedItem(ByVal itemID As Integer)
|
||||
Dim Item As Item = Item.GetItemByID(itemID)
|
||||
Private Shared Sub SelectedItem(ByVal itemID As String)
|
||||
Dim Item As Item = Item.GetItemByID(itemID.ToString)
|
||||
|
||||
If Item.CanBeUsedInBattle = True Then
|
||||
If Item.IsBall = True Then
|
||||
Core.Player.Inventory.RemoveItem(itemID, 1)
|
||||
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))
|
||||
Core.SetScreen(New BattleCatchScreen(TempBattleScreen, Item.GetItemByID(itemID)))
|
||||
Core.SetScreen(New BattleCatchScreen(TempBattleScreen, Item.GetItemByID(itemID.ToString)))
|
||||
PlayerStatistics.Track("[4]Poké Balls used", 1)
|
||||
Else
|
||||
TempBattleScreen.BattleQuery.Clear()
|
||||
@ -1064,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)
|
||||
@ -1075,9 +1186,9 @@
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Shared TempItemID As Integer = -1
|
||||
Shared TempItemID As String = "-1"
|
||||
|
||||
Private Shared Sub UseItemhandler(ByVal params As Object())
|
||||
Private Shared Sub UseItemHandler(ByVal params As Object())
|
||||
UseItem(CInt(params(0)))
|
||||
End Sub
|
||||
|
||||
@ -1086,8 +1197,8 @@
|
||||
|
||||
Dim Item As Item = Item.GetItemByID(TempItemID)
|
||||
|
||||
TempBattleScreen.BattleQuery.Clear()
|
||||
If Item.UseOnPokemon(PokeIndex) = True Then
|
||||
TempBattleScreen.BattleQuery.Clear()
|
||||
TempBattleScreen.BattleQuery.Add(TempBattleScreen.FocusBattle())
|
||||
TempBattleScreen.BattleQuery.Insert(0, New ToggleMenuQueryObject(True))
|
||||
TempBattleScreen.Battle.InitializeRound(TempBattleScreen, New Battle.RoundConst With {.StepType = Battle.RoundConst.StepTypes.Item, .Argument = TempItemID.ToString()})
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -42,6 +42,7 @@
|
||||
Public OwnYawn As Integer = 0 'Yawn move counter
|
||||
Public OwnPerishSongCount As Integer = 0 'Perishsong move counter
|
||||
Public OwnConfusionTurns As Integer = 0 'Turns until confusion runs out
|
||||
Public TempOwnConfusionTurns As Integer = 0 'For the functionality of Berserk Gene
|
||||
Public OwnTorment As Integer = 0 'Torment move counter
|
||||
Public OwnTormentMove As Attack = Nothing 'Torment move
|
||||
Public OwnMetronomeItemCount As Integer = 0 'The counter for the item Metronome
|
||||
@ -63,6 +64,7 @@
|
||||
Public OwnLockOn As Integer = 0 'Counter for the moves lock-on and mind reader
|
||||
Public OwnBideCounter As Integer = 0 'Counter for the Bide move
|
||||
Public OwnBideDamage As Integer = 0 'Half of the damage dealt by bide
|
||||
Public OwnRageFistPower As Integer = 0 'how much the Power of the attack Rage Fist increases
|
||||
Public OwnLansatBerry As Integer = 0 'Raise critical hit ration when Lansat got eaten
|
||||
Public OwnCustapBerry As Integer = 0 'Raises the attack speed once when Custap got eaten
|
||||
Public OwnTrappedCounter As Integer = 0 'If the pokemon is trapped (for example by Spider Web), this is =1
|
||||
@ -127,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
|
||||
@ -181,6 +186,7 @@
|
||||
Public OppFutureSightID As Integer = 0
|
||||
Public OppPerishSongCount As Integer = 0
|
||||
Public OppConfusionTurns As Integer = 0
|
||||
Public TempOppConfusionTurns As Integer = 0
|
||||
Public OppTorment As Integer = 0
|
||||
Public OppTormentMove As Attack = Nothing
|
||||
Public OppMetronomeItemCount As Integer = 0
|
||||
@ -201,6 +207,7 @@
|
||||
Public OppSolarBlade As Integer = 0
|
||||
Public OppLockOn As Integer = 0
|
||||
Public OppBideCounter As Integer = 0
|
||||
Public OppRageFistPower As Integer = 0
|
||||
Public OppBideDamage As Integer = 0
|
||||
Public OppLansatBerry As Integer = 0
|
||||
Public OppCustapBerry As Integer = 0
|
||||
@ -249,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
|
||||
@ -281,18 +291,24 @@
|
||||
'Special stuff
|
||||
Public RunTries As Integer = 0
|
||||
Public UsedPokemon As New List(Of Integer)
|
||||
Public StolenItemIDs As New List(Of Integer)
|
||||
Public StolenItemIDs As New List(Of String)
|
||||
Public DefeatedTrainerPokemon As Boolean = False
|
||||
Public RoamingFled As Boolean = False
|
||||
|
||||
'Moves that swap out Pokémon
|
||||
Public OwnSwapIndex As Integer = -1
|
||||
Public OppSwapIndex As Integer = -1
|
||||
|
||||
'BatonPassTemp:
|
||||
Public OwnUsedBatonPass As Boolean = False
|
||||
Public OwnBatonPassStats As List(Of Integer)
|
||||
Public OwnBatonPassConfusion As Boolean = False
|
||||
Public OwnBatonPassIndex As Integer = -1
|
||||
|
||||
Public OppUsedBatonPass As Boolean = False
|
||||
Public OppBatonPassStats As List(Of Integer)
|
||||
Public OppBatonPassConfusion As Boolean = False
|
||||
Public OppBatonPassIndex As Integer = -1
|
||||
|
||||
Public Function CanUseItem(ByVal own As Boolean) As Boolean
|
||||
Dim embargo As Integer = OwnEmbargo
|
||||
@ -364,10 +380,10 @@
|
||||
grounded = False
|
||||
End If
|
||||
If Not p.Item Is Nothing Then
|
||||
If p.Item.Name.ToLower() = "air balloon" And BattleScreen.FieldEffects.CanUseItem(True) = True And BattleScreen.FieldEffects.CanUseOwnItem(True, BattleScreen) = True Then
|
||||
If p.Item.OriginalName.ToLower() = "air balloon" And BattleScreen.FieldEffects.CanUseItem(True) = True And BattleScreen.FieldEffects.CanUseOwnItem(True, BattleScreen) = True Then
|
||||
grounded = False
|
||||
End If
|
||||
If p.Item.Name.ToLower() = "iron ball" And BattleScreen.FieldEffects.CanUseItem(True) = True And BattleScreen.FieldEffects.CanUseOwnItem(True, BattleScreen) = True Then
|
||||
If p.Item.OriginalName.ToLower() = "iron ball" And BattleScreen.FieldEffects.CanUseItem(True) = True And BattleScreen.FieldEffects.CanUseOwnItem(True, BattleScreen) = True Then
|
||||
grounded = True
|
||||
End If
|
||||
End If
|
||||
@ -377,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
|
||||
@ -387,10 +403,10 @@
|
||||
grounded = False
|
||||
End If
|
||||
If Not p.Item Is Nothing Then
|
||||
If p.Item.Name.ToLower() = "air balloon" And BattleScreen.FieldEffects.CanUseItem(False) = True And BattleScreen.FieldEffects.CanUseOwnItem(False, BattleScreen) = True Then
|
||||
If p.Item.OriginalName.ToLower() = "air balloon" And BattleScreen.FieldEffects.CanUseItem(False) = True And BattleScreen.FieldEffects.CanUseOwnItem(False, BattleScreen) = True Then
|
||||
grounded = False
|
||||
End If
|
||||
If p.Item.Name.ToLower() = "iron ball" And BattleScreen.FieldEffects.CanUseItem(False) = True And BattleScreen.FieldEffects.CanUseOwnItem(False, BattleScreen) = True Then
|
||||
If p.Item.OriginalName.ToLower() = "iron ball" And BattleScreen.FieldEffects.CanUseItem(False) = True And BattleScreen.FieldEffects.CanUseOwnItem(False, BattleScreen) = True Then
|
||||
grounded = True
|
||||
End If
|
||||
End If
|
||||
|
@ -1,48 +1,51 @@
|
||||
Namespace BattleSystem
|
||||
Imports System.Xml
|
||||
|
||||
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 CurrentModel As Entity
|
||||
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 ByVal model As Entity = Nothing, 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
|
||||
End If
|
||||
If model IsNot Nothing Then
|
||||
Me.CurrentModel = model
|
||||
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 @@
|
||||
[Object].UpdateModel()
|
||||
[Object].Render()
|
||||
Next
|
||||
RenderObjects.Clear()
|
||||
Backgrounds.Clear()
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub Update(BV2Screen As BattleScreen)
|
||||
@ -98,23 +103,32 @@
|
||||
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) As Entity
|
||||
Public Function SpawnEntity(ByVal Position As Vector3, ByVal Texture As Texture2D, ByVal Scale As Vector3, ByVal Opacity As Single, Optional ByVal startDelay As Single = 0.0F, Optional ByVal endDelay As Single = 0.0F, Optional ModelPath As String = "") As Entity
|
||||
Dim NewPosition As Vector3
|
||||
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
|
||||
@ -123,6 +137,19 @@
|
||||
SpawnedEntity.Opacity = Opacity
|
||||
SpawnedEntity.Visible = False
|
||||
|
||||
If ModelPath <> "" Then
|
||||
SpawnedEntity.ModelPath = ModelPath
|
||||
SpawnedEntity.Model = ModelManager.GetModel(SpawnedEntity.ModelPath)
|
||||
SpawnedEntity.Scale *= ModelManager.MODELSCALE
|
||||
If BattleFlipped = True Then
|
||||
Dim FlipRotation As Integer = Entity.GetRotationFromVector(SpawnedEntity.Rotation)
|
||||
FlipRotation += 2
|
||||
If FlipRotation > 3 Then
|
||||
FlipRotation -= 4
|
||||
End If
|
||||
SpawnedEntity.Rotation.Y = Entity.GetRotationFromInteger(FlipRotation).Y
|
||||
End If
|
||||
End If
|
||||
SpawnedEntities.Add(SpawnedEntity)
|
||||
|
||||
Return SpawnedEntity
|
||||
@ -144,16 +171,12 @@
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub AnimationMove(ByVal Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal DestinationX As Single, ByVal DestinationY As Single, ByVal DestinationZ As Single, ByVal Speed As Single, ByVal SpinX As Boolean, ByVal SpinZ As Boolean, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal SpinXSpeed As Single = 0.1F, Optional ByVal SpinZSpeed As Single = 0.1F, Optional MovementCurve As Integer = 3, Optional MoveYSpeed As Single = 0.0F)
|
||||
Public Sub AnimationMove(ByVal Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal DestinationX As Single, ByVal DestinationY As Single, ByVal DestinationZ As Single, ByVal Speed As Single, ByVal SpinX As Boolean, ByVal SpinZ As Boolean, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal SpinXSpeed As Single = 0.1F, Optional ByVal SpinZSpeed As Single = 0.1F, Optional MoveYSpeed As Single = 0.0F, Optional MovementCurve As Integer = 3)
|
||||
Dim MoveEntity As Entity
|
||||
Dim ModelEntity As Entity = Nothing
|
||||
Dim Destination As Vector3
|
||||
|
||||
If Entity Is Nothing Then
|
||||
MoveEntity = CurrentEntity
|
||||
If Me.CurrentModel IsNot Nothing Then
|
||||
ModelEntity = Me.CurrentModel
|
||||
End If
|
||||
Else
|
||||
MoveEntity = Entity
|
||||
End If
|
||||
@ -161,13 +184,14 @@
|
||||
If Not BattleFlipped = Nothing Then
|
||||
If BattleFlipped = True Then
|
||||
DestinationX *= -1.0F
|
||||
DestinationZ *= -1.0F
|
||||
|
||||
If SpinZ = True Then
|
||||
SpinXSpeed *= -1.0F
|
||||
SpinZSpeed *= -1.0F
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If CurrentEntity Is Nothing Then
|
||||
Destination = MoveEntity.Position + New Vector3(DestinationX, DestinationY, DestinationZ)
|
||||
Else
|
||||
@ -177,21 +201,80 @@
|
||||
Dim baEntityMove As BAEntityMove = New BAEntityMove(MoveEntity, RemoveEntityAfter, Destination, Speed, SpinX, SpinZ, startDelay, endDelay, SpinXSpeed, SpinZSpeed, MovementCurve, MoveYSpeed)
|
||||
AnimationSequence.Add(baEntityMove)
|
||||
|
||||
If ModelEntity IsNot Nothing Then
|
||||
Dim baModelMove As BAEntityMove = New BAEntityMove(CType(CurrentModel, Entity), False, Destination, Speed, SpinX, SpinZ, startDelay, endDelay, SpinXSpeed, SpinZSpeed, MovementCurve, MoveYSpeed)
|
||||
AnimationSequence.Add(baModelMove)
|
||||
End Sub
|
||||
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)
|
||||
|
||||
If Entity Is Nothing Then
|
||||
MoveEntity = CurrentEntity
|
||||
Else
|
||||
MoveEntity = Entity
|
||||
End If
|
||||
|
||||
If Not BattleFlipped = Nothing Then
|
||||
If BattleFlipped = True Then
|
||||
Distance.Z *= -1.0F
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim DurationWhole = CSng(Math.Truncate(CDbl(Duration / 6.0F)))
|
||||
Dim DurationFraction = CSng((Duration / 6.0F - DurationWhole) * 1000)
|
||||
Dim DurationTime As TimeSpan = New TimeSpan(0, 0, 0, CInt(DurationWhole), CInt(DurationFraction))
|
||||
Dim baEntityOscillateMove As BAEntityOscillateMove = New BAEntityOscillateMove(MoveEntity, RemoveEntityAfter, Distance, Speed, BothWays, DurationTime, startDelay, endDelay, MovementCurve, ReturnToStart)
|
||||
AnimationSequence.Add(baEntityOscillateMove)
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub AnimationSetPosition(ByVal Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal PositionX As Single, ByVal PositionY As Single, ByVal PositionZ As Single, ByVal startDelay As Single, ByVal endDelay As Single)
|
||||
Dim SetEntity As Entity
|
||||
Dim SetPosition As Vector3
|
||||
|
||||
If Entity Is Nothing Then
|
||||
SetEntity = CurrentEntity
|
||||
Else
|
||||
SetEntity = Entity
|
||||
End If
|
||||
|
||||
SetPosition = New Vector3(PositionX, PositionY, PositionZ) + BattleScreen.BattleMapOffset
|
||||
|
||||
Dim baEntitySetPosition As BAEntitySetPosition = New BAEntitySetPosition(SetEntity, RemoveEntityAfter, SetPosition, startDelay, endDelay)
|
||||
AnimationSequence.Add(baEntitySetPosition)
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub AnimationColor(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 VectorColorTo As Vector3, Optional ByVal VectorColorFrom As Vector3 = Nothing, Optional TransitionSpeedOut As Single = -1)
|
||||
Dim ColorEntity As Entity
|
||||
If Entity Is Nothing Then
|
||||
ColorEntity = CurrentEntity
|
||||
Else
|
||||
ColorEntity = Entity
|
||||
End If
|
||||
Dim baEntityColor As BAEntityColor = New BAEntityColor(ColorEntity, RemoveEntityAfter, TransitionSpeedIn, ReturnToFromWhenDone, startDelay, endDelay, VectorColorTo, VectorColorFrom, TransitionSpeedOut)
|
||||
AnimationSequence.Add(baEntityColor)
|
||||
End Sub
|
||||
|
||||
Public Sub AnimationColor(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 Color, Optional ByVal ColorFrom As Color = Nothing, Optional TransitionSpeedOut As Single = -1)
|
||||
Dim ColorEntity As Entity
|
||||
If Entity Is Nothing Then
|
||||
ColorEntity = CurrentEntity
|
||||
Else
|
||||
ColorEntity = Entity
|
||||
End If
|
||||
Dim VectorColorTo As Vector3 = ColorTo.ToVector3
|
||||
Dim VectorColorFrom As Vector3 = Nothing
|
||||
If ColorFrom <> Nothing Then
|
||||
VectorColorFrom = ColorFrom.ToVector3
|
||||
End If
|
||||
|
||||
Dim baEntityColor As BAEntityColor = New BAEntityColor(ColorEntity, RemoveEntityAfter, TransitionSpeedIn, ReturnToFromWhenDone, startDelay, endDelay, VectorColorTo, VectorColorFrom, TransitionSpeedOut)
|
||||
AnimationSequence.Add(baEntityColor)
|
||||
End Sub
|
||||
|
||||
Public Sub AnimationFade(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)
|
||||
Dim FadeEntity As Entity
|
||||
Dim FadeModel As Entity = Nothing
|
||||
If Entity Is Nothing Then
|
||||
FadeEntity = CurrentEntity
|
||||
If Me.CurrentModel IsNot Nothing Then
|
||||
FadeModel = Me.CurrentModel
|
||||
End If
|
||||
Else
|
||||
FadeEntity = Entity
|
||||
End If
|
||||
@ -199,20 +282,12 @@
|
||||
Dim baEntityOpacity As BAEntityOpacity = New BAEntityOpacity(FadeEntity, RemoveEntityAfter, TransitionSpeed, FadeIn, EndState, startDelay, endDelay, startState)
|
||||
AnimationSequence.Add(baEntityOpacity)
|
||||
|
||||
If FadeModel IsNot Nothing Then
|
||||
Dim baModelOpacity As BAEntityOpacity = New BAEntityOpacity(CType(FadeModel, Entity), False, TransitionSpeed, FadeIn, EndState, startDelay, endDelay, startState)
|
||||
AnimationSequence.Add(baModelOpacity)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub AnimationRotate(Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal RotationSpeedX As Single, ByVal RotationSpeedY As Single, ByVal RotationSpeedZ As Single, ByVal EndRotationX As Single, ByVal EndRotationY As Single, ByVal EndRotationZ As Single, ByVal startDelay As Single, ByVal endDelay As Single, ByVal DoXRotation As Boolean, ByVal DoYRotation As Boolean, ByVal DoZRotation As Boolean, ByVal DoReturn As Boolean)
|
||||
Dim RotateEntity As Entity
|
||||
Dim RotateModel As Entity = Nothing
|
||||
If Entity Is Nothing Then
|
||||
RotateEntity = CurrentEntity
|
||||
If Me.CurrentModel IsNot Nothing Then
|
||||
RotateModel = Me.CurrentModel
|
||||
End If
|
||||
Else
|
||||
RotateEntity = Entity
|
||||
End If
|
||||
@ -222,21 +297,12 @@
|
||||
Dim baEntityRotate As BAEntityRotate = New BAEntityRotate(RotateEntity, RemoveEntityAfter, RotationSpeedVector, EndRotation, startDelay, endDelay, DoXRotation, DoYRotation, DoZRotation, DoReturn)
|
||||
AnimationSequence.Add(baEntityRotate)
|
||||
|
||||
If RotateModel IsNot Nothing Then
|
||||
Dim baModelRotate As BAEntityRotate = New BAEntityRotate(CType(RotateModel, Entity), False, RotationSpeedVector, EndRotation, startDelay, endDelay, DoXRotation, DoYRotation, DoZRotation, DoReturn)
|
||||
AnimationSequence.Add(baModelRotate)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub AnimationTurnNPC(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)
|
||||
Dim TurnNPC As NPC = Nothing
|
||||
Dim TurnModel As Entity = Nothing
|
||||
If CurrentEntity IsNot Nothing Then
|
||||
TurnNPC = CType(CurrentEntity, NPC)
|
||||
If Me.CurrentModel IsNot Nothing Then
|
||||
TurnModel = Me.CurrentModel
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not BattleFlipped = Nothing AndAlso BattleFlipped = True Then
|
||||
@ -244,17 +310,19 @@
|
||||
TurnSpeed *= -1
|
||||
End If
|
||||
|
||||
Dim BAEntityFaceRotate As BAEntityFaceRotate = New BAEntityFaceRotate(TurnNPC, TurnSteps, startDelay, endDelay, EndFaceRotation, TurnSpeed, TurnDelay, TurnModel)
|
||||
Dim BAEntityFaceRotate As BAEntityFaceRotate = New BAEntityFaceRotate(TurnNPC, TurnSteps, startDelay, endDelay, EndFaceRotation, TurnSpeed, TurnDelay)
|
||||
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
|
||||
Dim ScaleModel As Entity = Nothing
|
||||
If Entity Is Nothing Then
|
||||
ScaleEntity = CurrentEntity
|
||||
If Me.CurrentModel IsNot Nothing Then
|
||||
ScaleModel = Me.CurrentModel
|
||||
If ScaleEntity.Model IsNot Nothing Then
|
||||
EndSizeX *= ModelManager.MODELSCALE
|
||||
EndSizeY *= ModelManager.MODELSCALE
|
||||
EndSizeZ *= ModelManager.MODELSCALE
|
||||
SizeSpeed *= ModelManager.MODELSCALE
|
||||
End If
|
||||
Else
|
||||
ScaleEntity = Entity
|
||||
@ -262,23 +330,41 @@
|
||||
|
||||
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)
|
||||
|
||||
If ScaleModel IsNot Nothing Then
|
||||
Dim baModelScale As BAEntityScale = New BAEntityScale(CType(ScaleModel, Entity), False, Scale, Grow, EndSize, SizeSpeed, startDelay, endDelay, Anchors)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub AnimationPlaySound(ByVal sound As String, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal stopMusic As Boolean = False, Optional ByVal IsPokemon As Boolean = False)
|
||||
Dim baSound As BAPlaySound = New BAPlaySound(sound, startDelay, endDelay, stopMusic, IsPokemon)
|
||||
Public Sub AnimationPlaySound(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 = "")
|
||||
Dim baSound As BAPlaySound = New BAPlaySound(sound, startDelay, endDelay, stopMusic, IsPokemon, CrySuffix)
|
||||
AnimationSequence.Add(baSound)
|
||||
End Sub
|
||||
|
||||
Public Sub AnimationBackground(Texture As Texture2D, ByVal TransitionSpeed As Single, ByVal FadeIn As Boolean, ByVal FadeOut As Boolean, ByVal EndState As Single, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal startState As Single = 0.0F)
|
||||
Dim baBackground As BABackground = New BABackground(Texture, TransitionSpeed, FadeIn, FadeOut, EndState, startDelay, endDelay, startState)
|
||||
Public Sub AnimationBackground(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 = 4, Optional ByVal Scale As Integer = 4)
|
||||
Dim baBackground As BABackground = New BABackground(Texture, startDelay, endDelay, Duration, AfterFadeInOpacity, FadeInSpeed, FadeOutSpeed, DoTile, AnimationLength, AnimationSpeed, Scale)
|
||||
AnimationSequence.Add(baBackground)
|
||||
End Sub
|
||||
|
||||
Public Sub AnimationCameraChangeAngle(ByRef Battlescreen As BattleScreen, ByVal CameraAngleID As Integer, ByVal startDelay As Single, ByVal endDelay As Single)
|
||||
Dim baCameraChangeAngle As BACameraChangeAngle = New BACameraChangeAngle(Battlescreen, CameraAngleID, startDelay, endDelay)
|
||||
AnimationSequence.Add(baCameraChangeAngle)
|
||||
End Sub
|
||||
|
||||
Public Sub AnimationCameraOscillateMove(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 ReturnPosition As New Vector3(0)
|
||||
|
||||
If Not BattleFlipped = Nothing Then
|
||||
If BattleFlipped = True Then
|
||||
Distance.Z *= -1.0F
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim DurationWhole = CSng(Math.Truncate(CDbl(Duration / 6.0F)))
|
||||
Dim DurationFraction = CSng((Duration / 6.0F - DurationWhole) * 1000)
|
||||
Dim DurationTime As TimeSpan = New TimeSpan(0, 0, 0, CInt(DurationWhole), CInt(DurationFraction))
|
||||
Dim baCameraOscillateMove As BACameraOscillateMove = New BACameraOscillateMove(Distance, Speed, BothWays, DurationTime, startDelay, endDelay, MovementCurve, ReturnToStart)
|
||||
AnimationSequence.Add(baCameraOscillateMove)
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
End Namespace
|
@ -6,17 +6,19 @@
|
||||
|
||||
Dim _sound As String = ""
|
||||
Dim _isPokemonSound As Boolean = False
|
||||
Dim _crySuffix As String = ""
|
||||
Dim _delay As Single = 0.0F
|
||||
|
||||
Public Sub New(ByVal sound As String, ByVal isPokemonSound As Boolean)
|
||||
Me.New(sound, isPokemonSound, 0.0F)
|
||||
Public Sub New(ByVal sound As String, ByVal isPokemonSound As Boolean, Optional ByVal CrySuffix As String = "")
|
||||
Me.New(sound, isPokemonSound, 0.0F, CrySuffix)
|
||||
End Sub
|
||||
|
||||
Public Sub New(ByVal sound As String, ByVal isPokemonSound As Boolean, ByVal delay As Single)
|
||||
Public Sub New(ByVal sound As String, ByVal isPokemonSound As Boolean, ByVal delay As Single, Optional ByVal CrySuffix As String = "")
|
||||
MyBase.New(QueryTypes.PlaySound)
|
||||
|
||||
Me._sound = sound
|
||||
Me._isPokemonSound = isPokemonSound
|
||||
Me._crySuffix = CrySuffix
|
||||
Me._delay = delay
|
||||
Me.PassThis = True
|
||||
End Sub
|
||||
@ -34,7 +36,7 @@
|
||||
|
||||
Private Sub InternalPlaySound()
|
||||
If _isPokemonSound = True Then
|
||||
SoundManager.PlayPokemonCry(CInt(_sound))
|
||||
SoundManager.PlayPokemonCry(CInt(_sound), _crySuffix)
|
||||
Else
|
||||
SoundManager.PlaySound(Me._sound, False)
|
||||
End If
|
||||
|
@ -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
|
||||
@ -89,31 +89,49 @@
|
||||
If rec.Contains(MouseHandler.MousePosition) = False Then
|
||||
If Controls.Accept(True, True, True) = True Then
|
||||
If _chooseIndex = 0 Then
|
||||
Dim selScreen = New PartyScreen(Core.CurrentScreen, Item.GetItemByID(5), AddressOf ChoosePokemon, Localization.GetString("battle_main_choose_pokemon"), False) With {.Mode = Screens.UI.ISelectionScreen.ScreenMode.Selection, .CanExit = True}
|
||||
Dim selScreen = New PartyScreen(Core.CurrentScreen, Item.GetItemByID(5.ToString), AddressOf ChoosePokemon, Localization.GetString("battle_choose_pokemon"), False) With {.Mode = Screens.UI.ISelectionScreen.ScreenMode.Selection, .CanExit = True}
|
||||
AddHandler selScreen.SelectedObject, AddressOf ChoosePokemonHandler
|
||||
SoundManager.PlaySound("select")
|
||||
Core.SetScreen(selScreen)
|
||||
Else
|
||||
SoundManager.PlaySound("select")
|
||||
TempScreen.BattleQuery.Clear()
|
||||
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
|
||||
TempScreen.BattleQuery.AddRange({cq1, cq2})
|
||||
TempScreen.HasSwitchedOwn = False
|
||||
TempScreen.Battle.StartRound(TempScreen)
|
||||
_ready = True
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If Controls.Accept(False, True, True) = True Then
|
||||
If _chooseIndex = 0 Then
|
||||
Dim selScreen = New PartyScreen(Core.CurrentScreen, Item.GetItemByID(5), AddressOf ChoosePokemon, Localization.GetString("battle_main_choose_pokemon"), False) With {.Mode = Screens.UI.ISelectionScreen.ScreenMode.Selection, .CanExit = True}
|
||||
Dim selScreen = New PartyScreen(Core.CurrentScreen, Item.GetItemByID(5.ToString), AddressOf ChoosePokemon, Localization.GetString("battle_choose_pokemon"), False) With {.Mode = Screens.UI.ISelectionScreen.ScreenMode.Selection, .CanExit = True}
|
||||
AddHandler selScreen.SelectedObject, AddressOf ChoosePokemonHandler
|
||||
SoundManager.PlaySound("select")
|
||||
Core.SetScreen(selScreen)
|
||||
Else
|
||||
SoundManager.PlaySound("select")
|
||||
TempScreen.BattleQuery.Clear()
|
||||
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
|
||||
TempScreen.BattleQuery.AddRange({cq1, cq2})
|
||||
TempScreen.HasSwitchedOwn = False
|
||||
TempScreen.Battle.StartRound(TempScreen)
|
||||
_ready = True
|
||||
End If
|
||||
End If
|
||||
If Controls.Accept(True, False, False) Then
|
||||
If New Rectangle(Core.windowSize.Width - 213, Core.windowSize.Height - 438, 80, 50).Contains(MouseHandler.MousePosition) Then
|
||||
_chooseIndex = 0
|
||||
Dim selScreen = New PartyScreen(Core.CurrentScreen, Item.GetItemByID(5), AddressOf ChoosePokemon, Localization.GetString("battle_main_choose_pokemon"), False) With {.Mode = Screens.UI.ISelectionScreen.ScreenMode.Selection, .CanExit = True}
|
||||
Dim selScreen = New PartyScreen(Core.CurrentScreen, Item.GetItemByID(5.ToString), AddressOf ChoosePokemon, Localization.GetString("battle_choose_pokemon"), False) With {.Mode = Screens.UI.ISelectionScreen.ScreenMode.Selection, .CanExit = True}
|
||||
AddHandler selScreen.SelectedObject, AddressOf ChoosePokemonHandler
|
||||
SoundManager.PlaySound("select")
|
||||
Core.SetScreen(selScreen)
|
||||
@ -121,12 +139,30 @@
|
||||
If New Rectangle(Core.windowSize.Width - 213, Core.windowSize.Height - 378, 80, 50).Contains(MouseHandler.MousePosition) Then
|
||||
_chooseIndex = 1
|
||||
SoundManager.PlaySound("select")
|
||||
TempScreen.BattleQuery.Clear()
|
||||
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
|
||||
TempScreen.BattleQuery.AddRange({cq1, cq2})
|
||||
TempScreen.HasSwitchedOwn = False
|
||||
TempScreen.Battle.StartRound(TempScreen)
|
||||
_ready = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If Controls.Dismiss(True, True, True) = True Then
|
||||
SoundManager.PlaySound("select")
|
||||
TempScreen.BattleQuery.Clear()
|
||||
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
|
||||
TempScreen.BattleQuery.AddRange({cq1, cq2})
|
||||
TempScreen.HasSwitchedOwn = False
|
||||
TempScreen.Battle.StartRound(TempScreen)
|
||||
_ready = True
|
||||
End If
|
||||
End Sub
|
||||
@ -157,36 +193,50 @@
|
||||
Private Sub ChoosePokemon(ByVal PokeIndex As Integer)
|
||||
Dim Pokemon As Pokemon = Core.Player.Pokemons(PokeIndex)
|
||||
If PokeIndex = TempScreen.OwnPokemonIndex Then
|
||||
Screen.TextBox.Show(Pokemon.GetDisplayName() & " is already~in battle!", {}, True, False)
|
||||
Screen.TextBox.Show(Pokemon.GetDisplayName() & " " & Localization.GetString("battle_switch_already_in_battle", "is already~in battle!"), {}, True, False)
|
||||
Else
|
||||
If Pokemon.IsEgg() = False Then
|
||||
If Pokemon.Status <> P3D.Pokemon.StatusProblems.Fainted Then
|
||||
If BattleCalculation.CanSwitch(TempScreen, True) = False Then
|
||||
Screen.TextBox.Show("Cannot switch out.", {}, True, False)
|
||||
Screen.TextBox.Show(Localization.GetString("battle_cannot_switch", "Cannot switch out."), {}, True, False)
|
||||
Else
|
||||
Dim TempQuery = TempScreen.BattleQuery.ToArray
|
||||
If TempScreen.OwnPokemonIndex <> PokeIndex Then
|
||||
TempScreen.ParticipatedPokemon.Clear()
|
||||
TempScreen.ParticipatedPokemon.Add(PokeIndex)
|
||||
If TempScreen.IsRemoteBattle = True And TempScreen.IsHost = False Then
|
||||
TempScreen.OppFaint = False
|
||||
TempScreen.OwnStatistics.Switches += 1
|
||||
TempScreen.BattleQuery.Clear()
|
||||
TempScreen.Battle.SwitchOutOwn(TempScreen, PokeIndex, TempScreen.BattleQuery.Count)
|
||||
TempScreen.BattleQuery.Reverse()
|
||||
TempScreen.BattleQuery.AddRange(TempQuery)
|
||||
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
|
||||
TempScreen.BattleQuery.AddRange({cq1, cq2})
|
||||
TempScreen.HasSwitchedOwn = True
|
||||
TempScreen.Battle.StartRound(TempScreen)
|
||||
Else
|
||||
TempScreen.BattleQuery.Clear()
|
||||
TempScreen.Battle.SwitchOutOwn(TempScreen, PokeIndex, TempScreen.BattleQuery.Count)
|
||||
TempScreen.BattleQuery.Reverse()
|
||||
TempScreen.BattleQuery.AddRange(TempQuery)
|
||||
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
|
||||
TempScreen.BattleQuery.AddRange({cq1, cq2})
|
||||
TempScreen.HasSwitchedOwn = True
|
||||
TempScreen.Battle.StartRound(TempScreen)
|
||||
End If
|
||||
Me._ready = True
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
Screen.TextBox.Show(Pokemon.GetDisplayName() & " is fainted!", {}, True, False)
|
||||
Screen.TextBox.Show(Pokemon.GetDisplayName() & " " & Localization.GetString("battle_switch_fainted", "is fainted!"), {}, True, False)
|
||||
End If
|
||||
Else
|
||||
Screen.TextBox.Show("Cannot switch in~the egg!", {}, True, False)
|
||||
Screen.TextBox.Show(Localization.GetString("battle_switch_egg", "Cannot switch in~the egg!"), {}, True, False)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
@ -197,11 +247,152 @@
|
||||
MyBase.New(QueryTypes.SwitchPokemon)
|
||||
|
||||
Me.TempScreen = BattleScreen
|
||||
TransformText(BattleScreen.Trainer.Name & " " & Localization.GetString("battle_main_trainer_sent_out_3") & " " & NewPokemon.GetDisplayName() & Localization.GetString("battle_main_trainer_sent_out_4"))
|
||||
TransformText(BattleScreen.Trainer.Name & " " & Localization.GetString("battle_trainer_about_to_send_out_1") & " " & NewPokemon.GetDisplayName() & Localization.GetString("battle_trainer_about_to_send_out_2"))
|
||||
End Sub
|
||||
|
||||
Dim delay As Single = 2.0F
|
||||
|
||||
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)
|
||||
If oppModel = "" Then
|
||||
BattleScreen.BattleQuery.Add(New ToggleEntityQueryObject(True, ToggleEntityQueryObject.BattleEntities.OppPokemon, PokemonForms.GetOverworldSpriteName(BattleScreen.OppPokemon), -1, -1, 0, 1))
|
||||
Else
|
||||
BattleScreen.BattleQuery.Add(New ToggleEntityQueryObject(False, oppModel, -1, -1, 1, 0))
|
||||
End If
|
||||
|
||||
BattleScreen.BattleQuery.Add(New ToggleEntityQueryObject(True, ToggleEntityQueryObject.BattleEntities.OppPokemon, 1, -1, -1, -1, -1))
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(BattleScreen.Trainer.Name & ": ""Go, " & BattleScreen.OppPokemon.GetDisplayName() & "!"""))
|
||||
|
||||
Dim BallThrow As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OppPokemonNPC, False)
|
||||
If Core.Player.ShowBattleAnimations <> 0 AndAlso BattleScreen.IsPVPBattle = False Then
|
||||
' Ball is thrown
|
||||
BallThrow.AnimationMove(Nothing, False, 0, 0.5, 0, 0.5, False, False, 0, 0,,,, 3)
|
||||
|
||||
BallThrow.AnimationPlaySound("Battle\Pokeball\Throw", 0, 0)
|
||||
Dim BallThrowEntity = BallThrow.SpawnEntity(New Vector3(2, -0.15, 0), BattleScreen.OppPokemon.CatchBall.Texture, New Vector3(0.3F), 1.0F)
|
||||
BallThrow.AnimationMove(BallThrowEntity, True, 0, 0.35, 0, 0.1, False, True, 0F, 0.5F,, 0.3, 0.025F)
|
||||
|
||||
' Ball opens
|
||||
BallThrow.AnimationPlaySound("Battle\Pokeball\Open", 3, 0)
|
||||
Dim SmokeSpawned As Integer = 0
|
||||
Do
|
||||
Dim SmokePosition = New Vector3(0, 0.35, 0)
|
||||
Dim SmokeDestination = New Vector3(CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10))
|
||||
|
||||
Dim SmokeTexture As Texture2D = TextureManager.GetTexture("Textures\Battle\Smoke")
|
||||
|
||||
Dim SmokeScale = New Vector3(CSng(Random.Next(2, 6) / 10))
|
||||
Dim SmokeSpeed = CSng(Random.Next(1, 3) / 20.0F)
|
||||
Dim SmokeEntity = BallThrow.SpawnEntity(SmokePosition, SmokeTexture, SmokeScale, 1, 3)
|
||||
|
||||
BallThrow.AnimationMove(SmokeEntity, True, SmokeDestination.X, SmokeDestination.Y, SmokeDestination.Z, SmokeSpeed, False, False, 3.0F, 0.0F)
|
||||
Threading.Interlocked.Increment(SmokeSpawned)
|
||||
Loop While SmokeSpawned <= 38
|
||||
End If
|
||||
|
||||
If Core.Player.ShowBattleAnimations <> 0 AndAlso BattleScreen.IsPVPBattle = False Then
|
||||
' Pokemon appears
|
||||
BallThrow.AnimationFade(Nothing, False, 1, True, 1, 3, 0)
|
||||
BallThrow.AnimationPlaySound(CStr(BattleScreen.OppPokemon.Number), 4, 0,, True)
|
||||
' Pokémon falls down
|
||||
BallThrow.AnimationMove(Nothing, False, 0, -0.5F, 0, 0.05F, False, False, 5, 0)
|
||||
Else
|
||||
' Pokemon appears
|
||||
BallThrow.AnimationFade(Nothing, False, 1, True, 1, 0, 0)
|
||||
BallThrow.AnimationPlaySound(CStr(BattleScreen.OppPokemon.Number), 0, 0,, True)
|
||||
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
|
||||
|
||||
Dim spikeAffected As Boolean = True
|
||||
Dim rockAffected As Boolean = True
|
||||
|
||||
spikeAffected = BattleScreen.FieldEffects.IsGrounded(False, BattleScreen)
|
||||
|
||||
If spikeAffected = True Then
|
||||
If .FieldEffects.OwnSpikes > 0 And p.Ability.Name.ToLower() <> "magic guard" Then
|
||||
Dim spikeDamage As Double = 1D
|
||||
Select Case .FieldEffects.OwnSpikes
|
||||
Case 1
|
||||
spikeDamage = (p.MaxHP / 100) * 12.5D
|
||||
Case 2
|
||||
spikeDamage = (p.MaxHP / 100) * 16.7D
|
||||
Case 3
|
||||
spikeDamage = (p.MaxHP / 100) * 25D
|
||||
End Select
|
||||
BattleScreen.Battle.ReduceHP(CInt(spikeDamage), False, True, BattleScreen, "The Spikes hurt " & p.GetDisplayName() & "!", "spikes")
|
||||
End If
|
||||
End If
|
||||
'Sticky Web
|
||||
If spikeAffected = True Then
|
||||
If .FieldEffects.OwnStickyWeb > 0 Then
|
||||
BattleScreen.Battle.LowerStat(False, False, BattleScreen, "Speed", 1, "The opposing pokemon was caught in a Sticky Web!", "stickyweb")
|
||||
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
|
||||
Select Case .FieldEffects.OwnToxicSpikes
|
||||
Case 1
|
||||
BattleScreen.Battle.InflictPoison(False, True, BattleScreen, False, "The Toxic Spikes hurt " & p.GetDisplayName() & "!", "toxicspikes")
|
||||
Case 2
|
||||
BattleScreen.Battle.InflictPoison(False, True, BattleScreen, True, "The Toxic Spikes hurt " & p.GetDisplayName() & "!", "toxicspikes")
|
||||
End Select
|
||||
End If
|
||||
If .FieldEffects.OwnToxicSpikes > 0 Then
|
||||
If p.Type1.Type = Element.Types.Poison Or p.Type2.Type = Element.Types.Poison Then
|
||||
.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " removed the Toxic Spikes!"))
|
||||
.FieldEffects.OwnToxicSpikes = 0
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If rockAffected = True Then
|
||||
If .FieldEffects.OwnStealthRock > 0 And p.Ability.Name.ToLower() <> "magic guard" Then
|
||||
Dim rocksDamage As Double = 1D
|
||||
|
||||
Dim effectiveness As Single = BattleCalculation.ReverseTypeEffectiveness(Element.GetElementMultiplier(New Element(Element.Types.Rock), p.Type1)) * BattleCalculation.ReverseTypeEffectiveness(Element.GetElementMultiplier(New Element(Element.Types.Rock), p.Type2))
|
||||
Select Case effectiveness
|
||||
Case 0.25F
|
||||
rocksDamage = (p.MaxHP / 100) * 3.125D
|
||||
Case 0.5F
|
||||
rocksDamage = (p.MaxHP / 100) * 6.25D
|
||||
Case 1.0F
|
||||
rocksDamage = (p.MaxHP / 100) * 12.5D
|
||||
Case 2.0F
|
||||
rocksDamage = (p.MaxHP / 100) * 25D
|
||||
Case 4.0F
|
||||
rocksDamage = (p.MaxHP / 100) * 50D
|
||||
End Select
|
||||
|
||||
BattleScreen.Battle.ReduceHP(CInt(rocksDamage), False, True, BattleScreen, "The Stealth Rocks hurt " & p.GetDisplayName() & "!", "stealthrocks")
|
||||
End If
|
||||
End If
|
||||
|
||||
BattleScreen.Battle.TriggerAbilityEffect(BattleScreen, False)
|
||||
BattleScreen.Battle.TriggerItemEffect(BattleScreen, False)
|
||||
|
||||
If .OppPokemon.Status = Pokemon.StatusProblems.Sleep Then
|
||||
.FieldEffects.OppSleepTurns = Core.Random.Next(1, 4)
|
||||
End If
|
||||
|
||||
If BattleScreen.FieldEffects.OppHealingWish = True Then
|
||||
BattleScreen.FieldEffects.OppHealingWish = False
|
||||
|
||||
If .OppPokemon.HP < .OppPokemon.MaxHP Or .OppPokemon.Status <> Pokemon.StatusProblems.None Then
|
||||
BattleScreen.Battle.GainHP(.OppPokemon.MaxHP - .OppPokemon.HP, False, False, BattleScreen, "The Healing Wish came true for " & .OppPokemon.GetDisplayName() & "!", "move:healingwish")
|
||||
BattleScreen.Battle.CureStatusProblem(False, False, BattleScreen, "", "move:healingwish")
|
||||
End If
|
||||
End If
|
||||
End With
|
||||
End Sub
|
||||
Public Overrides Sub Update(BV2Screen As BattleScreen)
|
||||
If TextReady = False Then
|
||||
UpdateText()
|
||||
|
@ -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é")
|
||||
|
||||
@ -58,9 +59,11 @@
|
||||
Me._textIndex = Me._text.Length
|
||||
End If
|
||||
Else
|
||||
If Controls.Accept(True, True) = True Then
|
||||
SoundManager.PlaySound("select")
|
||||
Me._ready = True
|
||||
If CurrentScreen.Identification <> Screen.Identifications.PauseScreen AndAlso CurrentScreen.Identification <> Screen.Identifications.ChatScreen Then
|
||||
If Controls.Accept(True, True) = True Then
|
||||
SoundManager.PlaySound("select")
|
||||
Me._ready = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
@ -77,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
|
||||
|
@ -79,16 +79,9 @@
|
||||
Public Overrides Sub Update(BV2Screen As BattleScreen)
|
||||
If changedIDs = False Then
|
||||
changedIDs = True
|
||||
|
||||
If Me.ownModelID > -1 Then
|
||||
BV2Screen.OwnPokemonModel.ID = ownModelID
|
||||
End If
|
||||
If Me.ownNPCID > -1 Then
|
||||
BV2Screen.OwnPokemonNPC.ID = ownNPCID
|
||||
End If
|
||||
If Me.oppModelID > -1 Then
|
||||
BV2Screen.OppPokemonModel.ID = oppModelID
|
||||
End If
|
||||
If Me.oppNPCID > -1 Then
|
||||
BV2Screen.OppPokemonNPC.ID = oppNPCID
|
||||
End If
|
||||
@ -98,37 +91,36 @@
|
||||
Case 0
|
||||
Select Case Me._entity
|
||||
Case BattleEntities.OwnPokemon
|
||||
If BV2Screen.OwnPokemonNPC.ID = 1 Then
|
||||
BV2Screen.OwnPokemonNPC.Visible = GetVisible(BV2Screen.OwnPokemonNPC.Visible)
|
||||
BV2Screen.OwnPokemonModel.Visible = False
|
||||
Else
|
||||
BV2Screen.OwnPokemonModel.Visible = GetVisible(BV2Screen.OwnPokemonModel.Visible)
|
||||
BV2Screen.OwnPokemonNPC.Visible = False
|
||||
End If
|
||||
BV2Screen.OwnPokemonNPC.Visible = GetVisible(BV2Screen.OwnPokemonNPC.Visible)
|
||||
Case BattleEntities.OppPokemon
|
||||
If BV2Screen.OppPokemonNPC.ID = 1 Then
|
||||
BV2Screen.OppPokemonNPC.Visible = GetVisible(BV2Screen.OppPokemonNPC.Visible)
|
||||
BV2Screen.OppPokemonModel.Visible = False
|
||||
Else
|
||||
BV2Screen.OppPokemonModel.Visible = GetVisible(BV2Screen.OppPokemonModel.Visible)
|
||||
BV2Screen.OppPokemonNPC.Visible = False
|
||||
End If
|
||||
BV2Screen.OppPokemonNPC.Visible = GetVisible(BV2Screen.OppPokemonNPC.Visible)
|
||||
End Select
|
||||
Case 1
|
||||
Select Case Me._entity
|
||||
Case BattleEntities.OwnPokemon
|
||||
BV2Screen.OwnPokemonNPC.ModelPath = ""
|
||||
BV2Screen.OwnPokemonNPC.Model = Nothing
|
||||
BV2Screen.OwnPokemonNPC.Scale = New Vector3(1)
|
||||
BV2Screen.OwnPokemonNPC.SetupSprite(_newTexture, "", False)
|
||||
|
||||
Case BattleEntities.OppPokemon
|
||||
BV2Screen.OppPokemonNPC.ModelPath = ""
|
||||
BV2Screen.OppPokemonNPC.Model = Nothing
|
||||
BV2Screen.OppPokemonNPC.Scale = New Vector3(1)
|
||||
BV2Screen.OppPokemonNPC.SetupSprite(_newTexture, "", False)
|
||||
End Select
|
||||
Case 2
|
||||
Select Case Me._entity
|
||||
Case BattleEntities.OwnPokemon
|
||||
BV2Screen.OwnPokemonModel.ModelPath = _newTexture
|
||||
BV2Screen.OwnPokemonModel.Model = ModelManager.GetModel(BV2Screen.OwnPokemonModel.ModelPath)
|
||||
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.OppPokemonModel.ModelPath = _newTexture
|
||||
BV2Screen.OppPokemonModel.Model = ModelManager.GetModel(BV2Screen.OppPokemonModel.ModelPath)
|
||||
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
|
||||
End Select
|
||||
_done = True
|
||||
|
@ -10,7 +10,9 @@
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub Update(BV2Screen As BattleScreen)
|
||||
BattleScreen.ReceivedInput = ""
|
||||
If BattleScreen.FirstRound = False Then
|
||||
BattleScreen.ReceivedInput = ""
|
||||
End If
|
||||
BV2Screen.SentHostData = False
|
||||
BattleScreen.ReceivedQuery = ""
|
||||
BV2Screen.SentInput = False
|
||||
|
@ -1,17 +1,19 @@
|
||||
Namespace BattleSystem
|
||||
Imports P3D.BattleSystem.Battle
|
||||
|
||||
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
|
||||
@ -101,28 +103,56 @@
|
||||
' - use never-miss attack when own accuracy is low/opp evasion is high
|
||||
|
||||
'-------------------------------------AI BEGIN------------------------------------------------------------------------------------'
|
||||
'-------------------------------------Encore Move if an encore is in effect-------------------------------------------------------'
|
||||
|
||||
If BattleScreen.FieldEffects.OppEncore > 0 Then
|
||||
Dim attackIndex As Integer = -1
|
||||
For a = 0 To p.Attacks.Count - 1
|
||||
If p.Attacks(a).ID = BattleScreen.FieldEffects.OppEncoreMove.ID Then
|
||||
attackIndex = a
|
||||
End If
|
||||
Next
|
||||
If attackIndex <> -1 AndAlso p.Attacks(attackIndex).CurrentPP > 0 Then
|
||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = BattleScreen.FieldEffects.OppEncoreMove}
|
||||
Else
|
||||
BattleScreen.FieldEffects.OppEncoreMove = Nothing
|
||||
BattleScreen.FieldEffects.OppEncore = 0
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & "'s encore stopped."))
|
||||
End If
|
||||
End If
|
||||
|
||||
'-------------------------------------Random move depending on difficulty---------------------------------------------------------'
|
||||
|
||||
'Only applies if trainer has an AI level below 20:
|
||||
If BattleScreen.Trainer.AILevel < 20 Then
|
||||
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, Core.Random.Next(0, m.Count))
|
||||
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, Core.Random.Next(0, m.Count))
|
||||
'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)
|
||||
Next
|
||||
Dim OppAttackChoice As Integer = Core.Random.Next(0, AvailableAttacks.Count)
|
||||
Dim Ready As Boolean = False
|
||||
While Ready = False
|
||||
If m(OppAttackChoice) Is BattleScreen.FieldEffects.OppTormentMove OrElse m(OppAttackChoice).Disabled > 0 OrElse BattleScreen.FieldEffects.OppTaunt > 0 AndAlso BattleScreen.OppPokemon.Attacks(OppAttackChoice).Category = Attack.Categories.Status Then
|
||||
AvailableAttacks.Remove(OppAttackChoice)
|
||||
If AvailableAttacks.Count > 0 Then
|
||||
OppAttackChoice = AvailableAttacks(Core.Random.Next(0, AvailableAttacks.Count))
|
||||
Else
|
||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = Attack.GetAttackByID(165)}
|
||||
End If
|
||||
Else
|
||||
Ready = True
|
||||
End If
|
||||
End While
|
||||
'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
|
||||
'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
|
||||
@ -347,13 +377,17 @@
|
||||
'-------------------------------------Moves---------------------------------------------------------------------------------------'
|
||||
|
||||
'If own pokemon is asleep, try to use Sleep Talk (100%)
|
||||
If p.Status = Pokemon.StatusProblems.Sleep And BattleScreen.FieldEffects.OppSleepTurns > 1 And HasMove(m, 214) = True Then
|
||||
Return ProduceOppStep(m, IDtoMoveIndex(m, 214))
|
||||
If p.Status = Pokemon.StatusProblems.Sleep And BattleScreen.FieldEffects.OppSleepTurns > 1 And HasMove(m, 214) = True AndAlso m(IDtoMoveIndex(m, 214)).Disabled = 0 AndAlso m(IDtoMoveIndex(m, 214)) IsNot BattleScreen.FieldEffects.OppTormentMove Then
|
||||
If BattleScreen.FieldEffects.OppTaunt = 0 OrElse m(IDtoMoveIndex(m, 214)).Category <> Attack.Categories.Status Then
|
||||
Return ProduceOppStep(m, IDtoMoveIndex(m, 214))
|
||||
End If
|
||||
End If
|
||||
|
||||
'If own pokemon is asleep, try to use Snore (100%)
|
||||
If p.Status = Pokemon.StatusProblems.Sleep And BattleScreen.FieldEffects.OppSleepTurns > 1 And HasMove(m, 173) = True Then
|
||||
Return ProduceOppStep(m, IDtoMoveIndex(m, 173))
|
||||
If p.Status = Pokemon.StatusProblems.Sleep And BattleScreen.FieldEffects.OppSleepTurns > 1 And HasMove(m, 173) = True AndAlso m(IDtoMoveIndex(m, 173)).Disabled = 0 AndAlso m(IDtoMoveIndex(m, 173)) IsNot BattleScreen.FieldEffects.OppTormentMove Then
|
||||
If BattleScreen.FieldEffects.OppTaunt = 0 OrElse m(IDtoMoveIndex(m, 173)).Category <> Attack.Categories.Status Then
|
||||
Return ProduceOppStep(m, IDtoMoveIndex(m, 173))
|
||||
End If
|
||||
End If
|
||||
|
||||
'If own pokemon is frozen and has a move to thraw out -> use that move
|
||||
@ -365,7 +399,7 @@
|
||||
End If
|
||||
|
||||
'Fake Out if first turn -> try to inflict flinch (100%)
|
||||
If HasMove(m, 252) = True Then
|
||||
If HasMove(m, 252) = True AndAlso m(IDtoMoveIndex(m, 252)).Disabled = 0 AndAlso m(IDtoMoveIndex(m, 252)) IsNot BattleScreen.FieldEffects.OppTormentMove Then
|
||||
If op.Ability.Name.ToLower() <> "inner focus" Then
|
||||
Dim turns As Integer = BattleScreen.FieldEffects.OppPokemonTurns
|
||||
If turns = 0 Then
|
||||
@ -386,7 +420,7 @@
|
||||
|
||||
'use attacking move if speed is higher than opp speed and opponent has low health (<= 30%) (75%)
|
||||
If p.Speed > op.Speed And op.HP <= CInt((op.MaxHP / 100) * 30) Then
|
||||
Dim chosenMove As Integer = GetAttackingMove(BattleScreen, m)
|
||||
Dim chosenMove As Integer = MoveAI(m, Attack.AIField.Damage)
|
||||
If chosenMove > -1 Then
|
||||
If CheckForTypeIneffectiveness(BattleScreen, m, chosenMove) = True Then
|
||||
Return ProduceOppStep(m, chosenMove)
|
||||
@ -518,9 +552,11 @@
|
||||
'try to set up leech seed (75%)
|
||||
If op.IsType(Element.Types.Grass) = False Then
|
||||
If BattleScreen.FieldEffects.OwnLeechSeed = 0 Then
|
||||
If HasMove(m, 73) = True Then
|
||||
If RPercent(75) = True Then
|
||||
Return ProduceOppStep(m, IDtoMoveIndex(m, 73))
|
||||
If HasMove(m, 73) = True AndAlso m(IDtoMoveIndex(m, 73)).Disabled = 0 AndAlso m(IDtoMoveIndex(m, 73)) IsNot BattleScreen.FieldEffects.OppTormentMove Then
|
||||
If BattleScreen.FieldEffects.OppTaunt = 0 OrElse m(IDtoMoveIndex(m, 75)).Category <> Attack.Categories.Status Then
|
||||
If RPercent(75) = True Then
|
||||
Return ProduceOppStep(m, IDtoMoveIndex(m, 73))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@ -528,9 +564,11 @@
|
||||
|
||||
'try to use FocusEnergy (50%)
|
||||
If BattleScreen.FieldEffects.OppFocusEnergy = 0 Then
|
||||
If HasMove(m, 116) = True Then
|
||||
If RPercent(50) = True Then
|
||||
Return ProduceOppStep(m, IDtoMoveIndex(m, 116))
|
||||
If HasMove(m, 116) = True AndAlso m(IDtoMoveIndex(m, 116)).Disabled = 0 AndAlso m(IDtoMoveIndex(m, 116)) IsNot BattleScreen.FieldEffects.OppTormentMove Then
|
||||
If BattleScreen.FieldEffects.OppTaunt = 0 OrElse m(IDtoMoveIndex(m, 116)).Category <> Attack.Categories.Status Then
|
||||
If RPercent(50) = True Then
|
||||
Return ProduceOppStep(m, IDtoMoveIndex(m, 116))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@ -622,21 +660,31 @@
|
||||
|
||||
'Use LightScreen/Reflect (75%):
|
||||
If RPercent(75) = True Then
|
||||
If HasMove(m, 113) = True And op.SpAttack > op.Attack And BattleScreen.FieldEffects.OppLightScreen = 0 Then
|
||||
Return ProduceOppStep(m, IDtoMoveIndex(m, 113))
|
||||
If HasMove(m, 113) = True And op.SpAttack > op.Attack And BattleScreen.FieldEffects.OppLightScreen = 0 AndAlso m(IDtoMoveIndex(m, 113)).Disabled = 0 AndAlso m(IDtoMoveIndex(m, 113)) IsNot BattleScreen.FieldEffects.OppTormentMove Then
|
||||
If BattleScreen.FieldEffects.OppTaunt = 0 OrElse m(IDtoMoveIndex(m, 113)).Category <> Attack.Categories.Status Then
|
||||
Return ProduceOppStep(m, IDtoMoveIndex(m, 113))
|
||||
End If
|
||||
End If
|
||||
If HasMove(m, 115) = True And op.Attack > op.SpAttack And BattleScreen.FieldEffects.OppReflect = 0 Then
|
||||
Return ProduceOppStep(m, IDtoMoveIndex(m, 115))
|
||||
If HasMove(m, 115) = True And op.Attack > op.SpAttack And BattleScreen.FieldEffects.OppReflect = 0 AndAlso m(IDtoMoveIndex(m, 115)).Disabled = 0 AndAlso m(IDtoMoveIndex(m, 115)) IsNot BattleScreen.FieldEffects.OppTormentMove Then
|
||||
If BattleScreen.FieldEffects.OppTaunt = 0 OrElse m(IDtoMoveIndex(m, 115)).Category <> Attack.Categories.Status Then
|
||||
Return ProduceOppStep(m, IDtoMoveIndex(m, 115))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'Special Moveset combos:
|
||||
' - Defense Curl + Rollout
|
||||
If HasMove(m, 205) = True And HasMove(m, 111) = True Then
|
||||
If BattleScreen.FieldEffects.OppDefenseCurl = 0 Then
|
||||
Return ProduceOppStep(m, IDtoMoveIndex(m, 111))
|
||||
If BattleScreen.FieldEffects.OppDefenseCurl = 0 AndAlso m(IDtoMoveIndex(m, 111)).Disabled = 0 AndAlso m(IDtoMoveIndex(m, 111)) IsNot BattleScreen.FieldEffects.OppTormentMove Then
|
||||
If BattleScreen.FieldEffects.OppTaunt = 0 OrElse m(IDtoMoveIndex(m, 111)).Category <> Attack.Categories.Status Then
|
||||
Return ProduceOppStep(m, IDtoMoveIndex(m, 111))
|
||||
End If
|
||||
Else
|
||||
Return ProduceOppStep(m, IDtoMoveIndex(m, 205))
|
||||
If BattleScreen.FieldEffects.OppTaunt = 0 OrElse m(IDtoMoveIndex(m, 205)).Category <> Attack.Categories.Status Then
|
||||
If m(IDtoMoveIndex(m, 205)).Disabled = 0 Then
|
||||
Return ProduceOppStep(m, IDtoMoveIndex(m, 205))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
@ -644,8 +692,10 @@
|
||||
|
||||
Dim attackDic As New Dictionary(Of Integer, Integer)
|
||||
For i = 0 To m.Count - 1
|
||||
If MoveHasAIField(m(i), Attack.AIField.Damage) = True Then
|
||||
attackDic.Add(i, 0)
|
||||
If MoveHasAIField(m(i), Attack.AIField.Damage) = True AndAlso m(i).Disabled = 0 AndAlso m(i) IsNot BattleScreen.FieldEffects.OppTormentMove Then
|
||||
If BattleScreen.FieldEffects.OppTaunt = 0 OrElse m(IDtoMoveIndex(m, 214)).Category <> Attack.Categories.Status Then
|
||||
attackDic.Add(i, 0)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
'If has more than 0 attacking moves:
|
||||
@ -792,8 +842,31 @@
|
||||
Return ProduceOppStep(m, chosenAttackMove)
|
||||
End If
|
||||
|
||||
'catch crash: return random move:
|
||||
Return ProduceOppStep(m, Core.Random.Next(0, m.Count))
|
||||
'if no attacking moves, return random move:
|
||||
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)
|
||||
Next
|
||||
Dim OppAttackChoice As Integer = Core.Random.Next(0, AvailableAttacks.Count)
|
||||
Dim Ready As Boolean = False
|
||||
While Ready = False
|
||||
If m(OppAttackChoice) Is BattleScreen.FieldEffects.OppTormentMove OrElse m(OppAttackChoice).Disabled > 0 OrElse BattleScreen.FieldEffects.OppTaunt > 0 AndAlso BattleScreen.OppPokemon.Attacks(OppAttackChoice).Category = Attack.Categories.Status Then
|
||||
AvailableAttacks.Remove(OppAttackChoice)
|
||||
If AvailableAttacks.Count > 0 Then
|
||||
OppAttackChoice = AvailableAttacks(Core.Random.Next(0, AvailableAttacks.Count))
|
||||
Else
|
||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = Attack.GetAttackByID(165)}
|
||||
End If
|
||||
Else
|
||||
Ready = True
|
||||
End If
|
||||
End While
|
||||
Return ProduceOppStep(m, OppAttackChoice)
|
||||
End If
|
||||
|
||||
'catch crash: return struggle
|
||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = Attack.GetAttackByID(165)}
|
||||
End Function
|
||||
|
||||
Private Shared Function HasOtherAttackingMoveThanExplosion(ByVal m As List(Of Attack), ByVal leaveOutIndex As Integer) As Boolean
|
||||
@ -835,9 +908,17 @@
|
||||
|
||||
Private Shared Function MoveAI(ByVal m As List(Of Attack), ByVal AIType As Attack.AIField) As Integer
|
||||
Dim validMoves As New List(Of Integer)
|
||||
Dim _battleScreen As Screen = Core.CurrentScreen
|
||||
While _battleScreen.Identification <> Screen.Identifications.BattleScreen
|
||||
_battleScreen = _battleScreen.PreScreen
|
||||
End While
|
||||
For i = 0 To m.Count - 1
|
||||
If m(i).AIField1 = AIType Or m(i).AIField2 = AIType Or m(i).AIField3 = AIType Then
|
||||
validMoves.Add(i)
|
||||
If m(i).Disabled = 0 AndAlso m(i) IsNot CType(_battleScreen, BattleScreen).FieldEffects.OppTormentMove Then
|
||||
If CType(_battleScreen, BattleScreen).FieldEffects.OppTaunt = 0 OrElse m(i).Category <> Attack.Categories.Status Then
|
||||
If m(i).AIField1 = AIType Or m(i).AIField2 = AIType Or m(i).AIField3 = AIType Then
|
||||
validMoves.Add(i)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
|
@ -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"
|
||||
@ -140,7 +140,7 @@ Public Class Trainer
|
||||
isDoubleTrainerValid += 1
|
||||
End If
|
||||
Case "money"
|
||||
Me.Money = CInt(ScriptCommander.Parse(value).ToString())
|
||||
Me.Money = CInt(ScriptConversion.ToInteger(ScriptCommander.Parse(value).ToString()))
|
||||
Case "intromessage"
|
||||
Me.IntroMessage = ScriptCommander.Parse(value).ToString()
|
||||
Case "outromessage"
|
||||
@ -179,7 +179,7 @@ Public Class Trainer
|
||||
If value <> "" Then
|
||||
Dim itemData() As String = ScriptCommander.Parse(value).ToString().Split(CChar(","))
|
||||
For Each ItemID As String In itemData
|
||||
Items.Add(Item.GetItemByID(CInt(ItemID)))
|
||||
Items.Add(Item.GetItemByID(ItemID.ToString))
|
||||
Next
|
||||
End If
|
||||
Case "gender"
|
||||
@ -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 = ""
|
||||
@ -263,7 +270,7 @@ Public Class Trainer
|
||||
Dim PK As String = ScriptCommander.Parse(firstPart).ToString()
|
||||
Dim Level As Integer = ScriptConversion.ToInteger(ScriptCommander.Parse(secondPart))
|
||||
|
||||
Dim ID As Integer = CInt(PK.Split(CChar("_"))(0))
|
||||
Dim ID As Integer = ScriptConversion.ToInteger(PK.Split(CChar("_"))(0))
|
||||
Dim AD As String = ""
|
||||
|
||||
If PK.Contains(CChar("_")) Then
|
||||
@ -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
|
||||
@ -491,4 +507,4 @@ Public Class Trainer
|
||||
Return i
|
||||
End Function
|
||||
|
||||
End Class
|
||||
End Class
|
||||
|
BIN
P3D/Content/Data/Items/example.dat
Normal file
BIN
P3D/Content/Data/Items/example.dat
Normal file
Binary file not shown.
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.
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.
BIN
P3D/Content/Data/Scripts/celadon/vflip/game.dat
Normal file
BIN
P3D/Content/Data/Scripts/celadon/vflip/game.dat
Normal file
Binary file not shown.
BIN
P3D/Content/Data/Scripts/celadon/vflip/leftshop.dat
Normal file
BIN
P3D/Content/Data/Scripts/celadon/vflip/leftshop.dat
Normal file
Binary file not shown.
BIN
P3D/Content/Data/Scripts/celadon/vflip/mrgame.dat
Normal file
BIN
P3D/Content/Data/Scripts/celadon/vflip/mrgame.dat
Normal file
Binary file not shown.
BIN
P3D/Content/Data/Scripts/celadon/vflip/rightshop.dat
Normal file
BIN
P3D/Content/Data/Scripts/celadon/vflip/rightshop.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.
BIN
P3D/Content/Data/Scripts/cherrygrove/noballs.dat
Normal file
BIN
P3D/Content/Data/Scripts/cherrygrove/noballs.dat
Normal file
Binary file not shown.
Binary file not shown.
BIN
P3D/Content/Data/Scripts/cianwood/cianmap.dat
Normal file
BIN
P3D/Content/Data/Scripts/cianwood/cianmap.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.
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.
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