From f5c4a205b4d1a5363a9b7891dbeb320b793b2962 Mon Sep 17 00:00:00 2001 From: Madmadness65 <59298170+Madmadness65@users.noreply.github.com> Date: Sun, 2 Feb 2025 20:14:07 -0600 Subject: [PATCH 1/7] [Sprites] Update many static trainer sprites (#5218) * Update many static trainer sprites * Replace BW Plasma Grunts with B2W2 Plasma Grunts --------- Co-authored-by: damocleas --- public/images/trainer/aether_grunt_f.json | 22 +- public/images/trainer/aether_grunt_f.png | Bin 849 -> 787 bytes public/images/trainer/aether_grunt_m.json | 22 +- public/images/trainer/aether_grunt_m.png | Bin 819 -> 782 bytes public/images/trainer/aqua_grunt_f.json | 22 +- public/images/trainer/aqua_grunt_f.png | Bin 767 -> 803 bytes public/images/trainer/aqua_grunt_m.json | 22 +- public/images/trainer/aqua_grunt_m.png | Bin 787 -> 797 bytes public/images/trainer/archie.json | 20 +- public/images/trainer/archie.png | Bin 1079 -> 1053 bytes public/images/trainer/atticus.json | 22 +- public/images/trainer/atticus.png | Bin 741 -> 740 bytes public/images/trainer/courtney.json | 18 +- public/images/trainer/courtney.png | Bin 888 -> 869 bytes public/images/trainer/eri.json | 22 +- public/images/trainer/eri.png | Bin 946 -> 1157 bytes public/images/trainer/faba.json | 22 +- public/images/trainer/faba.png | Bin 814 -> 772 bytes public/images/trainer/flare_grunt_f.json | 16 +- public/images/trainer/flare_grunt_f.png | Bin 613 -> 634 bytes public/images/trainer/flare_grunt_m.json | 10 +- public/images/trainer/flare_grunt_m.png | Bin 662 -> 662 bytes public/images/trainer/giacomo.json | 18 +- public/images/trainer/giacomo.png | Bin 1027 -> 846 bytes public/images/trainer/guzma.json | 22 +- public/images/trainer/guzma.png | Bin 2312 -> 874 bytes public/images/trainer/hala.json | 18 +- public/images/trainer/hala.png | Bin 1091 -> 1186 bytes public/images/trainer/hau.json | 22 +- public/images/trainer/hau.png | Bin 725 -> 693 bytes public/images/trainer/korrina.json | 22 +- public/images/trainer/korrina.png | Bin 1073 -> 1080 bytes public/images/trainer/lusamine.json | 20 +- public/images/trainer/lusamine.png | Bin 996 -> 976 bytes public/images/trainer/lysandre.json | 20 +- public/images/trainer/lysandre.png | Bin 797 -> 824 bytes public/images/trainer/macro_grunt_f.json | 14 +- public/images/trainer/macro_grunt_f.png | Bin 837 -> 807 bytes public/images/trainer/macro_grunt_m.json | 22 +- public/images/trainer/macro_grunt_m.png | Bin 919 -> 868 bytes public/images/trainer/magma_grunt_f.json | 24 +- public/images/trainer/magma_grunt_f.png | Bin 727 -> 727 bytes public/images/trainer/magma_grunt_m.json | 24 +- public/images/trainer/magma_grunt_m.png | Bin 756 -> 698 bytes public/images/trainer/mela.json | 22 +- public/images/trainer/mela.png | Bin 1152 -> 1014 bytes public/images/trainer/molayne.json | 12 +- public/images/trainer/molayne.png | Bin 816 -> 743 bytes public/images/trainer/oleana.json | 22 +- public/images/trainer/oleana.png | Bin 1074 -> 918 bytes public/images/trainer/ortega.json | 22 +- public/images/trainer/ortega.png | Bin 937 -> 909 bytes public/images/trainer/penny.json | 22 +- public/images/trainer/penny.png | Bin 955 -> 739 bytes public/images/trainer/plasma_grunt_f.json | 400 +++++++++++++++- public/images/trainer/plasma_grunt_f.png | Bin 764 -> 3430 bytes public/images/trainer/plasma_grunt_m.json | 545 +++++++++++++++++++++- public/images/trainer/plasma_grunt_m.png | Bin 914 -> 4502 bytes public/images/trainer/plumeria.json | 22 +- public/images/trainer/plumeria.png | Bin 934 -> 835 bytes public/images/trainer/rose.json | 22 +- public/images/trainer/rose.png | Bin 1088 -> 750 bytes public/images/trainer/shelly.json | 18 +- public/images/trainer/shelly.png | Bin 985 -> 898 bytes public/images/trainer/skull_grunt_f.json | 18 +- public/images/trainer/skull_grunt_f.png | Bin 905 -> 729 bytes public/images/trainer/skull_grunt_m.json | 18 +- public/images/trainer/skull_grunt_m.png | Bin 966 -> 700 bytes public/images/trainer/star_grunt_f.json | 10 +- public/images/trainer/star_grunt_f.png | Bin 756 -> 936 bytes public/images/trainer/star_grunt_m.json | 22 +- public/images/trainer/star_grunt_m.png | Bin 803 -> 755 bytes 72 files changed, 1261 insertions(+), 358 deletions(-) diff --git a/public/images/trainer/aether_grunt_f.json b/public/images/trainer/aether_grunt_f.json index c43bdae9b2e..26ae177bd21 100644 --- a/public/images/trainer/aether_grunt_f.json +++ b/public/images/trainer/aether_grunt_f.json @@ -4,8 +4,8 @@ "image": "aether_grunt_f.png", "format": "RGBA8888", "size": { - "w": 69, - "h": 69 + "w": 70, + "h": 70 }, "scale": 1, "frames": [ @@ -14,20 +14,20 @@ "rotated": false, "trimmed": false, "sourceSize": { - "w": 80, - "h": 80 + "w": 39, + "h": 70 }, "spriteSourceSize": { - "x": 23, - "y": 10, - "w": 35, - "h": 69 + "x": 0, + "y": 0, + "w": 39, + "h": 70 }, "frame": { "x": 0, "y": 0, - "w": 35, - "h": 69 + "w": 39, + "h": 70 } } ] @@ -36,6 +36,6 @@ "meta": { "app": "https://www.codeandweb.com/texturepacker", "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:0c9e77856d3b434e719021572bcb93de:f9c45dc5d67009b134dd1bbc5593f6ec:a694f8828aff21c718e5161e2fd63ade$" + "smartupdate": "$TexturePacker:SmartUpdate:0a678d2035c82d3741f2de29e01d42d3:374042fde99a4ff05c5e90cedbc5bd1f:a694f8828aff21c718e5161e2fd63ade$" } } diff --git a/public/images/trainer/aether_grunt_f.png b/public/images/trainer/aether_grunt_f.png index b43c5e71a51bdbad485f29764ea9dbf2d7081b99..a5088c9e1de3c27f921aea7d7fe9ac63a1b37d42 100644 GIT binary patch delta 780 zcmV+n1M~dR29pMViBL{Q4GJ0x0000DNk~Le0000+0000+2m=5B07mcbE$1=k9Jl)d`ek0004WQchC*c z8l2AO^PFWh$i?BVWX}0=`J%b0mUgQ(V~SzQ1r?k4wYGn^Vk%X9uqxxBp{zY7jw%gR zQ5-yJpXA;UAdx(MGjHuV9J(t5hCPu-AneTj^Na>~t=7}o)kF;KzcTt&NLY4MS^HdK&d z&$wW8Mrys>yn#nQMIg3OP2F)F3hQ8f|LH5@rhRwOLpp-_A)RgvosMGY_Y6zsgJr|u zWxn-f9IsP>mBa1$dx>()n3q?3cGX+s;QWUe>imCc!*r8t#=Kd8Kf~bN*=3ol-#9~- zLMEAvI-1#TpRfsE?Q`}^vYxrU*Fxuh!-o>;-n&~-V*j4HAt1ez?{tUeH`jMQkP|=q zypj7xnq$Wuo!j=Ns>QdW+fsRV-H3e7sr&f|YP(AqIPeXs**~joEPP@JI~)K2002ov KPDBK*LSTX<=xZPV delta 826 zcmV-A1I7H42GIs%iBL{Q4GJ0x0000DNk~Le0000*0000*2m=5B04r158vplAXV*l*o^N$-u3z4{$c!WYuaR=U-JNe;N!7 zWT)vkG|qJA5cP2gHyFG_nByE;i!s)sG>&1Yms0hVVsc`b=bP*?aa4>c;hhoHQiqBv zG-1>jgOG0l(rD6 zdBaW-j@pikBE6U`O*WBU%!?e9wzZ}uGcfdO>Ys{%wsXVNe_z7zgp|LN0XE93n2$rs zM@IFD_$3TaNZ+l8F{opdWAm`b<<8Fygmfyv*-w9C(5h36Oj&RF#DI?tMv9mVti!xo zpqFj?pt_dAu#9!DMU-92iv2F0k%hL8BC|!D&rDQ|*zI|{PuczvSrdtD<)FPGduW9r zwmnD`5cX9jGG#T*>e_PI-c%pP9TTid#}=h8N>z7PH-^SSW??`hQxo<^MW+Q-ypzPt zgOq=xwa0XH7XJleVyaeLKngAc(_JxE{WxVlM&Tl#|cA`Po=Sa(=|vAyzf;E zyRG~Efi1|882XhP6Z1Dfc^_f)-za|Hq-%x5#9Y7iLSx##K^F!fBG@_qYmnnV z4gE;|;rs)WgD(^G<@YiG000hUSV?A0O#mtY000O800000007cclK=n!07*qoM6N<$ Ef~~H64*&oF diff --git a/public/images/trainer/aether_grunt_m.json b/public/images/trainer/aether_grunt_m.json index eba00096f8d..74195b97dde 100644 --- a/public/images/trainer/aether_grunt_m.json +++ b/public/images/trainer/aether_grunt_m.json @@ -4,8 +4,8 @@ "image": "aether_grunt_m.png", "format": "RGBA8888", "size": { - "w": 65, - "h": 65 + "w": 69, + "h": 69 }, "scale": 1, "frames": [ @@ -14,20 +14,20 @@ "rotated": false, "trimmed": false, "sourceSize": { - "w": 80, - "h": 80 + "w": 45, + "h": 69 }, "spriteSourceSize": { - "x": 16, - "y": 14, - "w": 47, - "h": 65 + "x": 0, + "y": 0, + "w": 45, + "h": 69 }, "frame": { "x": 0, "y": 0, - "w": 47, - "h": 65 + "w": 45, + "h": 69 } } ] @@ -36,6 +36,6 @@ "meta": { "app": "https://www.codeandweb.com/texturepacker", "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:963887cf29549ad3c123b8055cb4d701:68004c4a6e04c93bd21c26a6f8921f0c:d2241fc11d0fc31b26ecbedae6da74f4$" + "smartupdate": "$TexturePacker:SmartUpdate:f7ad29bea8c4a179c08958890cadb04b:741fc1b2e43d2da720c249c6f81910bc:d2241fc11d0fc31b26ecbedae6da74f4$" } } diff --git a/public/images/trainer/aether_grunt_m.png b/public/images/trainer/aether_grunt_m.png index f4df26ef0077d059f93b3a01c69f22252792d71e..1b1e092a3407402fa6f38c6e42e85186408aefa3 100644 GIT binary patch literal 782 zcmV+p1M&QcP)jryAUa~KwOl0t`)ir1cZ5> z9h4B}C4H1q(xQwYe|xlq`3iw7xTZO5bMS=}aQh>af}2si*$t_bO_xUJ3P{CZX^<@h zgy7U7A(gak`Xj%>J=4=t()A{3LBJVsOC?kJ5c*q=iq(lv2 z*U`4M$#D`=UwVYoy13TyiRKm#KaLDC2r-Ul_v^8P;VIL-#?}15Fym#S2gKUm8sFh` zPe{WMdmxR1=O_>Q$}7YvhQ31X7&-@OT{tF&*eLj?e+K;tb~?rDKZh`Q1KE8W16}(X zPqR51zyJ|~{ZEQwa2jHi1CuQs(Sg{d z?dO=#zsJ+D3nXf-wHwiqk%V1XJCq|K*%ur=NM?Hl{dBD4UM*uLj#(ZZ46X7xwHvoO zUX%xQJB3$@+}V!p*qnQrA#P^`bT@UosCU(h6t2Lj%U%1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E_fDVJj2N&QZlQ3q*r$DNK;4@a;>a;^OyB%My3B<=UP8hM3ujz~yuh2+layOo{8 zm+r3HIGX!3f4b;M0&?}VltMY^M9N=5y3ISK_qLXrmxX%L*C!TPPx`EiUZ=}Crz43f ze@DWvA1O)lnfnWwluq%V{R>SL-Nm+U_hNX#?3s^!JuNBzOMOqW(t<8d79%qSF3wUT2WC^Xh=w`v%JVqNZzD-_-J6gdt%;F zTGX0wGBPqLDM8B0%BaBDct}`EYI{pPMVa{+J!VH~e- zEYPKnt0fQ3xHuC%8U_szTq)W@kkxqt6k~RzUmuW;F`hDb4L#t z_0D+BT`9O+l!3-&SwIksGhVb1ITx6_Zp8^<9F#^CGcK6n=?RsLBPU4jfB`~y`OG*f z`x=pfbzN^lY3Gbf4a0D|-G;$?HAG#&1fFX04G=PeFo^hJ&_fvpOfpSqz+k(qjkDr- zq;TN4A9Ya1m4cnYmk6yI1~)Rsn5gi1?R0^%Tn3Z1bO-4zzEm(Y4(tYI+hfrejbiBM z^H4w#-G;UnueHS!Mz!9Q0m=^IEHgARU1#}THfu)QZ@WVW1-T_=1>?63Ug+CIf8G;U zP&lw{e>e}Y!$*avf?nSlK69uXv#;`79D?*`J7z-o87De<(mT>n#M4Xhn&Lz-VgE+Q zxc%xfq5tkA8jdNBQ##0`awrV4@XZcSyve!S*GlI;j_iO22TZ$@4o=cS?7TxsyQ6={ zDUhPGlfx5o&^G7-c~{@sCxJqvgRcW^>go}Ra|on@9vul(zxW?G0#yc*U(~Zx+ZniU z8jwuL{ghKRqLagr#u4b~)Cby~4;u4zf#A`>lKWXr96BWO0sQ_=exoW(&xO+AG<mrpEx-}bMvVt;=;{{W_jB3ohXQELDI002ovPDHLkV1m!0Q1Ac% diff --git a/public/images/trainer/aqua_grunt_m.json b/public/images/trainer/aqua_grunt_m.json index 93408cc40c8..3a120f7d20c 100644 --- a/public/images/trainer/aqua_grunt_m.json +++ b/public/images/trainer/aqua_grunt_m.json @@ -4,8 +4,8 @@ "image": "aqua_grunt_m.png", "format": "RGBA8888", "size": { - "w": 73, - "h": 73 + "w": 74, + "h": 74 }, "scale": 1, "frames": [ @@ -14,20 +14,20 @@ "rotated": false, "trimmed": false, "sourceSize": { - "w": 80, - "h": 80 + "w": 38, + "h": 74 }, "spriteSourceSize": { - "x": 17, - "y": 6, - "w": 46, - "h": 73 + "x": 0, + "y": 0, + "w": 38, + "h": 74 }, "frame": { "x": 0, "y": 0, - "w": 46, - "h": 73 + "w": 38, + "h": 74 } } ] @@ -36,6 +36,6 @@ "meta": { "app": "https://www.codeandweb.com/texturepacker", "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:efd07ff3ed1e610150a4b8ca18974343:d9b85b9eb11182e9e4669e2bd8b08694:72b7b50231708a9486d5f315824e4df1$" + "smartupdate": "$TexturePacker:SmartUpdate:ea2cdca90584089079af92307948ecdc:331e1f5314abbfcf58331ab0b9fd1c40:72b7b50231708a9486d5f315824e4df1$" } } diff --git a/public/images/trainer/aqua_grunt_m.png b/public/images/trainer/aqua_grunt_m.png index 87dbfd566a1c16647fecd1b72fa4f5693ea294d2..4fe230ca119bfd665e61c32350ce8b3742d75101 100644 GIT binary patch literal 797 zcmV+&1LFLNP)k-v4E5^AnP^s)~s(d(ujqPvgNj4%_w&&9S`@T3Zf{b&~CY*GP6XM--#< z3$mCLJ8KzbW3-jEjEYqko26G(eLhtc*6N|E`e+RxU@^lQ_Lo2CZw-}gpg;~sSVbj- za8RUlES5WtM3fRD5^k~>6@p9@>}9QdI>@Db2t`?3D%&3+lj$&6C9z#UKTOJ874!LB z3Y)%qFe&DoBPLP$N{TkeSTLExn%T~RlSC*cv`2tgVo`VUg=7rfP0@1$xbWv#nt#uz#^TJ1O_<$8wD*!n3Pd85F(;|ArfS0T&Z7(5 zXvn6h+S>Wa1h*}Wc7Sd>e+hzi<4;f6tWuaC9gw z@J9MNh-RZf8mKP>R@HJUs2vz6=?vP^a~Bv^NME-*Y`c@n;<_H97}c>0B~?Y8D2XhM z{fatSq88JPuB48Vu+BAmpadE2chW#j8&3_v{T($ei%}e%bV2Q_s260th&pAR#WBBz z!~pN)fg)Y|&W&Pz4QT@9&p^?oM7@2dnTW6PX24U8l07D95{=iP7|IwUed0V&eV&n^ z9tkna$WiJpOP(Q(R``cZxmhbHZu0hFycqR3tH1(EKTvm-Q?@@*vJ(|nU>*lMG8ElK z>veezs|Q+IP+8;b>W&hWL!DIL buiyR#1_2{tdW@6O00000NkvXXu0mjf&*EKV literal 787 zcmV+u1MK{XP)nq0000sP)t-sOlfgi zc*owPdn+d^|Ns9YJzY^zQ2+n{JXfoEn&Ygqy#Lj`drDeONlh{`GQE3ZW@cu}%E}MO z#54c^00DGTPE!Ct=GbNc000SaNLh0L01m_e01m_fl`9S#0007ZNkl|`lCU~t+Vt`Ja&>UDOy~5u|hIOQVOBGD?Lx4 z#8Xn5;rW)5Q#Y28KQ5Z-{TD?2GH1a@NaoK|f}PZf z@^V}9w~*pDk{>1=lQ{OEWXeTz3+YX!lgn=-^(5uxS;}1`^M!=2TQG#=!=J}j0_p4t zcts)o`S-e&T-TnqpzS_CY$aET%cyq#iVxerS8INWB&V+*73ovFp00he^B=4~Cm93I RR|o(A002ovPDHLkV1gc9T!{bx diff --git a/public/images/trainer/archie.json b/public/images/trainer/archie.json index 63837d40847..3718bcffd0c 100644 --- a/public/images/trainer/archie.json +++ b/public/images/trainer/archie.json @@ -4,8 +4,8 @@ "image": "archie.png", "format": "RGBA8888", "size": { - "w": 80, - "h": 80 + "w": 79, + "h": 79 }, "scale": 1, "frames": [ @@ -14,20 +14,20 @@ "rotated": false, "trimmed": false, "sourceSize": { - "w": 80, - "h": 80 + "w": 58, + "h": 79 }, "spriteSourceSize": { - "x": 21, + "x": 0, "y": 0, - "w": 42, - "h": 80 + "w": 58, + "h": 79 }, "frame": { "x": 0, "y": 0, - "w": 42, - "h": 80 + "w": 58, + "h": 79 } } ] @@ -36,6 +36,6 @@ "meta": { "app": "https://www.codeandweb.com/texturepacker", "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:bfa7fdd7b6ac9be68dc9dc562fb8339f:06f87a279450b21b19294ba956b69c26:4b7980be4e3ac1d20c9eaf970913ec63$" + "smartupdate": "$TexturePacker:SmartUpdate:1edc051db037c1742819ac8674ebe4be:bfaa715c0faf707c1b20ab8259d42a35:4b7980be4e3ac1d20c9eaf970913ec63$" } } diff --git a/public/images/trainer/archie.png b/public/images/trainer/archie.png index c83975c06903258ac98c339615c1c3ce86c2a7b1..d4c003fd348874f44b04705782b120aa3df02882 100644 GIT binary patch literal 1053 zcmV+&1mgRNP)y}iZMnsDmXfdBvhUi;_{00001bW%=J06^y0W&i*H32;bRa{vGf6951U69E94 zoEQKA18zw~K~z}7t=Nm2qA&~wP-7}xE=#pj>HELw{z(zh9kG=5o5A%mXVWAt$m#TX zTrf`6#^ustR1;NGu^JcEGnYD^iBUk)QVkEBF+b6y93Cgl>*L5{KAF1m)iq3bPt5D(Y-gTflj|0&`@O(Z~cfb2PhV#@kp$KG* zrye4tGLE^yNK<1Z&!b;{qD;4l!>k%+B8V6Oy?~O!j;3pwmjYzIP5{aKR1Ah! zP>}}+agqonL~wY-D|odWWce4dM-s_7eWJiFnB@H(cgHLAo$O z=|$#Msmee?3&WFEX7x^oKqPIFyiJp8x`LNE7kLx?y-iX84k3(VdR1HTR2JX$c1yK@ zN2|h@H4O4LC2kx;h5a5NDk~WaH8@Qm1xbI5HM~(`3(Ac(u3sp|W*n=9hq=Z%yb500 zVBn$O!f}seQP35KD?qYzFu3VD;Rgr&0!1qhrPx5&P^`sa((|Ttp}<8U4#R-8Wx-)- z$jZQ(GP!nlPY($jtnK@mgNJSJEE@prxJDR;*^q#B) ztNS^Bb012X_j$Da1rHwQPuFbUX#r@^Hu;Oqd}&ynai*u!{q|7-Gb=PmbZK4dAfEp3)g=Cq;P>V1H@MIt*=68O$gau+yn`qKzO+x zc9|Hqm$`gP%k?IpC3~RUS&bVt&OZU3=2LNup{a6PnqnG00000NkvXXu0mjf^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l);|7h)a0Aq zbHT2EH_}az&Bz;ZteI{)Uh{3Erebg^G-J>mChzUR9h8wkZnr_Uh{}* zoGgS$WSqbkC2h;({`_K&4GHzIL7@C+ZefmnawhIIl9?oAG*?#=9h45aNInFdE6VE3 zl5J+^Yocaem3b}Y(jKBNC?``lWSTBUd6~pfgqy!1hAcZ@9e=T~%aJmZ&3|Tc)N@Ef zA->%?6v%(W^tqhHc6tPm86&<~pmT24R`%+wqqMuZIww}TJ1%;QbXLAsp*W}A{nAPM z=d~25xfF&AnD0;~vl6KDx=4swzi)KQOD61HU3*TZ0Yy zq|tk1z~jzLZg^g^jjL?6VO^J=dpzzMPj11w0Nc_ZsSYLd4f7FjhJ7#kaILL40?AtEm)AWteRJ2NY1K@vV*sO54GYl{wp zkdcv+Y*eu&wP2l&%xYJs-3b99x7%@u2+{505W4G-YdYhro)YBqs)vSs znx{*pJU5^IPVY#vH%{cfYYtAhxB$xG&SZZN6Nig%TA2AXz=aT)@d}Qz z*3aCq2ArPrJQ()_8h4QKmzr=sfn&}(Qim=x40^-U&@~~vClD#PO$^M6I6Oo9yQF?LQR9avei=WCyvP=>cMGkP#Wx+Ke2LLdr|JGyo-L_ z;QC2HYs=MyzPP*i@ATYIV!jKOsOhV#?oUo7bl{YE(R}L33a;z1+jB^N%1vu6Sx{Zg z8DI64^sC-^nf`>MEmyiAK0Y2NJwrO<*ct1>yZ29zW%=}?XApXtbI*?R>Sc diff --git a/public/images/trainer/courtney.json b/public/images/trainer/courtney.json index de55e91eb85..1da3e08b107 100644 --- a/public/images/trainer/courtney.json +++ b/public/images/trainer/courtney.json @@ -4,8 +4,8 @@ "image": "courtney.png", "format": "RGBA8888", "size": { - "w": 52, - "h": 80 + "w": 72, + "h": 72 }, "scale": 1, "frames": [ @@ -14,20 +14,20 @@ "rotated": false, "trimmed": false, "sourceSize": { - "w": 52, - "h": 80 + "w": 44, + "h": 72 }, "spriteSourceSize": { "x": 0, "y": 0, - "w": 52, - "h": 80 + "w": 44, + "h": 72 }, "frame": { "x": 0, "y": 0, - "w": 52, - "h": 80 + "w": 44, + "h": 72 } } ] @@ -36,6 +36,6 @@ "meta": { "app": "https://www.codeandweb.com/texturepacker", "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:831f5748dad92911b10a1cb358ee2dae:a3bf81bbaa3b49cad5e0e549cf94563b:bb6befc9383c9c08837183ae2a7a80c1$" + "smartupdate": "$TexturePacker:SmartUpdate:c39b0f300dc09114fba490e6ab68b2b5:a24a6dbdd0e3f4d4b7a567673b73316a:b0c7d3a5747d1c7edafa00c8e6d1257e$" } } diff --git a/public/images/trainer/courtney.png b/public/images/trainer/courtney.png index 0efdb615fcd3e59dd53d370a6869be7b7d14a8e2..3db5151e61c6741867a97c9678018429638eb190 100644 GIT binary patch literal 869 zcmV-r1DgDaP)f z$S00DGTPE!Ct=GbNc z000SaNLh0L01FcU01FcV0GgZ_0007{NklvEeg5Cve4ya)mcP0b~=P2T@C zdyc?%($2JIkKc%xyPQ;Iy}u8O6G-l4eQ$A+x&En&XhQ5WZt1} zb?=0{ePaUg+|8?ErX$EV*h=Y)&1ueCLa5BlAtjvFb(k6531pT9t`X1DJX6An#kfpy zSYaP4Hd**Yj^2gB~W1tGxjRdq2wHJW?|OKp~O`jT@XSDu(oZ%Z`_Im`Bq6? z*J!QPT~eBS{mLC9ggWrj+&djYq23|Xa5I{+I%vjN1j((?A;GShZtis0j(swICK&P} z^SrEk^yB7enIK~xXVmq~S>G32u7KkbxD*JDm!?ons<;nY7zxEJT^!c8mI=GcZ{aRQ zOG1z&T%T-(O{`X>{}(X}feoI=J|Bj5hlRvBtFLi~Gfi^XiYZ-&BdDp^`<-p;2|7-F z7*#@ge3inz1#W*XZ!R$nGV%schw1JYiT$0X**5!fE(bu@?!QAVa66GYoEv0C&epX( z*fI0&NBSHX&`Z*$f=%foG+P-Y0y+TjRsuB=ntUiJa;o75HAPTP>0!_yXQ;jq^g`#Q z(8=@PJRl)KFM_@oLxJ@e)?YuKN+I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4Y*bM9Oa$$^#N09;e9Zy~+_Z2(?h@(XH(ugb(u{x53lejZ?Hp1UI7*LR zd93kv1q;L+9mn)2V1YL5jsLVQ+w=%#mRZ^l->DZxy6&G<00000NkvXXu0mjfpLhoF diff --git a/public/images/trainer/flare_grunt_m.json b/public/images/trainer/flare_grunt_m.json index 4d54acbf810..226257ef84a 100644 --- a/public/images/trainer/flare_grunt_m.json +++ b/public/images/trainer/flare_grunt_m.json @@ -14,12 +14,12 @@ "rotated": false, "trimmed": false, "sourceSize": { - "w": 80, - "h": 80 + "w": 31, + "h": 77 }, "spriteSourceSize": { - "x": 24, - "y": 2, + "x": 0, + "y": 0, "w": 31, "h": 77 }, @@ -36,6 +36,6 @@ "meta": { "app": "https://www.codeandweb.com/texturepacker", "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:a26606e70778f88a1a7053b2f2420dde:84abf0d0f6bc90c6a60f660567b2d641:adc35a4070bac9fe828c2605a3b15744$" + "smartupdate": "$TexturePacker:SmartUpdate:8683e52bbd1a42992f4d7ab8aa65a2a1:e8279cd322279bc5f8e2bb5797e6f818:adc35a4070bac9fe828c2605a3b15744$" } } diff --git a/public/images/trainer/flare_grunt_m.png b/public/images/trainer/flare_grunt_m.png index 79eb98449ca337a58c2b21cc2efeaad4a93324be..eb14dbed0e281eaaa12b296d76ce84d2813d4b16 100644 GIT binary patch delta 456 zcmV;(0XP1Z1(pSnDSrR}00000FfcGkNLW!yPHZ9=ct}`?Eh>nZsF^b%qc$VBa9GID z(AQKr*rU;EOP{nX!|`@d$%ATS~fohNTE_{ueLgHSQfz+ z3BkG!|5|)+CnJ|6XgF?A)>|x71|6v2t$m4CL7Mlss#`CGkm6G(dQtDWU(U4jn9!-2g}QRUkA;|d6^g!8G%m6G(dQtDU?!H`-X9$Ay!0f{h* y-TU<)PH~9usp*FyoLW|a_bf0tzu$jxrqUmfo*pE@R?i>+0000ups7XXYR9M5!*xin! zFboA?4hi8Wkl6t5|EzoLP|9fcf|y>^(n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hV>(LJh*PI@PxS;DW85H^V(q*91rabbx-8_7? zj>S=VEYE9-2!C>2UEd+AJe2F2(7pVU!tZc46p<>+qPJ8(tl}sK6ti;fBtlw_VuxYY zrj^Nhp^jRQ1t_1~lu!uT_FIR0z*msntyJ-F+(@!t=3 zdQIM#`C@_EwgJiF{a|5i+wjO_;jHUv>oNMNXtPb`~)pyLzO5O?qL7`002ovPDHLkV1kvH=zahI diff --git a/public/images/trainer/guzma.json b/public/images/trainer/guzma.json index c278d68be24..1b75915c088 100644 --- a/public/images/trainer/guzma.json +++ b/public/images/trainer/guzma.json @@ -4,8 +4,8 @@ "image": "guzma.png", "format": "RGBA8888", "size": { - "w": 58, - "h": 58 + "w": 64, + "h": 64 }, "scale": 1, "frames": [ @@ -14,20 +14,20 @@ "rotated": false, "trimmed": false, "sourceSize": { - "w": 80, - "h": 80 + "w": 34, + "h": 64 }, "spriteSourceSize": { - "x": 21, - "y": 20, - "w": 37, - "h": 58 + "x": 0, + "y": 0, + "w": 34, + "h": 64 }, "frame": { "x": 0, "y": 0, - "w": 37, - "h": 58 + "w": 34, + "h": 64 } } ] @@ -36,6 +36,6 @@ "meta": { "app": "https://www.codeandweb.com/texturepacker", "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:c3b08a562a2882d1ca8b5e031e245da9:72a8305e547f091d15abccd2b142e401:3b302c7f9eb6ea81b65bcaeead4a95a9$" + "smartupdate": "$TexturePacker:SmartUpdate:90cfe8ae514c30ddf48840678b251141:87a93d268c61327ad913bba3b052686b:3b302c7f9eb6ea81b65bcaeead4a95a9$" } } diff --git a/public/images/trainer/guzma.png b/public/images/trainer/guzma.png index 6afd6f3b34a7f8766cf1e3a95743482dcb068763..1ae6d8eb8d17b84a8760522c75f16816b65a8a1b 100644 GIT binary patch literal 874 zcmV-w1C{)VP)?>2K~z}7 zrI*pVqaX}~JHZ8&Dgy8St~&{}+dWsLhYL%;uk&XDgxJU9$B2*Ljo6PEe+P&i{P-3U zWA7a?9`W1w{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QYixAwiGERlJo)`H#1L`p%A^GfPGU>`O$iE^c4SKeAO~)k*0!nI1mXpSm zbtxhLsK%U6nNjn#P@tzdPopAJl8*)Ln4CUCjc{s3jxkFwam}UuUJrm;=STMmA5X6E zQc6XRfPIH1-pDJ9x*Wac7>_vRE7`j93j4924312n)IoO<-o2-k<_2NI50myU^s4-m_#$L8|5x%5ok(~f(UtUx349}+ zT*-F*btgYvz@9*Qm@h+qxfl2=T0000!x)$lWw|;x{6NY!5<-^8-|ZZ9=Z)8!rQ1Kbz$>3 z=1l$uFy|bNPQ`H?VFJaGM57z8!ww~yuZ4CS60e|>JL^@wPfDJ9P`%I#3Xftce(I1aSRkFOVxn`9EQPFnN(A)2?t!G zAd*#Z+cpajUI-MHRmEjX>MiPpMByasa^Xul^6dep6(CUaBt^j_Q<_-ki+KtLLw|@8^{mN)d?srP46mew7-(|_Zt@WE8+iCLJWP~N#b%);uFehi z(NgAXk|2{5ncL@kYHLMLgXr82vL$#|HLXc|V#m@HX2!+&xVC#&kmbwkUz54Cc8#RI z2KO?46}>x2TY_#&+PUzq$JSG<3Em`*gSx_?kjK>Q0osg_lTG;ul%w69K)nN{Bk1?= z_kdxsH|Qm-cXze)3h*a@F8*zx+Xb0Qu*EG4VAR5AlunAN(i4sOXQ1 zy+P>++H<8mT;jawPYaK~kx0gG&X&Ocs>C1E<>4X`aC!$k{ax>|$G#_=|MvJ^xjH?A bo$bmWDDWqOLOf2500000NkvXXu0mjfe%f+L diff --git a/public/images/trainer/macro_grunt_f.json b/public/images/trainer/macro_grunt_f.json index 04b30ec4ca5..8a9a3943a27 100644 --- a/public/images/trainer/macro_grunt_f.json +++ b/public/images/trainer/macro_grunt_f.json @@ -14,19 +14,19 @@ "rotated": false, "trimmed": false, "sourceSize": { - "w": 80, - "h": 80 + "w": 33, + "h": 74 }, "spriteSourceSize": { - "x": 24, - "y": 5, - "w": 31, + "x": 0, + "y": 0, + "w": 33, "h": 74 }, "frame": { "x": 0, "y": 0, - "w": 31, + "w": 33, "h": 74 } } @@ -36,6 +36,6 @@ "meta": { "app": "https://www.codeandweb.com/texturepacker", "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:a015c43d80f8fd1932758e0e2cfcec61:59fc8205ea5ca04295831b4a2eb623ec:30df2ea8e9dac9e95f70534ec43d5ecd$" + "smartupdate": "$TexturePacker:SmartUpdate:7449212fcdbfb4a600364bd3761e4fb6:37c81a387501a047cff84cabdeedb496:d1412ef32f1904a102cf70569806f3b7$" } } diff --git a/public/images/trainer/macro_grunt_f.png b/public/images/trainer/macro_grunt_f.png index 892299d701eb1a99814109c9a8c9d088f1d9e13a..85586126da165ba0c024abc58d080c6f262ea79c 100644 GIT binary patch delta 750 zcmVNac7ZrC4YfQL_t(o!_Ao8w&E}d zg}V=_X+5^-Pu~AoXG5xEy%U@@vX)ve@+~$YK-zUD1Fh?RQtE;R2o1PgE!(bTdbLDQ>VML*@A^%7ODstjlGGM|)N?izU6~G25Akq-ea{DKzuj(@3?8TQJ}r}o zlBjB#Zj(9X(zci&ZW{rk=6ja@7w^X^@0yfM$lt!#0Bw{D`y=lLYXT-DI;6{yDp?B* z#E&O66JSo&n$l+A-j@wT>4~|c=%iJKI*yJs7gk^b3V%sNt@)ZEb=$W0Sz60$Dy67@ zNl3bK18DEptUHQ+iMo|n{9q)>(JfLVb?VMyd_PU`edF6LpXj z6(QxUbAQ8u8Y3~!b!B>$`z!-jqc~8jp;#XDL^9J?H!IJx`E#JekJ30La?*WVW1+}i zc?ZhOQ0tm~C}^x23KBxiimLTNl9FWhDFo*E1?A6Dw8G3&Ox93BGjcV9?q(@5RC%CE z6s5UYhwdY&bo3ZQNf$z;dUT62gsQPooa{W z-=O@gXHUKcby|&&IrUvAoUY{E|3|$@!YB281&V{q36=asl+EVp{?|&ocu8cPP~M^T z+!nNQC1=ACYk&`yM%~%GP%SnOg}j~UtmTmiIYz4I_dLEjW3fr6g>4Uu?`HXO_iHce gJR8%HbK$f70i`M+sai->p#T5?07*qoM6N<$f>t+bIsgCw delta 780 zcmV+n1M~c+2E_)DBvD9EOjJbx0000001$7qH#b04Sz3C)`g=h^gM*8eeQA~lEUZvK zxPV~2dt$w}zrDT1$!<;FqxT+e;>b=y;&fdNFuE>ibWH&W z11K6zm_Zi!xRjK_8I<7i(PV8XVUelT(t)p5iZQlO=oy9~#kqG|5hfW1iG4rMUMmhH za^_DT@4!6gx$oW7*Dv6UKkeuVJ>KG&%e;m&n5DaK1F!Q+9KE(XPP8w`hcP{ovrr0jp0GicOdtAl2S zPsl@TtfFpM!A02_K`Mz+14vDi*V4Hkixg5+Rhp8Iq7}ka$`t5uoS;T1BFma zW|67*ws;{Erf^wbXMS)V7FuDrTuS5N{HC}B&Y&cW=TITZr=EhP-CC)phG9?9LYt%? z&0nD!T82)xy^LTi(Z7GDxH~O5F))rTloZ`mLIs~sck=-qsv2CR60}I4G>%4v8b&!w zTq!}NbgbZ{o)T(-W|g9pbF{cI?WyMz@UPHx)uBc`Xn>Z*&d^z__leR@J|xNQqpro)^cPw4WCytcPoRT6iC0&D4LImVVDTi4tkBwy&Q^ zZ8QA0)b8~&Dnxf$h38Oq6aUkK{m-bj!8$3e^C)fib`&6PDQ%lHZAzV4alhMB{v!-} zZQBfw?2|lvq<&Lk*RCY4^0cQ4?>wZ~*c~r%X+*4Xbu0A#FNhE&u=k4rN$LW=%~1DgXcg2mk;800000(o>TF0000< KMNUMnLSTZ1g>8NS diff --git a/public/images/trainer/macro_grunt_m.json b/public/images/trainer/macro_grunt_m.json index 5357fdb0767..f9a8736c4d1 100644 --- a/public/images/trainer/macro_grunt_m.json +++ b/public/images/trainer/macro_grunt_m.json @@ -4,8 +4,8 @@ "image": "macro_grunt_m.png", "format": "RGBA8888", "size": { - "w": 75, - "h": 75 + "w": 76, + "h": 76 }, "scale": 1, "frames": [ @@ -14,20 +14,20 @@ "rotated": false, "trimmed": false, "sourceSize": { - "w": 80, - "h": 80 + "w": 35, + "h": 76 }, "spriteSourceSize": { - "x": 15, - "y": 4, - "w": 48, - "h": 75 + "x": 0, + "y": 0, + "w": 35, + "h": 76 }, "frame": { "x": 0, "y": 0, - "w": 48, - "h": 75 + "w": 35, + "h": 76 } } ] @@ -36,6 +36,6 @@ "meta": { "app": "https://www.codeandweb.com/texturepacker", "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:52fccff2a0675b4e10139ddb7067d4cf:10d254175d2d8a9111cce096ffb55fa3:d57016467aa07cafdfaf13e0ff643c1b$" + "smartupdate": "$TexturePacker:SmartUpdate:5800bf6888eb6dd61ea39e1c9a1f93e3:25a930b7c50e2d7832bd3c30402d7544:1f76f2e682f472208a45e187250a6a3d$" } } diff --git a/public/images/trainer/macro_grunt_m.png b/public/images/trainer/macro_grunt_m.png index aa6b3607a8761c192232163920a5ddc7130d750b..464c735c75d210e180660f9ef8151ed44cb85be2 100644 GIT binary patch delta 861 zcmV-j1ETzw2jm8SiBL{Q4GJ0x0000DNk~Le0000?0000?2m=5B0Psnn82|tPLQqUp zMF0Q*0000GZ?rczKvh{Xg9=RuqCuO4ET~oSAcIJLj{H`sI0Urf?gBjj8!c~@Ib{#MX^Y{Vn#S< zVJv}B9F_>10%w1k!!VIHZ@T7rjOQq}FF}0>4CG}z@)}zy-vS%OYfevr??z$%`1m%r z`Dh@CPfokEZNqAbmq^0Dt)UD{%z*SJCu%kk1N;2;-mDG#jh2@ic z#iH4y$_D+XvPyqEP`A8)?}cUVXJxJHQCgPs%X@AP3R{0ytK6%s2hHh zYdz|>QS%YT!mx<@FBf8#AIds>3L;GkBXs|g1xCu!UntCnE3WktgXINlYAj1yN7Jjp zrY_3@6GDaQDL8t88Y%miVIYH5uxxE*3rv2`uzB3ZEz<2CFwEnex7bA5hBJlbIR_gjX$|9|sU-=K zv!5h;4JNf;!%VWFxM^8>N}XF0*DP9=5R6{dH2GoER2gyyP&+A+KV&o7fUGdCFt4Gz zl?F?~(#9NxRa%2Ny_P4b)jLcN6Vv2Q0V}lzBa44C#RW2xjfPgNWiaZ3u$x|TZpKPc zVQd#BGFAvicVQ|mMPbs%+f9ywuzQfTT66~NzTaSe+AB{nu-1jU=i+@lIBL_Z?;D>V;j55% n0000>2m=5B01uFg*Z=?kNKi~v zMF0Q*0000GZ?rczKvh{N;vpp>x4(fz-<=F&o5nOE(kUczvVwx%-^Y~BDflWZoB_IAE?_~Ivx}gspuDQ= zPL7tYM0<31DyV_?m=uI=1WIJR_)q~m(#Ho6%sI;s9P;=oOeBNFstT|iWkH>{V7$(X zsF(rk9EJg~h_`dCYzgDct2{_%;eiG$@$Jo&$x_7WPZobi?sLCy^j z7))4>xDS7?^f{Keu#RjER7yAN-(DRVwpl33STRm4yr`Q#w)syigOSIK>BUEyg}EKY zQQe7%m$g_XO}Ue$#fh4l>|D((ou{y|bOdT)G4;6;7BDd^VixPfOnvWQ@jAM$meqBI zFpV7T!&(m|6hLRpQO)TZnjK3TE&T`n6?J&R{qDolJVOq!bwXBUgs=SKFk=BrCr z(k?9BhS8AwzzVApcF$6q$-4=29O55@?Z-N}9xmKHG9fRE{t)V69q50s>|k~Hhr-m$ z-3x!KbaOgcX>FBsz}B!x{r#QoQh!)6c~q4=uyTbk?2cmFV?5GY*UQ2dx3prh8L?Q! zx^1?rN&RY7l+Do|@2xwsW*`#%b}le8a66CsAKgBA^!NsBn<)Y6T;B}<000hUSV?A0 hO#mtY000O800000007cclK=n!07*qoM6LruV1k#}p6&nu diff --git a/public/images/trainer/magma_grunt_f.json b/public/images/trainer/magma_grunt_f.json index 05c0512bbf0..d7a3d214317 100644 --- a/public/images/trainer/magma_grunt_f.json +++ b/public/images/trainer/magma_grunt_f.json @@ -4,30 +4,30 @@ "image": "magma_grunt_f.png", "format": "RGBA8888", "size": { - "w": 80, - "h": 80 + "w": 72, + "h": 72 }, "scale": 1, "frames": [ { "filename": "0001.png", "rotated": false, - "trimmed": true, + "trimmed": false, "sourceSize": { - "w": 80, - "h": 80 + "w": 43, + "h": 72 }, "spriteSourceSize": { - "x": 10, + "x": 0, "y": 0, - "w": 60, - "h": 80 + "w": 43, + "h": 72 }, "frame": { - "x": 10, + "x": 0, "y": 0, - "w": 60, - "h": 80 + "w": 43, + "h": 72 } } ] @@ -36,6 +36,6 @@ "meta": { "app": "https://www.codeandweb.com/texturepacker", "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:f63ad48affc076f60fae78992c96a2bf:80928b32710abcb28c07c6fc5a425d99:3b961d8852b62aaf24ceb2030c036515$" + "smartupdate": "$TexturePacker:SmartUpdate:219462e400564a65012cda9dbc31ab22:4e0070239d24311df52a263271698c59:3b961d8852b62aaf24ceb2030c036515$" } } diff --git a/public/images/trainer/magma_grunt_f.png b/public/images/trainer/magma_grunt_f.png index 215ad83eea1c2e4413658a282118aa6bac800bd2..5ea582ad0677fbccc7846190f4a19be200cf9ce5 100644 GIT binary patch literal 727 zcmV;|0x127P)bgG; zBI?c_b0=b3=tZKn3CYfaF0+K(fGG%JWg#>67(JSAq`PFN*l zg3bh~nv!j5Ye>ObPrXP*^-WE@NU_P+!m1-hY_F8~aY)blqrH&e-e5p$)`Vjm`43uV0VmHOC*ZijZv4Y!&aPmol>)N^yw4p0k;As(T*u zcy{U7+qCMv$68<6vi+@k{BM%mQtR6y_RaH<6&2rh?OVOw$|7WWKY#ZBRtAOMYF!ph zixb_5ok!%u&b092-g~V4fxR95l9#?g%o#_3Y)G`nk(OY67H^PGUcB7?a*&=#+L9z@ zO`&FE^wU2Dt zXg({obU=D>w8l1hH8x0(p_;iGACg97O=L+!y*4M>6HKQ-){>yhOQ%6D{fGVzWhHaY zfIJ@W;B!Z)E;K;XpNvX6Er&cHGBPs%*T`}J{0@&g%dl>Wa?rx=H==9LhTl!u6rr&3S7 z8yY~7M+0T4wJx1tEhie~o}7z$oxwyO@F}tvv@Oe79^_LzcZ)EO9LE>g3sTG*JyO*~ z^nx#M+D8}B?O~sqhwptbQJGTCz+sSAe4~k9zsBK;2Ig&>GdjRuU*o#2qj@(db2ct- z2SJ>9weePOFi(BF&AfwgxViWQeY_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ZBbTU846Ha=pM$(!23J5jEY*BB#tHc{hPEX|81Ten&$9b~-On&_^l zvXV#)m}Q7xO<36$I$=gDJb^tIwFbNOyz9Mxi-S3@e^Np^iZ}ZhbM@|Ueq!X#ZlUDo zeQ!^z93@awD=S`GQ5{Vv9Bn8r)w&5Kxi4=rND`7pmNw7Y-B6RX3f9n)Cf1DZrjZ3q zsa6Y_=N{j>+e{g#X_}gxZ`we`*ygezv^E-TPIzg+YTo<@wD3TeN`u~w00000NkvXX Hu0mjf>%zTP diff --git a/public/images/trainer/plasma_grunt_f.json b/public/images/trainer/plasma_grunt_f.json index 4d23eeeb483..4a73a55e24b 100644 --- a/public/images/trainer/plasma_grunt_f.json +++ b/public/images/trainer/plasma_grunt_f.json @@ -4,30 +4,408 @@ "image": "plasma_grunt_f.png", "format": "RGBA8888", "size": { - "w": 75, - "h": 75 + "w": 186, + "h": 186 }, "scale": 1, "frames": [ { - "filename": "0001.png", + "filename": "0002.png", "rotated": false, - "trimmed": false, + "trimmed": true, "sourceSize": { "w": 80, "h": 80 }, "spriteSourceSize": { - "x": 21, - "y": 4, - "w": 37, - "h": 75 + "x": 16, + "y": 31, + "w": 49, + "h": 49 }, "frame": { "x": 0, "y": 0, - "w": 37, - "h": 75 + "w": 49, + "h": 49 + } + }, + { + "filename": "0003.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 16, + "y": 31, + "w": 49, + "h": 49 + }, + "frame": { + "x": 0, + "y": 0, + "w": 49, + "h": 49 + } + }, + { + "filename": "0015.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 17, + "y": 27, + "w": 46, + "h": 53 + }, + "frame": { + "x": 49, + "y": 0, + "w": 46, + "h": 53 + } + }, + { + "filename": "0001.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 17, + "y": 27, + "w": 45, + "h": 53 + }, + "frame": { + "x": 0, + "y": 49, + "w": 45, + "h": 53 + } + }, + { + "filename": "0017.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 17, + "y": 27, + "w": 45, + "h": 53 + }, + "frame": { + "x": 0, + "y": 49, + "w": 45, + "h": 53 + } + }, + { + "filename": "0018.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 17, + "y": 27, + "w": 45, + "h": 53 + }, + "frame": { + "x": 0, + "y": 49, + "w": 45, + "h": 53 + } + }, + { + "filename": "0019.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 17, + "y": 27, + "w": 45, + "h": 53 + }, + "frame": { + "x": 0, + "y": 49, + "w": 45, + "h": 53 + } + }, + { + "filename": "0004.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 33, + "w": 50, + "h": 47 + }, + "frame": { + "x": 45, + "y": 53, + "w": 50, + "h": 47 + } + }, + { + "filename": "0005.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 33, + "w": 50, + "h": 47 + }, + "frame": { + "x": 45, + "y": 53, + "w": 50, + "h": 47 + } + }, + { + "filename": "0006.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 36, + "w": 50, + "h": 44 + }, + "frame": { + "x": 45, + "y": 100, + "w": 50, + "h": 44 + } + }, + { + "filename": "0007.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 36, + "w": 50, + "h": 44 + }, + "frame": { + "x": 45, + "y": 100, + "w": 50, + "h": 44 + } + }, + { + "filename": "0016.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 17, + "y": 27, + "w": 45, + "h": 53 + }, + "frame": { + "x": 0, + "y": 102, + "w": 45, + "h": 53 + } + }, + { + "filename": "0008.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 38, + "w": 50, + "h": 42 + }, + "frame": { + "x": 45, + "y": 144, + "w": 50, + "h": 42 + } + }, + { + "filename": "0009.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 15, + "y": 38, + "w": 50, + "h": 42 + }, + "frame": { + "x": 45, + "y": 144, + "w": 50, + "h": 42 + } + }, + { + "filename": "0013.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 17, + "y": 27, + "w": 43, + "h": 53 + }, + "frame": { + "x": 95, + "y": 0, + "w": 43, + "h": 53 + } + }, + { + "filename": "0014.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 17, + "y": 27, + "w": 43, + "h": 53 + }, + "frame": { + "x": 95, + "y": 53, + "w": 43, + "h": 53 + } + }, + { + "filename": "0010.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 16, + "y": 31, + "w": 49, + "h": 49 + }, + "frame": { + "x": 95, + "y": 106, + "w": 49, + "h": 49 + } + }, + { + "filename": "0011.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 16, + "y": 31, + "w": 49, + "h": 49 + }, + "frame": { + "x": 95, + "y": 106, + "w": 49, + "h": 49 + } + }, + { + "filename": "0012.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 16, + "y": 29, + "w": 46, + "h": 51 + }, + "frame": { + "x": 138, + "y": 0, + "w": 46, + "h": 51 } } ] @@ -36,6 +414,6 @@ "meta": { "app": "https://www.codeandweb.com/texturepacker", "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:c3001e18f1878c01a4825697200e823e:2003e0d4db249f7020c3471872198ac8:b01645b9e941158814978f2126e7e995$" + "smartupdate": "$TexturePacker:SmartUpdate:e8e867ad78b993918fba435e10511740:758a95ecd97e2607ff6ab81f85e665e6:b01645b9e941158814978f2126e7e995$" } } diff --git a/public/images/trainer/plasma_grunt_f.png b/public/images/trainer/plasma_grunt_f.png index 95b065f4360a81cdfe3b96c0527e9f07a8c1c402..7fa804cc39d1a408840e6aa07ad9797516a86a19 100644 GIT binary patch literal 3430 zcmV-s4Vm(ZP)pw=GD3!9hYI=4_^(cBj({{97Py`a&<4|L5cAIoWivH5J&x^YOE}6HOOeQ;BVJ zKR?^gNB9Rg%XG1IE)kztYLm+tOcz^Iky66Nzojw;)5X?xk@7e=!*sDVK2XX4K0<68 zOcz_{GL8zk`|bPt{&j~lOcz_1GR}ef`uYk*LLoTCbg^|V1P;Pi-mu80Sf(-k{)E#i zHd~icvB3Q^7Wwmi8=I2w@6X$b6`QTobNjx1|M|H`NB+3WZDbmC2jOtL+|H}mY)wV( z-(TPGgMI8XeEZ1s1{zaa#b#@K?q6TwOYh!x6aHi>uwF9+vS^791%6O;P zX9T;rn)a%VOtx0*zz@|c$4S`xu+H=&L7_QuKLEkhyR*fh4xI~kJ=ZK<7Vli>h^cxs z9jPi}tU7e!A?oq5%pVja^fj{FKQsOVF07sJ?u3EVIP713-->kl>+z&4 z3>Ty(iE-lA=ioy0;U;R&^@o@L1&UctIwZpltG~paQ>43($Bmc%7m}&kg^r|e(hv|@ z8)t!}JdOz5o;J?WkhYG0ARn7he{ml_TW9DZHNo1s)VG}HT$pr_kl6m>Fo14>E&hRe zlh6770%;RT)#Eghc9tI>+p`$Adj-Fl220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yVuX8-^I delta 755 zcmV0000>2m=5B01uFg*Z=?kFi=cX zMNDaN`1tq$002lxSg63*h?uBoaCk5qjA*M14{cPrQdDBDy)aR0sieOUqx8zk0@CZH z%2J9%EwV&_i-u{r3Ca}$sWV7je@89NeJeSwHA%_zja3PLpFG&_7k7c$Cz9iR7w3j<9_oV&~(p%R(6aJ}8E*Uw7#MMu+ED3R%A& z9uTq)uFz*XI%^$Wa5mUqZ-B0}tn=v{b@bn7*QC#ggJBdow}hZ#4Kn}$002ovPDHLkV1lLNW?KLN diff --git a/public/images/trainer/plasma_grunt_m.json b/public/images/trainer/plasma_grunt_m.json index 7c34b16790f..8fda1bd947b 100644 --- a/public/images/trainer/plasma_grunt_m.json +++ b/public/images/trainer/plasma_grunt_m.json @@ -4,30 +4,555 @@ "image": "plasma_grunt_m.png", "format": "RGBA8888", "size": { - "w": 72, - "h": 72 + "w": 262, + "h": 262 }, "scale": 1, "frames": [ { - "filename": "0001.png", + "filename": "0021.png", "rotated": false, - "trimmed": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 13, + "y": 11, + "w": 54, + "h": 69 + }, + "frame": { + "x": 0, + "y": 0, + "w": 54, + "h": 69 + } + }, + { + "filename": "0022.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 13, + "y": 11, + "w": 54, + "h": 69 + }, + "frame": { + "x": 0, + "y": 0, + "w": 54, + "h": 69 + } + }, + { + "filename": "0023.png", + "rotated": false, + "trimmed": true, "sourceSize": { "w": 80, "h": 80 }, "spriteSourceSize": { "x": 16, - "y": 7, - "w": 47, - "h": 72 + "y": 11, + "w": 51, + "h": 69 }, "frame": { "x": 0, + "y": 69, + "w": 51, + "h": 69 + } + }, + { + "filename": "0001.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 17, + "y": 11, + "w": 50, + "h": 69 + }, + "frame": { + "x": 0, + "y": 138, + "w": 50, + "h": 69 + } + }, + { + "filename": "0024.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 17, + "y": 11, + "w": 50, + "h": 69 + }, + "frame": { + "x": 0, + "y": 138, + "w": 50, + "h": 69 + } + }, + { + "filename": "0025.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 17, + "y": 11, + "w": 50, + "h": 69 + }, + "frame": { + "x": 0, + "y": 138, + "w": 50, + "h": 69 + } + }, + { + "filename": "0026.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 17, + "y": 11, + "w": 50, + "h": 69 + }, + "frame": { + "x": 0, + "y": 138, + "w": 50, + "h": 69 + } + }, + { + "filename": "0002.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 17, + "y": 11, + "w": 50, + "h": 69 + }, + "frame": { + "x": 50, + "y": 138, + "w": 50, + "h": 69 + } + }, + { + "filename": "0003.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 17, + "y": 11, + "w": 50, + "h": 69 + }, + "frame": { + "x": 50, + "y": 138, + "w": 50, + "h": 69 + } + }, + { + "filename": "0016.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 17, + "y": 11, + "w": 50, + "h": 69 + }, + "frame": { + "x": 51, + "y": 69, + "w": 50, + "h": 69 + } + }, + { + "filename": "0017.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 17, + "y": 11, + "w": 50, + "h": 69 + }, + "frame": { + "x": 54, "y": 0, - "w": 47, - "h": 72 + "w": 50, + "h": 69 + } + }, + { + "filename": "0018.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 17, + "y": 11, + "w": 50, + "h": 69 + }, + "frame": { + "x": 54, + "y": 0, + "w": 50, + "h": 69 + } + }, + { + "filename": "0019.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 18, + "y": 11, + "w": 49, + "h": 69 + }, + "frame": { + "x": 100, + "y": 138, + "w": 49, + "h": 69 + } + }, + { + "filename": "0020.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 18, + "y": 11, + "w": 49, + "h": 69 + }, + "frame": { + "x": 100, + "y": 138, + "w": 49, + "h": 69 + } + }, + { + "filename": "0004.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 14, + "y": 13, + "w": 52, + "h": 67 + }, + "frame": { + "x": 101, + "y": 69, + "w": 52, + "h": 67 + } + }, + { + "filename": "0005.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 14, + "y": 13, + "w": 52, + "h": 67 + }, + "frame": { + "x": 101, + "y": 69, + "w": 52, + "h": 67 + } + }, + { + "filename": "0015.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 14, + "y": 13, + "w": 52, + "h": 67 + }, + "frame": { + "x": 104, + "y": 0, + "w": 52, + "h": 67 + } + }, + { + "filename": "0006.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 12, + "y": 15, + "w": 53, + "h": 65 + }, + "frame": { + "x": 156, + "y": 0, + "w": 53, + "h": 65 + } + }, + { + "filename": "0007.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 12, + "y": 15, + "w": 53, + "h": 65 + }, + "frame": { + "x": 156, + "y": 0, + "w": 53, + "h": 65 + } + }, + { + "filename": "0008.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 12, + "y": 15, + "w": 53, + "h": 65 + }, + "frame": { + "x": 209, + "y": 0, + "w": 53, + "h": 65 + } + }, + { + "filename": "0009.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 12, + "y": 15, + "w": 53, + "h": 65 + }, + "frame": { + "x": 156, + "y": 65, + "w": 53, + "h": 65 + } + }, + { + "filename": "0010.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 12, + "y": 15, + "w": 53, + "h": 65 + }, + "frame": { + "x": 209, + "y": 65, + "w": 53, + "h": 65 + } + }, + { + "filename": "0011.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 12, + "y": 15, + "w": 53, + "h": 65 + }, + "frame": { + "x": 153, + "y": 130, + "w": 53, + "h": 65 + } + }, + { + "filename": "0012.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 12, + "y": 15, + "w": 53, + "h": 65 + }, + "frame": { + "x": 149, + "y": 195, + "w": 53, + "h": 65 + } + }, + { + "filename": "0013.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 12, + "y": 15, + "w": 53, + "h": 65 + }, + "frame": { + "x": 202, + "y": 195, + "w": 53, + "h": 65 + } + }, + { + "filename": "0014.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 12, + "y": 15, + "w": 53, + "h": 65 + }, + "frame": { + "x": 206, + "y": 130, + "w": 53, + "h": 65 } } ] @@ -36,6 +561,6 @@ "meta": { "app": "https://www.codeandweb.com/texturepacker", "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:61f195ebbcde93ab7442408edad7fe7a:28ae203b3cb42a94c4ba4420fdebdccc:9ae0ee174d431d48052a2f6b74e9d40c$" + "smartupdate": "$TexturePacker:SmartUpdate:8e214218a81b826b2cecce3e41f6eee8:2b88638dcf4559e6aad7c14cd730b7c3:9ae0ee174d431d48052a2f6b74e9d40c$" } } diff --git a/public/images/trainer/plasma_grunt_m.png b/public/images/trainer/plasma_grunt_m.png index e3ec6dd8c3534bbabba12c200cd8388195ee4998..801e91b1d6d8bd3a6852cd3a4cd5584b8e1953f9 100644 GIT binary patch literal 4502 zcmXX~c{r5q7anW2k##VWvJ`_M>xjy}C%YQEv4z3#B`V4`Gfb9J_9eTJWe7t;wkTP$ zjAe)+Te5y(vg9}Q{od<(&bi-n?sK1Wz1MmEdGQuzhCntj8vpFGo0Y6*=^7i?u_4bWPi^rF461{&Gj1pwH2{~S6%R*oP5z)f$gr)_h8dLtMAduD!HGzV*1uWbIXO8#Iq4luOJSDi zysXQW$~B#|wUW0%1uCZ`hM)Gz{t21%{yTIVkT;~+-tKe63I7LU_%}Q~nZ9K@R5Njq z*Pt{TbFD*CESS|zs61{$;5tovpyu?^(f0gO5hjf5z{RM8x6iX!%sE(xZG*Re_kQtt zc2!Xh5ulGVw_@2bOXUxDyKwhp>rjypJ_q2>-b$wtxhs+eM{YtkvSr&Wy>-FjFo~}W zLC{6_7!ct%mC~4}JFW#-zY~5sSP1?RqxbCW)+s+>bx2;z35FRPM)@Owz% ztVJ&Gkrlni>|)%fee)bk?`JJ}d3lxG6HlmZe7kpQ`ADhJz>gVrO+T`cG5m!0ahfT@)mb1544P*gR-&F}%~#Qcy0=Prl--%Amh zIv7Fn2i)Cp=G5C2UdQGYX^9=$0IPI%?rL#lu36*P?eOdIU%4FaUXlh_rB3^J>p0}; zKKyc6qRI7PuP9DF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^L8+IM0$aJX%Bw@jHU;I-0EmJqAWC8&C)u}d z2W4^>*|tK3q@UC+2wIPvl!_!uJ_ZWq4l0slv}beBMpBf8z!-;X8eiFD?c7n>1b(7K|h;ETo&^M6Vrb5xjIV`(^`bfq(T>TByK}t0!gkh2is-p3f z)M=b^Oi*|SP3T%VST)1Jsn&l2x;O8GayvoYYoN3g;I^UMSnT2;BzB zoqbN1$~0;%aNAMu0^-^Zk53z@A2{Je5#YsQ(+3y)u~ o5A0p>=2cpqXSatp)VDeR0BKemLNInO0RR9107*qoM6N<$f`fsXvj6}9 diff --git a/public/images/trainer/plumeria.json b/public/images/trainer/plumeria.json index 936a8766750..4175fe5d716 100644 --- a/public/images/trainer/plumeria.json +++ b/public/images/trainer/plumeria.json @@ -4,8 +4,8 @@ "image": "plumeria.png", "format": "RGBA8888", "size": { - "w": 72, - "h": 72 + "w": 76, + "h": 76 }, "scale": 1, "frames": [ @@ -14,20 +14,20 @@ "rotated": false, "trimmed": false, "sourceSize": { - "w": 80, - "h": 80 + "w": 40, + "h": 76 }, "spriteSourceSize": { - "x": 23, - "y": 7, - "w": 36, - "h": 72 + "x": 0, + "y": 0, + "w": 40, + "h": 76 }, "frame": { "x": 0, "y": 0, - "w": 36, - "h": 72 + "w": 40, + "h": 76 } } ] @@ -36,6 +36,6 @@ "meta": { "app": "https://www.codeandweb.com/texturepacker", "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:5527e7b646932d429928b53f055e9d27:c0640510780d2974f9b74a7f8e6b29aa:7bfec029bae78c9d483f59c35b73afad$" + "smartupdate": "$TexturePacker:SmartUpdate:d0e080a4dcc30b39616c49dfd96c98f7:47c6a714be68fabdf11801166e154db6:7bfec029bae78c9d483f59c35b73afad$" } } diff --git a/public/images/trainer/plumeria.png b/public/images/trainer/plumeria.png index b7382f6afdee9df5a37a4c0c256d3c12eef51817..4528c3e205398eab8b451ad69e155d165e95772c 100644 GIT binary patch delta 831 zcmV-F1Hk;I2g3$`iBL{Q4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vSE;(5G*TQJXs3*c?{^{>50TSPeX|{!IlZ~TJMtwxSrL; zCr`HE4&Hxy*2ya^rU~}&3Xlsv;pvp!0HxsXJsocyJqf@S&=JT(LpiO8XK&=cy(8qq zlWgy&74hVaW--@s+88onlacu6?T?#a9AyVc;<)8Of1 z^EAMtpn%_a@-5Sr%0a=ACiuoXj>AuR7q{C#Wz`a69dyt=Y5)KL07*qoM6N<$f=$dO A?*IS* diff --git a/public/images/trainer/shelly.json b/public/images/trainer/shelly.json index 7761779864a..bac17e2885e 100644 --- a/public/images/trainer/shelly.json +++ b/public/images/trainer/shelly.json @@ -4,8 +4,8 @@ "image": "shelly.png", "format": "RGBA8888", "size": { - "w": 80, - "h": 80 + "w": 78, + "h": 78 }, "scale": 1, "frames": [ @@ -14,20 +14,20 @@ "rotated": false, "trimmed": false, "sourceSize": { - "w": 80, - "h": 80 + "w": 45, + "h": 78 }, "spriteSourceSize": { "x": 0, "y": 0, - "w": 80, - "h": 80 + "w": 45, + "h": 78 }, "frame": { "x": 0, "y": 0, - "w": 80, - "h": 80 + "w": 45, + "h": 78 } } ] @@ -36,6 +36,6 @@ "meta": { "app": "https://www.codeandweb.com/texturepacker", "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:831f5748dad92911b10a1cb358ee2dae:a3bf81bbaa3b49cad5e0e549cf94563b:bb6befc9383c9c08837183ae2a7a80c1$" + "smartupdate": "$TexturePacker:SmartUpdate:601dbcee82b14bde5072df26ddd7d684:a0d576e65d8e3ff549dde75f0a82bc94:a277ff67eb669e1dac57ad29940004ac$" } } diff --git a/public/images/trainer/shelly.png b/public/images/trainer/shelly.png index 2885fbde48e6d99a641834e0237c03724540a9ff..95e6a07310df9f5238f1e1ef223891f4237de36f 100644 GIT binary patch literal 898 zcmV-|1AY97P)Im}xf9oazwX=Jpk~wF%uxCE{G$bL`uKRb9tj=hGMp**Rr)}FJqP#2-%F&aW z(5M_dfCSm|1ezd!c); z=}%5?{z=>A)R?>DaX^f*n0Rq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joEh~7}`A_2y)IvFnm9HsN00000NkvXX Hu0mjfCfd+h diff --git a/public/images/trainer/skull_grunt_f.json b/public/images/trainer/skull_grunt_f.json index 182f9300ad5..b8c42ffafdd 100644 --- a/public/images/trainer/skull_grunt_f.json +++ b/public/images/trainer/skull_grunt_f.json @@ -4,8 +4,8 @@ "image": "skull_grunt_f.png", "format": "RGBA8888", "size": { - "w": 74, - "h": 74 + "w": 69, + "h": 69 }, "scale": 1, "frames": [ @@ -14,20 +14,20 @@ "rotated": false, "trimmed": false, "sourceSize": { - "w": 31, - "h": 74 + "w": 44, + "h": 69 }, "spriteSourceSize": { "x": 0, "y": 0, - "w": 31, - "h": 74 + "w": 44, + "h": 69 }, "frame": { "x": 0, "y": 0, - "w": 31, - "h": 74 + "w": 44, + "h": 69 } } ] @@ -36,6 +36,6 @@ "meta": { "app": "https://www.codeandweb.com/texturepacker", "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:71a1f5b1981674c6e81163ac8ea576c3:a5e612d58e5f0a1489e111212baea09d:dd369353af16e4c5eb6547e129dfac18$" + "smartupdate": "$TexturePacker:SmartUpdate:b9685517b9674887653c84a03f3781c0:894dcd88bf117d48750df82b7bfac644:9035f560a0ab0d45bcc084aba7172990$" } } diff --git a/public/images/trainer/skull_grunt_f.png b/public/images/trainer/skull_grunt_f.png index fe7834ba4a83b449e92f2fc5e89ed32ff83117e4..c26e8d7f882c97c2feb56d8a4f5ad51177de8dbf 100644 GIT binary patch delta 705 zcmV;y0zUnT2iXN+iBL{Q4GJ0x0000DNk~Le0000*0000*2m=5B04r158vpwk_V&5W=rBZz~-D)|`+ z-$NZ!mle0bF-XX00000NkvXXu0mjfa+5qZ delta 889 zcmV-<1BU$B1&IfLiBL{Q4GJ0x0000DNk~Le0000=0000=2m=5B04okMLjV8(OHfQy zMF0Q*0000G5D*|JC@3T*H8eL&OHWWZIA~~?Y%oW7NLYJERe*qio0XTSfN-p#oUl%H z#-)(R$jIJxqUhq~_)t*z(75>c`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/trainer/star_grunt_f.json index e26477e3512..a6b613f44cf 100644 --- a/public/images/trainer/star_grunt_f.json +++ b/public/images/trainer/star_grunt_f.json @@ -14,12 +14,12 @@ "rotated": false, "trimmed": false, "sourceSize": { - "w": 80, - "h": 80 + "w": 30, + "h": 68 }, "spriteSourceSize": { - "x": 24, - "y": 11, + "x": 0, + "y": 0, "w": 30, "h": 68 }, @@ -36,6 +36,6 @@ "meta": { "app": "https://www.codeandweb.com/texturepacker", "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:b542a1bdd6995584fc776f75d578b434:f03fddece4494ab59698002fe6671972:c6f0e54e24ec5ffaa711700431b1955e$" + "smartupdate": "$TexturePacker:SmartUpdate:a5493363086a57d0f145cf61c42475de:2e4d3b330bb89e05e93f34d605eee203:c6f0e54e24ec5ffaa711700431b1955e$" } } diff --git a/public/images/trainer/star_grunt_f.png b/public/images/trainer/star_grunt_f.png index 6eb63ae1e03b4d9bec347a9770ffcc4a569ad0fb..ee0c25147cca13147e56a60c467d2b64b993d5b7 100644 GIT binary patch delta 914 zcmV;D18w~D1*iv*B!2;OQb$4nuFf3k00004XF*Lt006O%3;baP00015P)t-sURPxQ z|Np$a-~a#sseB(PDM3m~Qv2Fb-lThbN?LwaQ2*7vd`Vipdt&ceKhDO+l9RTJT2oS0 ze1u9$*zNg`iMHfhGP$qZV=*!Gt(Cd2##~ipeSL@k005gSZ-0aU0016zQchF<|NsC0 z|NsC0|NsC0|NsC0|NsC0|NsC0|NsC00PGkXUH||932;bRa{vGf6951U69E94oEQKA z0+)RFgp%{ix%7O?vplgP!KUfjrUQiKpQKgBTq zd1#)FHzs2unSbrkCRZcNvnXYAu*O#$K% z)0GustrRZSQb|I@vN?N#M<_|iEOL}%S(ap=q#<)91r$p14ua08^b4c%Zw6$G=x`{Z z#HonX%+Vg>MzclcsxHZtmBbhh`S`#;7QvR~>4ZNkF@J_4k~L5SlcW%wVH8Cx5?)#$ zMw+Iy<;0&EmS{3~ybx)7IZNBh z(8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qA{Fkh%mETrh?kEo4u96H(IAjj z%gEaiEn`%zeM01_LoUmJg+kNnSn=P z7cG*WkVTcs#}K?cY}6%EgWxX{^G^`G&Mqnq<=np`OkRiJZ7r%=QjZ{g0_lHz06F&k zi-Hi!zwh+N*I3j1QRsB8k$t*H{133*ekmny+;Q#;t07*qo IM6N<$f+W~hdH?_b diff --git a/public/images/trainer/star_grunt_m.json b/public/images/trainer/star_grunt_m.json index bf49e3027e6..ba245e2eeb3 100644 --- a/public/images/trainer/star_grunt_m.json +++ b/public/images/trainer/star_grunt_m.json @@ -4,8 +4,8 @@ "image": "star_grunt_m.png", "format": "RGBA8888", "size": { - "w": 70, - "h": 70 + "w": 64, + "h": 64 }, "scale": 1, "frames": [ @@ -14,20 +14,20 @@ "rotated": false, "trimmed": false, "sourceSize": { - "w": 80, - "h": 80 + "w": 36, + "h": 64 }, "spriteSourceSize": { - "x": 24, - "y": 9, - "w": 31, - "h": 70 + "x": 0, + "y": 0, + "w": 36, + "h": 64 }, "frame": { "x": 0, "y": 0, - "w": 31, - "h": 70 + "w": 36, + "h": 64 } } ] @@ -36,6 +36,6 @@ "meta": { "app": "https://www.codeandweb.com/texturepacker", "version": "3.0", - "smartupdate": "$TexturePacker:SmartUpdate:abc4b0424c37fd55a2bf2e9f5142adce:41a140aa68a1eda61d9a00cab4e07721:a0796711f9e0333796b6629cd43ff8e8$" + "smartupdate": "$TexturePacker:SmartUpdate:11da63c3829d44356a3c26d094212d64:45ebf021548ac0e12b6f25093c5bf0db:a0796711f9e0333796b6629cd43ff8e8$" } } diff --git a/public/images/trainer/star_grunt_m.png b/public/images/trainer/star_grunt_m.png index a69359eda8e60a56d72d1041b9a8ca43754b4a91..13fd4e8851043b1c3b00d7016d663ae27953c72c 100644 GIT binary patch delta 741 zcmV;M1&NKi~v zMF0Q*0000fDM39f8cI2eN=i~(Rb^gRWNTNodqF{aN?LwaP>O<*kBPRFl%%PAAGxpG zyu9GOdt%xfgtbyrrVR8NZ6}eCXQMHWq+B!jL>x_vtnJdS-XifBWx6T178ar36-S@d#Fqp#a!z$^a{sm}i>_$zC2KBurT!>`bEv63|tE zW!p03AWnzC^_c+4$z_5k0bD<@@|FbjC^IRAaE0JmHP3%#ljMv9>cNz5HsX>GUV4Xh z>vGN+eI~Fb;@6cJ1n@2xlMvv*IM~eoiTOe)>yD8mIG0o5vuoJzd;F|z{ z3P3iO9*_u-ObDQ1L+1|e*%RSf5ByVKETl$2coQ0iVi9Ho^Z;Xk*ZOcqJy!X5z$VON z1-*053_5=TryzUK5s|-mpqh%i-nrhn7r~eY{SlyWK~^hr+Ka@C3IdA!kOUrS0K4dY zq5h$_%!r#bI166u4be{oG$8@^#BcL9RoXx$CfYYz_gmVnv!_pC;(@QH#8cs22 zrt0@JK<7dE{q2NQ%@o#gxz!gIwO`;#G=P-;4fIR3N_1#FKYCD`dPi`2espZjQk3jA?KLBK({;&T6 XEsQ2ObA^X600000NkvXXu0mjf$81eW delta 781 zcmV+o1M>Xy1)~OkiBL{Q4GJ0x0000DNk~Le0000+0000+2m=5B07mcU>~U9@gHY#avZG}PufkBOn8O2P`m>51g@V>YjDsw-M!gw;CJz0Nvl#gZ}WUwYPG^iL2L!|G` z1Zjo;NL1s7>`3)trDP5Ic z@NNfZim9rOFLdQ>#l)|UZ@LxiG)-aeX=ikonx|Zuaa1yo$vj9ElN-TvWzaH@M94zc zF|vI3MDXmgO6DmKR?Y{-fSLFF=eww3I;Ooef%t#Qep(D$!uK7e^&npxURNWmiovnI z@}|Du>+u}ZFvn_a`31c{-gxp(yPO#hId69TcTE4$zT#r!;i|M8v~QWVh-urv?U2%z zJ#X^i&bc=kRGe$eKHvb{VZU=JrO)fZ`)4P}CrjbPz4{aXvGNx~)-q}9(7|m00000< LMNS1ou0mjfgXL|^ From 3f71f79d7bbaaf37016cb64e4ca6be439ac4b2ba Mon Sep 17 00:00:00 2001 From: Wlowscha <54003515+Wlowscha@users.noreply.github.com> Date: Mon, 3 Feb 2025 03:17:08 +0100 Subject: [PATCH 2/7] [Bug] Ensuring proper .getTypes() behavior with secondary Normal type (#5241) * customPokemonData.types now accepts Type.UNKNOWN, ignores when determining type * Changed test for clowning around encounter to look at getTypes() instead of directly accessing customData * Simplifying logic for fusions when overrides are involved, introducing new tests in pokemon.test.ts * Renamed overrideTypes to customTypes to avoid confusion with override * pokemon.getType() properly recognizes Normal secondary type * Added effectiveness test for ghost on normal --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> --- src/field/pokemon.ts | 6 +++--- src/test/field/pokemon.test.ts | 26 ++++++++++---------------- src/test/moves/effectiveness.test.ts | 4 ++++ 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 112665e1723..0458c5471d2 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -1269,7 +1269,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { types.push(firstType); // Second type - let secondType: Type | null = null; + let secondType: Type = Type.UNKNOWN; if (fusionSpeciesForm) { // Check if the fusion Pokemon also has permanent changes from ME when determining the fusion types @@ -1287,10 +1287,10 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { } else { // If not a fusion, just get the second type from the species, checking for permanent changes from ME secondType = (customTypes && this.customPokemonData.types.length > 1 && this.customPokemonData.types[1] !== Type.UNKNOWN) - ? this.customPokemonData.types[1] : speciesForm.type2; + ? this.customPokemonData.types[1] : (speciesForm.type2 ?? Type.UNKNOWN); } - if (secondType) { + if (secondType !== Type.UNKNOWN) { types.push(secondType); } } diff --git a/src/test/field/pokemon.test.ts b/src/test/field/pokemon.test.ts index b8b7349c1f8..0a1ddac9e90 100644 --- a/src/test/field/pokemon.test.ts +++ b/src/test/field/pokemon.test.ts @@ -97,16 +97,14 @@ describe("Spec - Pokemon", () => { expect(types[0]).toBe(Type.PSYCHIC); expect(types[1]).toBe(Type.FIRE); - // Abra Psychic/Grass - pokemon.customPokemonData.types = [ Type.UNKNOWN, Type.GRASS ]; + pokemon.customPokemonData.types = [ Type.UNKNOWN, Type.NORMAL ]; types = pokemon.getTypes(); expect(types[0]).toBe(Type.PSYCHIC); expect(types[1]).toBe(Type.FIRE); - // Abra Grass - pokemon.customPokemonData.types = [ Type.GRASS, Type.UNKNOWN ]; + pokemon.customPokemonData.types = [ Type.NORMAL, Type.UNKNOWN ]; types = pokemon.getTypes(); - expect(types[0]).toBe(Type.GRASS); + expect(types[0]).toBe(Type.NORMAL); expect(types[1]).toBe(Type.FIRE); if (!pokemon.fusionCustomPokemonData) { @@ -114,24 +112,20 @@ describe("Spec - Pokemon", () => { } pokemon.customPokemonData.types = []; - // Charmander Fire/Grass - pokemon.fusionCustomPokemonData.types = [ Type.UNKNOWN, Type.GRASS ]; + pokemon.fusionCustomPokemonData.types = [ Type.UNKNOWN, Type.NORMAL ]; types = pokemon.getTypes(); expect(types[0]).toBe(Type.PSYCHIC); - expect(types[1]).toBe(Type.GRASS); + expect(types[1]).toBe(Type.NORMAL); - // Charmander Grass - pokemon.fusionCustomPokemonData.types = [ Type.GRASS, Type.UNKNOWN ]; + pokemon.fusionCustomPokemonData.types = [ Type.NORMAL, Type.UNKNOWN ]; types = pokemon.getTypes(); expect(types[0]).toBe(Type.PSYCHIC); - expect(types[1]).toBe(Type.GRASS); + expect(types[1]).toBe(Type.NORMAL); - // Abra Grass - // Charmander Fire/Grass - pokemon.customPokemonData.types = [ Type.GRASS, Type.UNKNOWN ]; - pokemon.fusionCustomPokemonData.types = [ Type.UNKNOWN, Type.GRASS ]; + pokemon.customPokemonData.types = [ Type.NORMAL, Type.UNKNOWN ]; + pokemon.fusionCustomPokemonData.types = [ Type.UNKNOWN, Type.NORMAL ]; types = pokemon.getTypes(); - expect(types[0]).toBe(Type.GRASS); + expect(types[0]).toBe(Type.NORMAL); expect(types[1]).toBe(Type.FIRE); }); diff --git a/src/test/moves/effectiveness.test.ts b/src/test/moves/effectiveness.test.ts index 7742178f595..c78416b1237 100644 --- a/src/test/moves/effectiveness.test.ts +++ b/src/test/moves/effectiveness.test.ts @@ -73,6 +73,10 @@ describe("Moves - Type Effectiveness", () => { () => testMoveEffectiveness(game, Moves.THUNDERBOLT, Species.BLASTOISE, 2) ); + it("Ghost-type attacks have no effect on Normal-type Pokemon", + () => testMoveEffectiveness(game, Moves.SHADOW_BALL, Species.URSALUNA, 0) + ); + it("Electric-type attacks are doubly super-effective against Water/Flying-type Pokemon", () => testMoveEffectiveness(game, Moves.THUNDERBOLT, Species.GYARADOS, 4) ); From 45f4bf3f1344ff86fab7155cf02d1006504b49c6 Mon Sep 17 00:00:00 2001 From: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com> Date: Mon, 3 Feb 2025 11:55:44 -0600 Subject: [PATCH 3/7] [Misc] add .editorconfig (#5246) * add .editorconfig * add .js files to editorconfig, fix insert_final_newline * Remove stray .editorconfig in src/tests --- .editorconfig | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000000..be478a2b5fa --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +[src/*.{js,ts}] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true From 91a4333e967851ee246ea5a0a0a523a7fed6162b Mon Sep 17 00:00:00 2001 From: Wlowscha <54003515+Wlowscha@users.noreply.github.com> Date: Tue, 4 Feb 2025 02:43:52 +0100 Subject: [PATCH 4/7] [Misc] New data structures for pokedex (#5223) * Introducing catchableStarters in biomes.ts * Introducing SpeciesTmMoves with a list of TM moves for each species * speciesTmMoves now properly accounts for form-specific tms * Removed argument from transverse function * Adding types to passive abilities data structures * Update tms.ts * Update src/data/balance/passives.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> --------- Co-authored-by: damocleas Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> --- src/data/balance/biomes.ts | 21 +++++++++++++++++++ src/data/balance/passives.ts | 10 ++++++++- src/data/balance/tms.ts | 40 ++++++++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+), 1 deletion(-) diff --git a/src/data/balance/biomes.ts b/src/data/balance/biomes.ts index 240881ad580..8913fd47e93 100644 --- a/src/data/balance/biomes.ts +++ b/src/data/balance/biomes.ts @@ -102,6 +102,18 @@ export interface BiomePokemonPools { [key: integer]: BiomeTierPokemonPools } +export interface BiomeTierTod { + biome: Biome, + tier: BiomePoolTier, + tod: TimeOfDay[] +} + +export interface CatchableSpecies{ + [key: integer]: BiomeTierTod[] +} + +export const catchableSpecies: CatchableSpecies = {}; + export interface BiomeTierTrainerPools { [key: integer]: TrainerType[] } @@ -7716,6 +7728,9 @@ export function initBiomes() { uncatchableSpecies.push(speciesId); } + // array of biome options for the current species + catchableSpecies[speciesId] = []; + for (const b of biomeEntries) { const biome = b[0]; const tier = b[1]; @@ -7725,6 +7740,12 @@ export function initBiomes() { : [ b[2] ] : [ TimeOfDay.ALL ]; + catchableSpecies[speciesId].push({ + biome: biome as Biome, + tier: tier as BiomePoolTier, + tod: timesOfDay as TimeOfDay[] + }); + for (const tod of timesOfDay) { if (!biomePokemonPools.hasOwnProperty(biome) || !biomePokemonPools[biome].hasOwnProperty(tier) || !biomePokemonPools[biome][tier].hasOwnProperty(tod)) { continue; diff --git a/src/data/balance/passives.ts b/src/data/balance/passives.ts index 60b50c7909c..f28b8bbdeea 100644 --- a/src/data/balance/passives.ts +++ b/src/data/balance/passives.ts @@ -1,7 +1,15 @@ import { Abilities } from "#app/enums/abilities"; import { Species } from "#app/enums/species"; -export const starterPassiveAbilities = { +export interface PassiveAbilities { + [key: number]: Abilities +} + +interface StarterPassiveAbilities { + [key: integer]: PassiveAbilities +} + +export const starterPassiveAbilities: StarterPassiveAbilities = { [Species.BULBASAUR]: { 0: Abilities.GRASSY_SURGE }, [Species.CHARMANDER]: { 0: Abilities.BEAST_BOOST }, [Species.SQUIRTLE]: { 0: Abilities.STURDY }, diff --git a/src/data/balance/tms.ts b/src/data/balance/tms.ts index da900768987..e44f7bf44bf 100644 --- a/src/data/balance/tms.ts +++ b/src/data/balance/tms.ts @@ -68433,6 +68433,46 @@ export const tmSpecies: TmSpecies = { ], }; +interface SpeciesTmMoves { + [key: integer]: (Moves | [string | Species, Moves])[]; +} + +function transposeTmSpecies(): SpeciesTmMoves { + const flipped: SpeciesTmMoves = {}; + + for (const move in tmSpecies) { + const moveKey = Number(move); + const speciesList = tmSpecies[move]; + + for (const species of speciesList) { + + if (Array.isArray(species)) { + // Extract base species and all associated forms + const [ baseSpecies, ...forms ] = species; + const speciesKey = Number(baseSpecies); + + if (!flipped[speciesKey]) { + flipped[speciesKey] = []; + } + + for (const form of forms) { + flipped[speciesKey].push([ form, moveKey ]); + } + + } else { + const speciesKey = Number(species); + if (!flipped[speciesKey]) { + flipped[speciesKey] = []; + } + flipped[speciesKey].push(moveKey); + } + } + } + return flipped; +} + +export const speciesTmMoves: SpeciesTmMoves = transposeTmSpecies(); + interface TmPoolTiers { [key: integer]: ModifierTier } From 0d1dacbc7ab619f409db258d7405a9e87b237610 Mon Sep 17 00:00:00 2001 From: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com> Date: Mon, 3 Feb 2025 22:21:49 -0600 Subject: [PATCH 5/7] [Bug] Fix softlock caused by shields down preventing faint status (#5252) --- src/data/ability.ts | 2 +- src/test/abilities/shields_down.test.ts | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index 8f0698e38b9..2c5d6949a67 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -2861,7 +2861,7 @@ export class PreSetStatusEffectImmunityAbAttr extends PreSetStatusAbAttr { * @returns A boolean indicating the result of the status application. */ applyPreSetStatus(pokemon: Pokemon, passive: boolean, simulated: boolean, effect: StatusEffect, cancelled: Utils.BooleanHolder, args: any[]): boolean { - if (this.immuneEffects.length < 1 || this.immuneEffects.includes(effect)) { + if (effect !== StatusEffect.FAINT && this.immuneEffects.length < 1 || this.immuneEffects.includes(effect)) { cancelled.value = true; return true; } diff --git a/src/test/abilities/shields_down.test.ts b/src/test/abilities/shields_down.test.ts index 6ffc28c37ab..ca6d945824e 100644 --- a/src/test/abilities/shields_down.test.ts +++ b/src/test/abilities/shields_down.test.ts @@ -189,4 +189,19 @@ describe("Abilities - SHIELDS DOWN", () => { } ); + test("should not prevent minior from receiving the fainted status effect in trainer battles", async () => { + game.override.enemyMoveset([ Moves.TACKLE ]); + game.override.moveset([ Moves.THUNDERBOLT ]); + game.override.startingLevel(100); + game.override.startingWave(5); + game.override.enemySpecies(Species.MINIOR); + await game.classicMode.startBattle([ Species.REGIELEKI ]); + const minior = game.scene.getEnemyPokemon()!; + + game.move.select(Moves.THUNDERBOLT); + await game.toNextTurn(); + expect(minior.isFainted()).toBe(true); + expect(minior.status?.effect).toBe(StatusEffect.FAINT); + }); + }); From 8d043a9f5540c988d45635e06b44102eb8aae050 Mon Sep 17 00:00:00 2001 From: Wlowscha <54003515+Wlowscha@users.noreply.github.com> Date: Wed, 5 Feb 2025 01:56:13 +0100 Subject: [PATCH 6/7] [Refactor] Replace all instances of `integer` with `number` (#5250) * Replaced instances of "integer" with "number" --- docs/enemy-ai.md | 4 +- src/account.ts | 4 +- src/battle-scene.ts | 98 +++++------ src/data/ability.ts | 108 ++++++------- src/data/balance/biomes.ts | 26 +-- src/data/balance/passives.ts | 2 +- src/data/balance/pokemon-evolutions.ts | 16 +- src/data/balance/pokemon-level-moves.ts | 8 +- src/data/balance/tms.ts | 6 +- src/data/battle-anims.ts | 94 +++++------ src/data/battler-tags.ts | 4 +- src/data/challenge.ts | 26 +-- src/data/daily-run.ts | 10 +- src/data/dialogue.ts | 2 +- src/data/egg.ts | 4 +- src/data/exp.ts | 6 +- src/data/move.ts | 118 +++++++------- .../utils/encounter-pokemon-utils.ts | 2 +- src/data/pokeball.ts | 2 +- src/data/pokemon-species.ts | 2 +- src/data/terrain.ts | 6 +- src/data/trainer-config.ts | 30 ++-- src/data/trainer-names.ts | 2 +- src/data/type.ts | 2 +- src/data/variant.ts | 4 +- src/data/weather.ts | 6 +- src/events/egg.ts | 2 +- src/field/anims.ts | 10 +- src/field/arena.ts | 24 +-- src/field/damage-number-handler.ts | 2 +- src/field/mystery-encounter-intro.ts | 8 +- src/field/pokemon.ts | 152 +++++++++--------- src/field/trainer.ts | 26 +-- src/game-mode.ts | 34 ++-- src/modifier/modifier-type.ts | 120 +++++++------- src/overrides.ts | 4 +- src/phases/attempt-capture-phase.ts | 6 +- src/phases/check-switch-phase.ts | 4 +- src/phases/command-phase.ts | 8 +- src/phases/common-anim-phase.ts | 2 +- src/phases/damage-anim-phase.ts | 6 +- src/phases/egg-hatch-phase.ts | 14 +- src/phases/encounter-phase.ts | 2 +- src/phases/enemy-command-phase.ts | 4 +- .../enemy-party-member-pokemon-phase.ts | 2 +- src/phases/evolution-phase.ts | 14 +- src/phases/exp-phase.ts | 2 +- src/phases/learn-move-phase.ts | 4 +- src/phases/message-phase.ts | 6 +- src/phases/party-member-pokemon-phase.ts | 6 +- .../player-party-member-pokemon-phase.ts | 2 +- src/phases/pokemon-heal-phase.ts | 4 +- src/phases/pokemon-phase.ts | 6 +- src/phases/return-phase.ts | 2 +- src/phases/scan-ivs-phase.ts | 4 +- src/phases/select-biome-phase.ts | 4 +- src/phases/select-modifier-phase.ts | 18 +-- src/phases/select-starter-phase.ts | 4 +- src/phases/select-target-phase.ts | 2 +- src/phases/show-party-exp-bar-phase.ts | 2 +- src/phases/stat-stage-change-phase.ts | 6 +- src/phases/summon-missing-phase.ts | 2 +- src/phases/summon-phase.ts | 2 +- src/phases/switch-phase.ts | 6 +- src/phases/switch-summon-phase.ts | 4 +- src/phases/title-phase.ts | 6 +- src/phases/victory-phase.ts | 2 +- src/pipelines/sprite.ts | 10 +- src/scene-base.ts | 2 +- src/system/achv.ts | 30 ++-- src/system/challenge-data.ts | 6 +- src/system/egg-data.ts | 6 +- src/system/game-data.ts | 124 +++++++------- src/system/game-stats.ts | 74 ++++----- src/system/modifier-data.ts | 2 +- src/system/pokemon-data.ts | 36 ++--- src/system/session-history.ts | 8 +- src/system/settings/settings-gamepad.ts | 2 +- src/system/settings/settings-keyboard.ts | 2 +- src/system/settings/settings.ts | 2 +- src/system/trainer-data.ts | 2 +- src/test/eggs/egg.test.ts | 2 +- src/test/eggs/manaphy-egg.test.ts | 2 +- .../clowning-around-encounter.test.ts | 2 +- src/test/utils/TextInterceptor.ts | 4 +- src/test/utils/gameManager.ts | 4 +- src/test/utils/helpers/moveHelper.ts | 2 +- src/test/utils/inputsHandler.ts | 6 +- .../utils/mocks/mocksContainer/mockText.ts | 8 +- src/test/utils/testUtils.ts | 2 +- src/ui/abstact-option-select-ui-handler.ts | 14 +- src/ui/achvs-ui-handler.ts | 12 +- src/ui/autocomplete-ui-handler.ts | 2 +- src/ui/ball-ui-handler.ts | 2 +- src/ui/battle-info.ts | 18 +-- src/ui/battle-message-ui-handler.ts | 12 +- src/ui/candy-bar.ts | 2 +- src/ui/challenges-select-ui-handler.ts | 6 +- src/ui/command-ui-handler.ts | 10 +- src/ui/confirm-ui-handler.ts | 10 +- src/ui/daily-run-scoreboard.ts | 14 +- src/ui/dropdown.ts | 2 +- src/ui/egg-gacha-ui-handler.ts | 12 +- src/ui/egg-hatch-scene-handler.ts | 2 +- src/ui/evolution-scene-handler.ts | 2 +- src/ui/fight-ui-handler.ts | 10 +- src/ui/game-stats-ui-handler.ts | 2 +- src/ui/menu-ui-handler.ts | 6 +- src/ui/message-ui-handler.ts | 16 +- src/ui/modifier-select-ui-handler.ts | 24 +-- src/ui/party-exp-bar.ts | 2 +- src/ui/party-ui-handler.ts | 40 ++--- src/ui/pokemon-info-container.ts | 6 +- src/ui/run-info-ui-handler.ts | 6 +- src/ui/save-slot-select-ui-handler.ts | 18 +-- .../settings/abstract-binding-ui-handler.ts | 2 +- .../settings/abstract-settings-ui-handler.ts | 2 +- src/ui/settings/option-select-ui-handler.ts | 2 +- src/ui/starter-select-ui-handler.ts | 30 ++-- src/ui/stats-container.ts | 10 +- src/ui/summary-ui-handler.ts | 10 +- src/ui/target-select-ui-handler.ts | 4 +- src/ui/text.ts | 4 +- src/ui/ui-handler.ts | 8 +- src/ui/ui-theme.ts | 2 +- src/ui/ui.ts | 12 +- src/utils.ts | 34 ++-- 127 files changed, 919 insertions(+), 919 deletions(-) diff --git a/docs/enemy-ai.md b/docs/enemy-ai.md index 46482f56a90..8edf5a3f10e 100644 --- a/docs/enemy-ai.md +++ b/docs/enemy-ai.md @@ -80,8 +80,8 @@ As part of the move selection process, the enemy Pokémon must compute a **targe A move's UBS and TBS are computed with the respective functions in the `Move` class: ```ts -getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer; -getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer; +getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number; +getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): number; ``` Logically, these functions are very similar – they add up their respective benefit scores from each of the move's attributes (as determined by `attr.getUserBenefitScore`, and `attr.getTargetBenefitScore`, respectively) and return the total benefit score. However, there are two key functional differences in how the UBS and TBS of a move are handled: diff --git a/src/account.ts b/src/account.ts index 316645b38ff..4c86595a5e6 100644 --- a/src/account.ts +++ b/src/account.ts @@ -11,8 +11,8 @@ export function initLoggedInUser(): void { loggedInUser = { username: "Guest", lastSessionSlot: -1, discordId: "", googleId: "", hasAdminRole: false }; } -export function updateUserInfo(): Promise<[boolean, integer]> { - return new Promise<[boolean, integer]>(resolve => { +export function updateUserInfo(): Promise<[boolean, number]> { + return new Promise<[boolean, number]>(resolve => { if (bypassLogin) { loggedInUser = { username: "Guest", lastSessionSlot: -1, discordId: "", googleId: "", hasAdminRole: false }; let lastSessionSlot = -1; diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 2c67c4d2cde..82ee785896c 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -118,7 +118,7 @@ export const bypassLogin = import.meta.env.VITE_BYPASS_LOGIN === "1"; const DEBUG_RNG = false; -const OPP_IVS_OVERRIDE_VALIDATED : integer[] = ( +const OPP_IVS_OVERRIDE_VALIDATED : number[] = ( Array.isArray(Overrides.OPP_IVS_OVERRIDE) ? Overrides.OPP_IVS_OVERRIDE : new Array(6).fill(Overrides.OPP_IVS_OVERRIDE) @@ -134,7 +134,7 @@ interface StarterColors { } export interface PokeballCounts { - [pb: string]: integer; + [pb: string]: number; } export type AnySound = Phaser.Sound.WebAudioSound | Phaser.Sound.HTML5AudioSound | Phaser.Sound.NoAudioSound; @@ -149,15 +149,15 @@ export default class BattleScene extends SceneBase { public inputController: InputsController; public uiInputs: UiInputs; - public sessionPlayTime: integer | null = null; - public lastSavePlayTime: integer | null = null; + public sessionPlayTime: number | null = null; + public lastSavePlayTime: number | null = null; public masterVolume: number = 0.5; public bgmVolume: number = 1; public fieldVolume: number = 1; public seVolume: number = 1; public uiVolume: number = 1; - public gameSpeed: integer = 1; - public damageNumbersMode: integer = 0; + public gameSpeed: number = 1; + public damageNumbersMode: number = 0; public reroll: boolean = false; public shopCursorTarget: number = ShopCursorTarget.REWARDS; public commandCursorMemory: boolean = false; @@ -176,16 +176,16 @@ export default class BattleScene extends SceneBase { * - 1 = 'Passives Only' * - 2 = 'On' */ - public candyUpgradeNotification: integer = 0; + public candyUpgradeNotification: number = 0; /** * Determines what type of notification is used for Candy Upgrades * - 0 = 'Icon' * - 1 = 'Animation' */ - public candyUpgradeDisplay: integer = 0; + public candyUpgradeDisplay: number = 0; public moneyFormat: MoneyFormat = MoneyFormat.NORMAL; public uiTheme: UiTheme = UiTheme.DEFAULT; - public windowType: integer = 0; + public windowType: number = 0; public experimentalSprites: boolean = false; public musicPreference: number = MusicPreference.ALLGENS; public moveAnimations: boolean = true; @@ -212,7 +212,7 @@ export default class BattleScene extends SceneBase { * @default 0 - Uses the default normal experience gain display. */ public expParty: ExpNotification = 0; - public hpBarSpeed: integer = 0; + public hpBarSpeed: number = 0; public fusionPaletteSwaps: boolean = true; public enableTouchControls: boolean = false; public enableVibration: boolean = false; @@ -223,7 +223,7 @@ export default class BattleScene extends SceneBase { * - 0 = 'Switch' * - 1 = 'Set' - The option to switch the active pokemon at the start of a battle will not display. */ - public battleStyle: integer = BattleStyle.SWITCH; + public battleStyle: number = BattleStyle.SWITCH; /** * Defines whether or not to show type effectiveness hints @@ -235,7 +235,7 @@ export default class BattleScene extends SceneBase { public disableMenu: boolean = false; public gameData: GameData; - public sessionSlotId: integer; + public sessionSlotId: number; /** PhaseQueue: dequeue/remove the first element to get the next phase */ public phaseQueue: Phase[]; @@ -244,7 +244,7 @@ export default class BattleScene extends SceneBase { private phaseQueuePrepend: Phase[]; /** overrides default of inserting phases to end of phaseQueuePrepend array, useful or inserting Phases "out of order" */ - private phaseQueuePrependSpliceIndex: integer; + private phaseQueuePrependSpliceIndex: number; private nextCommandPhaseQueue: Phase[]; private currentPhase: Phase | null; @@ -265,13 +265,13 @@ export default class BattleScene extends SceneBase { public arenaNextEnemy: ArenaBase; public arena: Arena; public gameMode: GameMode; - public score: integer; + public score: number; public lockModifierTiers: boolean; public trainer: Phaser.GameObjects.Sprite; public lastEnemyTrainer: Trainer | null; public currentBattle: Battle; public pokeballCounts: PokeballCounts; - public money: integer; + public money: number; public pokemonInfoContainer: PokemonInfoContainer; private party: PlayerPokemon[]; /** Session save data that pertains to Mystery Encounters */ @@ -300,7 +300,7 @@ export default class BattleScene extends SceneBase { public seed: string; public waveSeed: string; - public waveCycleOffset: integer; + public waveCycleOffset: number; public offsetGym: boolean; public damageNumberHandler: DamageNumberHandler; @@ -314,9 +314,9 @@ export default class BattleScene extends SceneBase { private bgmCache: Set = new Set(); private playTimeTimer: Phaser.Time.TimerEvent; - public rngCounter: integer = 0; + public rngCounter: number = 0; public rngSeedOverride: string = ""; - public rngOffset: integer = 0; + public rngOffset: number = 0; public inputMethod: string; private infoToggles: InfoToggle[] = []; @@ -717,7 +717,7 @@ export default class BattleScene extends SceneBase { const traverseVariantData = (keys: string[]) => { let variantTree = variantData; let expTree = expVariantData; - keys.map((k: string, i: integer) => { + keys.map((k: string, i: number) => { if (i < keys.length - 1) { variantTree = variantTree[k]; expTree = expTree[k]; @@ -926,12 +926,12 @@ export default class BattleScene extends SceneBase { return activeOnly ? this.infoToggles.filter(t => t?.isActive()) : this.infoToggles; } - getPokemonById(pokemonId: integer): Pokemon | null { + getPokemonById(pokemonId: number): Pokemon | null { const findInParty = (party: Pokemon[]) => party.find(p => p.id === pokemonId); return (findInParty(this.getPlayerParty()) || findInParty(this.getEnemyParty())) ?? null; } - addPlayerPokemon(species: PokemonSpecies, level: integer, abilityIndex?: integer, formIndex?: integer, gender?: Gender, shiny?: boolean, variant?: Variant, ivs?: integer[], nature?: Nature, dataSource?: Pokemon | PokemonData, postProcess?: (playerPokemon: PlayerPokemon) => void): PlayerPokemon { + addPlayerPokemon(species: PokemonSpecies, level: number, abilityIndex?: number, formIndex?: number, gender?: Gender, shiny?: boolean, variant?: Variant, ivs?: number[], nature?: Nature, dataSource?: Pokemon | PokemonData, postProcess?: (playerPokemon: PlayerPokemon) => void): PlayerPokemon { const pokemon = new PlayerPokemon(species, level, abilityIndex, formIndex, gender, shiny, variant, ivs, nature, dataSource); if (postProcess) { postProcess(pokemon); @@ -940,7 +940,7 @@ export default class BattleScene extends SceneBase { return pokemon; } - addEnemyPokemon(species: PokemonSpecies, level: integer, trainerSlot: TrainerSlot, boss: boolean = false, shinyLock: boolean = false, dataSource?: PokemonData, postProcess?: (enemyPokemon: EnemyPokemon) => void): EnemyPokemon { + addEnemyPokemon(species: PokemonSpecies, level: number, trainerSlot: TrainerSlot, boss: boolean = false, shinyLock: boolean = false, dataSource?: PokemonData, postProcess?: (enemyPokemon: EnemyPokemon) => void): EnemyPokemon { if (Overrides.OPP_LEVEL_OVERRIDE > 0) { level = Overrides.OPP_LEVEL_OVERRIDE; } @@ -1092,7 +1092,7 @@ export default class BattleScene extends SceneBase { * @param min The minimum integer to pick, default `0` * @returns A random integer between {@linkcode min} and ({@linkcode min} + {@linkcode range} - 1) */ - randBattleSeedInt(range: integer, min: integer = 0): integer { + randBattleSeedInt(range: number, min: number = 0): number { return this.currentBattle?.randSeedInt(range, min); } @@ -1217,7 +1217,7 @@ export default class BattleScene extends SceneBase { return Math.max(doubleChance.value, 1); } - newBattle(waveIndex?: integer, battleType?: BattleType, trainerData?: TrainerData, double?: boolean, mysteryEncounterType?: MysteryEncounterType): Battle | null { + newBattle(waveIndex?: number, battleType?: BattleType, trainerData?: TrainerData, double?: boolean, mysteryEncounterType?: MysteryEncounterType): Battle | null { const _startingWave = Overrides.STARTING_WAVE_OVERRIDE || startingWave; const newWaveIndex = waveIndex || ((this.currentBattle?.waveIndex || (_startingWave - 1)) + 1); let newDouble: boolean | undefined; @@ -1443,7 +1443,7 @@ export default class BattleScene extends SceneBase { }); } - getSpeciesFormIndex(species: PokemonSpecies, gender?: Gender, nature?: Nature, ignoreArena?: boolean): integer { + getSpeciesFormIndex(species: PokemonSpecies, gender?: Gender, nature?: Nature, ignoreArena?: boolean): number { if (!species.forms?.length) { return 0; } @@ -1540,7 +1540,7 @@ export default class BattleScene extends SceneBase { return ret; } - private getGeneratedWaveCycleOffset(): integer { + private getGeneratedWaveCycleOffset(): number { let ret = 0; this.executeWithSeedOffset(() => { ret = Utils.randSeedInt(8) * 5; @@ -1548,7 +1548,7 @@ export default class BattleScene extends SceneBase { return ret; } - getEncounterBossSegments(waveIndex: integer, level: integer, species?: PokemonSpecies, forceBoss: boolean = false): integer { + getEncounterBossSegments(waveIndex: number, level: number, species?: PokemonSpecies, forceBoss: boolean = false): number { if (Overrides.OPP_HEALTH_SEGMENTS_OVERRIDE > 1) { return Overrides.OPP_HEALTH_SEGMENTS_OVERRIDE; } else if (Overrides.OPP_HEALTH_SEGMENTS_OVERRIDE === 1) { @@ -1572,7 +1572,7 @@ export default class BattleScene extends SceneBase { return 0; } - let ret: integer = 2; + let ret: number = 2; if (level >= 100) { ret++; @@ -1589,7 +1589,7 @@ export default class BattleScene extends SceneBase { trySpreadPokerus(): void { const party = this.getPlayerParty(); - const infectedIndexes: integer[] = []; + const infectedIndexes: number[] = []; const spread = (index: number, spreadTo: number) => { const partyMember = party[index + spreadTo]; if (!partyMember.pokerus && !Utils.randSeedInt(10)) { @@ -1613,7 +1613,7 @@ export default class BattleScene extends SceneBase { }); } - resetSeed(waveIndex?: integer): void { + resetSeed(waveIndex?: number): void { const wave = waveIndex || this.currentBattle?.waveIndex || 0; this.waveSeed = Utils.shiftCharCodes(this.seed, wave); Phaser.Math.RND.sow([ this.waveSeed ]); @@ -1621,7 +1621,7 @@ export default class BattleScene extends SceneBase { this.rngCounter = 0; } - executeWithSeedOffset(func: Function, offset: integer, seedOverride?: string): void { + executeWithSeedOffset(func: Function, offset: number, seedOverride?: string): void { if (!func) { return; } @@ -1669,7 +1669,7 @@ export default class BattleScene extends SceneBase { this.arenaFlyout.toggleFlyout(pressed); } - showFieldOverlay(duration: integer): Promise { + showFieldOverlay(duration: number): Promise { return new Promise(resolve => { this.tweens.add({ targets: this.fieldOverlay, @@ -1681,7 +1681,7 @@ export default class BattleScene extends SceneBase { }); } - hideFieldOverlay(duration: integer): Promise { + hideFieldOverlay(duration: number): Promise { return new Promise(resolve => { this.tweens.add({ targets: this.fieldOverlay, @@ -1701,7 +1701,7 @@ export default class BattleScene extends SceneBase { } } - showShopOverlay(duration: integer): Promise { + showShopOverlay(duration: number): Promise { this.shopOverlayShown = true; return new Promise(resolve => { this.tweens.add({ @@ -1714,7 +1714,7 @@ export default class BattleScene extends SceneBase { }); } - hideShopOverlay(duration: integer): Promise { + hideShopOverlay(duration: number): Promise { this.shopOverlayShown = false; return new Promise(resolve => { this.tweens.add({ @@ -1803,7 +1803,7 @@ export default class BattleScene extends SceneBase { }); } - hideLuckText(duration: integer): void { + hideLuckText(duration: number): void { if (this.reroll) { return; } @@ -1843,7 +1843,7 @@ export default class BattleScene extends SceneBase { } addFaintedEnemyScore(enemy: EnemyPokemon): void { - let scoreIncrease = enemy.getSpeciesForm().getBaseExp() * (enemy.level / this.getMaxExpLevel()) * ((enemy.ivs.reduce((iv: integer, total: integer) => total += iv, 0) / 93) * 0.2 + 0.8); + let scoreIncrease = enemy.getSpeciesForm().getBaseExp() * (enemy.level / this.getMaxExpLevel()) * ((enemy.ivs.reduce((iv: number, total: number) => total += iv, 0) / 93) * 0.2 + 0.8); this.findModifiers(m => m instanceof PokemonHeldItemModifier && m.pokemonId === enemy.id, false).map(m => scoreIncrease *= (m as PokemonHeldItemModifier).getScoreMultiplier()); if (enemy.isBoss()) { scoreIncrease *= Math.sqrt(enemy.bossSegments); @@ -1851,7 +1851,7 @@ export default class BattleScene extends SceneBase { this.currentBattle.battleScore += Math.ceil(scoreIncrease); } - getMaxExpLevel(ignoreLevelCap: boolean = false): integer { + getMaxExpLevel(ignoreLevelCap: boolean = false): number { if (Overrides.LEVEL_CAP_OVERRIDE > 0) { return Overrides.LEVEL_CAP_OVERRIDE; } else if (ignoreLevelCap || Overrides.LEVEL_CAP_OVERRIDE < 0) { @@ -1863,7 +1863,7 @@ export default class BattleScene extends SceneBase { return Math.ceil(baseLevel / 2) * 2 + 2; } - randomSpecies(waveIndex: integer, level: integer, fromArenaPool?: boolean, speciesFilter?: PokemonSpeciesFilter, filterAllEvolutions?: boolean): PokemonSpecies { + randomSpecies(waveIndex: number, level: number, fromArenaPool?: boolean, speciesFilter?: PokemonSpeciesFilter, filterAllEvolutions?: boolean): PokemonSpecies { if (fromArenaPool) { return this.arena.randomSpecies(waveIndex, level, undefined, getPartyLuckValue(this.party)); } @@ -1878,13 +1878,13 @@ export default class BattleScene extends SceneBase { return filteredSpecies[Utils.randSeedInt(filteredSpecies.length)]; } - generateRandomBiome(waveIndex: integer): Biome { + generateRandomBiome(waveIndex: number): Biome { const relWave = waveIndex % 250; const biomes = Utils.getEnumValues(Biome).filter(b => b !== Biome.TOWN && b !== Biome.END); const maxDepth = biomeDepths[Biome.END][0] - 2; const depthWeights = new Array(maxDepth + 1).fill(null) - .map((_, i: integer) => ((1 - Math.min(Math.abs((i / (maxDepth - 1)) - (relWave / 250)) + 0.25, 1)) / 0.75) * 250); - const biomeThresholds: integer[] = []; + .map((_, i: number) => ((1 - Math.min(Math.abs((i / (maxDepth - 1)) - (relWave / 250)) + 0.25, 1)) / 0.75) * 250); + const biomeThresholds: number[] = []; let totalWeight = 0; for (const biome of biomes) { totalWeight += Math.ceil(depthWeights[biomeDepths[biome][0] - 1] / biomeDepths[biome][1]); @@ -2008,7 +2008,7 @@ export default class BattleScene extends SceneBase { } } - fadeOutBgm(duration: integer = 500, destroy: boolean = true): boolean { + fadeOutBgm(duration: number = 500, destroy: boolean = true): boolean { if (!this.bgm) { return false; } @@ -2075,7 +2075,7 @@ export default class BattleScene extends SceneBase { } } - playSoundWithoutBgm(soundName: string, pauseDuration?: integer): AnySound { + playSoundWithoutBgm(soundName: string, pauseDuration?: number): AnySound { this.bgmCache.add(soundName); const resumeBgm = this.pauseBgm(); this.playSound(soundName); @@ -2535,7 +2535,7 @@ export default class BattleScene extends SceneBase { * @param promptDelay optional param for MessagePhase constructor * @param defer boolean for which queue to add it to, false -> add to PhaseQueuePrepend, true -> nextCommandPhaseQueue */ - queueMessage(message: string, callbackDelay?: integer | null, prompt?: boolean | null, promptDelay?: integer | null, defer?: boolean | null) { + queueMessage(message: string, callbackDelay?: number | null, prompt?: boolean | null, promptDelay?: number | null, defer?: boolean | null) { const phase = new MessagePhase(message, callbackDelay, prompt, promptDelay); if (!defer) { // adds to the end of PhaseQueuePrepend @@ -2557,14 +2557,14 @@ export default class BattleScene extends SceneBase { this.phaseQueue.push(new TurnInitPhase()); } - addMoney(amount: integer): void { + addMoney(amount: number): void { this.money = Math.min(this.money + amount, Number.MAX_SAFE_INTEGER); this.updateMoneyText(); this.animateMoneyChanged(true); this.validateAchvs(MoneyAchv); } - getWaveMoneyAmount(moneyMultiplier: number): integer { + getWaveMoneyAmount(moneyMultiplier: number): number { const waveIndex = this.currentBattle.waveIndex; const waveSetIndex = Math.ceil(waveIndex / 10) - 1; const moneyValue = Math.pow((waveSetIndex + 1 + (0.75 + (((waveIndex - 1) % 10) + 1) / 10)) * 100, 1 + 0.005 * waveSetIndex) * moneyMultiplier; @@ -2761,7 +2761,7 @@ export default class BattleScene extends SceneBase { }); } - removePartyMemberModifiers(partyMemberIndex: integer): Promise { + removePartyMemberModifiers(partyMemberIndex: number): Promise { return new Promise(resolve => { const pokemonId = this.getPlayerParty()[partyMemberIndex].id; const modifiersToRemove = this.modifiers.filter(m => m instanceof PokemonHeldItemModifier && (m as PokemonHeldItemModifier).pokemonId === pokemonId); @@ -2793,7 +2793,7 @@ export default class BattleScene extends SceneBase { } } - party.forEach((enemyPokemon: EnemyPokemon, i: integer) => { + party.forEach((enemyPokemon: EnemyPokemon, i: number) => { if (heldModifiersConfigs && i < heldModifiersConfigs.length && heldModifiersConfigs[i]) { heldModifiersConfigs[i].forEach(mt => { let modifier: PokemonHeldItemModifier; diff --git a/src/data/ability.ts b/src/data/ability.ts index 2c5d6949a67..5020123622e 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -51,13 +51,13 @@ export class Ability implements Localizable { private nameAppend: string; public name: string; public description: string; - public generation: integer; + public generation: number; public isBypassFaint: boolean; public isIgnorable: boolean; public attrs: AbAttr[]; public conditions: AbAttrCondition[]; - constructor(id: Abilities, generation: integer) { + constructor(id: Abilities, generation: number) { this.id = id; this.nameAppend = ""; @@ -221,9 +221,9 @@ export class PostBattleInitAbAttr extends AbAttr { } export class PostBattleInitFormChangeAbAttr extends PostBattleInitAbAttr { - private formFunc: (p: Pokemon) => integer; + private formFunc: (p: Pokemon) => number; - constructor(formFunc: ((p: Pokemon) => integer)) { + constructor(formFunc: ((p: Pokemon) => number)) { super(true); this.formFunc = formFunc; @@ -491,9 +491,9 @@ class TypeImmunityStatStageChangeAbAttr extends TypeImmunityAbAttr { class TypeImmunityAddBattlerTagAbAttr extends TypeImmunityAbAttr { private tagType: BattlerTagType; - private turnCount: integer; + private turnCount: number; - constructor(immuneType: Type, tagType: BattlerTagType, turnCount: integer, condition?: AbAttrCondition) { + constructor(immuneType: Type, tagType: BattlerTagType, turnCount: number, condition?: AbAttrCondition) { super(immuneType, condition); this.tagType = tagType; @@ -605,7 +605,7 @@ export class FieldPriorityMoveImmunityAbAttr extends PreDefendAbAttr { } export class PostStatStageChangeAbAttr extends AbAttr { - applyPostStatStageChange(pokemon: Pokemon, simulated: boolean, statsChanged: BattleStat[], stagesChanged: integer, selfTarget: boolean, args: any[]): boolean | Promise { + applyPostStatStageChange(pokemon: Pokemon, simulated: boolean, statsChanged: BattleStat[], stagesChanged: number, selfTarget: boolean, args: any[]): boolean | Promise { return false; } } @@ -866,10 +866,10 @@ export class PostDefendTerrainChangeAbAttr extends PostDefendAbAttr { } export class PostDefendContactApplyStatusEffectAbAttr extends PostDefendAbAttr { - public chance: integer; + public chance: number; private effects: StatusEffect[]; - constructor(chance: integer, ...effects: StatusEffect[]) { + constructor(chance: number, ...effects: StatusEffect[]) { super(); this.chance = chance; @@ -905,11 +905,11 @@ export class EffectSporeAbAttr extends PostDefendContactApplyStatusEffectAbAttr } export class PostDefendContactApplyTagChanceAbAttr extends PostDefendAbAttr { - private chance: integer; + private chance: number; private tagType: BattlerTagType; - private turnCount: integer | undefined; + private turnCount: number | undefined; - constructor(chance: integer, tagType: BattlerTagType, turnCount?: integer) { + constructor(chance: number, tagType: BattlerTagType, turnCount?: number) { super(); this.tagType = tagType; @@ -959,9 +959,9 @@ export class PostDefendCritStatStageChangeAbAttr extends PostDefendAbAttr { } export class PostDefendContactDamageAbAttr extends PostDefendAbAttr { - private damageRatio: integer; + private damageRatio: number; - constructor(damageRatio: integer) { + constructor(damageRatio: number) { super(); this.damageRatio = damageRatio; @@ -993,9 +993,9 @@ export class PostDefendContactDamageAbAttr extends PostDefendAbAttr { * @extends {PostDefendAbAttr} */ export class PostDefendPerishSongAbAttr extends PostDefendAbAttr { - private turns: integer; + private turns: number; - constructor(turns: integer) { + constructor(turns: number) { super(); this.turns = turns; @@ -1101,11 +1101,11 @@ export class PostDefendAbilityGiveAbAttr extends PostDefendAbAttr { } export class PostDefendMoveDisableAbAttr extends PostDefendAbAttr { - private chance: integer; + private chance: number; private attacker: Pokemon; private move: Move; - constructor(chance: integer) { + constructor(chance: number) { super(); this.chance = chance; @@ -1688,10 +1688,10 @@ export class PostAttackStealHeldItemAbAttr extends PostAttackAbAttr { export class PostAttackApplyStatusEffectAbAttr extends PostAttackAbAttr { private contactRequired: boolean; - private chance: integer; + private chance: number; private effects: StatusEffect[]; - constructor(contactRequired: boolean, chance: integer, ...effects: StatusEffect[]) { + constructor(contactRequired: boolean, chance: number, ...effects: StatusEffect[]) { super(); this.contactRequired = contactRequired; @@ -1715,18 +1715,18 @@ export class PostAttackApplyStatusEffectAbAttr extends PostAttackAbAttr { } export class PostAttackContactApplyStatusEffectAbAttr extends PostAttackApplyStatusEffectAbAttr { - constructor(chance: integer, ...effects: StatusEffect[]) { + constructor(chance: number, ...effects: StatusEffect[]) { super(true, chance, ...effects); } } export class PostAttackApplyBattlerTagAbAttr extends PostAttackAbAttr { private contactRequired: boolean; - private chance: (user: Pokemon, target: Pokemon, move: Move) => integer; + private chance: (user: Pokemon, target: Pokemon, move: Move) => number; private effects: BattlerTagType[]; - constructor(contactRequired: boolean, chance: (user: Pokemon, target: Pokemon, move: Move) => integer, ...effects: BattlerTagType[]) { + constructor(contactRequired: boolean, chance: (user: Pokemon, target: Pokemon, move: Move) => number, ...effects: BattlerTagType[]) { super(); this.contactRequired = contactRequired; @@ -1863,9 +1863,9 @@ class PostVictoryStatStageChangeAbAttr extends PostVictoryAbAttr { } export class PostVictoryFormChangeAbAttr extends PostVictoryAbAttr { - private formFunc: (p: Pokemon) => integer; + private formFunc: (p: Pokemon) => number; - constructor(formFunc: ((p: Pokemon) => integer)) { + constructor(formFunc: ((p: Pokemon) => number)) { super(true); this.formFunc = formFunc; @@ -2081,9 +2081,9 @@ export class PostSummonUnnamedMessageAbAttr extends PostSummonAbAttr { export class PostSummonAddBattlerTagAbAttr extends PostSummonAbAttr { private tagType: BattlerTagType; - private turnCount: integer; + private turnCount: number; - constructor(tagType: BattlerTagType, turnCount: integer, showAbility?: boolean) { + constructor(tagType: BattlerTagType, turnCount: number, showAbility?: boolean) { super(showAbility); this.tagType = tagType; @@ -2209,9 +2209,9 @@ export class PostSummonClearAllyStatStagesAbAttr extends PostSummonAbAttr { * @see {applyPostSummon} */ export class DownloadAbAttr extends PostSummonAbAttr { - private enemyDef: integer; - private enemySpDef: integer; - private enemyCountTally: integer; + private enemyDef: number; + private enemySpDef: number; + private enemyCountTally: number; private stats: BattleStat[]; /** @@ -2295,9 +2295,9 @@ export class PostSummonTerrainChangeAbAttr extends PostSummonAbAttr { } export class PostSummonFormChangeAbAttr extends PostSummonAbAttr { - private formFunc: (p: Pokemon) => integer; + private formFunc: (p: Pokemon) => number; - constructor(formFunc: ((p: Pokemon) => integer)) { + constructor(formFunc: ((p: Pokemon) => number)) { super(true); this.formFunc = formFunc; @@ -2715,9 +2715,9 @@ export class PreSwitchOutHealAbAttr extends PreSwitchOutAbAttr { * @see {@linkcode applyPreSwitchOut} */ export class PreSwitchOutFormChangeAbAttr extends PreSwitchOutAbAttr { - private formFunc: (p: Pokemon) => integer; + private formFunc: (p: Pokemon) => number; - constructor(formFunc: ((p: Pokemon) => integer)) { + constructor(formFunc: ((p: Pokemon) => number)) { super(); this.formFunc = formFunc; @@ -3338,10 +3338,10 @@ export class PostWeatherChangeFormChangeAbAttr extends PostWeatherChangeAbAttr { export class PostWeatherChangeAddBattlerTagAttr extends PostWeatherChangeAbAttr { private tagType: BattlerTagType; - private turnCount: integer; + private turnCount: number; private weatherTypes: WeatherType[]; - constructor(tagType: BattlerTagType, turnCount: integer, ...weatherTypes: WeatherType[]) { + constructor(tagType: BattlerTagType, turnCount: number, ...weatherTypes: WeatherType[]) { super(); this.tagType = tagType; @@ -3382,9 +3382,9 @@ export class PostWeatherLapseAbAttr extends AbAttr { } export class PostWeatherLapseHealAbAttr extends PostWeatherLapseAbAttr { - private healFactor: integer; + private healFactor: number; - constructor(healFactor: integer, ...weatherTypes: WeatherType[]) { + constructor(healFactor: number, ...weatherTypes: WeatherType[]) { super(...weatherTypes); this.healFactor = healFactor; @@ -3405,9 +3405,9 @@ export class PostWeatherLapseHealAbAttr extends PostWeatherLapseAbAttr { } export class PostWeatherLapseDamageAbAttr extends PostWeatherLapseAbAttr { - private damageFactor: integer; + private damageFactor: number; - constructor(damageFactor: integer, ...weatherTypes: WeatherType[]) { + constructor(damageFactor: number, ...weatherTypes: WeatherType[]) { super(...weatherTypes); this.damageFactor = damageFactor; @@ -3436,10 +3436,10 @@ export class PostTerrainChangeAbAttr extends AbAttr { export class PostTerrainChangeAddBattlerTagAttr extends PostTerrainChangeAbAttr { private tagType: BattlerTagType; - private turnCount: integer; + private turnCount: number; private terrainTypes: TerrainType[]; - constructor(tagType: BattlerTagType, turnCount: integer, ...terrainTypes: TerrainType[]) { + constructor(tagType: BattlerTagType, turnCount: number, ...terrainTypes: TerrainType[]) { super(); this.tagType = tagType; @@ -3692,9 +3692,9 @@ export class PostTurnHealAbAttr extends PostTurnAbAttr { } export class PostTurnFormChangeAbAttr extends PostTurnAbAttr { - private formFunc: (p: Pokemon) => integer; + private formFunc: (p: Pokemon) => number; - constructor(formFunc: ((p: Pokemon) => integer)) { + constructor(formFunc: ((p: Pokemon) => number)) { super(true); this.formFunc = formFunc; @@ -3916,9 +3916,9 @@ export class PostItemLostApplyBattlerTagAbAttr extends PostItemLostAbAttr { } export class StatStageChangeMultiplierAbAttr extends AbAttr { - private multiplier: integer; + private multiplier: number; - constructor(multiplier: integer) { + constructor(multiplier: number) { super(true); this.multiplier = multiplier; @@ -4225,9 +4225,9 @@ export class PostFaintClearWeatherAbAttr extends PostFaintAbAttr { } export class PostFaintContactDamageAbAttr extends PostFaintAbAttr { - private damageRatio: integer; + private damageRatio: number; - constructor(damageRatio: integer) { + constructor(damageRatio: number) { super(); this.damageRatio = damageRatio; @@ -4404,9 +4404,9 @@ export class ReduceBerryUseThresholdAbAttr extends AbAttr { * Used for Heavy Metal (doubling weight) and Light Metal (halving weight) */ export class WeightMultiplierAbAttr extends AbAttr { - private multiplier: integer; + private multiplier: number; - constructor(multiplier: integer) { + constructor(multiplier: number) { super(); this.multiplier = multiplier; @@ -4700,12 +4700,12 @@ export class FormBlockDamageAbAttr extends ReceivedMoveDamageMultiplierAbAttr { * @extends AbAttr */ export class BypassSpeedChanceAbAttr extends AbAttr { - public chance: integer; + public chance: number; /** - * @param {integer} chance probability of ability being active. + * @param {number} chance probability of ability being active. */ - constructor(chance: integer) { + constructor(chance: number) { super(true); this.chance = chance; } @@ -5235,7 +5235,7 @@ export function applyPreStatStageChangeAbAttrs(attrType: Constructor, - pokemon: Pokemon, stats: BattleStat[], stages: integer, selfTarget: boolean, simulated: boolean = false, ...args: any[]): Promise { + pokemon: Pokemon, stats: BattleStat[], stages: number, selfTarget: boolean, simulated: boolean = false, ...args: any[]): Promise { return applyAbAttrsInternal(attrType, pokemon, (attr, _passive) => attr.applyPostStatStageChange(pokemon, simulated, stats, stages, selfTarget, args), args, false, simulated); } diff --git a/src/data/balance/biomes.ts b/src/data/balance/biomes.ts index 8913fd47e93..5b5e69b4042 100644 --- a/src/data/balance/biomes.ts +++ b/src/data/balance/biomes.ts @@ -26,11 +26,11 @@ export function getBiomeName(biome: Biome | -1) { } interface BiomeLinks { - [key: integer]: Biome | (Biome | [Biome, integer])[] + [key: number]: Biome | (Biome | [Biome, number])[] } interface BiomeDepths { - [key: integer]: [integer, integer] + [key: number]: [number, number] } export const biomeLinks: BiomeLinks = { @@ -87,19 +87,19 @@ export enum BiomePoolTier { export const uncatchableSpecies: Species[] = []; export interface SpeciesTree { - [key: integer]: Species[] + [key: number]: Species[] } export interface PokemonPools { - [key: integer]: (Species | SpeciesTree)[] + [key: number]: (Species | SpeciesTree)[] } export interface BiomeTierPokemonPools { - [key: integer]: PokemonPools + [key: number]: PokemonPools } export interface BiomePokemonPools { - [key: integer]: BiomeTierPokemonPools + [key: number]: BiomeTierPokemonPools } export interface BiomeTierTod { @@ -109,17 +109,17 @@ export interface BiomeTierTod { } export interface CatchableSpecies{ - [key: integer]: BiomeTierTod[] + [key: number]: BiomeTierTod[] } export const catchableSpecies: CatchableSpecies = {}; export interface BiomeTierTrainerPools { - [key: integer]: TrainerType[] + [key: number]: TrainerType[] } export interface BiomeTrainerPools { - [key: integer]: BiomeTierTrainerPools + [key: number]: BiomeTierTrainerPools } export const biomePokemonPools: BiomePokemonPools = { @@ -7675,15 +7675,15 @@ export function initBiomes() { biomeDepths[Biome.TOWN] = [ 0, 1 ]; - const traverseBiome = (biome: Biome, depth: integer) => { + const traverseBiome = (biome: Biome, depth: number) => { if (biome === Biome.END) { const biomeList = Object.keys(Biome).filter(key => !isNaN(Number(key))); biomeList.pop(); // Removes Biome.END from the list const randIndex = Utils.randSeedInt(biomeList.length, 1); // Will never be Biome.TOWN biome = Biome[biomeList[randIndex]]; } - const linkedBiomes: (Biome | [ Biome, integer ])[] = Array.isArray(biomeLinks[biome]) - ? biomeLinks[biome] as (Biome | [ Biome, integer ])[] + const linkedBiomes: (Biome | [ Biome, number ])[] = Array.isArray(biomeLinks[biome]) + ? biomeLinks[biome] as (Biome | [ Biome, number ])[] : [ biomeLinks[biome] as Biome ]; for (const linkedBiomeEntry of linkedBiomes) { const linkedBiome = !Array.isArray(linkedBiomeEntry) @@ -7700,7 +7700,7 @@ export function initBiomes() { }; traverseBiome(Biome.TOWN, 0); - biomeDepths[Biome.END] = [ Object.values(biomeDepths).map(d => d[0]).reduce((max: integer, value: integer) => Math.max(max, value), 0) + 1, 1 ]; + biomeDepths[Biome.END] = [ Object.values(biomeDepths).map(d => d[0]).reduce((max: number, value: number) => Math.max(max, value), 0) + 1, 1 ]; for (const biome of Utils.getEnumValues(Biome)) { biomePokemonPools[biome] = {}; diff --git a/src/data/balance/passives.ts b/src/data/balance/passives.ts index f28b8bbdeea..3b30a629a4b 100644 --- a/src/data/balance/passives.ts +++ b/src/data/balance/passives.ts @@ -6,7 +6,7 @@ export interface PassiveAbilities { } interface StarterPassiveAbilities { - [key: integer]: PassiveAbilities + [key: number]: PassiveAbilities } export const starterPassiveAbilities: StarterPassiveAbilities = { diff --git a/src/data/balance/pokemon-evolutions.ts b/src/data/balance/pokemon-evolutions.ts index a8fe3b5f4ab..9cc693dc33c 100644 --- a/src/data/balance/pokemon-evolutions.ts +++ b/src/data/balance/pokemon-evolutions.ts @@ -77,9 +77,9 @@ export enum EvolutionItem { /** * Pokemon Evolution tuple type consisting of: * @property 0 {@linkcode Species} The species of the Pokemon. - * @property 1 {@linkcode integer} The level at which the Pokemon evolves. + * @property 1 {@linkcode number} The level at which the Pokemon evolves. */ -export type EvolutionLevel = [species: Species, level: integer]; +export type EvolutionLevel = [species: Species, level: number]; export type EvolutionConditionPredicate = (p: Pokemon) => boolean; export type EvolutionConditionEnforceFunc = (p: Pokemon) => void; @@ -88,12 +88,12 @@ export class SpeciesFormEvolution { public speciesId: Species; public preFormKey: string | null; public evoFormKey: string | null; - public level: integer; + public level: number; public item: EvolutionItem | null; public condition: SpeciesEvolutionCondition | null; public wildDelay: SpeciesWildEvolutionDelay; - constructor(speciesId: Species, preFormKey: string | null, evoFormKey: string | null, level: integer, item: EvolutionItem | null, condition: SpeciesEvolutionCondition | null, wildDelay?: SpeciesWildEvolutionDelay) { + constructor(speciesId: Species, preFormKey: string | null, evoFormKey: string | null, level: number, item: EvolutionItem | null, condition: SpeciesEvolutionCondition | null, wildDelay?: SpeciesWildEvolutionDelay) { this.speciesId = speciesId; this.preFormKey = preFormKey; this.evoFormKey = evoFormKey; @@ -105,7 +105,7 @@ export class SpeciesFormEvolution { } export class SpeciesEvolution extends SpeciesFormEvolution { - constructor(speciesId: Species, level: integer, item: EvolutionItem | null, condition: SpeciesEvolutionCondition | null, wildDelay?: SpeciesWildEvolutionDelay) { + constructor(speciesId: Species, level: number, item: EvolutionItem | null, condition: SpeciesEvolutionCondition | null, wildDelay?: SpeciesWildEvolutionDelay) { super(speciesId, null, null, level, item, condition, wildDelay); } } @@ -169,7 +169,7 @@ class MoveEvolutionCondition extends SpeciesEvolutionCondition { } class FriendshipEvolutionCondition extends SpeciesEvolutionCondition { - public amount: integer; + public amount: number; constructor(amount: number) { super(p => p.friendship >= amount); this.amount = amount; @@ -178,7 +178,7 @@ class FriendshipEvolutionCondition extends SpeciesEvolutionCondition { } class FriendshipTimeOfDayEvolutionCondition extends SpeciesEvolutionCondition { - public amount: integer; + public amount: number; public timesOfDay: TimeOfDay[]; constructor(amount: number, tod: "day" | "night") { if (tod === "day") { @@ -197,7 +197,7 @@ class FriendshipTimeOfDayEvolutionCondition extends SpeciesEvolutionCondition { } class FriendshipMoveTypeEvolutionCondition extends SpeciesEvolutionCondition { - public amount: integer; + public amount: number; public type: Type; constructor(amount: number, type: Type) { super(p => p.friendship >= amount && !!p.getMoveset().find(m => m?.getMove().type === type)); diff --git a/src/data/balance/pokemon-level-moves.ts b/src/data/balance/pokemon-level-moves.ts index 8fe61da35c0..dcbc2fb0c0d 100644 --- a/src/data/balance/pokemon-level-moves.ts +++ b/src/data/balance/pokemon-level-moves.ts @@ -1,18 +1,18 @@ import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -export type LevelMoves = ([integer, Moves])[]; +export type LevelMoves = ([number, Moves])[]; interface PokemonSpeciesLevelMoves { - [key: integer]: LevelMoves + [key: number]: LevelMoves } interface PokemonFormLevelMoves { - [key: integer]: LevelMoves + [key: number]: LevelMoves } interface PokemonSpeciesFormLevelMoves { - [key: integer]: PokemonFormLevelMoves + [key: number]: PokemonFormLevelMoves } /** Moves that can only be learned with a memory-mushroom */ diff --git a/src/data/balance/tms.ts b/src/data/balance/tms.ts index e44f7bf44bf..788ffd4f273 100644 --- a/src/data/balance/tms.ts +++ b/src/data/balance/tms.ts @@ -3,7 +3,7 @@ import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; interface TmSpecies { - [key: integer]: Array> + [key: number]: Array> } export const reverseCompatibleTms: Moves[] = [];/*[ @@ -68434,7 +68434,7 @@ export const tmSpecies: TmSpecies = { }; interface SpeciesTmMoves { - [key: integer]: (Moves | [string | Species, Moves])[]; + [key: number]: (Moves | [string | Species, Moves])[]; } function transposeTmSpecies(): SpeciesTmMoves { @@ -68474,7 +68474,7 @@ function transposeTmSpecies(): SpeciesTmMoves { export const speciesTmMoves: SpeciesTmMoves = transposeTmSpecies(); interface TmPoolTiers { - [key: integer]: ModifierTier + [key: number]: ModifierTier } export const tmPoolTiers: TmPoolTiers = { diff --git a/src/data/battle-anims.ts b/src/data/battle-anims.ts index c3da8db57c4..99e9e82d4a6 100644 --- a/src/data/battle-anims.ts +++ b/src/data/battle-anims.ts @@ -106,15 +106,15 @@ export enum CommonAnim { } export class AnimConfig { - public id: integer; + public id: number; public graphic: string; public frames: AnimFrame[][]; - public frameTimedEvents: Map; - public position: integer; - public hue: integer; + public frameTimedEvents: Map; + public position: number; + public hue: number; constructor(source?: any) { - this.frameTimedEvents = new Map; + this.frameTimedEvents = new Map; if (source) { this.id = source.id; @@ -195,18 +195,18 @@ class AnimFrame { public visible: boolean; public blendType: AnimBlendType; public target: AnimFrameTarget; - public graphicFrame: integer; - public opacity: integer; - public color: integer[]; - public tone: integer[]; - public flash: integer[]; + public graphicFrame: number; + public opacity: number; + public color: number[]; + public tone: number[]; + public flash: number[]; public locked: boolean; - public priority: integer; + public priority: number; public focus: AnimFocus; - constructor(x: number, y: number, zoomX: number, zoomY: number, angle: number, mirror: boolean, visible: boolean, blendType: AnimBlendType, pattern: integer, - opacity: integer, colorR: integer, colorG: integer, colorB: integer, colorA: integer, toneR: integer, toneG: integer, toneB: integer, toneA: integer, - flashR: integer, flashG: integer, flashB: integer, flashA: integer, locked: boolean, priority: integer, focus: AnimFocus, init?: boolean) { + constructor(x: number, y: number, zoomX: number, zoomY: number, angle: number, mirror: boolean, visible: boolean, blendType: AnimBlendType, pattern: number, + opacity: number, colorR: number, colorG: number, colorB: number, colorA: number, toneR: number, toneG: number, toneB: number, toneA: number, + flashR: number, flashG: number, flashB: number, flashA: number, locked: boolean, priority: number, focus: AnimFocus, init?: boolean) { this.x = !init ? ((x || 0) - 128) * 0.5 : x; this.y = !init ? ((y || 0) - 224) * 0.5 : y; if (zoomX) { @@ -288,9 +288,9 @@ class AnimFrame { class ImportedAnimFrame extends AnimFrame { constructor(source: any) { - const color: integer[] = source.color || [ 0, 0, 0, 0 ]; - const tone: integer[] = source.tone || [ 0, 0, 0, 0 ]; - const flash: integer[] = source.flash || [ 0, 0, 0, 0 ]; + const color: number[] = source.color || [ 0, 0, 0, 0 ]; + const tone: number[] = source.tone || [ 0, 0, 0, 0 ]; + const flash: number[] = source.flash || [ 0, 0, 0, 0 ]; super(source.x, source.y, source.zoomX, source.zoomY, source.angle, source.mirror, source.visible, source.blendType, source.graphicFrame, source.opacity, color[0], color[1], color[2], color[3], tone[0], tone[1], tone[2], tone[3], flash[0], flash[1], flash[2], flash[3], source.locked, source.priority, source.focus, true); this.target = source.target; this.graphicFrame = source.graphicFrame; @@ -298,15 +298,15 @@ class ImportedAnimFrame extends AnimFrame { } abstract class AnimTimedEvent { - public frameIndex: integer; + public frameIndex: number; public resourceName: string; - constructor(frameIndex: integer, resourceName: string) { + constructor(frameIndex: number, resourceName: string) { this.frameIndex = frameIndex; this.resourceName = resourceName; } - abstract execute(battleAnim: BattleAnim, priority?: number): integer; + abstract execute(battleAnim: BattleAnim, priority?: number): number; abstract getEventType(): string; } @@ -315,7 +315,7 @@ class AnimTimedSoundEvent extends AnimTimedEvent { public volume: number = 100; public pitch: number = 100; - constructor(frameIndex: integer, resourceName: string, source?: any) { + constructor(frameIndex: number, resourceName: string, source?: any) { super(frameIndex, resourceName); if (source) { @@ -324,7 +324,7 @@ class AnimTimedSoundEvent extends AnimTimedEvent { } } - execute(battleAnim: BattleAnim, priority?: number): integer { + execute(battleAnim: BattleAnim, priority?: number): number { const soundConfig = { rate: (this.pitch * 0.01), volume: (this.volume * 0.01) }; if (this.resourceName) { try { @@ -346,20 +346,20 @@ class AnimTimedSoundEvent extends AnimTimedEvent { abstract class AnimTimedBgEvent extends AnimTimedEvent { public bgX: number = 0; public bgY: number = 0; - public opacity: integer = 0; - /*public colorRed: integer = 0; - public colorGreen: integer = 0; - public colorBlue: integer = 0; - public colorAlpha: integer = 0;*/ - public duration: integer = 0; - /*public flashScope: integer = 0; - public flashRed: integer = 0; - public flashGreen: integer = 0; - public flashBlue: integer = 0; - public flashAlpha: integer = 0; - public flashDuration: integer = 0;*/ + public opacity: number = 0; + /*public colorRed: number = 0; + public colorGreen: number = 0; + public colorBlue: number = 0; + public colorAlpha: number = 0;*/ + public duration: number = 0; + /*public flashScope: number = 0; + public flashRed: number = 0; + public flashGreen: number = 0; + public flashBlue: number = 0; + public flashAlpha: number = 0; + public flashDuration: number = 0;*/ - constructor(frameIndex: integer, resourceName: string, source: any) { + constructor(frameIndex: number, resourceName: string, source: any) { super(frameIndex, resourceName); if (source) { @@ -382,11 +382,11 @@ abstract class AnimTimedBgEvent extends AnimTimedEvent { } class AnimTimedUpdateBgEvent extends AnimTimedBgEvent { - constructor(frameIndex: integer, resourceName: string, source?: any) { + constructor(frameIndex: number, resourceName: string, source?: any) { super(frameIndex, resourceName, source); } - execute(moveAnim: MoveAnim, priority?: number): integer { + execute(moveAnim: MoveAnim, priority?: number): number { const tweenProps = {}; if (this.bgX !== undefined) { tweenProps["x"] = (this.bgX * 0.5) - 320; @@ -412,11 +412,11 @@ class AnimTimedUpdateBgEvent extends AnimTimedBgEvent { } class AnimTimedAddBgEvent extends AnimTimedBgEvent { - constructor(frameIndex: integer, resourceName: string, source?: any) { + constructor(frameIndex: number, resourceName: string, source?: any) { super(frameIndex, resourceName, source); } - execute(moveAnim: MoveAnim, priority?: number): integer { + execute(moveAnim: MoveAnim, priority?: number): number { if (moveAnim.bgSprite) { moveAnim.bgSprite.destroy(); } @@ -737,7 +737,7 @@ function isReversed(src1: number, src2: number, dst1: number, dst2: number) { } interface SpriteCache { - [key: integer]: Phaser.GameObjects.Sprite[] + [key: number]: Phaser.GameObjects.Sprite[] } export abstract class BattleAnim { @@ -774,8 +774,8 @@ export abstract class BattleAnim { return false; } - private getGraphicFrameData(frames: AnimFrame[], onSubstitute?: boolean): Map> { - const ret: Map> = new Map([ + private getGraphicFrameData(frames: AnimFrame[], onSubstitute?: boolean): Map> { + const ret: Map> = new Map([ [ AnimFrameTarget.GRAPHIC, new Map() ], [ AnimFrameTarget.USER, new Map() ], [ AnimFrameTarget.TARGET, new Map() ] @@ -853,7 +853,7 @@ export abstract class BattleAnim { [AnimFrameTarget.USER]: [], [AnimFrameTarget.TARGET]: [] }; - const spritePriorities: integer[] = []; + const spritePriorities: number[] = []; const cleanUpAndComplete = () => { userSprite.setPosition(0, 0); @@ -993,7 +993,7 @@ export abstract class BattleAnim { const moveSprite = sprites[graphicIndex]; if (spritePriorities[graphicIndex] !== frame.priority) { spritePriorities[graphicIndex] = frame.priority; - const setSpritePriority = (priority: integer) => { + const setSpritePriority = (priority: number) => { switch (priority) { case 0: globalScene.field.moveBelow(moveSprite as Phaser.GameObjects.GameObject, globalScene.getEnemyPokemon(false) ?? globalScene.getPlayerPokemon(false)!); // TODO: is this bang correct? @@ -1093,8 +1093,8 @@ export abstract class BattleAnim { }); } - private getGraphicFrameDataWithoutTarget(frames: AnimFrame[], targetInitialX: number, targetInitialY: number): Map> { - const ret: Map> = new Map([ + private getGraphicFrameDataWithoutTarget(frames: AnimFrame[], targetInitialX: number, targetInitialY: number): Map> { + const ret: Map> = new Map([ [ AnimFrameTarget.GRAPHIC, new Map() ], [ AnimFrameTarget.USER, new Map() ], [ AnimFrameTarget.TARGET, new Map() ] @@ -1188,7 +1188,7 @@ export abstract class BattleAnim { const graphicIndex = graphicFrameCount++; const moveSprite = sprites[graphicIndex]; if (!isNullOrUndefined(frame.priority)) { - const setSpritePriority = (priority: integer) => { + const setSpritePriority = (priority: number) => { if (existingFieldSprites.length > priority) { // Move to specified priority index const index = globalScene.field.getIndex(existingFieldSprites[priority]); diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index 4c68de5abc5..17dc34aa514 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -137,7 +137,7 @@ export interface TerrainBattlerTag { * to select restricted moves. */ export abstract class MoveRestrictionBattlerTag extends BattlerTag { - constructor(tagType: BattlerTagType, lapseType: BattlerTagLapseType | BattlerTagLapseType[], turnCount: integer, sourceMove?: Moves, sourceId?: integer) { + constructor(tagType: BattlerTagType, lapseType: BattlerTagLapseType | BattlerTagLapseType[], turnCount: number, sourceMove?: Moves, sourceId?: number) { super(tagType, lapseType, turnCount, sourceMove, sourceId); } @@ -2559,7 +2559,7 @@ export class SubstituteTag extends BattlerTag { /** Is the source Pokemon "in focus," i.e. is it fully visible on the field? */ public sourceInFocus: boolean; - constructor(sourceMove: Moves, sourceId: integer) { + constructor(sourceMove: Moves, sourceId: number) { super(BattlerTagType.SUBSTITUTE, [ BattlerTagLapseType.PRE_MOVE, BattlerTagLapseType.AFTER_MOVE, BattlerTagLapseType.HIT ], 0, sourceMove, sourceId, true); } diff --git a/src/data/challenge.ts b/src/data/challenge.ts index 2b2048ca18d..10fb9c55d3d 100644 --- a/src/data/challenge.ts +++ b/src/data/challenge.ts @@ -115,17 +115,17 @@ export enum MoveSourceType { export abstract class Challenge { public id: Challenges; // The id of the challenge - public value: integer; // The "strength" of the challenge, all challenges have a numerical value. - public maxValue: integer; // The maximum strength of the challenge. - public severity: integer; // The current severity of the challenge. Some challenges have multiple severities in addition to strength. - public maxSeverity: integer; // The maximum severity of the challenge. + public value: number; // The "strength" of the challenge, all challenges have a numerical value. + public maxValue: number; // The maximum strength of the challenge. + public severity: number; // The current severity of the challenge. Some challenges have multiple severities in addition to strength. + public maxSeverity: number; // The maximum severity of the challenge. public conditions: ChallengeCondition[]; /** * @param id {@link Challenges} The enum value for the challenge */ - constructor(id: Challenges, maxValue: integer = Number.MAX_SAFE_INTEGER) { + constructor(id: Challenges, maxValue: number = Number.MAX_SAFE_INTEGER) { this.id = id; this.value = 0; @@ -180,7 +180,7 @@ export abstract class Challenge { /** * Returns the textual representation of a challenge's current value. - * @param overrideValue {@link integer} The value to check for. If undefined, gets the current value. + * @param overrideValue {@link number} The value to check for. If undefined, gets the current value. * @returns {@link string} The localised name for the current value. */ getValue(overrideValue?: number): string { @@ -190,7 +190,7 @@ export abstract class Challenge { /** * Returns the description of a challenge's current value. - * @param overrideValue {@link integer} The value to check for. If undefined, gets the current value. + * @param overrideValue {@link number} The value to check for. If undefined, gets the current value. * @returns {@link string} The localised description for the current value. */ getDescription(overrideValue?: number): string { @@ -257,7 +257,7 @@ export abstract class Challenge { * Gets the "difficulty" value of this challenge. * @returns {@link integer} The difficulty value. */ - getDifficulty(): integer { + getDifficulty(): number { return this.value; } @@ -265,7 +265,7 @@ export abstract class Challenge { * Gets the minimum difficulty added by this challenge. * @returns {@link integer} The difficulty value. */ - getMinDifficulty(): integer { + getMinDifficulty(): number { return 0; } @@ -643,7 +643,7 @@ export class SingleTypeChallenge extends Challenge { * @param {value} overrideValue The value to check for. If undefined, gets the current value. * @returns {string} The localised name for the current value. */ - getValue(overrideValue?: integer): string { + getValue(overrideValue?: number): string { if (overrideValue === undefined) { overrideValue = this.value; } @@ -655,7 +655,7 @@ export class SingleTypeChallenge extends Challenge { * @param {value} overrideValue The value to check for. If undefined, gets the current value. * @returns {string} The localised description for the current value. */ - getDescription(overrideValue?: integer): string { + getDescription(overrideValue?: number): string { if (overrideValue === undefined) { overrideValue = this.value; } @@ -793,7 +793,7 @@ export class LowerStarterMaxCostChallenge extends Challenge { /** * @override */ - getValue(overrideValue?: integer): string { + getValue(overrideValue?: number): string { if (overrideValue === undefined) { overrideValue = this.value; } @@ -827,7 +827,7 @@ export class LowerStarterPointsChallenge extends Challenge { /** * @override */ - getValue(overrideValue?: integer): string { + getValue(overrideValue?: number): string { if (overrideValue === undefined) { overrideValue = this.value; } diff --git a/src/data/daily-run.ts b/src/data/daily-run.ts index 2a4a78a9caf..df6c08fc0f0 100644 --- a/src/data/daily-run.ts +++ b/src/data/daily-run.ts @@ -11,7 +11,7 @@ import { pokerogueApi } from "#app/plugins/api/pokerogue-api"; import { Biome } from "#app/enums/biome"; export interface DailyRunConfig { - seed: integer; + seed: number; starters: Starter; } @@ -38,7 +38,7 @@ export function getDailyRunStarters(seed: string): Starter[] { return; } - const starterCosts: integer[] = []; + const starterCosts: number[] = []; starterCosts.push(Math.min(Math.round(3.5 + Math.abs(Utils.randSeedGauss(1))), 8)); starterCosts.push(Utils.randSeedInt(9 - starterCosts[0], 1)); starterCosts.push(10 - (starterCosts[0] + starterCosts[1])); @@ -57,7 +57,7 @@ export function getDailyRunStarters(seed: string): Starter[] { return starters; } -function getDailyRunStarter(starterSpeciesForm: PokemonSpeciesForm, startingLevel: integer): Starter { +function getDailyRunStarter(starterSpeciesForm: PokemonSpeciesForm, startingLevel: number): Starter { const starterSpecies = starterSpeciesForm instanceof PokemonSpecies ? starterSpeciesForm : getPokemonSpecies(starterSpeciesForm.speciesId); const formIndex = starterSpeciesForm instanceof PokemonSpecies ? undefined : starterSpeciesForm.formIndex; const pokemon = new PlayerPokemon(starterSpecies, startingLevel, undefined, formIndex, undefined, undefined, undefined, undefined, undefined, undefined); @@ -74,7 +74,7 @@ function getDailyRunStarter(starterSpeciesForm: PokemonSpeciesForm, startingLeve } interface BiomeWeights { - [key: integer]: integer + [key: number]: number } // Initially weighted by amount of exits each biome has @@ -125,7 +125,7 @@ export function getDailyStartingBiome(): Biome { const biomes = Utils.getEnumValues(Biome).filter(b => b !== Biome.TOWN && b !== Biome.END); let totalWeight = 0; - const biomeThresholds: integer[] = []; + const biomeThresholds: number[] = []; for (const biome of biomes) { // Keep track of the total weight totalWeight += dailyBiomeWeights[biome]; diff --git a/src/data/dialogue.ts b/src/data/dialogue.ts index b42850fe4de..f4933a070fd 100644 --- a/src/data/dialogue.ts +++ b/src/data/dialogue.ts @@ -9,7 +9,7 @@ export interface TrainerTypeMessages { } export interface TrainerTypeDialogue { - [key: integer]: TrainerTypeMessages | Array + [key: number]: TrainerTypeMessages | Array } export function getTrainerTypeDialogue(): TrainerTypeDialogue { diff --git a/src/data/egg.ts b/src/data/egg.ts index 2599994ecf6..380b5ddabfe 100644 --- a/src/data/egg.ts +++ b/src/data/egg.ts @@ -373,8 +373,8 @@ export class Egg { } } - let minStarterValue: integer; - let maxStarterValue: integer; + let minStarterValue: number; + let maxStarterValue: number; switch (this.tier) { case EggTier.RARE: diff --git a/src/data/exp.ts b/src/data/exp.ts index c03abddadfc..0f5d3e62cef 100644 --- a/src/data/exp.ts +++ b/src/data/exp.ts @@ -16,7 +16,7 @@ const expLevels = [ [ 0, 4, 13, 32, 65, 112, 178, 276, 393, 540, 745, 967, 1230, 1591, 1957, 2457, 3046, 3732, 4526, 5440, 6482, 7666, 9003, 10506, 12187, 14060, 16140, 18439, 20974, 23760, 26811, 30146, 33780, 37731, 42017, 46656, 50653, 55969, 60505, 66560, 71677, 78533, 84277, 91998, 98415, 107069, 114205, 123863, 131766, 142500, 151222, 163105, 172697, 185807, 196322, 210739, 222231, 238036, 250562, 267840, 281456, 300293, 315059, 335544, 351520, 373744, 390991, 415050, 433631, 459620, 479600, 507617, 529063, 559209, 582187, 614566, 639146, 673863, 700115, 737280, 765275, 804997, 834809, 877201, 908905, 954084, 987754, 1035837, 1071552, 1122660, 1160499, 1214753, 1254796, 1312322, 1354652, 1415577, 1460276, 1524731, 1571884, 1640000 ] ]; -export function getLevelTotalExp(level: integer, growthRate: GrowthRate): integer { +export function getLevelTotalExp(level: number, growthRate: GrowthRate): number { if (level < 100) { const levelExp = expLevels[growthRate][level - 1]; if (growthRate !== GrowthRate.MEDIUM_FAST) { @@ -25,7 +25,7 @@ export function getLevelTotalExp(level: integer, growthRate: GrowthRate): intege return levelExp; } - let ret: integer; + let ret: number; switch (growthRate) { case GrowthRate.ERRATIC: @@ -55,7 +55,7 @@ export function getLevelTotalExp(level: integer, growthRate: GrowthRate): intege return Math.floor(ret); } -export function getLevelRelExp(level: integer, growthRate: GrowthRate): number { +export function getLevelRelExp(level: number, growthRate: GrowthRate): number { return getLevelTotalExp(level, growthRate) - getLevelTotalExp(level - 1, growthRate); } diff --git a/src/data/move.ts b/src/data/move.ts index 9219272267c..6d327ec5dc1 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -687,7 +687,7 @@ export default class Move implements Localizable { * @param move {@linkcode Move} using the move * @returns integer representing the total benefitScore */ - getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { + getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number { let score = 0; for (const attr of this.attrs) { @@ -708,7 +708,7 @@ export default class Move implements Localizable { * @param move {@linkcode Move} using the move * @returns integer representing the total benefitScore */ - getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { + getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): number { let score = 0; if (target.getAlly()?.getTag(BattlerTagType.COMMANDED)?.getSourcePokemon() === target) { @@ -875,7 +875,7 @@ export default class Move implements Localizable { } export class AttackMove extends Move { - constructor(id: Moves, type: Type, category: MoveCategory, power: integer, accuracy: integer, pp: integer, chance: integer, priority: integer, generation: integer) { + constructor(id: Moves, type: Type, category: MoveCategory, power: number, accuracy: number, pp: number, chance: number, priority: number, generation: number) { super(id, type, category, MoveTarget.NEAR_OTHER, power, accuracy, pp, chance, priority, generation); /** @@ -887,7 +887,7 @@ export class AttackMove extends Move { } } - getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { + getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): number { let ret = super.getTargetBenefitScore(user, target, move); let attackScore = 0; @@ -932,13 +932,13 @@ export class AttackMove extends Move { } export class StatusMove extends Move { - constructor(id: Moves, type: Type, accuracy: integer, pp: integer, chance: integer, priority: integer, generation: integer) { + constructor(id: Moves, type: Type, accuracy: number, pp: number, chance: number, priority: number, generation: number) { super(id, type, MoveCategory.STATUS, MoveTarget.NEAR_OTHER, -1, accuracy, pp, chance, priority, generation); } } export class SelfStatusMove extends Move { - constructor(id: Moves, type: Type, accuracy: integer, pp: integer, chance: integer, priority: integer, generation: integer) { + constructor(id: Moves, type: Type, accuracy: number, pp: number, chance: number, priority: number, generation: number) { super(id, type, MoveCategory.STATUS, MoveTarget.USER, -1, accuracy, pp, chance, priority, generation); } } @@ -1074,7 +1074,7 @@ export abstract class MoveAttr { * @see {@linkcode EnemyPokemon.getNextMove} * @virtual */ - getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { + getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number { return 0; } @@ -1083,7 +1083,7 @@ export abstract class MoveAttr { * @see {@linkcode EnemyPokemon.getNextMove} * @virtual */ - getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { + getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): number { return 0; } } @@ -1201,7 +1201,7 @@ export class MoveEffectAttr extends MoveAttr { * @param selfEffect `true` if move targets user. * @returns Move effect chance value. */ - getMoveChance(user: Pokemon, target: Pokemon, move: Move, selfEffect?: Boolean, showAbility?: Boolean): integer { + getMoveChance(user: Pokemon, target: Pokemon, move: Move, selfEffect?: Boolean, showAbility?: Boolean): number { const moveChance = new Utils.NumberHolder(this.effectChanceOverride ?? move.chance); applyAbAttrs(MoveEffectChanceMultiplierAbAttr, user, null, false, moveChance, move, target, selfEffect, showAbility); @@ -1330,7 +1330,7 @@ export class HighCritAttr extends MoveAttr { return true; } - getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { + getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number { return 3; } } @@ -1342,15 +1342,15 @@ export class CritOnlyAttr extends MoveAttr { return true; } - getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { + getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number { return 5; } } export class FixedDamageAttr extends MoveAttr { - private damage: integer; + private damage: number; - constructor(damage: integer) { + constructor(damage: number) { super(); this.damage = damage; @@ -1362,7 +1362,7 @@ export class FixedDamageAttr extends MoveAttr { return true; } - getDamage(user: Pokemon, target: Pokemon, move: Move): integer { + getDamage(user: Pokemon, target: Pokemon, move: Move): number { return this.damage; } } @@ -1435,7 +1435,7 @@ export class MatchHpAttr extends FixedDamageAttr { } // TODO - /*getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { + /*getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number { return 0; }*/ } @@ -1446,7 +1446,7 @@ export class CounterDamageAttr extends FixedDamageAttr { private moveFilter: MoveFilter; private multiplier: number; - constructor(moveFilter: MoveFilter, multiplier: integer) { + constructor(moveFilter: MoveFilter, multiplier: number) { super(0); this.moveFilter = moveFilter; @@ -1454,7 +1454,7 @@ export class CounterDamageAttr extends FixedDamageAttr { } apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { - const damage = user.turnData.attacksReceived.filter(ar => this.moveFilter(allMoves[ar.move])).reduce((total: integer, ar: AttackMoveResult) => total + ar.damage, 0); + const damage = user.turnData.attacksReceived.filter(ar => this.moveFilter(allMoves[ar.move])).reduce((total: number, ar: AttackMoveResult) => total + ar.damage, 0); (args[0] as Utils.IntegerHolder).value = Utils.toDmgValue(damage * this.multiplier); return true; @@ -1493,7 +1493,7 @@ export class ModifiedDamageAttr extends MoveAttr { return true; } - getModifiedDamage(user: Pokemon, target: Pokemon, move: Move, damage: integer): integer { + getModifiedDamage(user: Pokemon, target: Pokemon, move: Move, damage: number): number { return damage; } } @@ -1507,7 +1507,7 @@ export class SurviveDamageAttr extends ModifiedDamageAttr { return (user, target, move) => target.hp > 1; } - getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { + getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number { return target.hp > 1 ? 0 : -20; } } @@ -1563,7 +1563,7 @@ export class RecoilAttr extends MoveEffectAttr { return true; } - getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { + getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number { return Math.floor((move.power / 5) / -4); } } @@ -1594,7 +1594,7 @@ export class SacrificialAttr extends MoveEffectAttr { return true; } - getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { + getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number { if (user.isBoss()) { return -20; } @@ -1632,7 +1632,7 @@ export class SacrificialAttrOnHit extends MoveEffectAttr { return true; } - getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { + getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number { if (user.isBoss()) { return -20; } @@ -1674,7 +1674,7 @@ export class HalfSacrificialAttr extends MoveEffectAttr { return true; } - getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { + getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number { if (user.isBoss()) { return -10; } @@ -1778,7 +1778,7 @@ export class HealAttr extends MoveEffectAttr { Utils.toDmgValue(target.getMaxHp() * healRatio), i18next.t("moveTriggers:healHp", { pokemonName: getPokemonNameWithAffix(target) }), true, !this.showAnim)); } - getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { + getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): number { const score = ((1 - (this.selfTarget ? user : target).getHpRatio()) * 20) - this.healRatio * 10; return Math.round(score / (1 - this.healRatio / 2)); } @@ -1870,7 +1870,7 @@ export class FlameBurstAttr extends MoveEffectAttr { return true; } - getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { + getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): number { return target.getAlly() ? -5 : 0; } } @@ -1893,7 +1893,7 @@ export class SacrificialFullRestoreAttr extends SacrificialAttr { // We don't know which party member will be chosen, so pick the highest max HP in the party const party = user.isPlayer() ? globalScene.getPlayerParty() : globalScene.getEnemyParty(); - const maxPartyMemberHp = party.map(p => p.getMaxHp()).reduce((maxHp: integer, hp: integer) => Math.max(hp, maxHp), 0); + const maxPartyMemberHp = party.map(p => p.getMaxHp()).reduce((maxHp: number, hp: number) => Math.max(hp, maxHp), 0); globalScene.pushPhase( new PokemonHealPhase( @@ -1911,7 +1911,7 @@ export class SacrificialFullRestoreAttr extends SacrificialAttr { return true; } - getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { + getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number { return -20; } @@ -2118,7 +2118,7 @@ export class HitHealAttr extends MoveEffectAttr { * @param move {@linkcode Move} being used * @returns an integer. Higher means enemy is more likely to use that move. */ - getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { + getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number { if (this.healStat) { const healAmount = target.getEffectiveStat(this.healStat); return Math.floor(Math.max(0, (Math.min(1, (healAmount + user.hp) / user.getMaxHp() - 0.33))) / user.getHpRatio()); @@ -2138,7 +2138,7 @@ export class IncrementMovePriorityAttr extends MoveAttr { /** The condition for a move's priority being incremented */ private moveIncrementFunc: (pokemon: Pokemon, target:Pokemon, move: Move) => boolean; /** The amount to increment priority by, if condition passes. */ - private increaseAmount: integer; + private increaseAmount: number; constructor(moveIncrementFunc: (pokemon: Pokemon, target:Pokemon, move: Move) => boolean, increaseAmount = 1) { super(); @@ -2222,7 +2222,7 @@ export class MultiHitAttr extends MoveAttr { * @param target {@linkcode Pokemon} targeted by the attack * @returns The number of hits this attack should deal */ - getHitCount(user: Pokemon, target: Pokemon): integer { + getHitCount(user: Pokemon, target: Pokemon): number { switch (this.multiHitType) { case MultiHitType._2_TO_5: { @@ -2669,7 +2669,7 @@ export class HealStatusEffectAttr extends MoveEffectAttr { return this.effects.includes(effect); } - getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { + getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number { return user.status ? 10 : 0; } } @@ -2690,7 +2690,7 @@ export class BypassSleepAttr extends MoveAttr { * @param target * @param move */ - getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { + getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number { return user.status && user.status.effect === StatusEffect.SLEEP ? 200 : -10; } } @@ -3060,11 +3060,11 @@ export class StatStageChangeAttr extends MoveEffectAttr { return false; } - getLevels(_user: Pokemon): integer { + getLevels(_user: Pokemon): number { return this.stages; } - getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { + getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): number { let ret = 0; const moveLevels = this.getLevels(user); for (const stat of this.stats) { @@ -3302,10 +3302,10 @@ export class GrowthStatStageChangeAttr extends StatStageChangeAttr { } export class CutHpStatStageBoostAttr extends StatStageChangeAttr { - private cutRatio: integer; + private cutRatio: number; private messageCallback: ((user: Pokemon) => void) | undefined; - constructor(stat: BattleStat[], levels: integer, cutRatio: integer, messageCallback?: ((user: Pokemon) => void) | undefined) { + constructor(stat: BattleStat[], levels: number, cutRatio: number, messageCallback?: ((user: Pokemon) => void) | undefined) { super(stat, levels, true); this.cutRatio = cutRatio; @@ -3655,7 +3655,7 @@ const doublePowerChanceMessageFunc = (user: Pokemon, target: Pokemon, move: Move export class DoublePowerChanceAttr extends VariablePowerAttr { apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { - let rand: integer; + let rand: number; globalScene.executeWithSeedOffset(() => rand = Utils.randSeedInt(100), globalScene.currentBattle.turn << 6, globalScene.waveSeed); if (rand! < move.chance) { const power = args[0] as Utils.NumberHolder; @@ -3668,7 +3668,7 @@ export class DoublePowerChanceAttr extends VariablePowerAttr { } export abstract class ConsecutiveUsePowerMultiplierAttr extends MovePowerMultiplierAttr { - constructor(limit: integer, resetOnFail: boolean, resetOnLimit?: boolean, ...comboMoves: Moves[]) { + constructor(limit: number, resetOnFail: boolean, resetOnLimit?: boolean, ...comboMoves: Moves[]) { super((user: Pokemon, target: Pokemon, move: Move): number => { const moveHistory = user.getLastXMoves(limit + 1).slice(1); @@ -3689,7 +3689,7 @@ export abstract class ConsecutiveUsePowerMultiplierAttr extends MovePowerMultipl }); } - abstract getMultiplier(count: integer): number; + abstract getMultiplier(count: number): number; } export class ConsecutiveUseDoublePowerAttr extends ConsecutiveUsePowerMultiplierAttr { @@ -3938,7 +3938,7 @@ export class MagnitudePowerAttr extends VariablePowerAttr { const magnitudeThresholds = [ 5, 15, 35, 65, 75, 95 ]; const magnitudePowers = [ 10, 30, 50, 70, 90, 100, 110, 150 ]; - let rand: integer; + let rand: number; globalScene.executeWithSeedOffset(() => rand = Utils.randSeedInt(100), globalScene.currentBattle.turn << 6, globalScene.waveSeed); @@ -4180,9 +4180,9 @@ const hasStockpileStacksCondition: MoveConditionFunc = (user) => { */ export class MultiHitPowerIncrementAttr extends VariablePowerAttr { /** The max number of base power increments allowed for this move */ - private maxHits: integer; + private maxHits: number; - constructor(maxHits: integer) { + constructor(maxHits: number) { super(); this.maxHits = maxHits; @@ -5251,12 +5251,12 @@ export class SemiInvulnerableAttr extends MoveEffectAttr { export class AddBattlerTagAttr extends MoveEffectAttr { public tagType: BattlerTagType; - public turnCountMin: integer; - public turnCountMax: integer; + public turnCountMin: number; + public turnCountMax: number; protected cancelOnFail: boolean; private failOnOverlap: boolean; - constructor(tagType: BattlerTagType, selfTarget: boolean = false, failOnOverlap: boolean = false, turnCountMin: integer = 0, turnCountMax?: integer, lastHitOnly: boolean = false, cancelOnFail: boolean = false) { + constructor(tagType: BattlerTagType, selfTarget: boolean = false, failOnOverlap: boolean = false, turnCountMin: number = 0, turnCountMax?: number, lastHitOnly: boolean = false, cancelOnFail: boolean = false) { super(selfTarget, { lastHitOnly: lastHitOnly }); this.tagType = tagType; @@ -5293,7 +5293,7 @@ export class AddBattlerTagAttr extends MoveEffectAttr { : null; } - getTagTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer | void { + getTagTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): number | void { switch (this.tagType) { case BattlerTagType.RECHARGING: case BattlerTagType.PERISH_SONG: @@ -5340,7 +5340,7 @@ export class AddBattlerTagAttr extends MoveEffectAttr { } } - getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { + getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): number { let moveChance = this.getMoveChance(user, target, move, this.selfTarget, false); if (moveChance < 0) { moveChance = 100; @@ -5407,7 +5407,7 @@ export class GulpMissileTagAttr extends MoveEffectAttr { return false; } - getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { + getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number { const isCramorant = user.hasAbility(Abilities.GULP_MISSILE) && user.species.speciesId === Species.CRAMORANT; return isCramorant && !user.getTag(GulpMissileTag) ? 10 : 0; } @@ -5669,7 +5669,7 @@ export class HitsTagAttr extends MoveAttr { this.doubleDamage = !!doubleDamage; } - getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { + getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): number { return target.getTag(this.tagType) ? this.doubleDamage ? 10 : 5 : 0; } } @@ -5687,11 +5687,11 @@ export class HitsTagForDoubleDamageAttr extends HitsTagAttr { export class AddArenaTagAttr extends MoveEffectAttr { public tagType: ArenaTagType; - public turnCount: integer; + public turnCount: number; private failOnOverlap: boolean; public selfSideTarget: boolean; - constructor(tagType: ArenaTagType, turnCount?: integer | null, failOnOverlap: boolean = false, selfSideTarget: boolean = false) { + constructor(tagType: ArenaTagType, turnCount?: number | null, failOnOverlap: boolean = false, selfSideTarget: boolean = false) { super(true); this.tagType = tagType; @@ -5983,7 +5983,7 @@ export class RevivalBlessingAttr extends MoveEffectAttr { }); } - getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { + getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number { if (user.hasTrainer() && globalScene.getEnemyParty().findIndex(p => p.isFainted() && !p.isBoss()) > -1) { return 20; } @@ -6212,13 +6212,13 @@ export class ForceSwitchOutAttr extends MoveEffectAttr { }; } - getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { + getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number { if (!globalScene.getEnemyParty().find(p => p.isActive() && !p.isOnField())) { return -20; } let ret = this.selfSwitch ? Math.floor((1 - user.getHpRatio()) * 20) : super.getUserBenefitScore(user, target, move); if (this.selfSwitch && this.isBatonPass()) { - const statStageTotal = user.getStatStages().reduce((s: integer, total: integer) => total += s, 0); + const statStageTotal = user.getStatStages().reduce((s: number, total: number) => total += s, 0); ret = ret / 2 + (Phaser.Tweens.Builders.GetEaseFunction("Sine.easeOut")(Math.min(Math.abs(statStageTotal), 10) / 10) * (statStageTotal >= 0 ? 10 : -10)); } return ret; @@ -7185,7 +7185,7 @@ export class RepeatMoveAttr extends MoveEffectAttr { }; } - getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { + getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): number { // TODO: Make the AI actually use instruct /* Ideally, the AI would score instruct based on the scorings of the on-field pokemons' * last used moves at the time of using Instruct (by the time the instructor gets to act) @@ -7746,7 +7746,7 @@ export class ShiftStatAttr extends MoveEffectAttr { * @param move n/a * @returns number of points to add to the user's benefit score */ - override getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { + override getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number { return user.getStat(this.statToSwitchWith, false) > user.getStat(this.statToSwitch, false) ? 10 : 0; } } @@ -7798,7 +7798,7 @@ export class AverageStatsAttr extends MoveEffectAttr { } export class DiscourageFrequentUseAttr extends MoveAttr { - getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { + getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number { const lastMoves = user.getLastXMoves(4); console.log(lastMoves); for (let m = 0; m < lastMoves.length; m++) { @@ -8052,7 +8052,7 @@ export class MoveCondition { return this.func(user, target, move); } - getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { + getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number { return 0; } } @@ -8062,7 +8062,7 @@ export class FirstMoveCondition extends MoveCondition { super((user, target, move) => user.battleSummonData?.waveTurnCount === 1); } - getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { + getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number { return this.apply(user, target, move) ? 10 : -20; } } diff --git a/src/data/mystery-encounters/utils/encounter-pokemon-utils.ts b/src/data/mystery-encounters/utils/encounter-pokemon-utils.ts index bcce2ad1349..2d0081f19cd 100644 --- a/src/data/mystery-encounters/utils/encounter-pokemon-utils.ts +++ b/src/data/mystery-encounters/utils/encounter-pokemon-utils.ts @@ -624,7 +624,7 @@ export async function catchPokemon(pokemon: EnemyPokemon, pokeball: Phaser.GameO }); }, false); }, () => { - globalScene.ui.setMode(Mode.PARTY, PartyUiMode.RELEASE, 0, (slotIndex: integer, _option: PartyOption) => { + globalScene.ui.setMode(Mode.PARTY, PartyUiMode.RELEASE, 0, (slotIndex: number, _option: PartyOption) => { globalScene.ui.setMode(Mode.MESSAGE).then(() => { if (slotIndex < 6) { addToParty(slotIndex); diff --git a/src/data/pokeball.ts b/src/data/pokeball.ts index 049baf11f3d..7cd9f061cdd 100644 --- a/src/data/pokeball.ts +++ b/src/data/pokeball.ts @@ -4,7 +4,7 @@ import { NumberHolder } from "#app/utils"; import { PokeballType } from "#enums/pokeball"; import i18next from "i18next"; -export const MAX_PER_TYPE_POKEBALLS: integer = 99; +export const MAX_PER_TYPE_POKEBALLS: number = 99; export function getPokeballAtlasKey(type: PokeballType): string { switch (type) { diff --git a/src/data/pokemon-species.ts b/src/data/pokemon-species.ts index 6abdfe43470..edc9cbccfd2 100644 --- a/src/data/pokemon-species.ts +++ b/src/data/pokemon-species.ts @@ -718,7 +718,7 @@ export default class PokemonSpecies extends PokemonSpeciesForm implements Locali * The calculation with evolution delay is a weighted average of the easeIn and easeOut functions where preferredMinLevel is the denominator. * This also means a lower value of x will lead to a higher evolution chance. * @param strength {@linkcode PartyMemberStrength} The strength of the party member in question - * @returns {@linkcode integer} The level difference from expected evolution level tolerated for a mon to be unevolved. Lower value = higher evolution chance. + * @returns {@linkcode number} The level difference from expected evolution level tolerated for a mon to be unevolved. Lower value = higher evolution chance. */ private getStrengthLevelDiff(strength: PartyMemberStrength): number { switch (Math.min(strength, PartyMemberStrength.STRONGER)) { diff --git a/src/data/terrain.ts b/src/data/terrain.ts index da315a14a86..1ffe0adc8bf 100644 --- a/src/data/terrain.ts +++ b/src/data/terrain.ts @@ -15,9 +15,9 @@ export enum TerrainType { export class Terrain { public terrainType: TerrainType; - public turnsLeft: integer; + public turnsLeft: number; - constructor(terrainType: TerrainType, turnsLeft?: integer) { + constructor(terrainType: TerrainType, turnsLeft?: number) { this.terrainType = terrainType; this.turnsLeft = turnsLeft || 0; } @@ -81,7 +81,7 @@ export function getTerrainName(terrainType: TerrainType): string { } -export function getTerrainColor(terrainType: TerrainType): [ integer, integer, integer ] { +export function getTerrainColor(terrainType: TerrainType): [ number, number, number ] { switch (terrainType) { case TerrainType.MISTY: return [ 232, 136, 200 ]; diff --git a/src/data/trainer-config.ts b/src/data/trainer-config.ts index 590a8688428..016a2c9bca6 100644 --- a/src/data/trainer-config.ts +++ b/src/data/trainer-config.ts @@ -35,7 +35,7 @@ export enum TrainerPoolTier { } export interface TrainerTierPools { - [key: integer]: Species[] + [key: number]: Species[] } export enum TrainerSlot { @@ -45,27 +45,27 @@ export enum TrainerSlot { } export class TrainerPartyTemplate { - public size: integer; + public size: number; public strength: PartyMemberStrength; public sameSpecies: boolean; public balanced: boolean; - constructor(size: integer, strength: PartyMemberStrength, sameSpecies?: boolean, balanced?: boolean) { + constructor(size: number, strength: PartyMemberStrength, sameSpecies?: boolean, balanced?: boolean) { this.size = size; this.strength = strength; this.sameSpecies = !!sameSpecies; this.balanced = !!balanced; } - getStrength(index: integer): PartyMemberStrength { + getStrength(index: number): PartyMemberStrength { return this.strength; } - isSameSpecies(index: integer): boolean { + isSameSpecies(index: number): boolean { return this.sameSpecies; } - isBalanced(index: integer): boolean { + isBalanced(index: number): boolean { return this.balanced; } } @@ -74,14 +74,14 @@ export class TrainerPartyCompoundTemplate extends TrainerPartyTemplate { public templates: TrainerPartyTemplate[]; constructor(...templates: TrainerPartyTemplate[]) { - super(templates.reduce((total: integer, template: TrainerPartyTemplate) => { + super(templates.reduce((total: number, template: TrainerPartyTemplate) => { total += template.size; return total; }, 0), PartyMemberStrength.AVERAGE); this.templates = templates; } - getStrength(index: integer): PartyMemberStrength { + getStrength(index: number): PartyMemberStrength { let t = 0; for (const template of this.templates) { if (t + template.size > index) { @@ -93,7 +93,7 @@ export class TrainerPartyCompoundTemplate extends TrainerPartyTemplate { return super.getStrength(index); } - isSameSpecies(index: integer): boolean { + isSameSpecies(index: number): boolean { let t = 0; for (const template of this.templates) { if (t + template.size > index) { @@ -105,7 +105,7 @@ export class TrainerPartyCompoundTemplate extends TrainerPartyTemplate { return super.isSameSpecies(index); } - isBalanced(index: integer): boolean { + isBalanced(index: number): boolean { let t = 0; for (const template of this.templates) { if (t + template.size > index) { @@ -173,11 +173,11 @@ export const trainerPartyTemplates = { }; type PartyTemplateFunc = () => TrainerPartyTemplate; -type PartyMemberFunc = (level: integer, strength: PartyMemberStrength) => EnemyPokemon; +type PartyMemberFunc = (level: number, strength: PartyMemberStrength) => EnemyPokemon; type GenModifiersFunc = (party: EnemyPokemon[]) => PersistentModifier[]; export interface PartyMemberFuncs { - [key: integer]: PartyMemberFunc + [key: number]: PartyMemberFunc } export class TrainerConfig { @@ -524,7 +524,7 @@ export class TrainerConfig { return this; } - setPartyMemberFunc(slotIndex: integer, partyMemberFunc: PartyMemberFunc): TrainerConfig { + setPartyMemberFunc(slotIndex: number, partyMemberFunc: PartyMemberFunc): TrainerConfig { this.partyMemberFuncs[slotIndex] = partyMemberFunc; return this; } @@ -1125,7 +1125,7 @@ export class TrainerConfig { let t = 0; interface TrainerConfigs { - [key: integer]: TrainerConfig + [key: number]: TrainerConfig } /** @@ -1197,7 +1197,7 @@ function getSpeciesFilterRandomPartyMemberFunc( }; } -function getRandomTeraModifiers(party: EnemyPokemon[], count: integer, types?: Type[]): PersistentModifier[] { +function getRandomTeraModifiers(party: EnemyPokemon[], count: number, types?: Type[]): PersistentModifier[] { const ret: PersistentModifier[] = []; const partyMemberIndexes = new Array(party.length).fill(null).map((_, i) => i); for (let t = 0; t < Math.min(count, party.length); t++) { diff --git a/src/data/trainer-names.ts b/src/data/trainer-names.ts index d075b7121f2..8b0091d4398 100644 --- a/src/data/trainer-names.ts +++ b/src/data/trainer-names.ts @@ -16,7 +16,7 @@ class TrainerNameConfig { } interface TrainerNameConfigs { - [key: integer]: TrainerNameConfig + [key: number]: TrainerNameConfig } // used in a commented code diff --git a/src/data/type.ts b/src/data/type.ts index 6170eadc91e..498394bf90e 100644 --- a/src/data/type.ts +++ b/src/data/type.ts @@ -313,7 +313,7 @@ export function getTypeDamageMultiplierColor(multiplier: TypeDamageMultiplier, s } } -export function getTypeRgb(type: Type): [ integer, integer, integer ] { +export function getTypeRgb(type: Type): [ number, number, number ] { switch (type) { case Type.NORMAL: return [ 168, 168, 120 ]; diff --git a/src/data/variant.ts b/src/data/variant.ts index 13869635f1e..13c11b0bb40 100644 --- a/src/data/variant.ts +++ b/src/data/variant.ts @@ -8,7 +8,7 @@ export const variantData: any = {}; export const variantColorCache = {}; -export function getVariantTint(variant: Variant): integer { +export function getVariantTint(variant: Variant): number { switch (variant) { case 0: return 0xf8c020; @@ -19,7 +19,7 @@ export function getVariantTint(variant: Variant): integer { } } -export function getVariantIcon(variant: Variant): integer { +export function getVariantIcon(variant: Variant): number { switch (variant) { case 0: return VariantTier.STANDARD; diff --git a/src/data/weather.ts b/src/data/weather.ts index 7bba698f9b4..0c90f381130 100644 --- a/src/data/weather.ts +++ b/src/data/weather.ts @@ -14,9 +14,9 @@ import type { Arena } from "#app/field/arena"; export class Weather { public weatherType: WeatherType; - public turnsLeft: integer; + public turnsLeft: number; - constructor(weatherType: WeatherType, turnsLeft?: integer) { + constructor(weatherType: WeatherType, turnsLeft?: number) { this.weatherType = weatherType; this.turnsLeft = !this.isImmutable() ? turnsLeft || 0 : 0; } @@ -246,7 +246,7 @@ export function getTerrainBlockMessage(pokemon: Pokemon, terrainType: TerrainTyp export interface WeatherPoolEntry { weatherType: WeatherType; - weight: integer; + weight: number; } export function getRandomWeatherType(arena: Arena): WeatherType { diff --git a/src/events/egg.ts b/src/events/egg.ts index b30c37a25e8..dc3d2b55ffe 100644 --- a/src/events/egg.ts +++ b/src/events/egg.ts @@ -12,7 +12,7 @@ export enum EggEventType { */ export class EggCountChangedEvent extends Event { /** The updated egg count. */ - public eggCount: integer; + public eggCount: number; constructor(eggCount: number) { super(EggEventType.EGG_COUNT_CHANGED); diff --git a/src/field/anims.ts b/src/field/anims.ts index f96427326b5..9ffaae59bbc 100644 --- a/src/field/anims.ts +++ b/src/field/anims.ts @@ -34,7 +34,7 @@ function doDefaultPbOpenParticles(x: number, y: number, radius: number) { }); } - const addParticle = (index: integer) => { + const addParticle = (index: number) => { const particle = globalScene.add.sprite(x, y, "pb_open_particle"); globalScene.field.add(particle); const angle = index * 45; @@ -68,7 +68,7 @@ function doDefaultPbOpenParticles(x: number, y: number, radius: number) { }); } -function doUbOpenParticles(x: number, y: number, frameIndex: integer) { +function doUbOpenParticles(x: number, y: number, frameIndex: number) { const particles: Phaser.GameObjects.Image[] = []; for (let i = 0; i < 10; i++) { particles.push(doFanOutParticle(i * 25, x, y, 1, 1, 5, frameIndex)); @@ -110,7 +110,7 @@ function doMbOpenParticles(x: number, y: number) { } } -function doFanOutParticle(trigIndex: integer, x: integer, y: integer, xSpeed: integer, ySpeed: integer, angle: integer, frameIndex: integer): Phaser.GameObjects.Image { +function doFanOutParticle(trigIndex: number, x: number, y: number, xSpeed: number, ySpeed: number, angle: number, frameIndex: number): Phaser.GameObjects.Image { let f = 0; const particle = globalScene.add.image(x, y, "pb_particles", `${frameIndex}.png`); @@ -179,11 +179,11 @@ export function addPokeballCaptureStars(pokeball: Phaser.GameObjects.Sprite): vo new Array(3).fill(null).map(() => addParticle()); } -export function sin(index: integer, amplitude: integer): number { +export function sin(index: number, amplitude: number): number { return amplitude * Math.sin(index * (Math.PI / 128)); } -export function cos(index: integer, amplitude: integer): number { +export function cos(index: number, amplitude: number): number { return amplitude * Math.cos(index * (Math.PI / 128)); } diff --git a/src/field/arena.ts b/src/field/arena.ts index deeb261a491..acdf6171474 100644 --- a/src/field/arena.ts +++ b/src/field/arena.ts @@ -86,7 +86,7 @@ export class Arena { } } - randomSpecies(waveIndex: integer, level: integer, attempt?: integer, luckValue?: integer, isBoss?: boolean): PokemonSpecies { + randomSpecies(waveIndex: number, level: number, attempt?: number, luckValue?: number, isBoss?: boolean): PokemonSpecies { const overrideSpecies = globalScene.gameMode.getOverrideSpecies(waveIndex); if (overrideSpecies) { return overrideSpecies; @@ -167,7 +167,7 @@ export class Arena { return ret; } - randomTrainerType(waveIndex: integer, isBoss: boolean = false): TrainerType { + randomTrainerType(waveIndex: number, isBoss: boolean = false): TrainerType { const isTrainerBoss = !!this.trainerPool[BiomePoolTier.BOSS].length && (globalScene.gameMode.isTrainerBoss(waveIndex, this.biomeType, globalScene.offsetGym) || isBoss); console.log(isBoss, this.trainerPool); @@ -184,7 +184,7 @@ export class Arena { return !tierPool.length ? TrainerType.BREEDER : tierPool[Utils.randSeedInt(tierPool.length)]; } - getSpeciesFormIndex(species: PokemonSpecies): integer { + getSpeciesFormIndex(species: PokemonSpecies): number { switch (species.speciesId) { case Species.BURMY: case Species.WORMADAM: @@ -372,7 +372,7 @@ export class Arena { * Gets the denominator for the chance for a trainer spawn * @returns n where 1/n is the chance of a trainer battle */ - getTrainerChance(): integer { + getTrainerChance(): number { switch (this.biomeType) { case Biome.METROPOLIS: return 2; @@ -457,10 +457,10 @@ export class Arena { } } - overrideTint(): [integer, integer, integer] { + overrideTint(): [number, number, number] { switch (Overrides.ARENA_TINT_OVERRIDE) { case TimeOfDay.DUSK: - return [ 98, 48, 73 ].map(c => Math.round((c + 128) / 2)) as [integer, integer, integer]; + return [ 98, 48, 73 ].map(c => Math.round((c + 128) / 2)) as [number, number, number]; break; case (TimeOfDay.NIGHT): return [ 64, 64, 64 ]; @@ -473,7 +473,7 @@ export class Arena { } } - getDayTint(): [integer, integer, integer] { + getDayTint(): [number, number, number] { if (Overrides.ARENA_TINT_OVERRIDE !== null) { return this.overrideTint(); } @@ -485,7 +485,7 @@ export class Arena { } } - getDuskTint(): [integer, integer, integer] { + getDuskTint(): [number, number, number] { if (Overrides.ARENA_TINT_OVERRIDE) { return this.overrideTint(); } @@ -495,11 +495,11 @@ export class Arena { switch (this.biomeType) { default: - return [ 98, 48, 73 ].map(c => Math.round((c + 128) / 2)) as [integer, integer, integer]; + return [ 98, 48, 73 ].map(c => Math.round((c + 128) / 2)) as [number, number, number]; } } - getNightTint(): [integer, integer, integer] { + getNightTint(): [number, number, number] { if (Overrides.ARENA_TINT_OVERRIDE) { return this.overrideTint(); } @@ -813,7 +813,7 @@ export function getBiomeHasProps(biomeType: Biome): boolean { export class ArenaBase extends Phaser.GameObjects.Container { public player: boolean; public biome: Biome; - public propValue: integer; + public propValue: number; public base: Phaser.GameObjects.Sprite; public props: Phaser.GameObjects.Sprite[]; @@ -834,7 +834,7 @@ export class ArenaBase extends Phaser.GameObjects.Container { }) : []; } - setBiome(biome: Biome, propValue?: integer): void { + setBiome(biome: Biome, propValue?: number): void { const hasProps = getBiomeHasProps(biome); const biomeKey = getBiomeKey(biome); const baseKey = `${biomeKey}_${this.player ? "a" : "b"}`; diff --git a/src/field/damage-number-handler.ts b/src/field/damage-number-handler.ts index 57b9d6990ca..1551edc9697 100644 --- a/src/field/damage-number-handler.ts +++ b/src/field/damage-number-handler.ts @@ -15,7 +15,7 @@ export default class DamageNumberHandler { this.damageNumbers = new Map(); } - add(target: Pokemon, amount: integer, result: DamageResult | HitResult.HEAL = HitResult.EFFECTIVE, critical: boolean = false): void { + add(target: Pokemon, amount: number, result: DamageResult | HitResult.HEAL = HitResult.EFFECTIVE, critical: boolean = false): void { if (!globalScene?.damageNumbersMode) { return; } diff --git a/src/field/mystery-encounter-intro.ts b/src/field/mystery-encounter-intro.ts index 0110dabc7a9..1ea8f16e8f7 100644 --- a/src/field/mystery-encounter-intro.ts +++ b/src/field/mystery-encounter-intro.ts @@ -422,7 +422,7 @@ export default class MysteryEncounterIntroVisuals extends Phaser.GameObjects.Con * @param duration * @param ease */ - private tint(sprite, color: number, alpha?: number, duration?: integer, ease?: string): void { + private tint(sprite, color: number, alpha?: number, duration?: number, ease?: string): void { // const tintSprites = this.getTintSprites(); sprite.setTintFill(color); sprite.setVisible(true); @@ -448,7 +448,7 @@ export default class MysteryEncounterIntroVisuals extends Phaser.GameObjects.Con * @param duration * @param ease */ - tintAll(color: number, alpha?: number, duration?: integer, ease?: string): void { + tintAll(color: number, alpha?: number, duration?: number, ease?: string): void { const tintSprites = this.getTintSprites(); tintSprites.map(tintSprite => { this.tint(tintSprite, color, alpha, duration, ease); @@ -461,7 +461,7 @@ export default class MysteryEncounterIntroVisuals extends Phaser.GameObjects.Con * @param duration * @param ease */ - private untint(sprite, duration: integer, ease?: string): void { + private untint(sprite, duration: number, ease?: string): void { if (duration) { globalScene.tweens.add({ targets: sprite, @@ -485,7 +485,7 @@ export default class MysteryEncounterIntroVisuals extends Phaser.GameObjects.Con * @param duration * @param ease */ - untintAll(duration: integer, ease?: string): void { + untintAll(duration: number, ease?: string): void { const tintSprites = this.getTintSprites(); tintSprites.map(tintSprite => { this.untint(tintSprite, duration, ease); diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 0458c5471d2..ebf665ce5e6 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -99,45 +99,45 @@ export enum FieldPosition { } export default abstract class Pokemon extends Phaser.GameObjects.Container { - public id: integer; + public id: number; public name: string; public nickname: string; public species: PokemonSpecies; - public formIndex: integer; - public abilityIndex: integer; + public formIndex: number; + public abilityIndex: number; public passive: boolean; public shiny: boolean; public variant: Variant; public pokeball: PokeballType; protected battleInfo: BattleInfo; - public level: integer; - public exp: integer; - public levelExp: integer; + public level: number; + public exp: number; + public levelExp: number; public gender: Gender; - public hp: integer; - public stats: integer[]; - public ivs: integer[]; + public hp: number; + public stats: number[]; + public ivs: number[]; public nature: Nature; public moveset: (PokemonMove | null)[]; public status: Status | null; - public friendship: integer; - public metLevel: integer; + public friendship: number; + public metLevel: number; public metBiome: Biome | -1; public metSpecies: Species; public metWave: number; - public luck: integer; + public luck: number; public pauseEvolutions: boolean; public pokerus: boolean; public switchOutStatus: boolean; - public evoCounter: integer; + public evoCounter: number; public fusionSpecies: PokemonSpecies | null; - public fusionFormIndex: integer; - public fusionAbilityIndex: integer; + public fusionFormIndex: number; + public fusionAbilityIndex: number; public fusionShiny: boolean; public fusionVariant: Variant; public fusionGender: Gender; - public fusionLuck: integer; + public fusionLuck: number; public fusionCustomPokemonData: CustomPokemonData | null; private summonDataPrimer: PokemonSummonData | null; @@ -160,7 +160,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { private shinySparkle: Phaser.GameObjects.Sprite; - constructor(x: number, y: number, species: PokemonSpecies, level: integer, abilityIndex?: integer, formIndex?: integer, gender?: Gender, shiny?: boolean, variant?: Variant, ivs?: integer[], nature?: Nature, dataSource?: Pokemon | PokemonData) { + constructor(x: number, y: number, species: PokemonSpecies, level: number, abilityIndex?: number, formIndex?: number, gender?: Gender, shiny?: boolean, variant?: Variant, ivs?: number[], nature?: Nature, dataSource?: Pokemon | PokemonData) { super(globalScene, x, y); if (!species.isObtainable() && this.isPlayer()) { @@ -423,7 +423,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { abstract hasTrainer(): boolean; - abstract getFieldIndex(): integer; + abstract getFieldIndex(): number; abstract getBattlerIndex(): BattlerIndex; @@ -781,7 +781,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { } } - setFieldPosition(fieldPosition: FieldPosition, duration?: integer): Promise { + setFieldPosition(fieldPosition: FieldPosition, duration?: number): Promise { return new Promise(resolve => { if (fieldPosition === this.fieldPosition) { resolve(); @@ -949,7 +949,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { * @param simulated if `true`, nullifies any effects that produce any changes to game state from triggering * @returns the final in-battle value of a stat */ - getEffectiveStat(stat: EffectiveStat, opponent?: Pokemon, move?: Move, ignoreAbility: boolean = false, ignoreOppAbility: boolean = false, isCritical: boolean = false, simulated: boolean = true): integer { + getEffectiveStat(stat: EffectiveStat, opponent?: Pokemon, move?: Move, ignoreAbility: boolean = false, ignoreOppAbility: boolean = false, isCritical: boolean = false, simulated: boolean = true): number { const statValue = new Utils.NumberHolder(this.getStat(stat, false)); globalScene.applyModifiers(StatBoosterModifier, this.isPlayer(), this, stat, statValue); @@ -1103,12 +1103,12 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { return this.hp >= this.getMaxHp(); } - getMaxHp(): integer { + getMaxHp(): number { return this.getStat(Stat.HP); } /** Returns the amount of hp currently missing from this {@linkcode Pokemon} (max - current) */ - getInverseHp(): integer { + getInverseHp(): number { return this.getMaxHp() - this.hp; } @@ -1153,7 +1153,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { return !this.isFusion() ? this.variant : Math.max(this.variant, this.fusionVariant) as Variant; } - getLuck(): integer { + getLuck(): number { return this.luck + (this.isFusion() ? this.fusionLuck : 0); } @@ -1816,13 +1816,13 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { /** * Gets all level up moves in a given range for a particular pokemon. - * @param {integer} startingLevel Don't include moves below this level + * @param {number} startingLevel Don't include moves below this level * @param {boolean} includeEvolutionMoves Whether to include evolution moves * @param {boolean} simulateEvolutionChain Whether to include moves from prior evolutions * @param {boolean} includeRelearnerMoves Whether to include moves that would require a relearner. Note the move relearner inherently allows evolution moves * @returns {LevelMoves} A list of moves and the levels they can be learned at */ - getLevelMoves(startingLevel?: integer, includeEvolutionMoves: boolean = false, simulateEvolutionChain: boolean = false, includeRelearnerMoves: boolean = false, learnSituation: LearnMoveSituation = LearnMoveSituation.MISC): LevelMoves { + getLevelMoves(startingLevel?: number, includeEvolutionMoves: boolean = false, simulateEvolutionChain: boolean = false, includeRelearnerMoves: boolean = false, learnSituation: LearnMoveSituation = LearnMoveSituation.MISC): LevelMoves { const ret: LevelMoves = []; let levelMoves: LevelMoves = []; if (!startingLevel) { @@ -1862,7 +1862,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { } } } - levelMoves.sort((lma: [integer, integer], lmb: [integer, integer]) => lma[0] > lmb[0] ? 1 : lma[0] < lmb[0] ? -1 : 0); + levelMoves.sort((lma: [number, number], lmb: [number, number]) => lma[0] > lmb[0] ? 1 : lma[0] < lmb[0] ? -1 : 0); /** @@ -1919,7 +1919,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { return speciesEggMoves[this.getSpeciesForm().getRootSpeciesId()]; } - setMove(moveIndex: integer, moveId: Moves): void { + setMove(moveIndex: number, moveId: Moves): void { const move = moveId ? new PokemonMove(moveId) : null; this.moveset[moveIndex] = move; if (this.summonData?.moveset) { @@ -2326,7 +2326,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { } } - public trySelectMove(moveIndex: integer, ignorePp?: boolean): boolean { + public trySelectMove(moveIndex: number, ignorePp?: boolean): boolean { const move = this.getMoveset().length > moveIndex ? this.getMoveset()[moveIndex] : null; @@ -2412,7 +2412,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { * @param exp The amount of experience to add * @param ignoreLevelCap Whether to ignore level caps when adding experience (defaults to false) */ - addExp(exp: integer, ignoreLevelCap: boolean = false) { + addExp(exp: number, ignoreLevelCap: boolean = false) { const maxExpLevel = globalScene.getMaxExpLevel(ignoreLevelCap); const initialExp = this.exp; this.exp += exp; @@ -2435,7 +2435,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { return this.isPlayer() !== target.isPlayer(); } - getOpponent(targetIndex: integer): Pokemon | null { + getOpponent(targetIndex: number): Pokemon | null { const ret = this.getOpponents()[targetIndex]; if (ret.summonData) { return ret; @@ -2992,7 +2992,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { * @param ignoreFaintPhase flag on wheter to add FaintPhase if pokemon after applying damage faints * @returns integer representing damage */ - damage(damage: integer, ignoreSegments: boolean = false, preventEndure: boolean = false, ignoreFaintPhase: boolean = false): integer { + damage(damage: number, ignoreSegments: boolean = false, preventEndure: boolean = false, ignoreFaintPhase: boolean = false): number { if (this.isFainted()) { return 0; } @@ -3062,7 +3062,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { return damage; } - heal(amount: integer): integer { + heal(amount: number): number { const healAmount = Math.min(amount, this.getMaxHp() - this.hp); this.hp += healAmount; return healAmount; @@ -3093,7 +3093,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { return !cancelled.value; } - addTag(tagType: BattlerTagType, turnCount: integer = 0, sourceMove?: Moves, sourceId?: integer): boolean { + addTag(tagType: BattlerTagType, turnCount: number = 0, sourceMove?: Moves, sourceId?: number): boolean { const existingTag = this.getTag(tagType); if (existingTag) { existingTag.onOverlap(this); @@ -3199,11 +3199,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { return true; } - removeTagsBySourceId(sourceId: integer): void { + removeTagsBySourceId(sourceId: number): void { this.findAndRemoveTags(t => t.isSourceLinked() && t.sourceId === sourceId); } - transferTagsBySourceId(sourceId: integer, newSourceId: integer): void { + transferTagsBySourceId(sourceId: number, newSourceId: number): void { if (!this.summonData) { return; } @@ -3780,12 +3780,12 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { this.turnData = new PokemonTurnData(); } - getExpValue(): integer { + getExpValue(): number { // Logic to factor in victor level has been removed for balancing purposes, so the player doesn't have to focus on EXP maxxing return ((this.getSpeciesForm().getBaseExp() * this.level) / 5 + 1); } - setFrameRate(frameRate: integer) { + setFrameRate(frameRate: number) { globalScene.anims.get(this.getBattleSpriteKey()).frameRate = frameRate; try { this.getSprite().play(this.getBattleSpriteKey()); @@ -3799,7 +3799,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { } } - tint(color: number, alpha?: number, duration?: integer, ease?: string) { + tint(color: number, alpha?: number, duration?: number, ease?: string) { const tintSprite = this.getTintSprite(); tintSprite?.setTintFill(color); tintSprite?.setVisible(true); @@ -3818,7 +3818,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { } } - untint(duration: integer, ease?: string) { + untint(duration: number, ease?: string) { const tintSprite = this.getTintSprite(); if (duration) { @@ -3895,10 +3895,10 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { const fusionCanvas = document.createElement("canvas"); const fusionBackCanvas = document.createElement("canvas"); - const spriteColors: integer[][] = []; + const spriteColors: number[][] = []; const pixelData: Uint8ClampedArray[] = []; - [ canvas, backCanvas, fusionCanvas, fusionBackCanvas ].forEach((canv: HTMLCanvasElement, c: integer) => { + [ canvas, backCanvas, fusionCanvas, fusionBackCanvas ].forEach((canv: HTMLCanvasElement, c: number) => { const context = canv.getContext("2d"); const frame = [ sourceFrame, sourceBackFrame, fusionFrame, fusionBackFrame ][c]; canv.width = frame.width; @@ -3913,7 +3913,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { for (let f = 0; f < 2; f++) { const variantColors = variantColorCache[!f ? spriteKey : backSpriteKey]; - const variantColorSet = new Map(); + const variantColorSet = new Map(); if (this.shiny && variantColors && variantColors[this.variant]) { Object.keys(variantColors[this.variant]).forEach(k => { variantColorSet.set(Utils.rgbaToInt(Array.from(Object.values(Utils.rgbHexToRgba(k)))), Array.from(Object.values(Utils.rgbHexToRgba(variantColors[this.variant][k])))); @@ -3945,7 +3945,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { const pixelColors: number[] = []; for (let f = 0; f < 2; f++) { for (let i = 0; i < pixelData[f].length; i += 4) { - const total = pixelData[f].slice(i, i + 3).reduce((total: integer, value: integer) => total + value, 0); + const total = pixelData[f].slice(i, i + 3).reduce((total: number, value: number) => total + value, 0); if (!total) { continue; } @@ -3956,14 +3956,14 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { const fusionPixelColors : number[] = []; for (let f = 0; f < 2; f++) { const variantColors = variantColorCache[!f ? fusionSpriteKey : fusionBackSpriteKey]; - const variantColorSet = new Map(); + const variantColorSet = new Map(); if (this.fusionShiny && variantColors && variantColors[this.fusionVariant]) { Object.keys(variantColors[this.fusionVariant]).forEach(k => { variantColorSet.set(Utils.rgbaToInt(Array.from(Object.values(Utils.rgbHexToRgba(k)))), Array.from(Object.values(Utils.rgbHexToRgba(variantColors[this.fusionVariant][k])))); }); } for (let i = 0; i < pixelData[2 + f].length; i += 4) { - const total = pixelData[2 + f].slice(i, i + 3).reduce((total: integer, value: integer) => total + value, 0); + const total = pixelData[2 + f].slice(i, i + 3).reduce((total: number, value: number) => total + value, 0); if (!total) { continue; } @@ -3998,18 +3998,18 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { fusionPaletteColors = fusionPaletteColors!; // TS compiler that fusionPaletteColors is defined! const [ palette, fusionPalette ] = [ paletteColors, fusionPaletteColors ] .map(paletteColors => { - let keys = Array.from(paletteColors.keys()).sort((a: integer, b: integer) => paletteColors.get(a)! < paletteColors.get(b)! ? 1 : -1); - let rgbaColors: Map; + let keys = Array.from(paletteColors.keys()).sort((a: number, b: number) => paletteColors.get(a)! < paletteColors.get(b)! ? 1 : -1); + let rgbaColors: Map; let hsvColors: Map; - const mappedColors = new Map(); + const mappedColors = new Map(); do { mappedColors.clear(); - rgbaColors = keys.reduce((map: Map, k: number) => { + rgbaColors = keys.reduce((map: Map, k: number) => { map.set(k, Object.values(rgbaFromArgb(k))); return map; - }, new Map()); + }, new Map()); hsvColors = Array.from(rgbaColors.keys()).reduce((map: Map, k: number) => { const rgb = rgbaColors.get(k)!.slice(0, 3); map.set(k, Utils.rgbToHsv(rgb[0], rgb[1], rgb[2])); @@ -4032,7 +4032,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { } } - mappedColors.forEach((values: integer[], key: integer) => { + mappedColors.forEach((values: number[], key: number) => { const keyColor = rgbaColors.get(key)!; const valueColors = values.map(v => rgbaColors.get(v)!); const color = keyColor.slice(0); @@ -4047,7 +4047,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { for (let c = 0; c < 3; c++) { color[c] *= (paletteColors.get(key)! / count); - values.forEach((value: integer, i: integer) => { + values.forEach((value: number, i: number) => { if (paletteColors.has(value)) { const valueCount = paletteColors.get(value)!; color[c] += valueColors[i][c] * (valueCount / count); @@ -4067,7 +4067,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { paletteColors.set(argbFromRgba({ r: color[0], g: color[1], b: color[2], a: color[3] }), count); }); - keys = Array.from(paletteColors.keys()).sort((a: integer, b: integer) => paletteColors.get(a)! < paletteColors.get(b)! ? 1 : -1); + keys = Array.from(paletteColors.keys()).sort((a: number, b: number) => paletteColors.get(a)! < paletteColors.get(b)! ? 1 : -1); } while (mappedColors.size); return keys.map(c => Object.values(rgbaFromArgb(c))); @@ -4076,7 +4076,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { const paletteDeltas: number[][] = []; - spriteColors.forEach((sc: integer[], i: integer) => { + spriteColors.forEach((sc: number[], i: number) => { paletteDeltas.push([]); for (let p = 0; p < palette.length; p++) { paletteDeltas[i].push(Utils.deltaRgb(sc, palette[p])); @@ -4119,7 +4119,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { * @param min The minimum integer to pick, default `0` * @returns A random integer between {@linkcode min} and ({@linkcode min} + {@linkcode range} - 1) */ - randSeedInt(range: integer, min: integer = 0): integer { + randSeedInt(range: number, min: number = 0): number { return globalScene.currentBattle ? globalScene.randBattleSeedInt(range, min) : Utils.randSeedInt(range, min); @@ -4131,7 +4131,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { * @param max The maximum integer to generate * @returns a random integer between {@linkcode min} and {@linkcode max} inclusive */ - randSeedIntRange(min: integer, max: integer): integer { + randSeedIntRange(min: number, max: number): number { return this.randSeedInt((max - min) + 1, min); } @@ -4223,7 +4223,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { export class PlayerPokemon extends Pokemon { public compatibleTms: Moves[]; - constructor(species: PokemonSpecies, level: integer, abilityIndex?: integer, formIndex?: integer, gender?: Gender, shiny?: boolean, variant?: Variant, ivs?: integer[], nature?: Nature, dataSource?: Pokemon | PokemonData) { + constructor(species: PokemonSpecies, level: number, abilityIndex?: number, formIndex?: number, gender?: Gender, shiny?: boolean, variant?: Variant, ivs?: number[], nature?: Nature, dataSource?: Pokemon | PokemonData) { super(106, 148, species, level, abilityIndex, formIndex, gender, shiny, variant, ivs, nature, dataSource); if (Overrides.STATUS_OVERRIDE) { @@ -4268,7 +4268,7 @@ export class PlayerPokemon extends Pokemon { return false; } - getFieldIndex(): integer { + getFieldIndex(): number { return globalScene.getPlayerField().indexOf(this); } @@ -4325,7 +4325,7 @@ export class PlayerPokemon extends Pokemon { return new Promise(resolve => { this.leaveField(switchType === SwitchType.SWITCH); - globalScene.ui.setMode(Mode.PARTY, PartyUiMode.FAINT_SWITCH, this.getFieldIndex(), (slotIndex: integer, option: PartyOption) => { + globalScene.ui.setMode(Mode.PARTY, PartyUiMode.FAINT_SWITCH, this.getFieldIndex(), (slotIndex: number, option: PartyOption) => { if (slotIndex >= globalScene.currentBattle.getBattlerCount() && slotIndex < 6) { globalScene.prependToPhase(new SwitchSummonPhase(switchType, this.getFieldIndex(), slotIndex, false), MoveEndPhase); } @@ -4373,7 +4373,7 @@ export class PlayerPokemon extends Pokemon { */ revivalBlessing(): Promise { return new Promise(resolve => { - globalScene.ui.setMode(Mode.PARTY, PartyUiMode.REVIVAL_BLESSING, this.getFieldIndex(), (slotIndex:integer, option: PartyOption) => { + globalScene.ui.setMode(Mode.PARTY, PartyUiMode.REVIVAL_BLESSING, this.getFieldIndex(), (slotIndex:number, option: PartyOption) => { if (slotIndex >= 0 && slotIndex < 6) { const pokemon = globalScene.getPlayerParty()[slotIndex]; if (!pokemon || !pokemon.isFainted()) { @@ -4675,12 +4675,12 @@ export class PlayerPokemon extends Pokemon { export class EnemyPokemon extends Pokemon { public trainerSlot: TrainerSlot; public aiType: AiType; - public bossSegments: integer; - public bossSegmentIndex: integer; + public bossSegments: number; + public bossSegmentIndex: number; /** To indicate if the instance was populated with a dataSource -> e.g. loaded & populated from session data */ public readonly isPopulatedFromDataSource: boolean; - constructor(species: PokemonSpecies, level: integer, trainerSlot: TrainerSlot, boss: boolean, shinyLock: boolean = false, dataSource?: PokemonData) { + constructor(species: PokemonSpecies, level: number, trainerSlot: TrainerSlot, boss: boolean, shinyLock: boolean = false, dataSource?: PokemonData) { super(236, 84, species, level, dataSource?.abilityIndex, dataSource?.formIndex, dataSource?.gender, (!shinyLock && dataSource) ? dataSource.shiny : false, (!shinyLock && dataSource) ? dataSource.variant : undefined, undefined, dataSource ? dataSource.nature : undefined, dataSource); @@ -4763,7 +4763,7 @@ export class EnemyPokemon extends Pokemon { * @param boss if the pokemon is a boss * @param bossSegments amount of boss segments (health-bar segments) */ - setBoss(boss: boolean = true, bossSegments: integer = 0): void { + setBoss(boss: boolean = true, bossSegments: number = 0): void { if (boss) { this.bossSegments = bossSegments || globalScene.getEncounterBossSegments(globalScene.currentBattle.waveIndex, this.level, this.species, true); this.bossSegmentIndex = this.bossSegments - 1; @@ -4773,7 +4773,7 @@ export class EnemyPokemon extends Pokemon { } } - generateAndPopulateMoveset(formIndex?: integer): void { + generateAndPopulateMoveset(formIndex?: number): void { switch (true) { case (this.species.speciesId === Species.SMEARGLE): this.moveset = [ @@ -4895,7 +4895,7 @@ export class EnemyPokemon extends Pokemon { const move = pokemonMove.getMove(); let moveScore = moveScores[m]; - const targetScores: integer[] = []; + const targetScores: number[] = []; for (const mt of moveTargets[move.id]) { // Prevent a target score from being calculated when the target is whoever attacks the user @@ -5035,9 +5035,9 @@ export class EnemyPokemon extends Pokemon { targetWeights = targetWeights.slice(0, benefitCutoffIndex); } - const thresholds: integer[] = []; - let totalWeight: integer = 0; - targetWeights.reduce((total: integer, w: integer) => { + const thresholds: number[] = []; + let totalWeight: number = 0; + targetWeights.reduce((total: number, w: number) => { total += w; thresholds.push(total); totalWeight = total; @@ -5050,7 +5050,7 @@ export class EnemyPokemon extends Pokemon { * is greater than that random number. */ const randValue = globalScene.randBattleSeedInt(totalWeight); - let targetIndex: integer = 0; + let targetIndex: number = 0; thresholds.every((t, i) => { if (randValue >= t) { @@ -5076,7 +5076,7 @@ export class EnemyPokemon extends Pokemon { return !!this.bossSegments; } - getBossSegmentIndex(): integer { + getBossSegmentIndex(): number { const segments = (this as EnemyPokemon).bossSegments; const segmentSize = this.getMaxHp() / segments; for (let s = segments - 1; s > 0; s--) { @@ -5089,7 +5089,7 @@ export class EnemyPokemon extends Pokemon { return 0; } - damage(damage: integer, ignoreSegments: boolean = false, preventEndure: boolean = false, ignoreFaintPhase: boolean = false): integer { + damage(damage: number, ignoreSegments: boolean = false, preventEndure: boolean = false, ignoreFaintPhase: boolean = false): number { if (this.isFainted()) { return 0; } @@ -5143,7 +5143,7 @@ export class EnemyPokemon extends Pokemon { return ret; } - canBypassBossSegments(segmentCount: integer = 1): boolean { + canBypassBossSegments(segmentCount: number = 1): boolean { if (globalScene.currentBattle.battleSpec === BattleSpec.FINAL_BOSS) { if (!this.formIndex && (this.bossSegmentIndex - segmentCount) < 1) { return false; @@ -5160,7 +5160,7 @@ export class EnemyPokemon extends Pokemon { * For Pokemon with 5 health segments or more, breaking the last two shields give +2 each * @param segmentIndex index of the segment to get down to (0 = no shield left, 1 = 1 shield left, etc.) */ - handleBossSegmentCleared(segmentIndex: integer): void { + handleBossSegmentCleared(segmentIndex: number): void { while (this.bossSegmentIndex > 0 && segmentIndex - 1 < this.bossSegmentIndex) { // Filter out already maxed out stat stages and weigh the rest based on existing stats const leftoverStats = EFFECTIVE_STATS.filter((s: EffectiveStat) => this.getStatStage(s) < 6); @@ -5200,7 +5200,7 @@ export class EnemyPokemon extends Pokemon { } } - getFieldIndex(): integer { + getFieldIndex(): number { return globalScene.getEnemyField().indexOf(this); } @@ -5437,7 +5437,7 @@ export class PokemonMove { this.ppUsed = Math.min(this.ppUsed + count, this.getMovePp()); } - getMovePp(): integer { + getMovePp(): number { return this.maxPpOverride || (this.getMove().pp + this.ppUp * Utils.toDmgValue(this.getMove().pp / 5)); } diff --git a/src/field/trainer.ts b/src/field/trainer.ts index 2b74c1e5069..65bca641163 100644 --- a/src/field/trainer.ts +++ b/src/field/trainer.ts @@ -33,11 +33,11 @@ export enum TrainerVariant { export default class Trainer extends Phaser.GameObjects.Container { public config: TrainerConfig; public variant: TrainerVariant; - public partyTemplateIndex: integer; + public partyTemplateIndex: number; public name: string; public partnerName: string; - constructor(trainerType: TrainerType, variant: TrainerVariant, partyTemplateIndex?: integer, name?: string, partnerName?: string, trainerConfigOverride?: TrainerConfig) { + constructor(trainerType: TrainerType, variant: TrainerVariant, partyTemplateIndex?: number, name?: string, partnerName?: string, trainerConfigOverride?: TrainerConfig) { super(globalScene, -72, 80); this.config = trainerConfigs.hasOwnProperty(trainerType) ? trainerConfigs[trainerType] @@ -214,7 +214,7 @@ export default class Trainer extends Phaser.GameObjects.Container { return this.config.partyTemplates[this.partyTemplateIndex]; } - getPartyLevels(waveIndex: integer): integer[] { + getPartyLevels(waveIndex: number): number[] { const ret: number[] = []; const partyTemplate = this.getPartyTemplate(); @@ -262,7 +262,7 @@ export default class Trainer extends Phaser.GameObjects.Container { return ret; } - genPartyMember(index: integer): EnemyPokemon { + genPartyMember(index: number): EnemyPokemon { const battle = globalScene.currentBattle; const level = battle.enemyLevels?.[index]!; // TODO: is this bang correct? @@ -381,7 +381,7 @@ export default class Trainer extends Phaser.GameObjects.Container { } - genNewPartyMemberSpecies(level: integer, strength: PartyMemberStrength, attempt?: integer): PokemonSpecies { + genNewPartyMemberSpecies(level: number, strength: PartyMemberStrength, attempt?: number): PokemonSpecies { const battle = globalScene.currentBattle; const template = this.getPartyTemplate(); @@ -462,7 +462,7 @@ export default class Trainer extends Phaser.GameObjects.Container { return currentSpecies.includes(baseSpecies) || staticSpecies.includes(baseSpecies); } - getPartyMemberMatchupScores(trainerSlot: TrainerSlot = TrainerSlot.NONE, forSwitch: boolean = false): [integer, integer][] { + getPartyMemberMatchupScores(trainerSlot: TrainerSlot = TrainerSlot.NONE, forSwitch: boolean = false): [number, number][] { if (trainerSlot && !this.isDouble()) { trainerSlot = TrainerSlot.NONE; } @@ -487,12 +487,12 @@ export default class Trainer extends Phaser.GameObjects.Container { } return [ party.indexOf(p), score ]; - }) as [integer, integer][]; + }) as [number, number][]; return partyMemberScores; } - getSortedPartyMemberMatchupScores(partyMemberScores: [integer, integer][] = this.getPartyMemberMatchupScores()) { + getSortedPartyMemberMatchupScores(partyMemberScores: [number, number][] = this.getPartyMemberMatchupScores()) { const sortedPartyMemberScores = partyMemberScores.slice(0); sortedPartyMemberScores.sort((a, b) => { const scoreA = a[1]; @@ -503,7 +503,7 @@ export default class Trainer extends Phaser.GameObjects.Container { return sortedPartyMemberScores; } - getNextSummonIndex(trainerSlot: TrainerSlot = TrainerSlot.NONE, partyMemberScores: [integer, integer][] = this.getPartyMemberMatchupScores(trainerSlot)): integer { + getNextSummonIndex(trainerSlot: TrainerSlot = TrainerSlot.NONE, partyMemberScores: [number, number][] = this.getPartyMemberMatchupScores(trainerSlot)): number { if (trainerSlot && !this.isDouble()) { trainerSlot = TrainerSlot.NONE; } @@ -513,7 +513,7 @@ export default class Trainer extends Phaser.GameObjects.Container { const maxScorePartyMemberIndexes = partyMemberScores.filter(pms => pms[1] === sortedPartyMemberScores[0][1]).map(pms => pms[0]); if (maxScorePartyMemberIndexes.length > 1) { - let rand: integer; + let rand: number; globalScene.executeWithSeedOffset(() => rand = Utils.randSeedInt(maxScorePartyMemberIndexes.length), globalScene.currentBattle.turn << 2); return maxScorePartyMemberIndexes[rand!]; } @@ -521,7 +521,7 @@ export default class Trainer extends Phaser.GameObjects.Container { return maxScorePartyMemberIndexes[0]; } - getPartyMemberModifierChanceMultiplier(index: integer): number { + getPartyMemberModifierChanceMultiplier(index: number): number { switch (this.getPartyTemplate().getStrength(index)) { case PartyMemberStrength.WEAKER: return 0.75; @@ -626,7 +626,7 @@ export default class Trainer extends Phaser.GameObjects.Container { return ret; } - tint(color: number, alpha?: number, duration?: integer, ease?: string): void { + tint(color: number, alpha?: number, duration?: number, ease?: string): void { const tintSprites = this.getTintSprites(); tintSprites.map(tintSprite => { tintSprite.setTintFill(color); @@ -647,7 +647,7 @@ export default class Trainer extends Phaser.GameObjects.Container { }); } - untint(duration: integer, ease?: string): void { + untint(duration: number, ease?: string): void { const tintSprites = this.getTintSprites(); tintSprites.map(tintSprite => { if (duration) { diff --git a/src/game-mode.ts b/src/game-mode.ts index 78a65a54890..1da125ea55a 100644 --- a/src/game-mode.ts +++ b/src/game-mode.ts @@ -91,7 +91,7 @@ export class GameMode implements GameModeConfig { * - 20 for Daily Runs * - 5 for all other modes */ - getStartingLevel(): integer { + getStartingLevel(): number { if (Overrides.STARTING_LEVEL_OVERRIDE) { return Overrides.STARTING_LEVEL_OVERRIDE; } @@ -108,7 +108,7 @@ export class GameMode implements GameModeConfig { * - override from overrides.ts * - 1000 */ - getStartingMoney(): integer { + getStartingMoney(): number { return Overrides.STARTING_MONEY_OVERRIDE || 1000; } @@ -127,7 +127,7 @@ export class GameMode implements GameModeConfig { } } - getWaveForDifficulty(waveIndex: integer, ignoreCurveChanges: boolean = false): integer { + getWaveForDifficulty(waveIndex: number, ignoreCurveChanges: boolean = false): number { switch (this.modeId) { case GameModes.DAILY: return waveIndex + 30 + (!ignoreCurveChanges ? Math.floor(waveIndex / 5) : 0); @@ -142,7 +142,7 @@ export class GameMode implements GameModeConfig { * @param arena the current {@linkcode Arena} * @returns `true` if a trainer should be generated, `false` otherwise */ - isWaveTrainer(waveIndex: integer, arena: Arena): boolean { + isWaveTrainer(waveIndex: number, arena: Arena): boolean { /** * Daily spawns trainers on floors 5, 15, 20, 25, 30, 35, 40, and 45 */ @@ -186,7 +186,7 @@ export class GameMode implements GameModeConfig { return false; } - isTrainerBoss(waveIndex: integer, biomeType: Biome, offsetGym: boolean): boolean { + isTrainerBoss(waveIndex: number, biomeType: Biome, offsetGym: boolean): boolean { switch (this.modeId) { case GameModes.DAILY: return waveIndex > 10 && waveIndex < 50 && !(waveIndex % 10); @@ -195,7 +195,7 @@ export class GameMode implements GameModeConfig { } } - getOverrideSpecies(waveIndex: integer): PokemonSpecies | null { + getOverrideSpecies(waveIndex: number): PokemonSpecies | null { if (this.isDaily && this.isWaveFinal(waveIndex)) { const allFinalBossSpecies = allSpecies.filter(s => (s.subLegendary || s.legendary || s.mythical) && s.baseTotal >= 600 && s.speciesId !== Species.ETERNATUS && s.speciesId !== Species.ARCEUS); @@ -211,7 +211,7 @@ export class GameMode implements GameModeConfig { * @param modeId game mode * @returns if the current wave is final for classic or daily OR a minor boss in endless */ - isWaveFinal(waveIndex: integer, modeId: GameModes = this.modeId): boolean { + isWaveFinal(waveIndex: number, modeId: GameModes = this.modeId): boolean { switch (modeId) { case GameModes.CLASSIC: case GameModes.CHALLENGE: @@ -228,7 +228,7 @@ export class GameMode implements GameModeConfig { * Every 10 waves is a boss battle * @returns true if waveIndex is a multiple of 10 */ - isBoss(waveIndex: integer): boolean { + isBoss(waveIndex: number): boolean { return waveIndex % 10 === 0; } @@ -244,7 +244,7 @@ export class GameMode implements GameModeConfig { * At this time it is paradox pokemon * @returns true if waveIndex is a multiple of 50 in Endless */ - isEndlessBoss(waveIndex: integer): boolean { + isEndlessBoss(waveIndex: number): boolean { return waveIndex % 50 === 0 && (this.modeId === GameModes.ENDLESS || this.modeId === GameModes.SPLICED_ENDLESS); } @@ -254,7 +254,7 @@ export class GameMode implements GameModeConfig { * At this time it is Eternatus * @returns true if waveIndex is a multiple of 250 in Endless */ - isEndlessMinorBoss(waveIndex: integer): boolean { + isEndlessMinorBoss(waveIndex: number): boolean { return waveIndex % 250 === 0 && (this.modeId === GameModes.ENDLESS || this.modeId === GameModes.SPLICED_ENDLESS); } @@ -264,27 +264,27 @@ export class GameMode implements GameModeConfig { * At this time it is Eternamax Eternatus * @returns true if waveIndex is a multiple of 1000 in Endless */ - isEndlessMajorBoss(waveIndex: integer): boolean { + isEndlessMajorBoss(waveIndex: number): boolean { return waveIndex % 1000 === 0 && (this.modeId === GameModes.ENDLESS || this.modeId === GameModes.SPLICED_ENDLESS); } /** * Checks whether there is a fixed battle on this gamemode on a given wave. - * @param {integer} waveIndex The wave to check. + * @param {number} waveIndex The wave to check. * @returns {boolean} If this game mode has a fixed battle on this wave */ - isFixedBattle(waveIndex: integer): boolean { + isFixedBattle(waveIndex: number): boolean { const dummyConfig = new FixedBattleConfig(); return this.battleConfig.hasOwnProperty(waveIndex) || applyChallenges(this, ChallengeType.FIXED_BATTLES, waveIndex, dummyConfig); } /** * Returns the config for the fixed battle for a particular wave. - * @param {integer} waveIndex The wave to check. + * @param {number} waveIndex The wave to check. * @returns {boolean} The fixed battle for this wave. */ - getFixedBattle(waveIndex: integer): FixedBattleConfig { + getFixedBattle(waveIndex: number): FixedBattleConfig { const challengeConfig = new FixedBattleConfig(); if (applyChallenges(this, ChallengeType.FIXED_BATTLES, waveIndex, challengeConfig)) { return challengeConfig; @@ -294,7 +294,7 @@ export class GameMode implements GameModeConfig { } - getClearScoreBonus(): integer { + getClearScoreBonus(): number { switch (this.modeId) { case GameModes.CLASSIC: case GameModes.CHALLENGE: @@ -306,7 +306,7 @@ export class GameMode implements GameModeConfig { } } - getEnemyModifierChance(isBoss: boolean): integer { + getEnemyModifierChance(isBoss: boolean): number { switch (this.modeId) { case GameModes.CLASSIC: case GameModes.CHALLENGE: diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index f531e96d641..b65f1b53441 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -194,9 +194,9 @@ export interface GeneratedPersistentModifierType { class AddPokeballModifierType extends ModifierType { private pokeballType: PokeballType; - private count: integer; + private count: number; - constructor(iconImage: string, pokeballType: PokeballType, count: integer) { + constructor(iconImage: string, pokeballType: PokeballType, count: number) { super("", iconImage, (_type, _args) => new AddPokeballModifier(this, pokeballType, count), "pb", "se/pb_bounce_1"); this.pokeballType = pokeballType; this.count = count; @@ -221,9 +221,9 @@ class AddPokeballModifierType extends ModifierType { class AddVoucherModifierType extends ModifierType { private voucherType: VoucherType; - private count: integer; + private count: number; - constructor(voucherType: VoucherType, count: integer) { + constructor(voucherType: VoucherType, count: number) { super("", getVoucherTypeIcon(voucherType), (_type, _args) => new AddVoucherModifier(this, voucherType, count), "voucher"); this.count = count; this.voucherType = voucherType; @@ -276,11 +276,11 @@ export class PokemonHeldItemModifierType extends PokemonModifierType { } export class PokemonHpRestoreModifierType extends PokemonModifierType { - protected restorePoints: integer; - protected restorePercent: integer; + protected restorePoints: number; + protected restorePercent: number; protected healStatus: boolean; - constructor(localeKey: string, iconImage: string, restorePoints: integer, restorePercent: integer, healStatus: boolean = false, newModifierFunc?: NewModifierFunc, selectFilter?: PokemonSelectFilter, group?: string) { + constructor(localeKey: string, iconImage: string, restorePoints: number, restorePercent: number, healStatus: boolean = false, newModifierFunc?: NewModifierFunc, selectFilter?: PokemonSelectFilter, group?: string) { super(localeKey, iconImage, newModifierFunc || ((_type, args) => new PokemonHpRestoreModifier(this, (args[0] as PlayerPokemon).id, this.restorePoints, this.restorePercent, this.healStatus, false)), selectFilter || ((pokemon: PlayerPokemon) => { if (!pokemon.hp || (pokemon.isFullHp() && (!this.healStatus || (!pokemon.status && !pokemon.getTag(BattlerTagType.CONFUSED))))) { @@ -307,7 +307,7 @@ export class PokemonHpRestoreModifierType extends PokemonModifierType { } export class PokemonReviveModifierType extends PokemonHpRestoreModifierType { - constructor(localeKey: string, iconImage: string, restorePercent: integer) { + constructor(localeKey: string, iconImage: string, restorePercent: number) { super(localeKey, iconImage, 0, restorePercent, false, (_type, args) => new PokemonHpRestoreModifier(this, (args[0] as PlayerPokemon).id, 0, this.restorePercent, false, true), ((pokemon: PlayerPokemon) => { if (!pokemon.isFainted()) { @@ -356,10 +356,10 @@ export abstract class PokemonMoveModifierType extends PokemonModifierType { } export class PokemonPpRestoreModifierType extends PokemonMoveModifierType { - protected restorePoints: integer; + protected restorePoints: number; - constructor(localeKey: string, iconImage: string, restorePoints: integer) { - super(localeKey, iconImage, (_type, args) => new PokemonPpRestoreModifier(this, (args[0] as PlayerPokemon).id, (args[1] as integer), this.restorePoints), + constructor(localeKey: string, iconImage: string, restorePoints: number) { + super(localeKey, iconImage, (_type, args) => new PokemonPpRestoreModifier(this, (args[0] as PlayerPokemon).id, (args[1] as number), this.restorePoints), (_pokemon: PlayerPokemon) => { return null; }, (pokemonMove: PokemonMove) => { @@ -381,9 +381,9 @@ export class PokemonPpRestoreModifierType extends PokemonMoveModifierType { } export class PokemonAllMovePpRestoreModifierType extends PokemonModifierType { - protected restorePoints: integer; + protected restorePoints: number; - constructor(localeKey: string, iconImage: string, restorePoints: integer) { + constructor(localeKey: string, iconImage: string, restorePoints: number) { super(localeKey, iconImage, (_type, args) => new PokemonAllMovePpRestoreModifier(this, (args[0] as PlayerPokemon).id, this.restorePoints), (pokemon: PlayerPokemon) => { if (!pokemon.getMoveset().filter(m => m?.ppUsed).length) { @@ -404,10 +404,10 @@ export class PokemonAllMovePpRestoreModifierType extends PokemonModifierType { } export class PokemonPpUpModifierType extends PokemonMoveModifierType { - protected upPoints: integer; + protected upPoints: number; - constructor(localeKey: string, iconImage: string, upPoints: integer) { - super(localeKey, iconImage, (_type, args) => new PokemonPpUpModifier(this, (args[0] as PlayerPokemon).id, (args[1] as integer), this.upPoints), + constructor(localeKey: string, iconImage: string, upPoints: number) { + super(localeKey, iconImage, (_type, args) => new PokemonPpUpModifier(this, (args[0] as PlayerPokemon).id, (args[1] as number), this.upPoints), (_pokemon: PlayerPokemon) => { return null; }, (pokemonMove: PokemonMove) => { @@ -451,7 +451,7 @@ export class PokemonNatureChangeModifierType extends PokemonModifierType { export class RememberMoveModifierType extends PokemonModifierType { constructor(localeKey: string, iconImage: string, group?: string) { - super(localeKey, iconImage, (type, args) => new RememberMoveModifier(type, (args[0] as PlayerPokemon).id, (args[1] as integer)), + super(localeKey, iconImage, (type, args) => new RememberMoveModifier(type, (args[0] as PlayerPokemon).id, (args[1] as number)), (pokemon: PlayerPokemon) => { if (!pokemon.getLearnableLevelMoves().length) { return PartyUiHandler.NoEffectMessage; @@ -552,9 +552,9 @@ enum AttackTypeBoosterItem { export class AttackTypeBoosterModifierType extends PokemonHeldItemModifierType implements GeneratedPersistentModifierType { public moveType: Type; - public boostPercent: integer; + public boostPercent: number; - constructor(moveType: Type, boostPercent: integer) { + constructor(moveType: Type, boostPercent: number) { super("", `${AttackTypeBoosterItem[moveType]?.toLowerCase()}`, (_type, args) => new AttackTypeBoosterModifier(this, (args[0] as Pokemon).id, moveType, boostPercent)); @@ -657,9 +657,9 @@ export class BaseStatBoosterModifierType extends PokemonHeldItemModifierType imp * Shuckle Juice item */ export class PokemonBaseStatTotalModifierType extends PokemonHeldItemModifierType implements GeneratedPersistentModifierType { - private readonly statModifier: integer; + private readonly statModifier: number; - constructor(statModifier: integer) { + constructor(statModifier: number) { super("modifierType:ModifierType.MYSTERY_ENCOUNTER_SHUCKLE_JUICE", "berry_juice", (_type, args) => new PokemonBaseStatTotalModifier(this, (args[0] as Pokemon).id, this.statModifier)); this.statModifier = statModifier; } @@ -681,10 +681,10 @@ export class PokemonBaseStatTotalModifierType extends PokemonHeldItemModifierTyp * Old Gateau item */ export class PokemonBaseStatFlatModifierType extends PokemonHeldItemModifierType implements GeneratedPersistentModifierType { - private readonly statModifier: integer; + private readonly statModifier: number; private readonly stats: Stat[]; - constructor(statModifier: integer, stats: Stat[]) { + constructor(statModifier: number, stats: Stat[]) { super("modifierType:ModifierType.MYSTERY_ENCOUNTER_OLD_GATEAU", "old_gateau", (_type, args) => new PokemonBaseStatFlatModifier(this, (args[0] as Pokemon).id, this.statModifier, this.stats)); this.statModifier = statModifier; this.stats = stats; @@ -746,9 +746,9 @@ export class MoneyRewardModifierType extends ModifierType { } export class ExpBoosterModifierType extends ModifierType { - private boostPercent: integer; + private boostPercent: number; - constructor(localeKey: string, iconImage: string, boostPercent: integer) { + constructor(localeKey: string, iconImage: string, boostPercent: number) { super(localeKey, iconImage, () => new ExpBoosterModifier(this, boostPercent)); this.boostPercent = boostPercent; @@ -760,9 +760,9 @@ export class ExpBoosterModifierType extends ModifierType { } export class PokemonExpBoosterModifierType extends PokemonHeldItemModifierType { - private boostPercent: integer; + private boostPercent: number; - constructor(localeKey: string, iconImage: string, boostPercent: integer) { + constructor(localeKey: string, iconImage: string, boostPercent: number) { super(localeKey, iconImage, (_type, args) => new PokemonExpBoosterModifier(this, (args[0] as Pokemon).id, boostPercent)); this.boostPercent = boostPercent; @@ -784,9 +784,9 @@ export class PokemonFriendshipBoosterModifierType extends PokemonHeldItemModifie } export class PokemonMoveAccuracyBoosterModifierType extends PokemonHeldItemModifierType { - private amount: integer; + private amount: number; - constructor(localeKey: string, iconImage: string, amount: integer, group?: string, soundName?: string) { + constructor(localeKey: string, iconImage: string, amount: number, group?: string, soundName?: string) { super(localeKey, iconImage, (_type, args) => new PokemonMoveAccuracyBoosterModifier(this, (args[0] as Pokemon).id, amount), group, soundName); this.amount = amount; @@ -934,7 +934,7 @@ class AttackTypeBoosterModifierTypeGenerator extends ModifierTypeGenerator { return null; } - const attackMoveTypeWeights = new Map(); + const attackMoveTypeWeights = new Map(); let totalWeight = 0; for (const t of attackMoveTypes) { if (attackMoveTypeWeights.has(t)) { @@ -1215,9 +1215,9 @@ export class TerastallizeModifierType extends PokemonHeldItemModifierType implem } export class ContactHeldItemTransferChanceModifierType extends PokemonHeldItemModifierType { - private chancePercent: integer; + private chancePercent: number; - constructor(localeKey: string, iconImage: string, chancePercent: integer, group?: string, soundName?: string) { + constructor(localeKey: string, iconImage: string, chancePercent: number, group?: string, soundName?: string) { super(localeKey, iconImage, (type, args) => new ContactHeldItemTransferChanceModifier(type, (args[0] as Pokemon).id, chancePercent), group, soundName); this.chancePercent = chancePercent; @@ -1239,10 +1239,10 @@ export class TurnHeldItemTransferModifierType extends PokemonHeldItemModifierTyp } export class EnemyAttackStatusEffectChanceModifierType extends ModifierType { - private chancePercent: integer; + private chancePercent: number; private effect: StatusEffect; - constructor(localeKey: string, iconImage: string, chancePercent: integer, effect: StatusEffect, stackCount?: integer) { + constructor(localeKey: string, iconImage: string, chancePercent: number, effect: StatusEffect, stackCount?: number) { super(localeKey, iconImage, (type, _args) => new EnemyAttackStatusEffectChanceModifier(type, effect, chancePercent, stackCount), "enemy_status_chance"); this.chancePercent = chancePercent; @@ -1272,7 +1272,7 @@ export class EnemyEndureChanceModifierType extends ModifierType { } export type ModifierTypeFunc = () => ModifierType; -type WeightedModifierTypeWeightFunc = (party: Pokemon[], rerollCount?: integer) => integer; +type WeightedModifierTypeWeightFunc = (party: Pokemon[], rerollCount?: number) => number; /** * High order function that returns a WeightedModifierTypeWeightFunc that will only be applied on @@ -1281,7 +1281,7 @@ type WeightedModifierTypeWeightFunc = (party: Pokemon[], rerollCount?: integer) * @param defaultWeight - ModifierType default weight * @returns A WeightedModifierTypeWeightFunc */ -function skipInClassicAfterWave(wave: integer, defaultWeight: integer): WeightedModifierTypeWeightFunc { +function skipInClassicAfterWave(wave: number, defaultWeight: number): WeightedModifierTypeWeightFunc { return () => { const gameMode = globalScene.gameMode; const currentWave = globalScene.currentBattle.waveIndex; @@ -1295,7 +1295,7 @@ function skipInClassicAfterWave(wave: integer, defaultWeight: integer): Weighted * @param defaultWeight ModifierType default weight * @returns A WeightedModifierTypeWeightFunc */ -function skipInLastClassicWaveOrDefault(defaultWeight: integer) : WeightedModifierTypeWeightFunc { +function skipInLastClassicWaveOrDefault(defaultWeight: number) : WeightedModifierTypeWeightFunc { return skipInClassicAfterWave(199, defaultWeight); } @@ -1314,10 +1314,10 @@ function lureWeightFunc(maxBattles: number, weight: number): WeightedModifierTyp } class WeightedModifierType { public modifierType: ModifierType; - public weight: integer | WeightedModifierTypeWeightFunc; - public maxWeight: integer | WeightedModifierTypeWeightFunc; + public weight: number | WeightedModifierTypeWeightFunc; + public maxWeight: number | WeightedModifierTypeWeightFunc; - constructor(modifierTypeFunc: ModifierTypeFunc, weight: integer | WeightedModifierTypeWeightFunc, maxWeight?: integer | WeightedModifierTypeWeightFunc) { + constructor(modifierTypeFunc: ModifierTypeFunc, weight: number | WeightedModifierTypeWeightFunc, maxWeight?: number | WeightedModifierTypeWeightFunc) { this.modifierType = modifierTypeFunc(); this.modifierType.id = Object.keys(modifierTypes).find(k => modifierTypes[k] === modifierTypeFunc)!; // TODO: is this bang correct? this.weight = weight; @@ -1715,13 +1715,13 @@ const modifierPool: ModifierPool = { if (!party.find(p => p.getLearnableLevelMoves().length)) { return 0; } - const highestPartyLevel = party.map(p => p.level).reduce((highestLevel: integer, level: integer) => Math.max(highestLevel, level), 1); + const highestPartyLevel = party.map(p => p.level).reduce((highestLevel: number, level: number) => Math.max(highestLevel, level), 1); return Math.min(Math.ceil(highestPartyLevel / 20), 4); }, 4), new WeightedModifierType(modifierTypes.BASE_STAT_BOOSTER, 3), new WeightedModifierType(modifierTypes.TERA_SHARD, 1), new WeightedModifierType(modifierTypes.DNA_SPLICERS, (party: Pokemon[]) => globalScene.gameMode.isSplicedOnly && party.filter(p => !p.fusionSpecies).length > 1 ? 4 : 0), - new WeightedModifierType(modifierTypes.VOUCHER, (_party: Pokemon[], rerollCount: integer) => !globalScene.gameMode.isDaily ? Math.max(1 - rerollCount, 0) : 0, 1), + new WeightedModifierType(modifierTypes.VOUCHER, (_party: Pokemon[], rerollCount: number) => !globalScene.gameMode.isDaily ? Math.max(1 - rerollCount, 0) : 0, 1), ].map(m => { m.setTier(ModifierTier.GREAT); return m; }), @@ -1868,7 +1868,7 @@ const modifierPool: ModifierPool = { new WeightedModifierType(modifierTypes.RARE_FORM_CHANGE_ITEM, () => Math.min(Math.ceil(globalScene.currentBattle.waveIndex / 50), 4) * 6, 24), new WeightedModifierType(modifierTypes.MEGA_BRACELET, () => Math.min(Math.ceil(globalScene.currentBattle.waveIndex / 50), 4) * 9, 36), new WeightedModifierType(modifierTypes.DYNAMAX_BAND, () => Math.min(Math.ceil(globalScene.currentBattle.waveIndex / 50), 4) * 9, 36), - new WeightedModifierType(modifierTypes.VOUCHER_PLUS, (_party: Pokemon[], rerollCount: integer) => !globalScene.gameMode.isDaily ? Math.max(3 - rerollCount * 1, 0) : 0, 3), + new WeightedModifierType(modifierTypes.VOUCHER_PLUS, (_party: Pokemon[], rerollCount: number) => !globalScene.gameMode.isDaily ? Math.max(3 - rerollCount * 1, 0) : 0, 3), ].map(m => { m.setTier(ModifierTier.ROGUE); return m; }), @@ -1877,7 +1877,7 @@ const modifierPool: ModifierPool = { new WeightedModifierType(modifierTypes.SHINY_CHARM, 14), new WeightedModifierType(modifierTypes.HEALING_CHARM, 18), new WeightedModifierType(modifierTypes.MULTI_LENS, 18), - new WeightedModifierType(modifierTypes.VOUCHER_PREMIUM, (_party: Pokemon[], rerollCount: integer) => + new WeightedModifierType(modifierTypes.VOUCHER_PREMIUM, (_party: Pokemon[], rerollCount: number) => !globalScene.gameMode.isDaily && !globalScene.gameMode.isEndless && !globalScene.gameMode.isSplicedOnly ? Math.max(5 - rerollCount * 2, 0) : 0, 5), new WeightedModifierType(modifierTypes.DNA_SPLICERS, (party: Pokemon[]) => !globalScene.gameMode.isSplicedOnly && party.filter(p => !p.fusionSpecies).length > 1 ? 24 : 0, 24), new WeightedModifierType(modifierTypes.MINI_BLACK_HOLE, () => (globalScene.gameMode.isDaily || (!globalScene.gameMode.isFreshStartChallenge() && globalScene.gameData.isUnlocked(Unlockables.MINI_BLACK_HOLE))) ? 1 : 0, 1), @@ -2077,7 +2077,7 @@ const tierWeights = [ 768 / 1024, 195 / 1024, 48 / 1024, 12 / 1024, 1 / 1024 ]; */ export const itemPoolChecks: Map = new Map(); -export function regenerateModifierPoolThresholds(party: Pokemon[], poolType: ModifierPoolType, rerollCount: integer = 0) { +export function regenerateModifierPoolThresholds(party: Pokemon[], poolType: ModifierPoolType, rerollCount: number = 0) { const pool = getModifierPoolForType(poolType); itemPoolChecks.forEach((_v, k) => { itemPoolChecks.set(k, false); @@ -2091,7 +2091,7 @@ export function regenerateModifierPoolThresholds(party: Pokemon[], poolType: Mod const tierModifierIds: string[] = []; let tierMaxWeight = 0; let i = 0; - pool[t].reduce((total: integer, modifierType: WeightedModifierType) => { + pool[t].reduce((total: number, modifierType: WeightedModifierType) => { const weightedModifierType = modifierType as WeightedModifierType; const existingModifiers = globalScene.findModifiers(m => m.type.id === weightedModifierType.modifierType.id, poolType === ModifierPoolType.PLAYER); const itemModifierType = weightedModifierType.modifierType instanceof ModifierTypeGenerator @@ -2103,7 +2103,7 @@ export function regenerateModifierPoolThresholds(party: Pokemon[], poolType: Mod || existingModifiers.find(m => m.stackCount < m.getMaxStackCount(true)) ? weightedModifierType.weight instanceof Function ? (weightedModifierType.weight as Function)(party, rerollCount) - : weightedModifierType.weight as integer + : weightedModifierType.weight as number : 0; if (weightedModifierType.maxWeight) { const modifierId = weightedModifierType.modifierType.id; @@ -2187,7 +2187,7 @@ export function getModifierTypeFuncById(id: string): ModifierTypeFunc { * - `rerollMultiplier?: number` If specified, can adjust the amount of money required for a shop reroll. If set to a negative value, the shop will not allow rerolls at all. * - `allowLuckUpgrades?: boolean` Default `true`, if `false` will prevent set item tiers from upgrading via luck */ -export function getPlayerModifierTypeOptions(count: integer, party: PlayerPokemon[], modifierTiers?: ModifierTier[], customModifierSettings?: CustomModifierSettings): ModifierTypeOption[] { +export function getPlayerModifierTypeOptions(count: number, party: PlayerPokemon[], modifierTiers?: ModifierTier[], customModifierSettings?: CustomModifierSettings): ModifierTypeOption[] { const options: ModifierTypeOption[] = []; const retryCount = Math.min(count * 5, 50); if (!customModifierSettings) { @@ -2248,7 +2248,7 @@ export function getPlayerModifierTypeOptions(count: integer, party: PlayerPokemo * @param tier If specified will generate item of tier * @param allowLuckUpgrades `true` to allow items to upgrade tiers (the little animation that plays and is affected by luck) */ -function getModifierTypeOptionWithRetry(existingOptions: ModifierTypeOption[], retryCount: integer, party: PlayerPokemon[], tier?: ModifierTier, allowLuckUpgrades?: boolean): ModifierTypeOption { +function getModifierTypeOptionWithRetry(existingOptions: ModifierTypeOption[], retryCount: number, party: PlayerPokemon[], tier?: ModifierTier, allowLuckUpgrades?: boolean): ModifierTypeOption { allowLuckUpgrades = allowLuckUpgrades ?? true; let candidate = getNewModifierTypeOption(party, ModifierPoolType.PLAYER, tier, undefined, 0, allowLuckUpgrades); let r = 0; @@ -2283,7 +2283,7 @@ export function overridePlayerModifierTypeOptions(options: ModifierTypeOption[], } } -export function getPlayerShopModifierTypeOptionsForWave(waveIndex: integer, baseCost: integer): ModifierTypeOption[] { +export function getPlayerShopModifierTypeOptionsForWave(waveIndex: number, baseCost: number): ModifierTypeOption[] { if (!(waveIndex % 10)) { return []; } @@ -2349,7 +2349,7 @@ export function getEnemyBuffModifierForWave(tier: ModifierTier, enemyModifiers: return modifier; } -export function getEnemyModifierTypesForWave(waveIndex: integer, count: integer, party: EnemyPokemon[], poolType: ModifierPoolType.WILD | ModifierPoolType.TRAINER, upgradeChance: integer = 0): PokemonHeldItemModifierType[] { +export function getEnemyModifierTypesForWave(waveIndex: number, count: number, party: EnemyPokemon[], poolType: ModifierPoolType.WILD | ModifierPoolType.TRAINER, upgradeChance: number = 0): PokemonHeldItemModifierType[] { const ret = new Array(count).fill(0).map(() => getNewModifierTypeOption(party, poolType, undefined, upgradeChance && !randSeedInt(upgradeChance) ? 1 : 0)?.type as PokemonHeldItemModifierType); if (!(waveIndex % 1000)) { ret.push(getModifierType(modifierTypes.MINI_BLACK_HOLE) as PokemonHeldItemModifierType); @@ -2393,7 +2393,7 @@ export function getDailyRunStarterModifiers(party: PlayerPokemon[]): PokemonHeld * @param retryCount Max allowed tries before the next tier down is checked for a valid ModifierType * @param allowLuckUpgrades Default true. If false, will not allow ModifierType to randomly upgrade to next tier */ -function getNewModifierTypeOption(party: Pokemon[], poolType: ModifierPoolType, tier?: ModifierTier, upgradeCount?: integer, retryCount: integer = 0, allowLuckUpgrades: boolean = true): ModifierTypeOption | null { +function getNewModifierTypeOption(party: Pokemon[], poolType: ModifierPoolType, tier?: ModifierTier, upgradeCount?: number, retryCount: number = 0, allowLuckUpgrades: boolean = true): ModifierTypeOption | null { const player = !poolType; const pool = getModifierPoolForType(poolType); let thresholds: object; @@ -2472,7 +2472,7 @@ function getNewModifierTypeOption(party: Pokemon[], poolType: ModifierPoolType, const tierThresholds = Object.keys(thresholds[tier]); const totalWeight = parseInt(tierThresholds[tierThresholds.length - 1]); const value = randSeedInt(totalWeight); - let index: integer | undefined; + let index: number | undefined; for (const t of tierThresholds) { const threshold = parseInt(t); if (value < threshold) { @@ -2514,10 +2514,10 @@ export function getDefaultModifierTypeForTier(tier: ModifierTier): ModifierType export class ModifierTypeOption { public type: ModifierType; - public upgradeCount: integer; - public cost: integer; + public upgradeCount: number; + public cost: number; - constructor(type: ModifierType, upgradeCount: integer, cost: number = 0) { + constructor(type: ModifierType, upgradeCount: number, cost: number = 0) { this.type = type; this.upgradeCount = upgradeCount; this.cost = Math.min(Math.round(cost), Number.MAX_SAFE_INTEGER); @@ -2529,7 +2529,7 @@ export class ModifierTypeOption { * @param party The player's party. * @returns A number between 0 and 14 based on the party's total luck value, or a random number between 0 and 14 if the player is in Daily Run mode. */ -export function getPartyLuckValue(party: Pokemon[]): integer { +export function getPartyLuckValue(party: Pokemon[]): number { if (globalScene.gameMode.isDaily) { const DailyLuck = new NumberHolder(0); globalScene.executeWithSeedOffset(() => { @@ -2539,15 +2539,15 @@ export function getPartyLuckValue(party: Pokemon[]): integer { } const eventSpecies = globalScene.eventManager.getEventLuckBoostedSpecies(); const luck = Phaser.Math.Clamp(party.map(p => p.isAllowedInBattle() ? p.getLuck() + (eventSpecies.includes(p.species.speciesId) ? 1 : 0) : 0) - .reduce((total: integer, value: integer) => total += value, 0), 0, 14); + .reduce((total: number, value: number) => total += value, 0), 0, 14); return Math.min(globalScene.eventManager.getEventLuckBoost() + (luck ?? 0), 14); } -export function getLuckString(luckValue: integer): string { +export function getLuckString(luckValue: number): string { return [ "D", "C", "C+", "B-", "B", "B+", "A-", "A", "A+", "A++", "S", "S+", "SS", "SS+", "SSS" ][luckValue]; } -export function getLuckTextTint(luckValue: integer): integer { +export function getLuckTextTint(luckValue: number): number { let modifierTier: ModifierTier; if (luckValue > 11) { modifierTier = ModifierTier.LUXURY; diff --git a/src/overrides.ts b/src/overrides.ts index 06ad619a074..8f881ca59dd 100644 --- a/src/overrides.ts +++ b/src/overrides.ts @@ -126,7 +126,7 @@ class DefaultOverrides { /** * This will override the species of the fusion */ - readonly STARTER_FUSION_SPECIES_OVERRIDE: Species | integer = 0; + readonly STARTER_FUSION_SPECIES_OVERRIDE: Species | number = 0; readonly ABILITY_OVERRIDE: Abilities = Abilities.NONE; readonly PASSIVE_ABILITY_OVERRIDE: Abilities = Abilities.NONE; readonly STATUS_OVERRIDE: StatusEffect = StatusEffect.NONE; @@ -146,7 +146,7 @@ class DefaultOverrides { /** * This will override the species of the fusion only when the opponent is already a fusion */ - readonly OPP_FUSION_SPECIES_OVERRIDE: Species | integer = 0; + readonly OPP_FUSION_SPECIES_OVERRIDE: Species | number = 0; readonly OPP_LEVEL_OVERRIDE: number = 0; readonly OPP_ABILITY_OVERRIDE: Abilities = Abilities.NONE; readonly OPP_PASSIVE_ABILITY_OVERRIDE: Abilities = Abilities.NONE; diff --git a/src/phases/attempt-capture-phase.ts b/src/phases/attempt-capture-phase.ts index 1f4fc0d6271..6a6a2efa061 100644 --- a/src/phases/attempt-capture-phase.ts +++ b/src/phases/attempt-capture-phase.ts @@ -24,7 +24,7 @@ export class AttemptCapturePhase extends PokemonPhase { private pokeball: Phaser.GameObjects.Sprite; private originalY: number; - constructor(targetIndex: integer, pokeballType: PokeballType) { + constructor(targetIndex: number, pokeballType: PokeballType) { super(BattlerIndex.ENEMY + targetIndex); this.pokeballType = pokeballType; @@ -174,7 +174,7 @@ export class AttemptCapturePhase extends PokemonPhase { }); } - failCatch(shakeCount: integer) { + failCatch(shakeCount: number) { const pokemon = this.getPokemon(); globalScene.playSound("se/pb_rel"); @@ -276,7 +276,7 @@ export class AttemptCapturePhase extends PokemonPhase { }); }, false); }, () => { - globalScene.ui.setMode(Mode.PARTY, PartyUiMode.RELEASE, this.fieldIndex, (slotIndex: integer, _option: PartyOption) => { + globalScene.ui.setMode(Mode.PARTY, PartyUiMode.RELEASE, this.fieldIndex, (slotIndex: number, _option: PartyOption) => { globalScene.ui.setMode(Mode.MESSAGE).then(() => { if (slotIndex < 6) { addToParty(slotIndex); diff --git a/src/phases/check-switch-phase.ts b/src/phases/check-switch-phase.ts index 06e08f7f30d..ea16e91b990 100644 --- a/src/phases/check-switch-phase.ts +++ b/src/phases/check-switch-phase.ts @@ -10,10 +10,10 @@ import { SwitchPhase } from "./switch-phase"; import { SwitchType } from "#enums/switch-type"; export class CheckSwitchPhase extends BattlePhase { - protected fieldIndex: integer; + protected fieldIndex: number; protected useName: boolean; - constructor(fieldIndex: integer, useName: boolean) { + constructor(fieldIndex: number, useName: boolean) { super(); this.fieldIndex = fieldIndex; diff --git a/src/phases/command-phase.ts b/src/phases/command-phase.ts index e2bad953fc5..632344be335 100644 --- a/src/phases/command-phase.ts +++ b/src/phases/command-phase.ts @@ -25,9 +25,9 @@ import { ArenaTagSide } from "#app/data/arena-tag"; import { ArenaTagType } from "#app/enums/arena-tag-type"; export class CommandPhase extends FieldPhase { - protected fieldIndex: integer; + protected fieldIndex: number; - constructor(fieldIndex: integer) { + constructor(fieldIndex: number) { super(); this.fieldIndex = fieldIndex; @@ -113,7 +113,7 @@ export class CommandPhase extends FieldPhase { } } - handleCommand(command: Command, cursor: integer, ...args: any[]): boolean { + handleCommand(command: Command, cursor: number, ...args: any[]): boolean { const playerPokemon = globalScene.getPlayerField()[this.fieldIndex]; let success: boolean = false; @@ -319,7 +319,7 @@ export class CommandPhase extends FieldPhase { } } - getFieldIndex(): integer { + getFieldIndex(): number { return this.fieldIndex; } diff --git a/src/phases/common-anim-phase.ts b/src/phases/common-anim-phase.ts index 53cbdfaeb38..9ca74ed5a77 100644 --- a/src/phases/common-anim-phase.ts +++ b/src/phases/common-anim-phase.ts @@ -6,7 +6,7 @@ import { PokemonPhase } from "./pokemon-phase"; export class CommonAnimPhase extends PokemonPhase { private anim: CommonAnim | null; - private targetIndex: integer | undefined; + private targetIndex: number | undefined; private playOnEmptyField: boolean; constructor(battlerIndex?: BattlerIndex, targetIndex?: BattlerIndex, anim?: CommonAnim, playOnEmptyField: boolean = false) { diff --git a/src/phases/damage-anim-phase.ts b/src/phases/damage-anim-phase.ts index 2983d6b2de0..a21d9d4622a 100644 --- a/src/phases/damage-anim-phase.ts +++ b/src/phases/damage-anim-phase.ts @@ -6,11 +6,11 @@ import { fixedInt } from "#app/utils"; import { PokemonPhase } from "#app/phases/pokemon-phase"; export class DamageAnimPhase extends PokemonPhase { - private amount: integer; + private amount: number; private damageResult: DamageResult; private critical: boolean; - constructor(battlerIndex: BattlerIndex, amount: integer, damageResult?: DamageResult, critical: boolean = false) { + constructor(battlerIndex: BattlerIndex, amount: number, damageResult?: DamageResult, critical: boolean = false) { super(battlerIndex); this.amount = amount; @@ -35,7 +35,7 @@ export class DamageAnimPhase extends PokemonPhase { this.applyDamage(); } - updateAmount(amount: integer): void { + updateAmount(amount: number): void { this.amount = amount; } diff --git a/src/phases/egg-hatch-phase.ts b/src/phases/egg-hatch-phase.ts index 11bf9584ee7..2d0aa24dd1f 100644 --- a/src/phases/egg-hatch-phase.ts +++ b/src/phases/egg-hatch-phase.ts @@ -28,7 +28,7 @@ export class EggHatchPhase extends Phase { private eggHatchData: EggHatchData; /** The number of eggs that are hatching */ - private eggsToHatchCount: integer; + private eggsToHatchCount: number; /** The container that lists how many eggs are hatching */ private eggCounterContainer: EggCounterContainer; @@ -59,7 +59,7 @@ export class EggHatchPhase extends Phase { /** The newly hatched {@link PlayerPokemon} */ private pokemon: PlayerPokemon; /** The index of which egg move is unlocked. 0-2 is common, 3 is rare */ - private eggMoveIndex: integer; + private eggMoveIndex: number; /** Internal booleans representing if the egg is hatched, able to be skipped, or skipped */ private hatched: boolean; private canSkip: boolean; @@ -68,7 +68,7 @@ export class EggHatchPhase extends Phase { private evolutionBgm: AnySound; private eggLapsePhase: EggLapsePhase; - constructor(hatchScene: EggLapsePhase, egg: Egg, eggsToHatchCount: integer) { + constructor(hatchScene: EggLapsePhase, egg: Egg, eggsToHatchCount: number) { super(); this.eggLapsePhase = hatchScene; this.egg = egg; @@ -221,7 +221,7 @@ export class EggHatchPhase extends Phase { * @param count the current number of times this function has been called. * @returns nothing since it's a Promise */ - doEggShake(intensity: number, repeatCount?: integer, count?: integer): Promise { + doEggShake(intensity: number, repeatCount?: number, count?: number): Promise { return new Promise(resolve => { if (repeatCount === undefined) { repeatCount = 0; @@ -382,7 +382,7 @@ export class EggHatchPhase extends Phase { * @param amplitude Scaling * @returns a number */ - sin(index: integer, amplitude: integer): number { + sin(index: number, amplitude: number): number { return amplitude * Math.sin(index * (Math.PI / 128)); } @@ -391,7 +391,7 @@ export class EggHatchPhase extends Phase { * @param intensity number of times this is repeated (this is a badly named variable) * @param offsetY how much to offset the Y coordinates */ - doSpray(intensity: integer, offsetY?: number) { + doSpray(intensity: number, offsetY?: number) { globalScene.tweens.addCounter({ repeat: intensity, duration: Utils.getFrameMs(1), @@ -406,7 +406,7 @@ export class EggHatchPhase extends Phase { * @param trigIndex Used to modify the particle's vertical speed, is a random number from 0-7 * @param offsetY how much to offset the Y coordinate */ - doSprayParticle(trigIndex: integer, offsetY: number) { + doSprayParticle(trigIndex: number, offsetY: number) { const initialX = this.eggHatchBg.displayWidth / 2; const initialY = this.eggHatchBg.displayHeight / 2 + offsetY; const shardKey = !this.egg.isManaphyEgg() ? this.egg.tier.toString() : "1"; diff --git a/src/phases/encounter-phase.ts b/src/phases/encounter-phase.ts index 353dd6681cb..7e62ca17f7c 100644 --- a/src/phases/encounter-phase.ts +++ b/src/phases/encounter-phase.ts @@ -272,7 +272,7 @@ export class EncounterPhase extends BattlePhase { const enemyField = globalScene.getEnemyField(); globalScene.tweens.add({ targets: [ globalScene.arenaEnemy, globalScene.currentBattle.trainer, enemyField, globalScene.arenaPlayer, globalScene.trainer ].flat(), - x: (_target, _key, value, fieldIndex: integer) => fieldIndex < 2 + (enemyField.length) ? value + 300 : value - 300, + x: (_target, _key, value, fieldIndex: number) => fieldIndex < 2 + (enemyField.length) ? value + 300 : value - 300, duration: 2000, onComplete: () => { if (!this.tryOverrideForBattleSpec()) { diff --git a/src/phases/enemy-command-phase.ts b/src/phases/enemy-command-phase.ts index 715303863be..e76518bb71e 100644 --- a/src/phases/enemy-command-phase.ts +++ b/src/phases/enemy-command-phase.ts @@ -15,10 +15,10 @@ import { BattlerTagType } from "#enums/battler-tag-type"; * @see {@linkcode EnemyPokemon.getNextMove} */ export class EnemyCommandPhase extends FieldPhase { - protected fieldIndex: integer; + protected fieldIndex: number; protected skipTurn: boolean = false; - constructor(fieldIndex: integer) { + constructor(fieldIndex: number) { super(); this.fieldIndex = fieldIndex; diff --git a/src/phases/enemy-party-member-pokemon-phase.ts b/src/phases/enemy-party-member-pokemon-phase.ts index 7c02cf97880..5c701f7d73a 100644 --- a/src/phases/enemy-party-member-pokemon-phase.ts +++ b/src/phases/enemy-party-member-pokemon-phase.ts @@ -2,7 +2,7 @@ import type { EnemyPokemon } from "#app/field/pokemon"; import { PartyMemberPokemonPhase } from "./party-member-pokemon-phase"; export abstract class EnemyPartyMemberPokemonPhase extends PartyMemberPokemonPhase { - constructor(partyMemberIndex: integer) { + constructor(partyMemberIndex: number) { super(partyMemberIndex, false); } diff --git a/src/phases/evolution-phase.ts b/src/phases/evolution-phase.ts index bf046e682e4..533edd320e3 100644 --- a/src/phases/evolution-phase.ts +++ b/src/phases/evolution-phase.ts @@ -20,7 +20,7 @@ import { EVOLVE_MOVE } from "#app/data/balance/pokemon-level-moves"; export class EvolutionPhase extends Phase { protected pokemon: PlayerPokemon; - protected lastLevel: integer; + protected lastLevel: number; private preEvolvedPokemonName: string; @@ -39,7 +39,7 @@ export class EvolutionPhase extends Phase { protected pokemonEvoSprite: Phaser.GameObjects.Sprite; protected pokemonEvoTintSprite: Phaser.GameObjects.Sprite; - constructor(pokemon: PlayerPokemon, evolution: SpeciesFormEvolution | null, lastLevel: integer) { + constructor(pokemon: PlayerPokemon, evolution: SpeciesFormEvolution | null, lastLevel: number) { super(); this.pokemon = pokemon; @@ -356,7 +356,7 @@ export class EvolutionPhase extends Phase { }); } - doCycle(l: number, lastCycle: integer = 15): Promise { + doCycle(l: number, lastCycle: number = 15): Promise { return new Promise(resolve => { const isLastCycle = l === lastCycle; globalScene.tweens.add({ @@ -427,7 +427,7 @@ export class EvolutionPhase extends Phase { }); } - doSpiralUpwardParticle(trigIndex: integer) { + doSpiralUpwardParticle(trigIndex: number) { const initialX = this.evolutionBaseBg.displayWidth / 2; const particle = globalScene.add.image(initialX, 0, "evo_sparkle"); this.evolutionContainer.add(particle); @@ -463,7 +463,7 @@ export class EvolutionPhase extends Phase { updateParticle(); } - doArcDownParticle(trigIndex: integer) { + doArcDownParticle(trigIndex: number) { const initialX = this.evolutionBaseBg.displayWidth / 2; const particle = globalScene.add.image(initialX, 0, "evo_sparkle"); particle.setScale(0.5); @@ -496,7 +496,7 @@ export class EvolutionPhase extends Phase { updateParticle(); } - doCircleInwardParticle(trigIndex: integer, speed: integer) { + doCircleInwardParticle(trigIndex: number, speed: number) { const initialX = this.evolutionBaseBg.displayWidth / 2; const initialY = this.evolutionBaseBg.displayHeight / 2; const particle = globalScene.add.image(initialX, initialY, "evo_sparkle"); @@ -528,7 +528,7 @@ export class EvolutionPhase extends Phase { updateParticle(); } - doSprayParticle(trigIndex: integer) { + doSprayParticle(trigIndex: number) { const initialX = this.evolutionBaseBg.displayWidth / 2; const initialY = this.evolutionBaseBg.displayHeight / 2; const particle = globalScene.add.image(initialX, initialY, "evo_sparkle"); diff --git a/src/phases/exp-phase.ts b/src/phases/exp-phase.ts index f0fe9fde719..7cf953851a1 100644 --- a/src/phases/exp-phase.ts +++ b/src/phases/exp-phase.ts @@ -9,7 +9,7 @@ import { LevelUpPhase } from "./level-up-phase"; export class ExpPhase extends PlayerPartyMemberPokemonPhase { private expValue: number; - constructor(partyMemberIndex: integer, expValue: number) { + constructor(partyMemberIndex: number, expValue: number) { super(partyMemberIndex); this.expValue = expValue; diff --git a/src/phases/learn-move-phase.ts b/src/phases/learn-move-phase.ts index a11b797c574..c1f3042dbbe 100644 --- a/src/phases/learn-move-phase.ts +++ b/src/phases/learn-move-phase.ts @@ -29,7 +29,7 @@ export class LearnMovePhase extends PlayerPartyMemberPokemonPhase { private learnMoveType: LearnMoveType; private cost: number; - constructor(partyMemberIndex: integer, moveId: Moves, learnMoveType: LearnMoveType = LearnMoveType.LEARN_MOVE, cost: number = -1) { + constructor(partyMemberIndex: number, moveId: Moves, learnMoveType: LearnMoveType = LearnMoveType.LEARN_MOVE, cost: number = -1) { super(partyMemberIndex); this.moveId = moveId; this.learnMoveType = learnMoveType; @@ -99,7 +99,7 @@ export class LearnMovePhase extends PlayerPartyMemberPokemonPhase { async forgetMoveProcess(move: Move, pokemon: Pokemon) { globalScene.ui.setMode(this.messageMode); await globalScene.ui.showTextPromise(i18next.t("battle:learnMoveForgetQuestion"), undefined, true); - await globalScene.ui.setModeWithoutClear(Mode.SUMMARY, pokemon, SummaryUiMode.LEARN_MOVE, move, (moveIndex: integer) => { + await globalScene.ui.setModeWithoutClear(Mode.SUMMARY, pokemon, SummaryUiMode.LEARN_MOVE, move, (moveIndex: number) => { if (moveIndex === 4) { globalScene.ui.setMode(this.messageMode).then(() => this.rejectMoveAndEnd(move, pokemon)); return; diff --git a/src/phases/message-phase.ts b/src/phases/message-phase.ts index 9439d8286c3..366fd324376 100644 --- a/src/phases/message-phase.ts +++ b/src/phases/message-phase.ts @@ -3,12 +3,12 @@ import { Phase } from "#app/phase"; export class MessagePhase extends Phase { private text: string; - private callbackDelay: integer | null; + private callbackDelay: number | null; private prompt: boolean | null; - private promptDelay: integer | null; + private promptDelay: number | null; private speaker?: string; - constructor(text: string, callbackDelay?: integer | null, prompt?: boolean | null, promptDelay?: integer | null, speaker?: string) { + constructor(text: string, callbackDelay?: number | null, prompt?: boolean | null, promptDelay?: number | null, speaker?: string) { super(); this.text = text; diff --git a/src/phases/party-member-pokemon-phase.ts b/src/phases/party-member-pokemon-phase.ts index bc702c832b1..592f35834aa 100644 --- a/src/phases/party-member-pokemon-phase.ts +++ b/src/phases/party-member-pokemon-phase.ts @@ -3,11 +3,11 @@ import type Pokemon from "#app/field/pokemon"; import { FieldPhase } from "./field-phase"; export abstract class PartyMemberPokemonPhase extends FieldPhase { - protected partyMemberIndex: integer; - protected fieldIndex: integer; + protected partyMemberIndex: number; + protected fieldIndex: number; protected player: boolean; - constructor(partyMemberIndex: integer, player: boolean) { + constructor(partyMemberIndex: number, player: boolean) { super(); this.partyMemberIndex = partyMemberIndex; diff --git a/src/phases/player-party-member-pokemon-phase.ts b/src/phases/player-party-member-pokemon-phase.ts index bdedc0743e9..d97376a8614 100644 --- a/src/phases/player-party-member-pokemon-phase.ts +++ b/src/phases/player-party-member-pokemon-phase.ts @@ -2,7 +2,7 @@ import type { PlayerPokemon } from "#app/field/pokemon"; import { PartyMemberPokemonPhase } from "./party-member-pokemon-phase"; export abstract class PlayerPartyMemberPokemonPhase extends PartyMemberPokemonPhase { - constructor(partyMemberIndex: integer) { + constructor(partyMemberIndex: number) { super(partyMemberIndex, true); } diff --git a/src/phases/pokemon-heal-phase.ts b/src/phases/pokemon-heal-phase.ts index 268794ce97c..a544d47df70 100644 --- a/src/phases/pokemon-heal-phase.ts +++ b/src/phases/pokemon-heal-phase.ts @@ -15,7 +15,7 @@ import { BattlerTagType } from "#app/enums/battler-tag-type"; import type { HealBlockTag } from "#app/data/battler-tags"; export class PokemonHealPhase extends CommonAnimPhase { - private hpHealed: integer; + private hpHealed: number; private message: string | null; private showFullHpMessage: boolean; private skipAnim: boolean; @@ -24,7 +24,7 @@ export class PokemonHealPhase extends CommonAnimPhase { private preventFullHeal: boolean; private fullRestorePP: boolean; - constructor(battlerIndex: BattlerIndex, hpHealed: integer, message: string | null, showFullHpMessage: boolean, skipAnim: boolean = false, revive: boolean = false, healStatus: boolean = false, preventFullHeal: boolean = false, fullRestorePP: boolean = false) { + constructor(battlerIndex: BattlerIndex, hpHealed: number, message: string | null, showFullHpMessage: boolean, skipAnim: boolean = false, revive: boolean = false, healStatus: boolean = false, preventFullHeal: boolean = false, fullRestorePP: boolean = false) { super(battlerIndex, undefined, CommonAnim.HEALTH_UP); this.hpHealed = hpHealed; diff --git a/src/phases/pokemon-phase.ts b/src/phases/pokemon-phase.ts index 29153ee726a..bf4193adb6d 100644 --- a/src/phases/pokemon-phase.ts +++ b/src/phases/pokemon-phase.ts @@ -4,11 +4,11 @@ import type Pokemon from "#app/field/pokemon"; import { FieldPhase } from "./field-phase"; export abstract class PokemonPhase extends FieldPhase { - protected battlerIndex: BattlerIndex | integer; + protected battlerIndex: BattlerIndex | number; public player: boolean; - public fieldIndex: integer; + public fieldIndex: number; - constructor(battlerIndex?: BattlerIndex | integer) { + constructor(battlerIndex?: BattlerIndex | number) { super(); if (battlerIndex === undefined) { diff --git a/src/phases/return-phase.ts b/src/phases/return-phase.ts index 9dd13f6d5be..8a876268c8e 100644 --- a/src/phases/return-phase.ts +++ b/src/phases/return-phase.ts @@ -4,7 +4,7 @@ import { SwitchType } from "#enums/switch-type"; import { SwitchSummonPhase } from "./switch-summon-phase"; export class ReturnPhase extends SwitchSummonPhase { - constructor(fieldIndex: integer) { + constructor(fieldIndex: number) { super(SwitchType.SWITCH, fieldIndex, -1, true); } diff --git a/src/phases/scan-ivs-phase.ts b/src/phases/scan-ivs-phase.ts index b3385a5de94..519d7913b79 100644 --- a/src/phases/scan-ivs-phase.ts +++ b/src/phases/scan-ivs-phase.ts @@ -9,9 +9,9 @@ import i18next from "i18next"; import { PokemonPhase } from "./pokemon-phase"; export class ScanIvsPhase extends PokemonPhase { - private shownIvs: integer; + private shownIvs: number; - constructor(battlerIndex: BattlerIndex, shownIvs: integer) { + constructor(battlerIndex: BattlerIndex, shownIvs: number) { super(battlerIndex); this.shownIvs = shownIvs; diff --git a/src/phases/select-biome-phase.ts b/src/phases/select-biome-phase.ts index 41077dfffc1..ea4dcc4274b 100644 --- a/src/phases/select-biome-phase.ts +++ b/src/phases/select-biome-phase.ts @@ -37,7 +37,7 @@ export class SelectBiomePhase extends BattlePhase { } else if (Array.isArray(biomeLinks[currentBiome])) { let biomes: Biome[] = []; globalScene.executeWithSeedOffset(() => { - biomes = (biomeLinks[currentBiome] as (Biome | [Biome, integer])[]) + biomes = (biomeLinks[currentBiome] as (Biome | [Biome, number])[]) .filter(b => !Array.isArray(b) || !Utils.randSeedInt(b[1])) .map(b => !Array.isArray(b) ? b : b[0]); }, globalScene.currentBattle.waveIndex); @@ -46,7 +46,7 @@ export class SelectBiomePhase extends BattlePhase { globalScene.executeWithSeedOffset(() => { biomeChoices = (!Array.isArray(biomeLinks[currentBiome]) ? [ biomeLinks[currentBiome] as Biome ] - : biomeLinks[currentBiome] as (Biome | [Biome, integer])[]) + : biomeLinks[currentBiome] as (Biome | [Biome, number])[]) .filter((b, i) => !Array.isArray(b) || !Utils.randSeedInt(b[1])) .map(b => Array.isArray(b) ? b[0] : b); }, globalScene.currentBattle.waveIndex); diff --git a/src/phases/select-modifier-phase.ts b/src/phases/select-modifier-phase.ts index 6c8788c6a51..3b9a0a0405c 100644 --- a/src/phases/select-modifier-phase.ts +++ b/src/phases/select-modifier-phase.ts @@ -16,14 +16,14 @@ import type { CustomModifierSettings } from "#app/modifier/modifier-type"; import { isNullOrUndefined, NumberHolder } from "#app/utils"; export class SelectModifierPhase extends BattlePhase { - private rerollCount: integer; + private rerollCount: number; private modifierTiers?: ModifierTier[]; private customModifierSettings?: CustomModifierSettings; private isCopy: boolean; private typeOptions: ModifierTypeOption[]; - constructor(rerollCount: integer = 0, modifierTiers?: ModifierTier[], customModifierSettings?: CustomModifierSettings, isCopy: boolean = false) { + constructor(rerollCount: number = 0, modifierTiers?: ModifierTier[], customModifierSettings?: CustomModifierSettings, isCopy: boolean = false) { super(); this.rerollCount = rerollCount; @@ -66,7 +66,7 @@ export class SelectModifierPhase extends BattlePhase { this.typeOptions = this.getModifierTypeOptions(modifierCount.value); - const modifierSelectCallback = (rowCursor: integer, cursor: integer) => { + const modifierSelectCallback = (rowCursor: number, cursor: number) => { if (rowCursor < 0 || cursor < 0) { globalScene.ui.showText(i18next.t("battle:skipItemQuestion"), null, () => { globalScene.ui.setOverlayMode(Mode.CONFIRM, () => { @@ -78,7 +78,7 @@ export class SelectModifierPhase extends BattlePhase { return false; } let modifierType: ModifierType; - let cost: integer; + let cost: number; const rerollCost = this.getRerollCost(globalScene.lockModifierTiers); switch (rowCursor) { case 0: @@ -101,7 +101,7 @@ export class SelectModifierPhase extends BattlePhase { } break; case 1: - globalScene.ui.setModeWithoutClear(Mode.PARTY, PartyUiMode.MODIFIER_TRANSFER, -1, (fromSlotIndex: integer, itemIndex: integer, itemQuantity: integer, toSlotIndex: integer) => { + globalScene.ui.setModeWithoutClear(Mode.PARTY, PartyUiMode.MODIFIER_TRANSFER, -1, (fromSlotIndex: number, itemIndex: number, itemQuantity: number, toSlotIndex: number) => { if (toSlotIndex !== undefined && fromSlotIndex < 6 && toSlotIndex < 6 && fromSlotIndex !== toSlotIndex && itemIndex > -1) { const itemModifiers = globalScene.findModifiers(m => m instanceof PokemonHeldItemModifier && m.isTransferable && m.pokemonId === party[fromSlotIndex].id) as PokemonHeldItemModifier[]; @@ -200,7 +200,7 @@ export class SelectModifierPhase extends BattlePhase { if (modifierType! instanceof PokemonModifierType) { //TODO: is the bang correct? if (modifierType instanceof FusePokemonModifierType) { - globalScene.ui.setModeWithoutClear(Mode.PARTY, PartyUiMode.SPLICE, -1, (fromSlotIndex: integer, spliceSlotIndex: integer) => { + globalScene.ui.setModeWithoutClear(Mode.PARTY, PartyUiMode.SPLICE, -1, (fromSlotIndex: number, spliceSlotIndex: number) => { if (spliceSlotIndex !== undefined && fromSlotIndex < 6 && spliceSlotIndex < 6 && fromSlotIndex !== spliceSlotIndex) { globalScene.ui.setMode(Mode.MODIFIER_SELECT, this.isPlayer()).then(() => { const modifier = modifierType.newModifier(party[fromSlotIndex], party[spliceSlotIndex])!; //TODO: is the bang correct? @@ -223,13 +223,13 @@ export class SelectModifierPhase extends BattlePhase { const tmMoveId = isTmModifier ? (modifierType as TmModifierType).moveId : undefined; - globalScene.ui.setModeWithoutClear(Mode.PARTY, partyUiMode, -1, (slotIndex: integer, option: PartyOption) => { + globalScene.ui.setModeWithoutClear(Mode.PARTY, partyUiMode, -1, (slotIndex: number, option: PartyOption) => { if (slotIndex < 6) { globalScene.ui.setMode(Mode.MODIFIER_SELECT, this.isPlayer()).then(() => { const modifier = !isMoveModifier ? !isRememberMoveModifier ? modifierType.newModifier(party[slotIndex]) - : modifierType.newModifier(party[slotIndex], option as integer) + : modifierType.newModifier(party[slotIndex], option as number) : modifierType.newModifier(party[slotIndex], option - PartyOption.MOVE_1); applyModifier(modifier!, true); // TODO: is the bang correct? }); @@ -291,7 +291,7 @@ export class SelectModifierPhase extends BattlePhase { return ModifierPoolType.PLAYER; } - getModifierTypeOptions(modifierCount: integer): ModifierTypeOption[] { + getModifierTypeOptions(modifierCount: number): ModifierTypeOption[] { return getPlayerModifierTypeOptions(modifierCount, globalScene.getPlayerParty(), globalScene.lockModifierTiers ? this.modifierTiers : undefined, this.customModifierSettings); } diff --git a/src/phases/select-starter-phase.ts b/src/phases/select-starter-phase.ts index 20ba414147a..79012901a3a 100644 --- a/src/phases/select-starter-phase.ts +++ b/src/phases/select-starter-phase.ts @@ -26,7 +26,7 @@ export class SelectStarterPhase extends Phase { globalScene.ui.setMode(Mode.STARTER_SELECT, (starters: Starter[]) => { globalScene.ui.clearText(); - globalScene.ui.setMode(Mode.SAVE_SLOT, SaveSlotUiMode.SAVE, (slotId: integer) => { + globalScene.ui.setMode(Mode.SAVE_SLOT, SaveSlotUiMode.SAVE, (slotId: number) => { if (slotId === -1) { globalScene.clearPhaseQueue(); globalScene.pushPhase(new TitlePhase()); @@ -45,7 +45,7 @@ export class SelectStarterPhase extends Phase { initBattle(starters: Starter[]) { const party = globalScene.getPlayerParty(); const loadPokemonAssets: Promise[] = []; - starters.forEach((starter: Starter, i: integer) => { + starters.forEach((starter: Starter, i: number) => { if (!i && Overrides.STARTER_SPECIES_OVERRIDE) { starter.species = getPokemonSpecies(Overrides.STARTER_SPECIES_OVERRIDE as Species); } diff --git a/src/phases/select-target-phase.ts b/src/phases/select-target-phase.ts index b21415746fb..a30ef9000a5 100644 --- a/src/phases/select-target-phase.ts +++ b/src/phases/select-target-phase.ts @@ -8,7 +8,7 @@ import i18next from "#app/plugins/i18n"; import { allMoves } from "#app/data/move"; export class SelectTargetPhase extends PokemonPhase { - constructor(fieldIndex: integer) { + constructor(fieldIndex: number) { super(fieldIndex); } diff --git a/src/phases/show-party-exp-bar-phase.ts b/src/phases/show-party-exp-bar-phase.ts index 71bd39e3898..004592bc335 100644 --- a/src/phases/show-party-exp-bar-phase.ts +++ b/src/phases/show-party-exp-bar-phase.ts @@ -10,7 +10,7 @@ import { PlayerPartyMemberPokemonPhase } from "./player-party-member-pokemon-pha export class ShowPartyExpBarPhase extends PlayerPartyMemberPokemonPhase { private expValue: number; - constructor(partyMemberIndex: integer, expValue: number) { + constructor(partyMemberIndex: number, expValue: number) { super(partyMemberIndex); this.expValue = expValue; diff --git a/src/phases/stat-stage-change-phase.ts b/src/phases/stat-stage-change-phase.ts index f2e95446139..359610b320c 100644 --- a/src/phases/stat-stage-change-phase.ts +++ b/src/phases/stat-stage-change-phase.ts @@ -16,14 +16,14 @@ export type StatStageChangeCallback = (target: Pokemon | null, changed: BattleSt export class StatStageChangePhase extends PokemonPhase { private stats: BattleStat[]; private selfTarget: boolean; - private stages: integer; + private stages: number; private showMessage: boolean; private ignoreAbilities: boolean; private canBeCopied: boolean; private onChange: StatStageChangeCallback | null; - constructor(battlerIndex: BattlerIndex, selfTarget: boolean, stats: BattleStat[], stages: integer, showMessage: boolean = true, ignoreAbilities: boolean = false, canBeCopied: boolean = true, onChange: StatStageChangeCallback | null = null) { + constructor(battlerIndex: BattlerIndex, selfTarget: boolean, stats: BattleStat[], stages: number, showMessage: boolean = true, ignoreAbilities: boolean = false, canBeCopied: boolean = true, onChange: StatStageChangeCallback | null = null) { super(battlerIndex); this.selfTarget = selfTarget; @@ -211,7 +211,7 @@ export class StatStageChangePhase extends PokemonPhase { } } - getStatStageChangeMessages(stats: BattleStat[], stages: integer, relStages: integer[]): string[] { + getStatStageChangeMessages(stats: BattleStat[], stages: number, relStages: number[]): string[] { const messages: string[] = []; const relStageStatIndexes = {}; diff --git a/src/phases/summon-missing-phase.ts b/src/phases/summon-missing-phase.ts index f32f6a377f5..459a0399964 100644 --- a/src/phases/summon-missing-phase.ts +++ b/src/phases/summon-missing-phase.ts @@ -4,7 +4,7 @@ import { SummonPhase } from "./summon-phase"; import { globalScene } from "#app/global-scene"; export class SummonMissingPhase extends SummonPhase { - constructor(fieldIndex: integer) { + constructor(fieldIndex: number) { super(fieldIndex); } diff --git a/src/phases/summon-phase.ts b/src/phases/summon-phase.ts index 72f5ec8640f..09eded9e52f 100644 --- a/src/phases/summon-phase.ts +++ b/src/phases/summon-phase.ts @@ -18,7 +18,7 @@ import { globalScene } from "#app/global-scene"; export class SummonPhase extends PartyMemberPokemonPhase { private loaded: boolean; - constructor(fieldIndex: integer, player: boolean = true, loaded: boolean = false) { + constructor(fieldIndex: number, player: boolean = true, loaded: boolean = false) { super(fieldIndex, player); this.loaded = loaded; diff --git a/src/phases/switch-phase.ts b/src/phases/switch-phase.ts index e763aee1521..34b70aeaf63 100644 --- a/src/phases/switch-phase.ts +++ b/src/phases/switch-phase.ts @@ -11,7 +11,7 @@ import { SwitchSummonPhase } from "./switch-summon-phase"; * for the player (if a switch would be valid for the current battle state). */ export class SwitchPhase extends BattlePhase { - protected readonly fieldIndex: integer; + protected readonly fieldIndex: number; private readonly switchType: SwitchType; private readonly isModal: boolean; private readonly doReturn: boolean; @@ -25,7 +25,7 @@ export class SwitchPhase extends BattlePhase { * @param doReturn Indicates if the party member on the field should be * recalled to ball or has already left the field. Passed to {@linkcode SwitchSummonPhase}. */ - constructor(switchType: SwitchType, fieldIndex: integer, isModal: boolean, doReturn: boolean) { + constructor(switchType: SwitchType, fieldIndex: number, isModal: boolean, doReturn: boolean) { super(); this.switchType = switchType; @@ -61,7 +61,7 @@ export class SwitchPhase extends BattlePhase { // Override field index to 0 in case of double battle where 2/3 remaining legal party members fainted at once const fieldIndex = globalScene.currentBattle.getBattlerCount() === 1 || globalScene.getPokemonAllowedInBattle().length > 1 ? this.fieldIndex : 0; - globalScene.ui.setMode(Mode.PARTY, this.isModal ? PartyUiMode.FAINT_SWITCH : PartyUiMode.POST_BATTLE_SWITCH, fieldIndex, (slotIndex: integer, option: PartyOption) => { + globalScene.ui.setMode(Mode.PARTY, this.isModal ? PartyUiMode.FAINT_SWITCH : PartyUiMode.POST_BATTLE_SWITCH, fieldIndex, (slotIndex: number, option: PartyOption) => { if (slotIndex >= globalScene.currentBattle.getBattlerCount() && slotIndex < 6) { // Remove any pre-existing PostSummonPhase under the same field index. // Pre-existing PostSummonPhases may occur when this phase is invoked during a prompt to switch at the start of a wave. diff --git a/src/phases/switch-summon-phase.ts b/src/phases/switch-summon-phase.ts index 94e57435922..d24ef68ebb2 100644 --- a/src/phases/switch-summon-phase.ts +++ b/src/phases/switch-summon-phase.ts @@ -16,7 +16,7 @@ import { SwitchType } from "#enums/switch-type"; export class SwitchSummonPhase extends SummonPhase { private readonly switchType: SwitchType; - private readonly slotIndex: integer; + private readonly slotIndex: number; private readonly doReturn: boolean; private lastPokemon: Pokemon; @@ -29,7 +29,7 @@ export class SwitchSummonPhase extends SummonPhase { * @param doReturn boolean whether to render "comeback" dialogue * @param player boolean if the switch is from the player */ - constructor(switchType: SwitchType, fieldIndex: integer, slotIndex: integer, doReturn: boolean, player?: boolean) { + constructor(switchType: SwitchType, fieldIndex: number, slotIndex: number, doReturn: boolean, player?: boolean) { super(fieldIndex, player !== undefined ? player : true); this.switchType = switchType; diff --git a/src/phases/title-phase.ts b/src/phases/title-phase.ts index 86b5fe04a09..4e96214d600 100644 --- a/src/phases/title-phase.ts +++ b/src/phases/title-phase.ts @@ -133,7 +133,7 @@ export class TitlePhase extends Phase { label: i18next.t("menu:loadGame"), handler: () => { globalScene.ui.setOverlayMode(Mode.SAVE_SLOT, SaveSlotUiMode.LOAD, - (slotId: integer) => { + (slotId: number) => { if (slotId === -1) { return this.showOptions(); } @@ -174,7 +174,7 @@ export class TitlePhase extends Phase { globalScene.ui.setMode(Mode.TITLE, config); } - loadSaveSlot(slotId: integer): void { + loadSaveSlot(slotId: number): void { globalScene.sessionSlotId = slotId > -1 || !loggedInUser ? slotId : loggedInUser.lastSessionSlot; globalScene.ui.setMode(Mode.MESSAGE); globalScene.ui.resetModeChain(); @@ -192,7 +192,7 @@ export class TitlePhase extends Phase { } initDailyRun(): void { - globalScene.ui.setMode(Mode.SAVE_SLOT, SaveSlotUiMode.SAVE, (slotId: integer) => { + globalScene.ui.setMode(Mode.SAVE_SLOT, SaveSlotUiMode.SAVE, (slotId: number) => { globalScene.clearPhaseQueue(); if (slotId === -1) { globalScene.pushPhase(new TitlePhase()); diff --git a/src/phases/victory-phase.ts b/src/phases/victory-phase.ts index 8918b664a36..13e04569ef3 100644 --- a/src/phases/victory-phase.ts +++ b/src/phases/victory-phase.ts @@ -18,7 +18,7 @@ export class VictoryPhase extends PokemonPhase { /** If true, indicates that the phase is intended for EXP purposes only, and not to continue a battle to next phase */ isExpOnly: boolean; - constructor(battlerIndex: BattlerIndex | integer, isExpOnly: boolean = false) { + constructor(battlerIndex: BattlerIndex | number, isExpOnly: boolean = false) { super(battlerIndex); this.isExpOnly = isExpOnly; diff --git a/src/pipelines/sprite.ts b/src/pipelines/sprite.ts index 1fc3b771897..67639d6450a 100644 --- a/src/pipelines/sprite.ts +++ b/src/pipelines/sprite.ts @@ -351,7 +351,7 @@ export default class SpritePipeline extends FieldSpritePipeline { const data = sprite.pipelineData; const tone = data["tone"] as number[]; - const teraColor = data["teraColor"] as integer[] ?? [ 0, 0, 0 ]; + const teraColor = data["teraColor"] as number[] ?? [ 0, 0, 0 ]; const hasShadow = data["hasShadow"] as boolean; const yShadowOffset = data["yShadowOffset"] as number; const ignoreFieldPos = data["ignoreFieldPos"] as boolean; @@ -389,8 +389,8 @@ export default class SpritePipeline extends FieldSpritePipeline { const fusionSpriteColors = ((ignoreOverride && data["fusionSpriteColorsBase"]) || data["fusionSpriteColors"] || []) as number[][]; const emptyColors = [ 0, 0, 0, 0 ]; - const flatSpriteColors: integer[] = []; - const flatFusionSpriteColors: integer[] = []; + const flatSpriteColors: number[] = []; + const flatFusionSpriteColors: number[] = []; for (let c = 0; c < 32; c++) { flatSpriteColors.splice(flatSpriteColors.length, 0, ...(c < spriteColors.length ? spriteColors[c] : emptyColors)); flatFusionSpriteColors.splice(flatFusionSpriteColors.length, 0, ...(c < fusionSpriteColors.length ? fusionSpriteColors[c] : emptyColors)); @@ -406,14 +406,14 @@ export default class SpritePipeline extends FieldSpritePipeline { const sprite = (gameObject as Phaser.GameObjects.Sprite); const data = sprite.pipelineData; - const variant: integer = data.hasOwnProperty("variant") + const variant: number = data.hasOwnProperty("variant") ? data["variant"] : sprite.parentContainer instanceof Pokemon ? sprite.parentContainer.variant : 0; let variantColors; const emptyColors = [ 0, 0, 0, 0 ]; - const flatBaseColors: integer[] = []; + const flatBaseColors: number[] = []; const flatVariantColors: number[] = []; if ((sprite.parentContainer instanceof Pokemon ? sprite.parentContainer.shiny : !!data["shiny"]) diff --git a/src/scene-base.ts b/src/scene-base.ts index 9af97b8e6d4..c6ca9bb8ba2 100644 --- a/src/scene-base.ts +++ b/src/scene-base.ts @@ -41,7 +41,7 @@ export class SceneBase extends Phaser.Scene { } } - loadSpritesheet(key: string, folder: string, size: integer, filename?: string) { + loadSpritesheet(key: string, folder: string, size: number, filename?: string) { if (!filename) { filename = `${key}.png`; } diff --git a/src/system/achv.ts b/src/system/achv.ts index e0c9f0cf052..bd9348a52bf 100644 --- a/src/system/achv.ts +++ b/src/system/achv.ts @@ -25,7 +25,7 @@ export class Achv { public name: string; public description: string; public iconImage: string; - public score: integer; + public score: number; public secret: boolean; public hasParent: boolean; @@ -33,7 +33,7 @@ export class Achv { private conditionFunc: ConditionFn | undefined; - constructor(localizationKey:string, name: string, description: string, iconImage: string, score: integer, conditionFunc?: ConditionFn) { + constructor(localizationKey:string, name: string, description: string, iconImage: string, score: number, conditionFunc?: ConditionFn) { this.name = name; this.description = description; this.iconImage = iconImage; @@ -89,58 +89,58 @@ export class Achv { } export class MoneyAchv extends Achv { - moneyAmount: integer; + moneyAmount: number; - constructor(localizationKey: string, name: string, moneyAmount: integer, iconImage: string, score: integer) { + constructor(localizationKey: string, name: string, moneyAmount: number, iconImage: string, score: number) { super(localizationKey, name, "", iconImage, score, (_args: any[]) => globalScene.money >= this.moneyAmount); this.moneyAmount = moneyAmount; } } export class RibbonAchv extends Achv { - ribbonAmount: integer; + ribbonAmount: number; - constructor(localizationKey: string, name: string, ribbonAmount: integer, iconImage: string, score: integer) { + constructor(localizationKey: string, name: string, ribbonAmount: number, iconImage: string, score: number) { super(localizationKey, name, "", iconImage, score, (_args: any[]) => globalScene.gameData.gameStats.ribbonsOwned >= this.ribbonAmount); this.ribbonAmount = ribbonAmount; } } export class DamageAchv extends Achv { - damageAmount: integer; + damageAmount: number; - constructor(localizationKey: string, name: string, damageAmount: integer, iconImage: string, score: integer) { + constructor(localizationKey: string, name: string, damageAmount: number, iconImage: string, score: number) { super(localizationKey, name, "", iconImage, score, (args: any[]) => (args[0] instanceof Utils.NumberHolder ? args[0].value : args[0]) >= this.damageAmount); this.damageAmount = damageAmount; } } export class HealAchv extends Achv { - healAmount: integer; + healAmount: number; - constructor(localizationKey: string, name: string, healAmount: integer, iconImage: string, score: integer) { + constructor(localizationKey: string, name: string, healAmount: number, iconImage: string, score: number) { super(localizationKey, name, "", iconImage, score, (args: any[]) => (args[0] instanceof Utils.NumberHolder ? args[0].value : args[0]) >= this.healAmount); this.healAmount = healAmount; } } export class LevelAchv extends Achv { - level: integer; + level: number; - constructor(localizationKey: string, name: string, level: integer, iconImage: string, score: integer) { + constructor(localizationKey: string, name: string, level: number, iconImage: string, score: number) { super(localizationKey, name, "", iconImage, score, (args: any[]) => (args[0] instanceof Utils.NumberHolder ? args[0].value : args[0]) >= this.level); this.level = level; } } export class ModifierAchv extends Achv { - constructor(localizationKey: string, name: string, description: string, iconImage: string, score: integer, modifierFunc: (modifier: Modifier) => boolean) { + constructor(localizationKey: string, name: string, description: string, iconImage: string, score: number, modifierFunc: (modifier: Modifier) => boolean) { super(localizationKey, name, description, iconImage, score, (args: any[]) => modifierFunc((args[0] as Modifier))); } } export class ChallengeAchv extends Achv { - constructor(localizationKey: string, name: string, description: string, iconImage: string, score: integer, challengeFunc: (challenge: Challenge) => boolean) { + constructor(localizationKey: string, name: string, description: string, iconImage: string, score: number, challengeFunc: (challenge: Challenge) => boolean) { super(localizationKey, name, description, iconImage, score, (args: any[]) => challengeFunc(args[0] as Challenge)); } } @@ -370,7 +370,7 @@ export const achvs = { export function initAchievements() { const achvKeys = Object.keys(achvs); - achvKeys.forEach((a: string, i: integer) => { + achvKeys.forEach((a: string, i: number) => { achvs[a].id = a; if (achvs[a].hasParent) { achvs[a].parentId = achvKeys[i - 1]; diff --git a/src/system/challenge-data.ts b/src/system/challenge-data.ts index 76a3392861d..87299ae653a 100644 --- a/src/system/challenge-data.ts +++ b/src/system/challenge-data.ts @@ -2,9 +2,9 @@ import type { Challenge } from "#app/data/challenge"; import { copyChallenge } from "#app/data/challenge"; export default class ChallengeData { - public id: integer; - public value: integer; - public severity: integer; + public id: number; + public value: number; + public severity: number; constructor(source: Challenge | any) { this.id = source.id; diff --git a/src/system/egg-data.ts b/src/system/egg-data.ts index 7b75f387c63..8296c2da98e 100644 --- a/src/system/egg-data.ts +++ b/src/system/egg-data.ts @@ -5,11 +5,11 @@ import { EGG_SEED, Egg } from "../data/egg"; import type { EggSourceType } from "#app/enums/egg-source-types"; export default class EggData { - public id: integer; + public id: number; public tier: EggTier; public sourceType: EggSourceType; - public hatchWaves: integer; - public timestamp: integer; + public hatchWaves: number; + public timestamp: number; public variantTier: VariantTier; public isShiny: boolean; public species: Species; diff --git a/src/system/game-data.ts b/src/system/game-data.ts index 58d416eb468..7282d2730a4 100644 --- a/src/system/game-data.ts +++ b/src/system/game-data.ts @@ -70,7 +70,7 @@ export const defaultStarterSpecies: Species[] = [ const saveKey = "x0i2O7WRiANTqPmZ"; // Temporary; secure encryption is not yet necessary -export function getDataTypeKey(dataType: GameDataType, slotId: integer = 0): string { +export function getDataTypeKey(dataType: GameDataType, slotId: number = 0): string { switch (dataType) { case GameDataType.SYSTEM: return "data"; @@ -104,8 +104,8 @@ export function decrypt(data: string, bypassLogin: boolean): string { } export interface SystemSaveData { - trainerId: integer; - secretId: integer; + trainerId: number; + secretId: number; gender: PlayerGender; dexData: DexData; starterData: StarterData; @@ -116,14 +116,14 @@ export interface SystemSaveData { voucherCounts: VoucherCounts; eggs: EggData[]; gameVersion: string; - timestamp: integer; - eggPity: integer[]; - unlockPity: integer[]; + timestamp: number; + eggPity: number[]; + unlockPity: number[]; } export interface SessionSaveData { seed: string; - playTime: integer; + playTime: number; gameMode: GameModes; party: PokemonData[]; enemyParty: PokemonData[]; @@ -131,46 +131,46 @@ export interface SessionSaveData { enemyModifiers: PersistentModifierData[]; arena: ArenaData; pokeballCounts: PokeballCounts; - money: integer; - score: integer; - waveIndex: integer; + money: number; + score: number; + waveIndex: number; battleType: BattleType; trainer: TrainerData; gameVersion: string; - timestamp: integer; + timestamp: number; challenges: ChallengeData[]; mysteryEncounterType: MysteryEncounterType | -1; // Only defined when current wave is ME, mysteryEncounterSaveData: MysteryEncounterSaveData; } interface Unlocks { - [key: integer]: boolean; + [key: number]: boolean; } interface AchvUnlocks { - [key: string]: integer + [key: string]: number } interface VoucherUnlocks { - [key: string]: integer + [key: string]: number } export interface VoucherCounts { - [type: string]: integer; + [type: string]: number; } export interface DexData { - [key: integer]: DexEntry + [key: number]: DexEntry } export interface DexEntry { seenAttr: bigint; caughtAttr: bigint; - natureAttr: integer, - seenCount: integer; - caughtCount: integer; - hatchedCount: integer; - ivs: integer[]; + natureAttr: number, + seenCount: number; + caughtCount: number; + hatchedCount: number; + ivs: number[]; } export const DexAttr = { @@ -188,7 +188,7 @@ export interface DexAttrProps { shiny: boolean; female: boolean; variant: Variant; - formIndex: integer; + formIndex: number; } export const AbilityAttr = { @@ -209,18 +209,18 @@ export interface RunEntry { export type StarterMoveset = [ Moves ] | [ Moves, Moves ] | [ Moves, Moves, Moves ] | [ Moves, Moves, Moves, Moves ]; export interface StarterFormMoveData { - [key: integer]: StarterMoveset + [key: number]: StarterMoveset } export interface StarterMoveData { - [key: integer]: StarterMoveset | StarterFormMoveData + [key: number]: StarterMoveset | StarterFormMoveData } export interface StarterAttributes { - nature?: integer; - ability?: integer; - variant?: integer; - form?: integer; + nature?: number; + ability?: number; + variant?: number; + form?: number; female?: boolean; shiny?: boolean; favorite?: boolean; @@ -228,7 +228,7 @@ export interface StarterAttributes { } export interface StarterPreferences { - [key: integer]: StarterAttributes; + [key: number]: StarterAttributes; } // the latest data saved/loaded for the Starter Preferences. Required to reduce read/writes. Initialize as "{}", since this is the default value and no data needs to be stored if present. @@ -263,17 +263,17 @@ export class StarterPrefs { export interface StarterDataEntry { moveset: StarterMoveset | StarterFormMoveData | null; - eggMoves: integer; - candyCount: integer; - friendship: integer; - abilityAttr: integer; - passiveAttr: integer; - valueReduction: integer; - classicWinCount: integer; + eggMoves: number; + candyCount: number; + friendship: number; + abilityAttr: number; + passiveAttr: number; + valueReduction: number; + classicWinCount: number; } export interface StarterData { - [key: integer]: StarterDataEntry + [key: number]: StarterDataEntry } export interface TutorialFlags { @@ -303,8 +303,8 @@ const systemShortKeys = { }; export class GameData { - public trainerId: integer; - public secretId: integer; + public trainerId: number; + public secretId: number; public gender: PlayerGender; @@ -323,8 +323,8 @@ export class GameData { public voucherUnlocks: VoucherUnlocks; public voucherCounts: VoucherCounts; public eggs: Egg[]; - public eggPity: integer[]; - public unlockPity: integer[]; + public eggPity: number[]; + public unlockPity: number[]; constructor() { this.loadSettings(); @@ -733,7 +733,7 @@ export class GameData { * @param valueIndex index of the setting's option * @returns true */ - public saveSetting(setting: string, valueIndex: integer): boolean { + public saveSetting(setting: string, valueIndex: number): boolean { let settings: object = {}; if (localStorage.hasOwnProperty("settings")) { settings = JSON.parse(localStorage.getItem("settings")!); // TODO: is this bang correct? @@ -816,7 +816,7 @@ export class GameData { * to update the specified setting with the new value. Finally, it saves the updated settings back * to localStorage and returns `true` to indicate success. */ - public saveControlSetting(device: Device, localStoragePropertyName: string, setting: SettingGamepad|SettingKeyboard, settingDefaults, valueIndex: integer): boolean { + public saveControlSetting(device: Device, localStoragePropertyName: string, setting: SettingGamepad|SettingKeyboard, settingDefaults, valueIndex: number): boolean { let settingsControls: object = {}; // Initialize an empty object to hold the gamepad settings if (localStorage.hasOwnProperty(localStoragePropertyName)) { // Check if 'settingsControls' exists in localStorage @@ -968,7 +968,7 @@ export class GameData { } as SessionSaveData; } - getSession(slotId: integer): Promise { + getSession(slotId: number): Promise { return new Promise(async (resolve, reject) => { if (slotId < 0) { return resolve(null); @@ -1006,7 +1006,7 @@ export class GameData { }); } - loadSession(slotId: integer, sessionData?: SessionSaveData): Promise { + loadSession(slotId: number, sessionData?: SessionSaveData): Promise { return new Promise(async (resolve, reject) => { try { const initSessionFromData = async (sessionData: SessionSaveData) => { @@ -1137,7 +1137,7 @@ export class GameData { * @param slotId the slot to clear * @returns Promise with result `true` if the session was deleted successfully, `false` otherwise */ - deleteSession(slotId: integer): Promise { + deleteSession(slotId: number): Promise { return new Promise(resolve => { if (bypassLogin) { localStorage.removeItem(`sessionData${slotId ? slotId : ""}_${loggedInUser?.username}`); @@ -1206,7 +1206,7 @@ export class GameData { * After session data is removed, attempt to update user info so the menu updates * To delete an unfinished run instead, use {@linkcode deleteSession} */ - async tryClearSession(slotId: integer): Promise<[success: boolean, newClear: boolean]> { + async tryClearSession(slotId: number): Promise<[success: boolean, newClear: boolean]> { let result: [boolean, boolean] = [ false, false ]; if (bypassLogin) { @@ -1361,7 +1361,7 @@ export class GameData { }); } - public tryExportData(dataType: GameDataType, slotId: integer = 0): Promise { + public tryExportData(dataType: GameDataType, slotId: number = 0): Promise { return new Promise(resolve => { const dataKey: string = `${getDataTypeKey(dataType, slotId)}_${loggedInUser?.username}`; const handleData = (dataStr: string) => { @@ -1407,7 +1407,7 @@ export class GameData { }); } - public importData(dataType: GameDataType, slotId: integer = 0): void { + public importData(dataType: GameDataType, slotId: number = 0): void { const dataKey = `${getDataTypeKey(dataType, slotId)}_${loggedInUser?.username}`; let saveFile: any = document.getElementById("saveFile"); @@ -1695,7 +1695,7 @@ export class GameData { }); } - incrementRibbonCount(species: PokemonSpecies, forStarter: boolean = false): integer { + incrementRibbonCount(species: PokemonSpecies, forStarter: boolean = false): number { const speciesIdToIncrement: Species = species.getRootSpeciesId(forStarter); if (!this.starterData[speciesIdToIncrement].classicWinCount) { @@ -1706,7 +1706,7 @@ export class GameData { globalScene.gameData.gameStats.ribbonsOwned++; } - const ribbonsInStats: integer = globalScene.gameData.gameStats.ribbonsOwned; + const ribbonsInStats: number = globalScene.gameData.gameStats.ribbonsOwned; if (ribbonsInStats >= 100) { globalScene.validateAchv(achvs._100_RIBBONS); @@ -1733,7 +1733,7 @@ export class GameData { * @param species * @param count */ - addStarterCandy(species: PokemonSpecies, count: integer): void { + addStarterCandy(species: PokemonSpecies, count: number): void { // Only gain candies if the Pokemon has already been marked as caught in dex (ignore "rental" pokemon) const speciesRootForm = species.getRootSpeciesId(); if (globalScene.gameData.dexData[speciesRootForm].caughtAttr) { @@ -1749,7 +1749,7 @@ export class GameData { * @param showMessage Default true. If true, will display message for unlocked egg move * @param prependSpeciesToMessage Default false. If true, will change message from "X Egg Move Unlocked!" to "Bulbasaur X Egg Move Unlocked!" */ - setEggMoveUnlocked(species: PokemonSpecies, eggMoveIndex: integer, showMessage: boolean = true, prependSpeciesToMessage: boolean = false): Promise { + setEggMoveUnlocked(species: PokemonSpecies, eggMoveIndex: number, showMessage: boolean = true, prependSpeciesToMessage: boolean = false): Promise { return new Promise(resolve => { const speciesId = species.speciesId; if (!speciesEggMoves.hasOwnProperty(speciesId) || !speciesEggMoves[speciesId][eggMoveIndex]) { @@ -1808,7 +1808,7 @@ export class GameData { _unlockSpeciesNature(species.speciesId); } - updateSpeciesDexIvs(speciesId: Species, ivs: integer[]): void { + updateSpeciesDexIvs(speciesId: Species, ivs: number[]): void { let dexEntry: DexEntry; do { dexEntry = globalScene.gameData.dexData[speciesId]; @@ -1824,7 +1824,7 @@ export class GameData { } while (pokemonPrevolutions.hasOwnProperty(speciesId) && (speciesId = pokemonPrevolutions[speciesId])); } - getSpeciesCount(dexEntryPredicate: (entry: DexEntry) => boolean): integer { + getSpeciesCount(dexEntryPredicate: (entry: DexEntry) => boolean): number { const dexKeys = Object.keys(this.dexData); let speciesCount = 0; for (const s of dexKeys) { @@ -1835,7 +1835,7 @@ export class GameData { return speciesCount; } - getStarterCount(dexEntryPredicate: (entry: DexEntry) => boolean): integer { + getStarterCount(dexEntryPredicate: (entry: DexEntry) => boolean): number { const starterKeys = Object.keys(speciesStarterCosts); let starterCount = 0; for (const s of starterKeys) { @@ -1906,7 +1906,7 @@ export class GameData { }; } - getStarterSpeciesDefaultAbilityIndex(species: PokemonSpecies): integer { + getStarterSpeciesDefaultAbilityIndex(species: PokemonSpecies): number { const abilityAttr = this.starterData[species.speciesId].abilityAttr; return abilityAttr & AbilityAttr.ABILITY_1 ? 0 : !species.ability2 || abilityAttr & AbilityAttr.ABILITY_2 ? 1 : 2; } @@ -1921,15 +1921,15 @@ export class GameData { return 0 as Nature; } - getSpeciesDefaultNatureAttr(species: PokemonSpecies): integer { + getSpeciesDefaultNatureAttr(species: PokemonSpecies): number { return 1 << (this.getSpeciesDefaultNature(species)); } - getDexAttrLuck(dexAttr: bigint): integer { + getDexAttrLuck(dexAttr: bigint): number { return dexAttr & DexAttr.SHINY ? dexAttr & DexAttr.VARIANT_3 ? 3 : dexAttr & DexAttr.VARIANT_2 ? 2 : 1 : 0; } - getNaturesForAttr(natureAttr: integer = 0): Nature[] { + getNaturesForAttr(natureAttr: number = 0): Nature[] { const ret: Nature[] = []; for (let n = 0; n < 25; n++) { if (natureAttr & (1 << (n + 1))) { @@ -1962,7 +1962,7 @@ export class GameData { return cost.value; } - getFormIndex(attr: bigint): integer { + getFormIndex(attr: bigint): number { if (!attr || attr < DexAttr.DEFAULT_FORM) { return 0; } @@ -1973,7 +1973,7 @@ export class GameData { return f; } - getFormAttr(formIndex: integer): bigint { + getFormAttr(formIndex: number): bigint { return BigInt(1) << BigInt(7 + formIndex); } diff --git a/src/system/game-stats.ts b/src/system/game-stats.ts index a8b74f29bb7..5553a0332fc 100644 --- a/src/system/game-stats.ts +++ b/src/system/game-stats.ts @@ -1,43 +1,43 @@ -// public (.*?): integer; +// public (.*?): number; // this.$1 = source?.$1 || 0; export class GameStats { - public playTime: integer; - public battles: integer; - public classicSessionsPlayed: integer; - public sessionsWon: integer; - public ribbonsOwned: integer; - public dailyRunSessionsPlayed: integer; - public dailyRunSessionsWon: integer; - public endlessSessionsPlayed: integer; - public highestEndlessWave: integer; - public highestLevel: integer; - public highestMoney: integer; - public highestDamage: integer; - public highestHeal: integer; - public pokemonSeen: integer; - public pokemonDefeated: integer; - public pokemonCaught: integer; - public pokemonHatched: integer; - public subLegendaryPokemonSeen: integer; - public subLegendaryPokemonCaught: integer; - public subLegendaryPokemonHatched: integer; - public legendaryPokemonSeen: integer; - public legendaryPokemonCaught: integer; - public legendaryPokemonHatched: integer; - public mythicalPokemonSeen: integer; - public mythicalPokemonCaught: integer; - public mythicalPokemonHatched: integer; - public shinyPokemonSeen: integer; - public shinyPokemonCaught: integer; - public shinyPokemonHatched: integer; - public pokemonFused: integer; - public trainersDefeated: integer; - public eggsPulled: integer; - public rareEggsPulled: integer; - public epicEggsPulled: integer; - public legendaryEggsPulled: integer; - public manaphyEggsPulled: integer; + public playTime: number; + public battles: number; + public classicSessionsPlayed: number; + public sessionsWon: number; + public ribbonsOwned: number; + public dailyRunSessionsPlayed: number; + public dailyRunSessionsWon: number; + public endlessSessionsPlayed: number; + public highestEndlessWave: number; + public highestLevel: number; + public highestMoney: number; + public highestDamage: number; + public highestHeal: number; + public pokemonSeen: number; + public pokemonDefeated: number; + public pokemonCaught: number; + public pokemonHatched: number; + public subLegendaryPokemonSeen: number; + public subLegendaryPokemonCaught: number; + public subLegendaryPokemonHatched: number; + public legendaryPokemonSeen: number; + public legendaryPokemonCaught: number; + public legendaryPokemonHatched: number; + public mythicalPokemonSeen: number; + public mythicalPokemonCaught: number; + public mythicalPokemonHatched: number; + public shinyPokemonSeen: number; + public shinyPokemonCaught: number; + public shinyPokemonHatched: number; + public pokemonFused: number; + public trainersDefeated: number; + public eggsPulled: number; + public rareEggsPulled: number; + public epicEggsPulled: number; + public legendaryEggsPulled: number; + public manaphyEggsPulled: number; constructor(source?: any) { this.playTime = source?.playTime || 0; diff --git a/src/system/modifier-data.ts b/src/system/modifier-data.ts index d153236c93e..4816115f586 100644 --- a/src/system/modifier-data.ts +++ b/src/system/modifier-data.ts @@ -8,7 +8,7 @@ export default class ModifierData { public typeId: string; public typePregenArgs: any[]; public args: any[]; - public stackCount: integer; + public stackCount: number; public className: string; diff --git a/src/system/pokemon-data.ts b/src/system/pokemon-data.ts index 92eca5c3e9f..6459bb5033d 100644 --- a/src/system/pokemon-data.ts +++ b/src/system/pokemon-data.ts @@ -15,47 +15,47 @@ import type { Species } from "#enums/species"; import { CustomPokemonData } from "#app/data/custom-pokemon-data"; export default class PokemonData { - public id: integer; + public id: number; public player: boolean; public species: Species; public nickname: string; - public formIndex: integer; - public abilityIndex: integer; + public formIndex: number; + public abilityIndex: number; public passive: boolean; public shiny: boolean; public variant: Variant; public pokeball: PokeballType; - public level: integer; - public exp: integer; - public levelExp: integer; + public level: number; + public exp: number; + public levelExp: number; public gender: Gender; - public hp: integer; - public stats: integer[]; - public ivs: integer[]; + public hp: number; + public stats: number[]; + public ivs: number[]; public nature: Nature; public moveset: (PokemonMove | null)[]; public status: Status | null; - public friendship: integer; - public metLevel: integer; + public friendship: number; + public metLevel: number; public metBiome: Biome | -1; // -1 for starters public metSpecies: Species; public metWave: number; // 0 for unknown (previous saves), -1 for starters - public luck: integer; + public luck: number; public pauseEvolutions: boolean; public pokerus: boolean; public usedTMs: Moves[]; - public evoCounter: integer; + public evoCounter: number; public fusionSpecies: Species; - public fusionFormIndex: integer; - public fusionAbilityIndex: integer; + public fusionFormIndex: number; + public fusionAbilityIndex: number; public fusionShiny: boolean; public fusionVariant: Variant; public fusionGender: Gender; - public fusionLuck: integer; + public fusionLuck: number; public boss: boolean; - public bossSegments?: integer; + public bossSegments?: number; public summonData: PokemonSummonData; @@ -163,7 +163,7 @@ export default class PokemonData { } } - toPokemon(battleType?: BattleType, partyMemberIndex: integer = 0, double: boolean = false): Pokemon { + toPokemon(battleType?: BattleType, partyMemberIndex: number = 0, double: boolean = false): Pokemon { const species = getPokemonSpecies(this.species); const ret: Pokemon = this.player ? globalScene.addPlayerPokemon(species, this.level, this.abilityIndex, this.formIndex, this.gender, this.shiny, this.variant, this.ivs, this.nature, this, (playerPokemon) => { diff --git a/src/system/session-history.ts b/src/system/session-history.ts index e6901b2fa93..d9dd2022d8f 100644 --- a/src/system/session-history.ts +++ b/src/system/session-history.ts @@ -10,13 +10,13 @@ export enum SessionHistoryResult { export interface SessionHistory { seed: string; - playTime: integer; + playTime: number; result: SessionHistoryResult, gameMode: GameModes; party: PokemonData[]; modifiers: PersistentModifierData[]; - money: integer; - waveIndex: integer; + money: number; + waveIndex: number; gameVersion: string; - timestamp: integer; + timestamp: number; } diff --git a/src/system/settings/settings-gamepad.ts b/src/system/settings/settings-gamepad.ts index 18973666766..d26c0c9f019 100644 --- a/src/system/settings/settings-gamepad.ts +++ b/src/system/settings/settings-gamepad.ts @@ -80,7 +80,7 @@ export const settingGamepadBlackList = [ SettingKeyboard.Button_Right, ]; -export function setSettingGamepad(setting: SettingGamepad, value: integer): boolean { +export function setSettingGamepad(setting: SettingGamepad, value: number): boolean { switch (setting) { case SettingGamepad.Gamepad_Support: // if we change the value of the gamepad support, we call a method in the inputController to diff --git a/src/system/settings/settings-keyboard.ts b/src/system/settings/settings-keyboard.ts index f4adc30ee52..95ad4ba41f1 100644 --- a/src/system/settings/settings-keyboard.ts +++ b/src/system/settings/settings-keyboard.ts @@ -133,7 +133,7 @@ export const settingKeyboardBlackList = [ ]; -export function setSettingKeyboard(setting: SettingKeyboard, value: integer): boolean { +export function setSettingKeyboard(setting: SettingKeyboard, value: number): boolean { switch (setting) { case SettingKeyboard.Button_Up: case SettingKeyboard.Button_Down: diff --git a/src/system/settings/settings.ts b/src/system/settings/settings.ts index 44fc1ee4f31..e5662842cd0 100644 --- a/src/system/settings/settings.ts +++ b/src/system/settings/settings.ts @@ -713,7 +713,7 @@ export function resetSettings() { * @param value value to update setting with * @returns true if successful, false if not */ -export function setSetting(setting: string, value: integer): boolean { +export function setSetting(setting: string, value: number): boolean { const index: number = settingIndex(setting); if (index === -1) { return false; diff --git a/src/system/trainer-data.ts b/src/system/trainer-data.ts index 51dfdde9ec1..134d16e25ef 100644 --- a/src/system/trainer-data.ts +++ b/src/system/trainer-data.ts @@ -4,7 +4,7 @@ import Trainer, { TrainerVariant } from "../field/trainer"; export default class TrainerData { public trainerType: TrainerType; public variant: TrainerVariant; - public partyTemplateIndex: integer; + public partyTemplateIndex: number; public name: string; public partnerName: string; diff --git a/src/test/eggs/egg.test.ts b/src/test/eggs/egg.test.ts index 3394771d84a..d7ed07dd151 100644 --- a/src/test/eggs/egg.test.ts +++ b/src/test/eggs/egg.test.ts @@ -14,7 +14,7 @@ import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vite describe("Egg Generation Tests", () => { let phaserGame: Phaser.Game; let game: GameManager; - const EGG_HATCH_COUNT: integer = 1000; + const EGG_HATCH_COUNT: number = 1000; beforeAll(() => { phaserGame = new Phaser.Game({ diff --git a/src/test/eggs/manaphy-egg.test.ts b/src/test/eggs/manaphy-egg.test.ts index 4285476a913..5bb5b790201 100644 --- a/src/test/eggs/manaphy-egg.test.ts +++ b/src/test/eggs/manaphy-egg.test.ts @@ -9,7 +9,7 @@ import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vite describe("Manaphy Eggs", () => { let phaserGame: Phaser.Game; let game: GameManager; - const EGG_HATCH_COUNT: integer = 48; + const EGG_HATCH_COUNT: number = 48; let rngSweepProgress: number = 0; beforeAll(() => { diff --git a/src/test/mystery-encounter/encounters/clowning-around-encounter.test.ts b/src/test/mystery-encounter/encounters/clowning-around-encounter.test.ts index ae52ffc0fef..f105678e71f 100644 --- a/src/test/mystery-encounter/encounters/clowning-around-encounter.test.ts +++ b/src/test/mystery-encounter/encounters/clowning-around-encounter.test.ts @@ -372,7 +372,7 @@ describe("Clowning Around - Mystery Encounter", () => { }); }); -async function addItemToPokemon(scene: BattleScene, pokemon: Pokemon, stackCount: integer, itemType: PokemonHeldItemModifierType) { +async function addItemToPokemon(scene: BattleScene, pokemon: Pokemon, stackCount: number, itemType: PokemonHeldItemModifierType) { const itemMod = itemType.newModifier(pokemon) as PokemonHeldItemModifier; itemMod.stackCount = stackCount; await scene.addModifier(itemMod, true, false, false, true); diff --git a/src/test/utils/TextInterceptor.ts b/src/test/utils/TextInterceptor.ts index 466bcbf8052..089d8967c61 100644 --- a/src/test/utils/TextInterceptor.ts +++ b/src/test/utils/TextInterceptor.ts @@ -9,12 +9,12 @@ export default class TextInterceptor { scene.messageWrapper = this; } - showText(text: string, delay?: integer, callback?: Function, callbackDelay?: integer, prompt?: boolean, promptDelay?: integer): void { + showText(text: string, delay?: number, callback?: Function, callbackDelay?: number, prompt?: boolean, promptDelay?: number): void { console.log(text); this.logs.push(text); } - showDialogue(text: string, name: string, delay?: integer, callback?: Function, callbackDelay?: integer, promptDelay?: integer): void { + showDialogue(text: string, name: string, delay?: number, callback?: Function, callbackDelay?: number, promptDelay?: number): void { console.log(name, text); this.logs.push(name, text); } diff --git a/src/test/utils/gameManager.ts b/src/test/utils/gameManager.ts index 8e595212898..fa7624c976e 100644 --- a/src/test/utils/gameManager.ts +++ b/src/test/utils/gameManager.ts @@ -255,7 +255,7 @@ export default class GameManager { * @param {BattlerIndex} targetIndex The index of the attack target, or `undefined` for multi-target attacks * @param movePosition The index of the move in the pokemon's moveset array */ - selectTarget(movePosition: integer, targetIndex?: BattlerIndex) { + selectTarget(movePosition: number, targetIndex?: BattlerIndex) { this.onNextPrompt("SelectTargetPhase", Mode.TARGET_SELECT, () => { const handler = this.scene.ui.getHandler() as TargetSelectUiHandler; const move = (this.scene.getCurrentPhase() as SelectTargetPhase).getPokemon().getMoveset()[movePosition]!.getMove(); // TODO: is the bang correct? @@ -387,7 +387,7 @@ export default class GameManager { * @param path - The path to the data file. * @returns A promise that resolves with a tuple containing a boolean indicating success and an integer status code. */ - async importData(path): Promise<[boolean, integer]> { + async importData(path): Promise<[boolean, number]> { const saveKey = "x0i2O7WRiANTqPmZ"; const dataRaw = fs.readFileSync(path, { encoding: "utf8", flag: "r" }); let dataStr = AES.decrypt(dataRaw, saveKey).toString(enc.Utf8); diff --git a/src/test/utils/helpers/moveHelper.ts b/src/test/utils/helpers/moveHelper.ts index ad39755b556..ee026c06a8d 100644 --- a/src/test/utils/helpers/moveHelper.ts +++ b/src/test/utils/helpers/moveHelper.ts @@ -102,7 +102,7 @@ export class MoveHelper extends GameManagerHelper { * defaults to 0 (first slot) and 4 aborts the procedure * @returns a promise that resolves once the move has been successfully learnt */ - public async learnMove(move: Moves | integer, partyIndex: integer = 0, moveSlotIndex: integer = 0) { + public async learnMove(move: Moves | number, partyIndex: number = 0, moveSlotIndex: number = 0) { return new Promise(async (resolve, reject) => { this.game.scene.pushPhase(new LearnMovePhase(partyIndex, move)); diff --git a/src/test/utils/inputsHandler.ts b/src/test/utils/inputsHandler.ts index 8b8a89e45dc..e2591def447 100644 --- a/src/test/utils/inputsHandler.ts +++ b/src/test/utils/inputsHandler.ts @@ -30,7 +30,7 @@ export default class InputsHandler { this.init(); } - pressTouch(button: string, duration: integer): Promise { + pressTouch(button: string, duration: number): Promise { return new Promise(async (resolve) => { this.fakeMobile.touchDown(button); await holdOn(duration); @@ -39,7 +39,7 @@ export default class InputsHandler { }); } - pressGamepadButton(button: integer, duration: integer): Promise { + pressGamepadButton(button: number, duration: number): Promise { return new Promise(async (resolve) => { this.scene.input.gamepad?.emit("down", this.fakePad, { index: button }); await holdOn(duration); @@ -48,7 +48,7 @@ export default class InputsHandler { }); } - pressKeyboardKey(key: integer, duration: integer): Promise { + pressKeyboardKey(key: number, duration: number): Promise { return new Promise(async (resolve) => { this.scene.input.keyboard?.emit("keydown", { keyCode: key }); await holdOn(duration); diff --git a/src/test/utils/mocks/mocksContainer/mockText.ts b/src/test/utils/mocks/mocksContainer/mockText.ts index 604679af372..5550e801386 100644 --- a/src/test/utils/mocks/mocksContainer/mockText.ts +++ b/src/test/utils/mocks/mocksContainer/mockText.ts @@ -81,11 +81,11 @@ export default class MockText implements MockGameObject { showText( text: string, - delay?: integer | null, + delay?: number | null, callback?: Function | null, - callbackDelay?: integer | null, + callbackDelay?: number | null, prompt?: boolean | null, - promptDelay?: integer | null + promptDelay?: number | null ) { this.scene.messageWrapper.showText(text, delay, callback, callbackDelay, prompt, promptDelay); if (callback) { @@ -93,7 +93,7 @@ export default class MockText implements MockGameObject { } } - showDialogue(keyOrText: string, name: string | undefined, delay: integer | null = 0, callback: Function, callbackDelay?: integer, promptDelay?: integer) { + showDialogue(keyOrText: string, name: string | undefined, delay: number | null = 0, callback: Function, callbackDelay?: number, promptDelay?: number) { this.scene.messageWrapper.showDialogue(keyOrText, name, delay, callback, callbackDelay, promptDelay); if (callback) { callback(); diff --git a/src/test/utils/testUtils.ts b/src/test/utils/testUtils.ts index a8410f8ba40..40e4bbe8775 100644 --- a/src/test/utils/testUtils.ts +++ b/src/test/utils/testUtils.ts @@ -18,7 +18,7 @@ export function mockI18next() { * @param end end number e.g. 10 * @returns an array of numbers */ -export function arrayOfRange(start: integer, end: integer) { +export function arrayOfRange(start: number, end: number) { return Array.from({ length: end - start }, (_v, k) => k + start); } diff --git a/src/ui/abstact-option-select-ui-handler.ts b/src/ui/abstact-option-select-ui-handler.ts index df592fc45b1..fb5ce9bc5aa 100644 --- a/src/ui/abstact-option-select-ui-handler.ts +++ b/src/ui/abstact-option-select-ui-handler.ts @@ -11,8 +11,8 @@ export interface OptionSelectConfig { xOffset?: number; yOffset?: number; options: OptionSelectItem[]; - maxOptions?: integer; - delay?: integer; + maxOptions?: number; + delay?: number; noCancel?: boolean; supportHover?: boolean; } @@ -40,7 +40,7 @@ export default abstract class AbstractOptionSelectUiHandler extends UiHandler { protected blockInput: boolean; - protected scrollCursor: integer = 0; + protected scrollCursor: number = 0; protected scale: number = 0.1666666667; @@ -50,9 +50,9 @@ export default abstract class AbstractOptionSelectUiHandler extends UiHandler { super(mode); } - abstract getWindowWidth(): integer; + abstract getWindowWidth(): number; - getWindowHeight(): integer { + getWindowHeight(): number { return (Math.min((this.config?.options || []).length, this.config?.maxOptions || 99) + 1) * 96 * this.scale; } @@ -118,7 +118,7 @@ export default abstract class AbstractOptionSelectUiHandler extends UiHandler { this.optionSelectText.setPositionRelative(this.optionSelectBg, 12 + 24 * this.scale, 2 + 42 * this.scale); - options.forEach((option: OptionSelectItem, i: integer) => { + options.forEach((option: OptionSelectItem, i: number) => { if (option.item) { const itemIcon = globalScene.add.sprite(0, 0, "items", option.item); itemIcon.setScale(3 * this.scale); @@ -295,7 +295,7 @@ export default abstract class AbstractOptionSelectUiHandler extends UiHandler { return options; } - setCursor(cursor: integer): boolean { + setCursor(cursor: number): boolean { const changed = this.cursor !== cursor; let isScroll = false; diff --git a/src/ui/achvs-ui-handler.ts b/src/ui/achvs-ui-handler.ts index ff1e2ee9184..74a121c231b 100644 --- a/src/ui/achvs-ui-handler.ts +++ b/src/ui/achvs-ui-handler.ts @@ -302,7 +302,7 @@ export default class AchvsUiHandler extends MessageUiHandler { return success; } - setCursor(cursor: integer, pageChange?: boolean): boolean { + setCursor(cursor: number, pageChange?: boolean): boolean { const ret = super.setCursor(cursor); let update = ret; @@ -340,12 +340,12 @@ export default class AchvsUiHandler extends MessageUiHandler { } /** - * setScrollCursor(scrollCursor: integer) : boolean + * setScrollCursor(scrollCursor: number) : boolean * scrollCursor refers to the page's position within the entire sum of the data, unlike cursor, which refers to a user's position within displayed data - * @param takes a scrollCursor that has been updated based on user behavior + * @param scrollCursor takes a value that has been updated based on user behavior * @returns returns a boolean that indicates whether the updated scrollCursor led to an update in the data displayed. */ - setScrollCursor(scrollCursor: integer): boolean { + setScrollCursor(scrollCursor: number): boolean { if (scrollCursor === this.scrollCursor) { return false; } @@ -391,7 +391,7 @@ export default class AchvsUiHandler extends MessageUiHandler { const achvRange = Object.values(achvs).slice(itemOffset, itemLimit + itemOffset); - achvRange.forEach((achv: Achv, i: integer) => { + achvRange.forEach((achv: Achv, i: number) => { const icon = this.icons[i]; const unlocked = achvUnlocks.hasOwnProperty(achv.id); const hidden = !unlocked && achv.secret && (!achv.parentId || !achvUnlocks.hasOwnProperty(achv.parentId)); @@ -431,7 +431,7 @@ export default class AchvsUiHandler extends MessageUiHandler { const voucherRange = Object.values(vouchers).slice(itemOffset, itemLimit + itemOffset); - voucherRange.forEach((voucher: Voucher, i: integer) => { + voucherRange.forEach((voucher: Voucher, i: number) => { const icon = this.icons[i]; const unlocked = voucherUnlocks.hasOwnProperty(voucher.id); diff --git a/src/ui/autocomplete-ui-handler.ts b/src/ui/autocomplete-ui-handler.ts index 8754e65db77..23abdb85772 100644 --- a/src/ui/autocomplete-ui-handler.ts +++ b/src/ui/autocomplete-ui-handler.ts @@ -8,7 +8,7 @@ export default class AutoCompleteUiHandler extends AbstractOptionSelectUiHandler super(mode); } - getWindowWidth(): integer { + getWindowWidth(): number { return 64; } diff --git a/src/ui/ball-ui-handler.ts b/src/ui/ball-ui-handler.ts index 2c1a53a9a52..a402d11ef1d 100644 --- a/src/ui/ball-ui-handler.ts +++ b/src/ui/ball-ui-handler.ts @@ -110,7 +110,7 @@ export default class BallUiHandler extends UiHandler { this.countsText.setText(Object.values(globalScene.pokeballCounts).map(c => `x${c}`).join("\n")); } - setCursor(cursor: integer): boolean { + setCursor(cursor: number): boolean { const ret = super.setCursor(cursor); if (!this.cursorObj) { diff --git a/src/ui/battle-info.ts b/src/ui/battle-info.ts index ca98d4c9d10..fa8767f5eb0 100644 --- a/src/ui/battle-info.ts +++ b/src/ui/battle-info.ts @@ -22,17 +22,17 @@ export default class BattleInfo extends Phaser.GameObjects.Container { private player: boolean; private mini: boolean; private boss: boolean; - private bossSegments: integer; + private bossSegments: number; private offset: boolean; private lastName: string | null; private lastTeraType: Type; private lastStatus: StatusEffect; - private lastHp: integer; - private lastMaxHp: integer; + private lastHp: number; + private lastMaxHp: number; private lastHpFrame: string | null; - private lastExp: integer; - private lastLevelExp: integer; - private lastLevel: integer; + private lastExp: number; + private lastLevelExp: number; + private lastLevel: number; private lastLevelCapped: boolean; private lastStats: string; @@ -739,7 +739,7 @@ export default class BattleInfo extends Phaser.GameObjects.Container { }); } - setLevel(level: integer): void { + setLevel(level: number): void { const isCapped = level >= globalScene.getMaxExpLevel(); this.levelNumbersContainer.removeAll(true); const levelStr = level.toString(); @@ -749,7 +749,7 @@ export default class BattleInfo extends Phaser.GameObjects.Container { this.levelContainer.setX((this.player ? -41 : -50) - 8 * Math.max(levelStr.length - 3, 0)); } - setHpNumbers(hp: integer, maxHp: integer): void { + setHpNumbers(hp: number, maxHp: number): void { if (!this.player || !globalScene) { return; } @@ -766,7 +766,7 @@ export default class BattleInfo extends Phaser.GameObjects.Container { } } - updateStats(stats: integer[]): void { + updateStats(stats: number[]): void { this.statOrder.map((s, i) => { if (s !== Stat.HP) { this.statNumbers[i].setFrame(stats[s - 1].toString()); diff --git a/src/ui/battle-message-ui-handler.ts b/src/ui/battle-message-ui-handler.ts index 2c0998b79ab..93de69240c3 100644 --- a/src/ui/battle-message-ui-handler.ts +++ b/src/ui/battle-message-ui-handler.ts @@ -154,19 +154,19 @@ export default class BattleMessageUiHandler extends MessageUiHandler { super.clear(); } - showText(text: string, delay?: integer | null, callback?: Function | null, callbackDelay?: integer | null, prompt?: boolean | null, promptDelay?: integer | null) { + showText(text: string, delay?: number | null, callback?: Function | null, callbackDelay?: number | null, prompt?: boolean | null, promptDelay?: number | null) { this.hideNameText(); super.showText(text, delay, callback, callbackDelay, prompt, promptDelay); } - showDialogue(text: string, name?: string, delay?: integer | null, callback?: Function, callbackDelay?: integer, prompt?: boolean, promptDelay?: integer) { + showDialogue(text: string, name?: string, delay?: number | null, callback?: Function, callbackDelay?: number, prompt?: boolean, promptDelay?: number) { if (name) { this.showNameText(name); } super.showDialogue(text, name, delay, callback, callbackDelay, prompt, promptDelay); } - promptLevelUpStats(partyMemberIndex: integer, prevStats: integer[], showTotals: boolean): Promise { + promptLevelUpStats(partyMemberIndex: number, prevStats: number[], showTotals: boolean): Promise { return new Promise(resolve => { if (!globalScene.showLevelUpStats) { return resolve(); @@ -191,7 +191,7 @@ export default class BattleMessageUiHandler extends MessageUiHandler { }); } - promptIvs(pokemonId: integer, ivs: integer[], shownIvsCount: integer): Promise { + promptIvs(pokemonId: number, ivs: number[], shownIvsCount: number): Promise { return new Promise(resolve => { globalScene.executeWithSeedOffset(() => { let levelUpStatsValuesText = ""; @@ -211,7 +211,7 @@ export default class BattleMessageUiHandler extends MessageUiHandler { }); } - getTopIvs(ivs: integer[], shownIvsCount: integer): Stat[] { + getTopIvs(ivs: number[], shownIvsCount: number): Stat[] { let shownStats: Stat[] = []; if (shownIvsCount < 6) { const statsPool = PERMANENT_STATS.slice(); @@ -226,7 +226,7 @@ export default class BattleMessageUiHandler extends MessageUiHandler { return shownStats; } - getIvDescriptor(value: integer, typeIv: integer, pokemonId: integer): string { + getIvDescriptor(value: number, typeIv: number, pokemonId: number): string { const starterSpecies = globalScene.getPokemonById(pokemonId)!.species.getRootSpeciesId(); // we are using getRootSpeciesId() here because we want to check against the baby form, not the mid form if it exists const starterIvs: number[] = globalScene.gameData.dexData[starterSpecies].ivs; const uiTheme = globalScene.uiTheme; // Assuming uiTheme is accessible diff --git a/src/ui/candy-bar.ts b/src/ui/candy-bar.ts index 81478f6fa7c..d58fd040a7c 100644 --- a/src/ui/candy-bar.ts +++ b/src/ui/candy-bar.ts @@ -47,7 +47,7 @@ export default class CandyBar extends Phaser.GameObjects.Container { this.shown = false; } - showStarterSpeciesCandy(starterSpeciesId: Species, count: integer): Promise { + showStarterSpeciesCandy(starterSpeciesId: Species, count: number): Promise { return new Promise(resolve => { if (this.shown) { if (this.speciesId === starterSpeciesId) { diff --git a/src/ui/challenges-select-ui-handler.ts b/src/ui/challenges-select-ui-handler.ts index 9c13d54bf55..31ee91388fc 100644 --- a/src/ui/challenges-select-ui-handler.ts +++ b/src/ui/challenges-select-ui-handler.ts @@ -20,7 +20,7 @@ export default class GameChallengesUiHandler extends UiHandler { private challengesContainer: Phaser.GameObjects.Container; private valuesContainer: Phaser.GameObjects.Container; - private scrollCursor: integer; + private scrollCursor: number; private optionsBg: Phaser.GameObjects.NineSlice; @@ -430,7 +430,7 @@ export default class GameChallengesUiHandler extends UiHandler { return success; } - setCursor(cursor: integer): boolean { + setCursor(cursor: number): boolean { let ret = super.setCursor(cursor); if (!this.cursorObj) { @@ -447,7 +447,7 @@ export default class GameChallengesUiHandler extends UiHandler { return ret; } - setScrollCursor(scrollCursor: integer): boolean { + setScrollCursor(scrollCursor: number): boolean { if (scrollCursor === this.scrollCursor) { return false; } diff --git a/src/ui/command-ui-handler.ts b/src/ui/command-ui-handler.ts index 32a3bb764a9..de75f29ff6f 100644 --- a/src/ui/command-ui-handler.ts +++ b/src/ui/command-ui-handler.ts @@ -19,8 +19,8 @@ export default class CommandUiHandler extends UiHandler { private commandsContainer: Phaser.GameObjects.Container; private cursorObj: Phaser.GameObjects.Image | null; - protected fieldIndex: integer = 0; - protected cursor2: integer = 0; + protected fieldIndex: number = 0; + protected cursor2: number = 0; constructor() { super(Mode.COMMAND); @@ -50,7 +50,7 @@ export default class CommandUiHandler extends UiHandler { show(args: any[]): boolean { super.show(args); - this.fieldIndex = args.length ? args[0] as integer : 0; + this.fieldIndex = args.length ? args[0] as number : 0; this.commandsContainer.setVisible(true); @@ -144,11 +144,11 @@ export default class CommandUiHandler extends UiHandler { return success; } - getCursor(): integer { + getCursor(): number { return !this.fieldIndex ? this.cursor : this.cursor2; } - setCursor(cursor: integer): boolean { + setCursor(cursor: number): boolean { const changed = this.getCursor() !== cursor; if (changed) { if (!this.fieldIndex) { diff --git a/src/ui/confirm-ui-handler.ts b/src/ui/confirm-ui-handler.ts index b53a350cce0..3a3a5dfbfe7 100644 --- a/src/ui/confirm-ui-handler.ts +++ b/src/ui/confirm-ui-handler.ts @@ -8,16 +8,16 @@ import { globalScene } from "#app/global-scene"; export default class ConfirmUiHandler extends AbstractOptionSelectUiHandler { - public static readonly windowWidth: integer = 48; + public static readonly windowWidth: number = 48; private switchCheck: boolean; - private switchCheckCursor: integer; + private switchCheckCursor: number; constructor() { super(Mode.CONFIRM); } - getWindowWidth(): integer { + getWindowWidth(): number { return ConfirmUiHandler.windowWidth; } @@ -45,7 +45,7 @@ export default class ConfirmUiHandler extends AbstractOptionSelectUiHandler { } } ], - delay: args.length >= 8 && args[7] !== null ? args[7] as integer : 0 + delay: args.length >= 8 && args[7] !== null ? args[7] as number : 0 }; super.show([ config ]); @@ -105,7 +105,7 @@ export default class ConfirmUiHandler extends AbstractOptionSelectUiHandler { return super.processInput(button); } - setCursor(cursor: integer): boolean { + setCursor(cursor: number): boolean { const ret = super.setCursor(cursor); if (ret && this.switchCheck) { diff --git a/src/ui/daily-run-scoreboard.ts b/src/ui/daily-run-scoreboard.ts index 0c7ac0d60b3..d9131150262 100644 --- a/src/ui/daily-run-scoreboard.ts +++ b/src/ui/daily-run-scoreboard.ts @@ -6,10 +6,10 @@ import { WindowVariant, addWindow } from "./ui-theme"; import { pokerogueApi } from "#app/plugins/api/pokerogue-api"; export interface RankingEntry { - rank: integer, + rank: number, username: string, - score: integer, - wave: integer + score: number, + wave: number } // Don't forget to update translations when adding a new category @@ -28,8 +28,8 @@ export class DailyRunScoreboard extends Phaser.GameObjects.Container { private pageNumberLabel: Phaser.GameObjects.Text; private nextPageButton: Phaser.GameObjects.Sprite; - private pageCount: integer; - private page: integer; + private pageCount: number; + private page: number; private category: ScoreboardCategory; private _isUpdating: boolean; @@ -157,7 +157,7 @@ export class DailyRunScoreboard extends Phaser.GameObjects.Container { this.rankingsContainer.add(getEntry(i18next.t("menu:positionIcon"), i18next.t("menu:usernameScoreboard"), i18next.t("menu:score"), i18next.t("menu:wave"))); - rankings.forEach((r: RankingEntry, i: integer) => { + rankings.forEach((r: RankingEntry, i: number) => { const entryContainer = getEntry(r.rank.toString(), r.username, r.score.toString(), r.wave.toString()); entryContainer.setY((i + 1) * 9); this.rankingsContainer.add(entryContainer); @@ -176,7 +176,7 @@ export class DailyRunScoreboard extends Phaser.GameObjects.Container { * @param {ScoreboardCategory} [category=this.category] - The category to fetch rankings for. Defaults to the current category. * @param {number} [page=this.page] - The page number to fetch. Defaults to the current page. */ - update(category: ScoreboardCategory = this.category, page: integer = this.page) { + update(category: ScoreboardCategory = this.category, page: number = this.page) { if (this.isUpdating) { return; } diff --git a/src/ui/dropdown.ts b/src/ui/dropdown.ts index 8c318b29d64..67599b843d8 100644 --- a/src/ui/dropdown.ts +++ b/src/ui/dropdown.ts @@ -370,7 +370,7 @@ export class DropDown extends Phaser.GameObjects.Container { return this.setCursor(this.defaultCursor); } - setCursor(cursor: integer): boolean { + setCursor(cursor: number): boolean { this.cursor = cursor; if (cursor < 0) { cursor = 0; diff --git a/src/ui/egg-gacha-ui-handler.ts b/src/ui/egg-gacha-ui-handler.ts index 82e361fac39..3cd8a7e8dc9 100644 --- a/src/ui/egg-gacha-ui-handler.ts +++ b/src/ui/egg-gacha-ui-handler.ts @@ -30,7 +30,7 @@ export default class EggGachaUiHandler extends MessageUiHandler { private voucherCountLabels: Phaser.GameObjects.Text[]; - private gachaCursor: integer; + private gachaCursor: number; private cursorObj: Phaser.GameObjects.Image; private transitioning: boolean; @@ -331,14 +331,14 @@ export default class EggGachaUiHandler extends MessageUiHandler { return true; } - getDelayValue(delay: integer) { + getDelayValue(delay: number) { if (this.transitioning && this.transitionCancelled) { delay = Math.ceil(delay / 5); } return Utils.fixedInt(delay); } - pull(pullCount: integer = 0, count: integer = 0, eggs?: Egg[]): void { + pull(pullCount: number = 0, count: number = 0, eggs?: Egg[]): void { if (Overrides.EGG_GACHA_PULL_COUNT_OVERRIDE && !count) { pullCount = Overrides.EGG_GACHA_PULL_COUNT_OVERRIDE; } @@ -575,7 +575,7 @@ export default class EggGachaUiHandler extends MessageUiHandler { } } - consumeVouchers(voucherType: VoucherType, count: integer): void { + consumeVouchers(voucherType: VoucherType, count: number): void { globalScene.gameData.voucherCounts[voucherType] = Math.max(globalScene.gameData.voucherCounts[voucherType] - count, 0); this.updateVoucherCounts(); } @@ -751,7 +751,7 @@ export default class EggGachaUiHandler extends MessageUiHandler { return success || error; } - setCursor(cursor: integer): boolean { + setCursor(cursor: number): boolean { const ret = super.setCursor(cursor); if (!this.cursorObj) { @@ -765,7 +765,7 @@ export default class EggGachaUiHandler extends MessageUiHandler { return ret; } - setGachaCursor(cursor: integer): boolean { + setGachaCursor(cursor: number): boolean { const oldCursor = this.gachaCursor; const changed = oldCursor !== cursor; diff --git a/src/ui/egg-hatch-scene-handler.ts b/src/ui/egg-hatch-scene-handler.ts index 189d2f295d1..791c488c91a 100644 --- a/src/ui/egg-hatch-scene-handler.ts +++ b/src/ui/egg-hatch-scene-handler.ts @@ -54,7 +54,7 @@ export default class EggHatchSceneHandler extends UiHandler { return globalScene.ui.getMessageHandler().processInput(button); } - setCursor(_cursor: integer): boolean { + setCursor(_cursor: number): boolean { return false; } diff --git a/src/ui/evolution-scene-handler.ts b/src/ui/evolution-scene-handler.ts index e7866dfea53..b35aa8f6cc0 100644 --- a/src/ui/evolution-scene-handler.ts +++ b/src/ui/evolution-scene-handler.ts @@ -82,7 +82,7 @@ export default class EvolutionSceneHandler extends MessageUiHandler { return false; } - setCursor(_cursor: integer): boolean { + setCursor(_cursor: number): boolean { return false; } diff --git a/src/ui/fight-ui-handler.ts b/src/ui/fight-ui-handler.ts index 220e5d817ef..72fb90066e7 100644 --- a/src/ui/fight-ui-handler.ts +++ b/src/ui/fight-ui-handler.ts @@ -32,8 +32,8 @@ export default class FightUiHandler extends UiHandler implements InfoToggle { private moveCategoryIcon: Phaser.GameObjects.Sprite; private moveInfoOverlay : MoveInfoOverlay; - protected fieldIndex: integer = 0; - protected cursor2: integer = 0; + protected fieldIndex: number = 0; + protected cursor2: number = 0; constructor() { super(Mode.FIGHT); @@ -113,7 +113,7 @@ export default class FightUiHandler extends UiHandler implements InfoToggle { show(args: any[]): boolean { super.show(args); - this.fieldIndex = args.length ? args[0] as integer : 0; + this.fieldIndex = args.length ? args[0] as number : 0; const messageHandler = this.getUi().getMessageHandler(); messageHandler.bg.setVisible(false); @@ -206,11 +206,11 @@ export default class FightUiHandler extends UiHandler implements InfoToggle { return this.active; } - getCursor(): integer { + getCursor(): number { return !this.fieldIndex ? this.cursor : this.cursor2; } - setCursor(cursor: integer): boolean { + setCursor(cursor: number): boolean { const ui = this.getUi(); this.moveInfoOverlay.clear(); diff --git a/src/ui/game-stats-ui-handler.ts b/src/ui/game-stats-ui-handler.ts index 2fa5b54ac76..09fd178e101 100644 --- a/src/ui/game-stats-ui-handler.ts +++ b/src/ui/game-stats-ui-handler.ts @@ -372,7 +372,7 @@ export default class GameStatsUiHandler extends UiHandler { return success; } - setCursor(cursor: integer): boolean { + setCursor(cursor: number): boolean { const ret = super.setCursor(cursor); if (ret) { diff --git a/src/ui/menu-ui-handler.ts b/src/ui/menu-ui-handler.ts index 1a1070122ab..aadb39cdcfe 100644 --- a/src/ui/menu-ui-handler.ts +++ b/src/ui/menu-ui-handler.ts @@ -171,7 +171,7 @@ export default class MenuUiHandler extends MessageUiHandler { const manageDataOptions: any[] = []; // TODO: proper type - const confirmSlot = (message: string, slotFilter: (i: integer) => boolean, callback: (i: integer) => void) => { + const confirmSlot = (message: string, slotFilter: (i: number) => boolean, callback: (i: number) => void) => { ui.revertMode(); ui.showText(message, null, () => { const config: OptionSelectConfig = { @@ -212,7 +212,7 @@ export default class MenuUiHandler extends MessageUiHandler { manageDataOptions.push({ label: i18next.t("menuUiHandler:exportSession"), handler: () => { - const dataSlots: integer[] = []; + const dataSlots: number[] = []; Promise.all( new Array(5).fill(null).map((_, i) => { const slotId = i; @@ -680,7 +680,7 @@ export default class MenuUiHandler extends MessageUiHandler { super.showText(text, delay, callback, callbackDelay, prompt, promptDelay); } - setCursor(cursor: integer): boolean { + setCursor(cursor: number): boolean { const ret = super.setCursor(cursor); if (!this.cursorObj) { diff --git a/src/ui/message-ui-handler.ts b/src/ui/message-ui-handler.ts index 81a09e90167..18e1dfb1aff 100644 --- a/src/ui/message-ui-handler.ts +++ b/src/ui/message-ui-handler.ts @@ -34,24 +34,24 @@ export default abstract class MessageUiHandler extends AwaitableUiHandler { } } - showText(text: string, delay?: integer | null, callback?: Function | null, callbackDelay?: integer | null, prompt?: boolean | null, promptDelay?: integer | null) { + showText(text: string, delay?: number | null, callback?: Function | null, callbackDelay?: number | null, prompt?: boolean | null, promptDelay?: number | null) { this.showTextInternal(text, delay, callback, callbackDelay, prompt, promptDelay); } - showDialogue(text: string, name?: string, delay?: integer | null, callback?: Function | null, callbackDelay?: integer | null, prompt?: boolean | null, promptDelay?: integer | null) { + showDialogue(text: string, name?: string, delay?: number | null, callback?: Function | null, callbackDelay?: number | null, prompt?: boolean | null, promptDelay?: number | null) { this.showTextInternal(text, delay, callback, callbackDelay, prompt, promptDelay); } - private showTextInternal(text: string, delay?: integer | null, callback?: Function | null, callbackDelay?: integer | null, prompt?: boolean | null, promptDelay?: integer | null) { + private showTextInternal(text: string, delay?: number | null, callback?: Function | null, callbackDelay?: number | null, prompt?: boolean | null, promptDelay?: number | null) { if (delay === null || delay === undefined) { delay = 20; } // Pattern matching regex that checks for @c{}, @f{}, @s{}, and @f{} patterns within message text and parses them to their respective behaviors. - const charVarMap = new Map(); - const delayMap = new Map(); - const soundMap = new Map(); - const fadeMap = new Map(); + const charVarMap = new Map(); + const delayMap = new Map(); + const soundMap = new Map(); + const fadeMap = new Map(); const actionPattern = /@(c|d|s|f)\{(.*?)\}/; let actionMatch: RegExpExecArray | null; while ((actionMatch = actionPattern.exec(text))) { @@ -188,7 +188,7 @@ export default abstract class MessageUiHandler extends AwaitableUiHandler { } } - showPrompt(callback?: Function | null, callbackDelay?: integer | null) { + showPrompt(callback?: Function | null, callbackDelay?: number | null) { const wrappedTextLines = this.message.runWordWrap(this.message.text).split(/\n/g); const textLinesCount = wrappedTextLines.length; const lastTextLine = wrappedTextLines[wrappedTextLines.length - 1]; diff --git a/src/ui/modifier-select-ui-handler.ts b/src/ui/modifier-select-ui-handler.ts index 0cca087ce8d..a3508532631 100644 --- a/src/ui/modifier-select-ui-handler.ts +++ b/src/ui/modifier-select-ui-handler.ts @@ -35,15 +35,15 @@ export default class ModifierSelectUiHandler extends AwaitableUiHandler { private moveInfoOverlay: MoveInfoOverlay; private moveInfoOverlayActive: boolean = false; - private rowCursor: integer = 0; + private rowCursor: number = 0; private player: boolean; /** * If reroll cost is negative, it is assumed there are 0 items in the shop. * It will cause reroll button to be disabled, and a "Continue" button to show in the place of shop items */ - private rerollCost: integer; - private transferButtonWidth: integer; - private checkButtonWidth: integer; + private rerollCost: number; + private transferButtonWidth: number; + private checkButtonWidth: number; public options: ModifierOption[]; public shopOptionsRows: ModifierOption[][]; @@ -185,7 +185,7 @@ export default class ModifierSelectUiHandler extends AwaitableUiHandler { this.rerollButtonContainer.setPositionRelative(this.lockRarityButtonContainer, 0, canLockRarities ? -12 : 0); - this.rerollCost = args[3] as integer; + this.rerollCost = args[3] as number; this.updateRerollCostText(); @@ -460,7 +460,7 @@ export default class ModifierSelectUiHandler extends AwaitableUiHandler { return success; } - setCursor(cursor: integer): boolean { + setCursor(cursor: number): boolean { const ui = this.getUi(); const ret = super.setCursor(cursor); @@ -516,7 +516,7 @@ export default class ModifierSelectUiHandler extends AwaitableUiHandler { return ret; } - setRowCursor(rowCursor: integer): boolean { + setRowCursor(rowCursor: number): boolean { const lastRowCursor = this.rowCursor; if (rowCursor !== lastRowCursor) { @@ -553,7 +553,7 @@ export default class ModifierSelectUiHandler extends AwaitableUiHandler { return false; } - private getRowItems(rowCursor: integer): integer { + private getRowItems(rowCursor: number): number { switch (rowCursor) { case 0: return 3; @@ -564,7 +564,7 @@ export default class ModifierSelectUiHandler extends AwaitableUiHandler { } } - setRerollCost(rerollCost: integer): void { + setRerollCost(rerollCost: number): void { this.rerollCost = rerollCost; } @@ -730,7 +730,7 @@ class ModifierOption extends Phaser.GameObjects.Container { } } - show(remainingDuration: integer, upgradeCountOffset: integer) { + show(remainingDuration: number, upgradeCountOffset: number) { if (!this.modifierTypeOption.cost) { globalScene.tweens.add({ targets: this.pb, @@ -847,8 +847,8 @@ class ModifierOption extends Phaser.GameObjects.Container { }); } - getPbAtlasKey(tierOffset: integer = 0) { - return getPokeballAtlasKey((this.modifierTypeOption.type?.tier! + tierOffset) as integer as PokeballType); // TODO: is this bang correct? + getPbAtlasKey(tierOffset: number = 0) { + return getPokeballAtlasKey((this.modifierTypeOption.type?.tier! + tierOffset) as number as PokeballType); // TODO: is this bang correct? } updateCostText(): void { diff --git a/src/ui/party-exp-bar.ts b/src/ui/party-exp-bar.ts index 93e4117157a..75970a5908b 100644 --- a/src/ui/party-exp-bar.ts +++ b/src/ui/party-exp-bar.ts @@ -29,7 +29,7 @@ export default class PartyExpBar extends Phaser.GameObjects.Container { this.shown = false; } - showPokemonExp(pokemon: Pokemon, expValue: integer, showOnlyLevelUp: boolean, newLevel: number): Promise { + showPokemonExp(pokemon: Pokemon, expValue: number, showOnlyLevelUp: boolean, newLevel: number): Promise { return new Promise(resolve => { if (this.shown) { return resolve(); diff --git a/src/ui/party-ui-handler.ts b/src/ui/party-ui-handler.ts index 4a7716f7e62..3ffd470b6ca 100644 --- a/src/ui/party-ui-handler.ts +++ b/src/ui/party-ui-handler.ts @@ -125,16 +125,16 @@ export enum PartyOption { ALL = 4000, } -export type PartySelectCallback = (cursor: integer, option: PartyOption) => void; -export type PartyModifierTransferSelectCallback = (fromCursor: integer, index: integer, itemQuantity?: integer, toCursor?: integer) => void; -export type PartyModifierSpliceSelectCallback = (fromCursor: integer, toCursor?: integer) => void; +export type PartySelectCallback = (cursor: number, option: PartyOption) => void; +export type PartyModifierTransferSelectCallback = (fromCursor: number, index: number, itemQuantity?: number, toCursor?: number) => void; +export type PartyModifierSpliceSelectCallback = (fromCursor: number, toCursor?: number) => void; export type PokemonSelectFilter = (pokemon: PlayerPokemon) => string | null; export type PokemonModifierTransferSelectFilter = (pokemon: PlayerPokemon, modifier: PokemonHeldItemModifier) => string | null; export type PokemonMoveSelectFilter = (pokemonMove: PokemonMove) => string | null; export default class PartyUiHandler extends MessageUiHandler { private partyUiMode: PartyUiMode; - private fieldIndex: integer; + private fieldIndex: number; private partyBg: Phaser.GameObjects.Image; private partyContainer: Phaser.GameObjects.Container; @@ -146,26 +146,26 @@ export default class PartyUiHandler extends MessageUiHandler { private optionsMode: boolean; private optionsScroll: boolean; - private optionsCursor: integer = 0; - private optionsScrollCursor: integer = 0; - private optionsScrollTotal: integer = 0; + private optionsCursor: number = 0; + private optionsScrollCursor: number = 0; + private optionsScrollTotal: number = 0; /** This is only public for test/ui/transfer-item.test.ts */ public optionsContainer: Phaser.GameObjects.Container; private optionsBg: Phaser.GameObjects.NineSlice; private optionsCursorObj: Phaser.GameObjects.Image | null; - private options: integer[]; + private options: number[]; private transferMode: boolean; - private transferOptionCursor: integer; - private transferCursor: integer; + private transferOptionCursor: number; + private transferCursor: number; /** Current quantity selection for every item held by the pokemon selected for the transfer */ - private transferQuantities: integer[]; + private transferQuantities: number[]; /** Stack size of every item that the selected pokemon is holding */ - private transferQuantitiesMax: integer[]; + private transferQuantitiesMax: number[]; /** Whether to transfer all items */ private transferAll: boolean; - private lastCursor: integer = 0; + private lastCursor: number = 0; private selectCallback: PartySelectCallback | PartyModifierTransferSelectCallback | null; private selectFilter: PokemonSelectFilter | PokemonModifierTransferSelectFilter; private moveSelectFilter: PokemonMoveSelectFilter; @@ -304,7 +304,7 @@ export default class PartyUiHandler extends MessageUiHandler { this.partyUiMode = args[0] as PartyUiMode; - this.fieldIndex = args.length > 1 ? args[1] as integer : -1; + this.fieldIndex = args.length > 1 ? args[1] as number : -1; this.selectCallback = args.length > 2 && args[2] instanceof Function ? args[2] : undefined; this.selectFilter = args.length > 3 && args[3] instanceof Function @@ -689,7 +689,7 @@ export default class PartyUiHandler extends MessageUiHandler { } } - setCursor(cursor: integer): boolean { + setCursor(cursor: number): boolean { let changed: boolean; if (this.optionsMode) { @@ -749,7 +749,7 @@ export default class PartyUiHandler extends MessageUiHandler { return changed; } - showText(text: string, delay?: integer | null, callback?: Function | null, callbackDelay?: integer | null, prompt?: boolean | null, promptDelay?: integer | null) { + showText(text: string, delay?: number | null, callback?: Function | null, callbackDelay?: number | null, prompt?: boolean | null, promptDelay?: number | null) { if (text.length === 0) { text = defaultMessage; } @@ -1060,7 +1060,7 @@ export default class PartyUiHandler extends MessageUiHandler { } } - doRelease(slotIndex: integer): void { + doRelease(slotIndex: number): void { this.showText(this.getReleaseMessage(getPokemonNameWithAffix(globalScene.getPlayerParty()[slotIndex])), null, () => { this.clearPartySlots(); globalScene.removePartyMemberModifiers(slotIndex); @@ -1121,7 +1121,7 @@ export default class PartyUiHandler extends MessageUiHandler { return formChangeItemModifiers; } - getOptionsCursorWithScroll(): integer { + getOptionsCursorWithScroll(): number { return this.optionsCursor + this.optionsScrollCursor + (this.options && this.options[0] === PartyOption.SCROLL_UP ? -1 : 0); } @@ -1164,7 +1164,7 @@ export default class PartyUiHandler extends MessageUiHandler { class PartySlot extends Phaser.GameObjects.Container { private selected: boolean; private transfer: boolean; - private slotIndex: integer; + private slotIndex: number; private pokemon: PlayerPokemon; private slotBg: Phaser.GameObjects.Image; @@ -1179,7 +1179,7 @@ class PartySlot extends Phaser.GameObjects.Container { private pokemonIcon: Phaser.GameObjects.Container; private iconAnimHandler: PokemonIconAnimHandler; - constructor(slotIndex: integer, pokemon: PlayerPokemon, iconAnimHandler: PokemonIconAnimHandler, partyUiMode: PartyUiMode, tmMoveId: Moves) { + constructor(slotIndex: number, pokemon: PlayerPokemon, iconAnimHandler: PokemonIconAnimHandler, partyUiMode: PartyUiMode, tmMoveId: Moves) { super(globalScene, slotIndex >= globalScene.currentBattle.getBattlerCount() ? 230.5 : 64, slotIndex >= globalScene.currentBattle.getBattlerCount() ? -184 + (globalScene.currentBattle.double ? -40 : 0) + (28 + (globalScene.currentBattle.double ? 8 : 0)) * slotIndex : -124 + (globalScene.currentBattle.double ? -8 : 0) + slotIndex * 64); diff --git a/src/ui/pokemon-info-container.ts b/src/ui/pokemon-info-container.ts index 4f7a28f1d6d..554cea39731 100644 --- a/src/ui/pokemon-info-container.ts +++ b/src/ui/pokemon-info-container.ts @@ -17,8 +17,8 @@ import { Species } from "#enums/species"; interface LanguageSetting { infoContainerTextSize: string; - infoContainerLabelXPos?: integer; - infoContainerTextXPos?: integer; + infoContainerLabelXPos?: number; + infoContainerTextXPos?: number; } const languageSettings: { [key: string]: LanguageSetting } = { @@ -330,7 +330,7 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container { } const starterSpeciesId = pokemon.species.getRootSpeciesId(); - const originalIvs: integer[] | null = eggInfo ? (dexEntry.caughtAttr ? dexEntry.ivs : null) : (globalScene.gameData.dexData[starterSpeciesId].caughtAttr + const originalIvs: number[] | null = eggInfo ? (dexEntry.caughtAttr ? dexEntry.ivs : null) : (globalScene.gameData.dexData[starterSpeciesId].caughtAttr ? globalScene.gameData.dexData[starterSpeciesId].ivs : null); this.statsContainer.updateIvs(pokemon.ivs, originalIvs!); // TODO: is this bang correct? diff --git a/src/ui/run-info-ui-handler.ts b/src/ui/run-info-ui-handler.ts index 43b95cb3793..02bcba17a73 100644 --- a/src/ui/run-info-ui-handler.ts +++ b/src/ui/run-info-ui-handler.ts @@ -59,7 +59,7 @@ export default class RunInfoUiHandler extends UiHandler { private runResultContainer: Phaser.GameObjects.Container; private runInfoContainer: Phaser.GameObjects.Container; private partyContainer: Phaser.GameObjects.Container; - private statsBgWidth: integer; + private statsBgWidth: number; private hallofFameContainer: Phaser.GameObjects.Container; private endCardContainer: Phaser.GameObjects.Container; @@ -534,7 +534,7 @@ export default class RunInfoUiHandler extends UiHandler { // Luck // Uses the parameters windowX and windowY to dynamically position the luck value neatly into the bottom right corner const luckText = addBBCodeTextObject(0, 0, "", TextStyle.WINDOW, { fontSize: "55px" }); - const luckValue = Phaser.Math.Clamp(this.runInfo.party.map(p => p.toPokemon().getLuck()).reduce((total: integer, value: integer) => total += value, 0), 0, 14); + const luckValue = Phaser.Math.Clamp(this.runInfo.party.map(p => p.toPokemon().getLuck()).reduce((total: number, value: number) => total += value, 0), 0, 14); let luckInfo = i18next.t("runHistory:luck") + ": " + getLuckString(luckValue); if (luckValue < 14) { luckInfo = "[color=#" + (getLuckTextTint(luckValue)).toString(16) + "]" + luckInfo + "[/color]"; @@ -621,7 +621,7 @@ export default class RunInfoUiHandler extends UiHandler { const currentLanguage = i18next.resolvedLanguage ?? "en"; const windowHeight = ((globalScene.game.canvas.height / 6) - 23) / 6; - party.forEach((p: PokemonData, i: integer) => { + party.forEach((p: PokemonData, i: number) => { const pokemonInfoWindow = new RoundRectangle(globalScene, 0, 14, (this.statsBgWidth * 2) + 10, windowHeight - 2, 3); const pokemon = p.toPokemon(); diff --git a/src/ui/save-slot-select-ui-handler.ts b/src/ui/save-slot-select-ui-handler.ts index fe2ac9e1221..e746c9302d0 100644 --- a/src/ui/save-slot-select-ui-handler.ts +++ b/src/ui/save-slot-select-ui-handler.ts @@ -20,7 +20,7 @@ export enum SaveSlotUiMode { SAVE } -export type SaveSlotSelectCallback = (cursor: integer) => void; +export type SaveSlotSelectCallback = (cursor: number) => void; export default class SaveSlotSelectUiHandler extends MessageUiHandler { @@ -33,7 +33,7 @@ export default class SaveSlotSelectUiHandler extends MessageUiHandler { private uiMode: SaveSlotUiMode; private saveSlotSelectCallback: SaveSlotSelectCallback | null; - private scrollCursor: integer = 0; + private scrollCursor: number = 0; private cursorObj: Phaser.GameObjects.Container | null; @@ -210,7 +210,7 @@ export default class SaveSlotSelectUiHandler extends MessageUiHandler { } } - showText(text: string, delay?: integer, callback?: Function, callbackDelay?: integer, prompt?: boolean, promptDelay?: integer) { + showText(text: string, delay?: number, callback?: Function, callbackDelay?: number, prompt?: boolean, promptDelay?: number) { super.showText(text, delay, callback, callbackDelay, prompt, promptDelay); if (text?.indexOf("\n") === -1) { @@ -230,7 +230,7 @@ export default class SaveSlotSelectUiHandler extends MessageUiHandler { * @param prevSlotIndex index of the previous session occupied by the cursor, between `0` and `SESSION_SLOTS_COUNT - 1` - optional * @returns `true` if the cursor position has changed | `false` if it has not */ - override setCursor(cursor: integer, prevSlotIndex?: integer): boolean { + override setCursor(cursor: number, prevSlotIndex?: number): boolean { const changed = super.setCursor(cursor); if (!this.cursorObj) { @@ -267,7 +267,7 @@ export default class SaveSlotSelectUiHandler extends MessageUiHandler { /** * Helper function that resets the given session slot to its default central position */ - revertSessionSlot(slotIndex: integer): void { + revertSessionSlot(slotIndex: number): void { const sessionSlot = this.sessionSlots[slotIndex]; if (sessionSlot) { sessionSlot.setPosition(0, slotIndex * 56); @@ -291,7 +291,7 @@ export default class SaveSlotSelectUiHandler extends MessageUiHandler { * @param prevSlotIndex index of the previous slot occupied by the cursor, between `0` and `SESSION_SLOTS_COUNT-1` - optional * @returns `true` if the cursor position has changed | `false` if it has not */ - setScrollCursor(scrollCursor: integer, prevSlotIndex?: integer): boolean { + setScrollCursor(scrollCursor: number, prevSlotIndex?: number): boolean { const changed = scrollCursor !== this.scrollCursor; if (changed) { @@ -331,13 +331,13 @@ export default class SaveSlotSelectUiHandler extends MessageUiHandler { } class SessionSlot extends Phaser.GameObjects.Container { - public slotId: integer; + public slotId: number; public hasData: boolean; private loadingLabel: Phaser.GameObjects.Text; public saveData: SessionSaveData; - constructor(slotId: integer) { + constructor(slotId: number) { super(globalScene, 0, slotId * 56); this.slotId = slotId; @@ -367,7 +367,7 @@ class SessionSlot extends Phaser.GameObjects.Container { this.add(playTimeLabel); const pokemonIconsContainer = globalScene.add.container(144, 4); - data.party.forEach((p: PokemonData, i: integer) => { + data.party.forEach((p: PokemonData, i: number) => { const iconContainer = globalScene.add.container(26 * i, 0); iconContainer.setScale(0.75); diff --git a/src/ui/settings/abstract-binding-ui-handler.ts b/src/ui/settings/abstract-binding-ui-handler.ts index d0f9a5c8a90..e8c3e20c38f 100644 --- a/src/ui/settings/abstract-binding-ui-handler.ts +++ b/src/ui/settings/abstract-binding-ui-handler.ts @@ -203,7 +203,7 @@ export default abstract class AbstractBindingUiHandler extends UiHandler { * @param cursor - The cursor position to set. * @returns `true` if the cursor was set successfully. */ - setCursor(cursor: integer): boolean { + setCursor(cursor: number): boolean { this.cursor = cursor; if (cursor === 1) { this.actionLabel.setColor(this.getTextColor(TextStyle.SETTINGS_SELECTED)); diff --git a/src/ui/settings/abstract-settings-ui-handler.ts b/src/ui/settings/abstract-settings-ui-handler.ts index a0287f80f79..7300b6d3266 100644 --- a/src/ui/settings/abstract-settings-ui-handler.ts +++ b/src/ui/settings/abstract-settings-ui-handler.ts @@ -463,7 +463,7 @@ export default class AbstractSettingsUiHandler extends MessageUiHandler { this.cursorObj = null; } - override showText(text: string, delay?: integer, callback?: Function, callbackDelay?: integer, prompt?: boolean, promptDelay?: integer) { + override showText(text: string, delay?: number, callback?: Function, callbackDelay?: number, prompt?: boolean, promptDelay?: number) { this.messageBoxContainer.setVisible(!!text?.length); super.showText(text, delay, callback, callbackDelay, prompt, promptDelay); } diff --git a/src/ui/settings/option-select-ui-handler.ts b/src/ui/settings/option-select-ui-handler.ts index 5deaba5cfc5..b3d1735dc19 100644 --- a/src/ui/settings/option-select-ui-handler.ts +++ b/src/ui/settings/option-select-ui-handler.ts @@ -6,7 +6,7 @@ export default class OptionSelectUiHandler extends AbstractOptionSelectUiHandler super(mode); } - getWindowWidth(): integer { + getWindowWidth(): number { return 64; } } diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index de7b182c5c1..938779dfee6 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -62,7 +62,7 @@ export type StarterSelectCallback = (starters: Starter[]) => void; export interface Starter { species: PokemonSpecies; dexAttr: bigint; - abilityIndex: integer, + abilityIndex: number, passive: boolean; nature: Nature; moveset?: StarterMoveset; @@ -73,8 +73,8 @@ export interface Starter { interface LanguageSetting { starterInfoTextSize: string, instructionTextSize: string, - starterInfoXPos?: integer, - starterInfoYOffset?: integer + starterInfoXPos?: number, + starterInfoYOffset?: number } const languageSettings: { [key: string]: LanguageSetting } = { @@ -206,11 +206,11 @@ function findClosestStarterRow(index: number, numberOfRows: number) { interface SpeciesDetails { shiny?: boolean, - formIndex?: integer + formIndex?: number female?: boolean, variant?: Variant, - abilityIndex?: integer, - natureIndex?: integer, + abilityIndex?: number, + natureIndex?: number, forSeen?: boolean, // default = false } @@ -292,7 +292,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { private dexAttrCursor: bigint = 0n; private abilityCursor: number = -1; private natureCursor: number = -1; - private filterBarCursor: integer = 0; + private filterBarCursor: number = 0; private starterMoveset: StarterMoveset | null; private scrollCursor: number; @@ -302,7 +302,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { public starterSpecies: PokemonSpecies[] = []; private pokerusSpecies: PokemonSpecies[] = []; private starterAttr: bigint[] = []; - private starterAbilityIndexes: integer[] = []; + private starterAbilityIndexes: number[] = []; private starterNatures: Nature[] = []; private starterMovesets: StarterMoveset[] = []; private speciesStarterDexEntry: DexEntry | null; @@ -1072,7 +1072,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { } } - showText(text: string, delay?: integer, callback?: Function, callbackDelay?: integer, prompt?: boolean, promptDelay?: integer, moveToTop?: boolean) { + showText(text: string, delay?: number, callback?: Function, callbackDelay?: number, prompt?: boolean, promptDelay?: number, moveToTop?: boolean) { super.showText(text, delay, callback, callbackDelay, prompt, promptDelay); const singleLine = text?.indexOf("\n") === -1; @@ -2105,7 +2105,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { const natureIndex = natures.indexOf(this.natureCursor); const newNature = natures[natureIndex < natures.length - 1 ? natureIndex + 1 : 0]; // store cycled nature as default - starterAttributes.nature = newNature as unknown as integer; + starterAttributes.nature = newNature as unknown as number; this.setSpeciesDetails(this.lastSpecies, { natureIndex: newNature }); success = true; } @@ -2274,7 +2274,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { return [ isDupe, removeIndex ]; } - addToParty(species: PokemonSpecies, dexAttr: bigint, abilityIndex: integer, nature: Nature, moveset: StarterMoveset, randomSelection: boolean = false) { + addToParty(species: PokemonSpecies, dexAttr: bigint, abilityIndex: number, nature: Nature, moveset: StarterMoveset, randomSelection: boolean = false) { const props = globalScene.gameData.getSpeciesDexAttrProps(species, dexAttr); this.starterIcons[this.starterSpecies.length].setTexture(species.getIconAtlasKey(props.formIndex, props.shiny, props.variant)); this.starterIcons[this.starterSpecies.length].setFrame(species.getIconId(props.female, props.formIndex, props.shiny, props.variant)); @@ -2783,7 +2783,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { }); }; - setCursor(cursor: integer): boolean { + setCursor(cursor: number): boolean { let changed = false; if (this.filterMode) { @@ -3379,7 +3379,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { ? speciesMoveData : speciesMoveData[formIndex!] // TODO: is this bang correct? : null; - const availableStarterMoves = this.speciesStarterMoves.concat(speciesEggMoves.hasOwnProperty(species.speciesId) ? speciesEggMoves[species.speciesId].filter((_, em: integer) => globalScene.gameData.starterData[species.speciesId].eggMoves & (1 << em)) : []); + const availableStarterMoves = this.speciesStarterMoves.concat(speciesEggMoves.hasOwnProperty(species.speciesId) ? speciesEggMoves[species.speciesId].filter((_, em: number) => globalScene.gameData.starterData[species.speciesId].eggMoves & (1 << em)) : []); this.starterMoveset = (moveData || (this.speciesStarterMoves.slice(0, 4) as StarterMoveset)).filter(m => availableStarterMoves.find(sm => sm === m)) as StarterMoveset; // Consolidate move data if it contains an incompatible move if (this.starterMoveset.length < 4 && this.starterMoveset.length < availableStarterMoves.length) { @@ -3548,8 +3548,8 @@ export default class StarterSelectUiHandler extends MessageUiHandler { } } - tryUpdateValue(add?: integer, addingToParty?: boolean): boolean { - const value = this.starterSpecies.map(s => s.generation).reduce((total: integer, _gen: integer, i: integer) => total += globalScene.gameData.getSpeciesStarterValue(this.starterSpecies[i].speciesId), 0); + tryUpdateValue(add?: number, addingToParty?: boolean): boolean { + const value = this.starterSpecies.map(s => s.generation).reduce((total: number, _gen: number, i: number) => total += globalScene.gameData.getSpeciesStarterValue(this.starterSpecies[i].speciesId), 0); const newValue = value + (add || 0); const valueLimit = this.getValueLimit(); const overLimit = newValue > valueLimit; diff --git a/src/ui/stats-container.ts b/src/ui/stats-container.ts index 8d8d3c101b2..add7eeedbb8 100644 --- a/src/ui/stats-container.ts +++ b/src/ui/stats-container.ts @@ -17,7 +17,7 @@ const defaultIvChartData = new Array(12).fill(null).map(() => 0); export class StatsContainer extends Phaser.GameObjects.Container { private showDiff: boolean; - private statsIvsCache: integer[]; + private statsIvsCache: number[]; private ivChart: Phaser.GameObjects.Polygon; private ivStatValueTexts: BBCodeText[]; @@ -31,7 +31,7 @@ export class StatsContainer extends Phaser.GameObjects.Container { setup() { this.setName("stats"); - const ivChartBgData = new Array(6).fill(null).map((_, i: integer) => [ ivChartSize * ivChartStatCoordMultipliers[ivChartStatIndexes[i]][0], ivChartSize * ivChartStatCoordMultipliers[ivChartStatIndexes[i]][1] ] ).flat(); + const ivChartBgData = new Array(6).fill(null).map((_, i: number) => [ ivChartSize * ivChartStatCoordMultipliers[ivChartStatIndexes[i]][0], ivChartSize * ivChartStatCoordMultipliers[ivChartStatIndexes[i]][1] ] ).flat(); const ivChartBg = globalScene.add.polygon(48, 44, ivChartBgData, 0xd8e0f0, 0.625); ivChartBg.setOrigin(0, 0); @@ -74,14 +74,14 @@ export class StatsContainer extends Phaser.GameObjects.Container { } } - updateIvs(ivs: integer[], originalIvs?: integer[]): void { + updateIvs(ivs: number[], originalIvs?: number[]): void { if (ivs) { const ivChartData = new Array(6).fill(null).map((_, i) => [ (ivs[ivChartStatIndexes[i]] / 31) * ivChartSize * ivChartStatCoordMultipliers[ivChartStatIndexes[i]][0], (ivs[ivChartStatIndexes[i]] / 31) * ivChartSize * ivChartStatCoordMultipliers[ivChartStatIndexes[i]][1] ] ).flat(); const lastIvChartData = this.statsIvsCache || defaultIvChartData; const perfectIVColor: string = getTextColor(TextStyle.SUMMARY_GOLD, false, globalScene.uiTheme); this.statsIvsCache = ivChartData.slice(0); - this.ivStatValueTexts.map((t: BBCodeText, i: integer) => { + this.ivStatValueTexts.map((t: BBCodeText, i: number) => { let label = ""; // Check to see if IVs are 31, if so change the text style to gold, otherwise leave them be. @@ -114,7 +114,7 @@ export class StatsContainer extends Phaser.GameObjects.Container { ease: "Cubic.easeOut", onUpdate: (tween: Phaser.Tweens.Tween) => { const progress = tween.getValue(); - const interpolatedData = ivChartData.map((v: number, i: integer) => v * progress + (lastIvChartData[i] * (1 - progress))); + const interpolatedData = ivChartData.map((v: number, i: number) => v * progress + (lastIvChartData[i] * (1 - progress))); if (interpolateColor) { this.ivChart.setFillStyle( Phaser.Display.Color.ValueToColor( diff --git a/src/ui/summary-ui-handler.ts b/src/ui/summary-ui-handler.ts index 3fe6a372737..3305b3f7aa2 100644 --- a/src/ui/summary-ui-handler.ts +++ b/src/ui/summary-ui-handler.ts @@ -110,8 +110,8 @@ export default class SummaryUiHandler extends UiHandler { private moveEffectsVisible: boolean; private moveSelect: boolean; - private moveCursor: integer; - private selectedMoveIndex: integer; + private moveCursor: number; + private selectedMoveIndex: number; private selectCallback: Function | null; constructor() { @@ -289,7 +289,7 @@ export default class SummaryUiHandler extends UiHandler { this.summaryPageTransitionContainer.setVisible(false); } - getPageKey(page?: integer) { + getPageKey(page?: number) { if (page === undefined) { page = this.cursor; } @@ -597,7 +597,7 @@ export default class SummaryUiHandler extends UiHandler { return success || error; } - setCursor(cursor: integer, overrideChanged: boolean = false): boolean { + setCursor(cursor: number, overrideChanged: boolean = false): boolean { let changed: boolean = overrideChanged || this.moveCursor !== cursor; if (this.moveSelect) { @@ -756,7 +756,7 @@ export default class SummaryUiHandler extends UiHandler { typeLabel.setOrigin(0, 0); profileContainer.add(typeLabel); - const getTypeIcon = (index: integer, type: Type, tera: boolean = false) => { + const getTypeIcon = (index: number, type: Type, tera: boolean = false) => { const xCoord = typeLabel.width * typeLabel.scale + 9 + 34 * index; const typeIcon = !tera ? globalScene.add.sprite(xCoord, 42, Utils.getLocalizedSpriteKey("types"), Type[type].toLowerCase()) diff --git a/src/ui/target-select-ui-handler.ts b/src/ui/target-select-ui-handler.ts index 232ec887b0a..681c5ff40c0 100644 --- a/src/ui/target-select-ui-handler.ts +++ b/src/ui/target-select-ui-handler.ts @@ -41,7 +41,7 @@ export default class TargetSelectUiHandler extends UiHandler { super.show(args); - this.fieldIndex = args[0] as integer; + this.fieldIndex = args[0] as number; this.move = args[1] as Moves; this.targetSelectCallback = args[2] as TargetSelectCallback; const user = globalScene.getPlayerField()[this.fieldIndex]; @@ -131,7 +131,7 @@ export default class TargetSelectUiHandler extends UiHandler { return success; } - setCursor(cursor: integer): boolean { + setCursor(cursor: number): boolean { const singleTarget = globalScene.getField()[cursor]; const multipleTargets = this.targets.map(index => globalScene.getField()[index]); diff --git a/src/ui/text.ts b/src/ui/text.ts index cdd1142e7ee..fc48c4ea86e 100644 --- a/src/ui/text.ts +++ b/src/ui/text.ts @@ -362,7 +362,7 @@ export function getTextColor(textStyle: TextStyle, shadow?: boolean, uiTheme: Ui } } -export function getModifierTierTextTint(tier: ModifierTier): integer { +export function getModifierTierTextTint(tier: ModifierTier): number { switch (tier) { case ModifierTier.COMMON: return 0xf8f8f8; @@ -379,7 +379,7 @@ export function getModifierTierTextTint(tier: ModifierTier): integer { } } -export function getEggTierTextTint(tier: EggTier): integer { +export function getEggTierTextTint(tier: EggTier): number { switch (tier) { case EggTier.COMMON: return getModifierTierTextTint(ModifierTier.COMMON); diff --git a/src/ui/ui-handler.ts b/src/ui/ui-handler.ts index 89f8d9e65b6..f001ab5bd6f 100644 --- a/src/ui/ui-handler.ts +++ b/src/ui/ui-handler.ts @@ -8,8 +8,8 @@ import type { Button } from "#enums/buttons"; * A basic abstract class to act as a holder and processor for UI elements. */ export default abstract class UiHandler { - protected mode: integer | null; - protected cursor: integer = 0; + protected mode: number | null; + protected cursor: number = 0; public active: boolean = false; /** @@ -37,11 +37,11 @@ export default abstract class UiHandler { return getTextColor(style, shadow, globalScene.uiTheme); } - getCursor(): integer { + getCursor(): number { return this.cursor; } - setCursor(cursor: integer): boolean { + setCursor(cursor: number): boolean { const changed = this.cursor !== cursor; if (changed) { this.cursor = cursor; diff --git a/src/ui/ui-theme.ts b/src/ui/ui-theme.ts index 0d42815f842..36e2e844a56 100644 --- a/src/ui/ui-theme.ts +++ b/src/ui/ui-theme.ts @@ -70,7 +70,7 @@ export function addWindow(x: number, y: number, width: number, height: number, m return window; } -export function updateWindowType(windowTypeIndex: integer): void { +export function updateWindowType(windowTypeIndex: number): void { const windowObjects: [Phaser.GameObjects.NineSlice, WindowVariant][] = []; const themedObjects: (Phaser.GameObjects.Image | Phaser.GameObjects.NineSlice)[] = []; const traverse = (object: any) => { diff --git a/src/ui/ui.ts b/src/ui/ui.ts index 682ef836765..72147e8ccb1 100644 --- a/src/ui/ui.ts +++ b/src/ui/ui.ts @@ -296,13 +296,13 @@ export default class UI extends Phaser.GameObjects.Container { return handler.processInput(button); } - showTextPromise(text: string, callbackDelay: number = 0, prompt: boolean = true, promptDelay?: integer | null): Promise { + showTextPromise(text: string, callbackDelay: number = 0, prompt: boolean = true, promptDelay?: number | null): Promise { return new Promise(resolve => { this.showText(text ?? "", null, () => resolve(), callbackDelay, prompt, promptDelay); }); } - showText(text: string, delay?: integer | null, callback?: Function | null, callbackDelay?: integer | null, prompt?: boolean | null, promptDelay?: integer | null): void { + showText(text: string, delay?: number | null, callback?: Function | null, callbackDelay?: number | null, prompt?: boolean | null, promptDelay?: number | null): void { if (prompt && text.indexOf("$") > -1) { const messagePages = text.split(/\$/g).map(m => m.trim()); let showMessageAndCallback = () => callback && callback(); @@ -322,7 +322,7 @@ export default class UI extends Phaser.GameObjects.Container { } } - showDialogue(keyOrText: string, name: string | undefined, delay: integer | null = 0, callback: Function, callbackDelay?: integer, promptDelay?: integer): void { + showDialogue(keyOrText: string, name: string | undefined, delay: number | null = 0, callback: Function, callbackDelay?: number, promptDelay?: number): void { // Get localized dialogue (if available) let hasi18n = false; let text = keyOrText; @@ -443,7 +443,7 @@ export default class UI extends Phaser.GameObjects.Container { } } - setCursor(cursor: integer): boolean { + setCursor(cursor: number): boolean { const changed = this.getHandler().setCursor(cursor); if (changed) { this.playSelect(); @@ -460,7 +460,7 @@ export default class UI extends Phaser.GameObjects.Container { globalScene.playSound("ui/error"); } - fadeOut(duration: integer): Promise { + fadeOut(duration: number): Promise { return new Promise(resolve => { if (this.overlayActive) { return resolve(); @@ -478,7 +478,7 @@ export default class UI extends Phaser.GameObjects.Container { }); } - fadeIn(duration: integer): Promise { + fadeIn(duration: number): Promise { return new Promise(resolve => { if (!this.overlayActive) { return resolve(); diff --git a/src/utils.ts b/src/utils.ts index 2235fb69633..a906ee76391 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -11,7 +11,7 @@ export function toReadableString(str: string): string { return str.replace(/\_/g, " ").split(" ").map(s => `${s.slice(0, 1)}${s.slice(1).toLowerCase()}`).join(" "); } -export function randomString(length: integer, seeded: boolean = false) { +export function randomString(length: number, seeded: boolean = false) { const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; let result = ""; @@ -23,7 +23,7 @@ export function randomString(length: integer, seeded: boolean = false) { return result; } -export function shiftCharCodes(str: string, shiftCount: integer) { +export function shiftCharCodes(str: string, shiftCount: number) { if (!shiftCount) { shiftCount = 0; } @@ -59,7 +59,7 @@ export function randSeedGauss(stdev: number, mean: number = 0): number { return z * stdev + mean; } -export function padInt(value: integer, length: integer, padWith?: string): string { +export function padInt(value: number, length: number, padWith?: string): string { if (!padWith) { padWith = "0"; } @@ -75,7 +75,7 @@ export function padInt(value: integer, length: integer, padWith?: string): strin * @param range The amount of possible numbers * @param min The starting number */ -export function randInt(range: integer, min: integer = 0): integer { +export function randInt(range: number, min: number = 0): number { if (range === 1) { return min; } @@ -88,7 +88,7 @@ export function randInt(range: integer, min: integer = 0): integer { * @param min The minimum integer to pick, default `0` * @returns A random integer between {@linkcode min} and ({@linkcode min} + {@linkcode range} - 1) */ -export function randSeedInt(range: integer, min: integer = 0): integer { +export function randSeedInt(range: number, min: number = 0): number { if (range <= 1) { return min; } @@ -100,7 +100,7 @@ export function randSeedInt(range: integer, min: integer = 0): integer { * @param min The lowest number * @param max The highest number */ -export function randIntRange(min: integer, max: integer): integer { +export function randIntRange(min: number, max: number): number { return randInt(max - min, min); } @@ -139,7 +139,7 @@ export function randSeedShuffle(items: T[]): T[] { return newArray; } -export function getFrameMs(frameCount: integer): integer { +export function getFrameMs(frameCount: number): number { return Math.floor((1 / 60) * 1000 * frameCount); } @@ -150,7 +150,7 @@ export function getCurrentTime(): number { const secondsInHour = 3600; -export function getPlayTimeString(totalSeconds: integer): string { +export function getPlayTimeString(totalSeconds: number): string { const days = `${Math.floor(totalSeconds / (secondsInHour * 24))}`; const hours = `${Math.floor(totalSeconds % (secondsInHour * 24) / secondsInHour)}`; const minutes = `${Math.floor(totalSeconds % secondsInHour / 60)}`; @@ -176,7 +176,7 @@ export function getIvsFromId(id: number): number[] { ]; } -export function formatLargeNumber(count: integer, threshold: integer): string { +export function formatLargeNumber(count: number, threshold: number): string { if (count < threshold) { return count.toString(); } @@ -236,7 +236,7 @@ export function formatMoney(format: MoneyFormat, amount: number) { return amount.toLocaleString(); } -export function formatStat(stat: integer, forHp: boolean = false): string { +export function formatStat(stat: number, forHp: boolean = false): string { return formatLargeNumber(stat, forHp ? 100000 : 1000000); } @@ -244,7 +244,7 @@ export function getEnumKeys(enumType: any): string[] { return Object.values(enumType).filter(v => isNaN(parseInt(v!.toString()))).map(v => v!.toString()); } -export function getEnumValues(enumType: any): integer[] { +export function getEnumValues(enumType: any): number[] { return Object.values(enumType).filter(v => !isNaN(parseInt(v!.toString()))).map(v => parseInt(v!.toString())); } @@ -344,7 +344,7 @@ export class NumberHolder { /** @deprecated Use {@linkcode NumberHolder} */ export class IntegerHolder extends NumberHolder { - constructor(value: integer) { + constructor(value: number) { super(value); } } @@ -357,8 +357,8 @@ export class FixedInt { } } -export function fixedInt(value: integer): integer { - return new FixedInt(value) as unknown as integer; +export function fixedInt(value: number): number { + return new FixedInt(value) as unknown as number; } /** @@ -382,7 +382,7 @@ export function toCamelCaseString(unformattedText: string): string { return unformattedText.split(/[_ ]/).filter(f => f).map((f, i) => i ? `${f[0].toUpperCase()}${f.slice(1).toLowerCase()}` : f.toLowerCase()).join(""); } -export function rgbToHsv(r: integer, g: integer, b: integer) { +export function rgbToHsv(r: number, g: number, b: number) { const v = Math.max(r, g, b); const c = v - Math.min(r, g, b); const h = c && ((v === r) ? (g - b) / c : ((v === g) ? 2 + (b - r) / c : 4 + (r - g) / c)); @@ -394,7 +394,7 @@ export function rgbToHsv(r: integer, g: integer, b: integer) { * @param {Array} rgb1 First RGB color in array * @param {Array} rgb2 Second RGB color in array */ -export function deltaRgb(rgb1: integer[], rgb2: integer[]): integer { +export function deltaRgb(rgb1: number[], rgb2: number[]): number { const [ r1, g1, b1 ] = rgb1; const [ r2, g2, b2 ] = rgb2; const drp2 = Math.pow(r1 - r2, 2); @@ -415,7 +415,7 @@ export function rgbHexToRgba(hex: string) { }; } -export function rgbaToInt(rgba: integer[]): integer { +export function rgbaToInt(rgba: number[]): number { return (rgba[0] << 24) + (rgba[1] << 16) + (rgba[2] << 8) + rgba[3]; } From c363d2b93c10c263480ecd8085cdeff261da4f13 Mon Sep 17 00:00:00 2001 From: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com> Date: Tue, 4 Feb 2025 22:28:49 -0600 Subject: [PATCH 7/7] [Ability] Fully Implement Good as Gold (#5245) * Fix good as gold * Update good as gold tests with Kev's feedback --- src/data/ability.ts | 5 +- src/test/abilities/good_as_gold.test.ts | 143 ++++++++++++++++++++++++ 2 files changed, 145 insertions(+), 3 deletions(-) create mode 100644 src/test/abilities/good_as_gold.test.ts diff --git a/src/data/ability.ts b/src/data/ability.ts index 5020123622e..4c9c44c6f35 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -6289,9 +6289,8 @@ export function initAbilities() { .attr(NoTransformAbilityAbAttr) .partial(), // While setting the tag, the getbattlestat should ignore all modifiers to stats except stat stages new Ability(Abilities.GOOD_AS_GOLD, 9) - .attr(MoveImmunityAbAttr, (pokemon, attacker, move) => pokemon !== attacker && move.category === MoveCategory.STATUS) - .ignorable() - .partial(), // Lots of weird interactions with moves and abilities such as negating status moves that target the field + .attr(MoveImmunityAbAttr, (pokemon, attacker, move) => pokemon !== attacker && move.category === MoveCategory.STATUS && ![ MoveTarget.ENEMY_SIDE, MoveTarget.BOTH_SIDES, MoveTarget.USER_SIDE ].includes(move.moveTarget)) + .ignorable(), new Ability(Abilities.VESSEL_OF_RUIN, 9) .attr(FieldMultiplyStatAbAttr, Stat.SPATK, 0.75) .attr(PostSummonMessageAbAttr, (user) => i18next.t("abilityTriggers:postSummonVesselOfRuin", { pokemonNameWithAffix: getPokemonNameWithAffix(user), statName: i18next.t(getStatKey(Stat.SPATK)) })) diff --git a/src/test/abilities/good_as_gold.test.ts b/src/test/abilities/good_as_gold.test.ts new file mode 100644 index 00000000000..ecda1a0e031 --- /dev/null +++ b/src/test/abilities/good_as_gold.test.ts @@ -0,0 +1,143 @@ +import { BattlerIndex } from "#app/battle"; +import { allAbilities } from "#app/data/ability"; +import { ArenaTagSide } from "#app/data/arena-tag"; +import { ArenaTagType } from "#app/enums/arena-tag-type"; +import { BattlerTagType } from "#app/enums/battler-tag-type"; +import { Stat } from "#app/enums/stat"; +import { StatusEffect } from "#app/enums/status-effect"; +import { WeatherType } from "#app/enums/weather-type"; +import { Abilities } from "#enums/abilities"; +import { Moves } from "#enums/moves"; +import { Species } from "#enums/species"; +import GameManager from "#test/utils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; + +describe("Abilities - Good As Gold", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + game.override + .moveset([ Moves.SPLASH ]) + .ability(Abilities.GOOD_AS_GOLD) + .battleType("single") + .disableCrits() + .enemySpecies(Species.MAGIKARP) + .enemyAbility(Abilities.BALL_FETCH) + .enemyMoveset(Moves.SPLASH); + }); + + it("should block normal status moves", async () => { + game.override.enemyMoveset( [ Moves.GROWL ] ); + await game.classicMode.startBattle([ Species.MAGIKARP ]); + + const player = game.scene.getPlayerPokemon()!; + + game.move.select(Moves.SPLASH, 0); + + await game.phaseInterceptor.to("BerryPhase"); + + expect(player.battleData.abilitiesApplied[0]).toBe(Abilities.GOOD_AS_GOLD); + expect(player.getStatStage(Stat.ATK)).toBe(0); + }); + + it("should block memento and prevent the user from fainting", async () => { + game.override.enemyMoveset( [ Moves.MEMENTO ] ); + await game.classicMode.startBattle([ Species.MAGIKARP ]); + game.move.select(Moves.MEMENTO); + await game.phaseInterceptor.to("BerryPhase"); + expect(game.scene.getPlayerPokemon()!.isFainted()).toBe(false); + expect(game.scene.getEnemyPokemon()?.getStatStage(Stat.ATK)).toBe(0); + }); + + it("should not block any status moves that target the field, one side, or all pokemon", async () => { + game.override.battleType("double"); + game.override.enemyMoveset( [ Moves.STEALTH_ROCK, Moves.HAZE ] ); + game.override.moveset([ Moves.SWORDS_DANCE, Moves.SAFEGUARD ]); + await game.classicMode.startBattle([ Species.MAGIKARP, Species.FEEBAS ]); + const [ good_as_gold, ball_fetch ] = game.scene.getPlayerField(); + + // Force second pokemon to have ball fetch to isolate to a single mon. + vi.spyOn(ball_fetch, "getAbility").mockReturnValue(allAbilities[Abilities.BALL_FETCH]); + + game.move.select(Moves.SWORDS_DANCE, 0); + game.move.select(Moves.SAFEGUARD, 1); + await game.forceEnemyMove(Moves.STEALTH_ROCK); + await game.forceEnemyMove(Moves.HAZE); + await game.setTurnOrder( [ BattlerIndex.PLAYER, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY, BattlerIndex.ENEMY_2 ] ); + await game.phaseInterceptor.to("BerryPhase"); + expect(good_as_gold.getAbility().id).toBe(Abilities.GOOD_AS_GOLD); + expect(good_as_gold.getStatStage(Stat.ATK)).toBe(0); + expect(game.scene.arena.getTagOnSide(ArenaTagType.STEALTH_ROCK, ArenaTagSide.PLAYER)).toBeDefined(); + expect(game.scene.arena.getTagOnSide(ArenaTagType.SAFEGUARD, ArenaTagSide.PLAYER)).toBeDefined(); + }); + + it("should not block field targeted effects in singles", async () => { + game.override.battleType("single"); + game.override.enemyMoveset( [ Moves.SPIKES ] ); + await game.classicMode.startBattle([ Species.MAGIKARP ]); + + game.move.select(Moves.SPLASH, 0); + await game.phaseInterceptor.to("BerryPhase"); + + expect(game.scene.arena.getTagOnSide(ArenaTagType.SPIKES, ArenaTagSide.PLAYER)).toBeDefined(); + }); + + it("should block the ally's helping hand", async () => { + game.override.battleType("double"); + game.override.moveset([ Moves.HELPING_HAND, Moves.TACKLE ]); + await game.classicMode.startBattle([ Species.MAGIKARP, Species.FEEBAS ]); + + game.move.select(Moves.HELPING_HAND, 0); + game.move.select(Moves.TACKLE, 1); + await game.phaseInterceptor.to("MoveEndPhase", true); + + expect(game.scene.getPlayerField()[1].getTag(BattlerTagType.HELPING_HAND)).toBeUndefined(); + }); + + it("should block the ally's heal bell, but only if the good as gold user is on the field", async () => { + game.override.battleType("double"); + game.override.moveset([ Moves.HEAL_BELL, Moves.SPLASH ]); + game.override.statusEffect(StatusEffect.BURN); + await game.classicMode.startBattle([ Species.MAGIKARP, Species.FEEBAS, Species.ABRA ]); + const [ good_as_gold, ball_fetch ] = game.scene.getPlayerField(); + + // Force second pokemon to have ball fetch to isolate to a single mon. + vi.spyOn(ball_fetch, "getAbility").mockReturnValue(allAbilities[Abilities.BALL_FETCH]); + + // turn 1 + game.move.select(Moves.SPLASH, 0); + game.move.select(Moves.HEAL_BELL, 1); + await game.toNextTurn(); + expect(good_as_gold.status?.effect).toBe(StatusEffect.BURN); + + game.doSwitchPokemon(2); + game.move.select(Moves.HEAL_BELL, 0); + await game.toNextTurn(); + expect(good_as_gold.status?.effect).toBeUndefined(); + }); + + it("should not block field targeted effects like rain dance", async () => { + game.override.battleType("single"); + game.override.enemyMoveset( [ Moves.RAIN_DANCE ] ); + game.override.weather(WeatherType.NONE); + await game.classicMode.startBattle([ Species.MAGIKARP ]); + + game.move.select(Moves.SPLASH, 0); + await game.phaseInterceptor.to("BerryPhase"); + + expect(game.scene.arena.weather?.weatherType).toBe(WeatherType.RAIN); + }); +});