From 66cd02fc3029d500f20a0d12fb6404d9b21ae3c1 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Mon, 8 May 2023 10:03:57 -0400 Subject: [PATCH] Add beach and city backgrounds --- public/images/arenas/beach_a.png | Bin 0 -> 852 bytes public/images/arenas/beach_b.png | Bin 0 -> 1682 bytes public/images/arenas/beach_bg.png | Bin 0 -> 644 bytes public/images/arenas/city_a.png | Bin 0 -> 858 bytes public/images/arenas/city_b.png | Bin 0 -> 2051 bytes public/images/arenas/city_bg.png | Bin 0 -> 635 bytes src/arena.ts | 4 ---- src/battle-phases.ts | 17 ++++++++--------- src/data/move.ts | 8 ++++---- 9 files changed, 12 insertions(+), 17 deletions(-) create mode 100644 public/images/arenas/beach_a.png create mode 100644 public/images/arenas/beach_b.png create mode 100644 public/images/arenas/beach_bg.png create mode 100644 public/images/arenas/city_a.png create mode 100644 public/images/arenas/city_b.png create mode 100644 public/images/arenas/city_bg.png diff --git a/public/images/arenas/beach_a.png b/public/images/arenas/beach_a.png new file mode 100644 index 0000000000000000000000000000000000000000..90e9189a4be5e40214758c5e6d8a216eaebd99fe GIT binary patch literal 852 zcmeAS@N?(olHy`uVBq!ia0y~yU~~YoTR7N&5jgR z3=A9lx&I`xGB7Yb@pN$vsfc@f>%6x}Aj5%=E00XsGlSFVLcIzLYhc{2vNtiuca^-n zvCvz*dx66TdoHGfbq={1yZ%1teSg%#`mx39oZpAfKmT;^&AE5c*SE*J-Q)pUGU&hz zOYui1I&A6+Ui(Y%|JwiQ@uGD7?R)+kxY;$xdLQ&&b?CeOne(w-n;*~HQ}Mo>Zz8`l zx4-Y=9>)3;ft`pciKwFh@5ES|pP#L@$E zpK|FP$xnUjW+U~b^7-K#$~RP8jaY+ZW~x4~GA@_g{p8=>-WnU5KVj1Qo9|7pnG+px zYG2*0lfUd&|Brcl=+ULA7S^9$olTp=>n}1>^m*FjGQr&<+xOnOX+gPGV{!iIF7j4H$q+W zDpL*5^|3EmBeCe`($zmBME6>$+m_EY`?xxId!FHh!$%BV3|RtsW`-DVH@xk#US@aF zi&-JA%11Shyf6Q+u-n3XzC3%VBG2>CyZ1y6=`FhM_Veo!gKeFQB#b)K(u~{I&o^<^ zXUU&&W28eTP+M{PMjavQK31 zqyI0P0^?jo*E4h{2kqNi@jo*@JhbJNT(tQ9CEec_?Q!Es3g&5@P&oV6+3OzF%{ z<<+6ED9DboFyt I=akR{0IS+VtpET3 literal 0 HcmV?d00001 diff --git a/public/images/arenas/beach_b.png b/public/images/arenas/beach_b.png new file mode 100644 index 0000000000000000000000000000000000000000..e3b7e31ea969ec665daac0b157a6e67a17d45a52 GIT binary patch literal 1682 zcmb`H>08nX5XXNS8fmRZ7_M2X^pF{5*g@KwH>mlbtyfl}k5)=4fZ_PV^B^ z{+i^1et5abfrK{!SYR|MWg^ zLVi+y656W&K>QG2-FLI&)Sqv=DZNieb4C{uKRn5KwJt#-Eqlz@Bp|u-{}Cf?#t6)N z%U(;8(6S}6_2o*eR*e%SQhMJHm4~QkMouR>3}#~e=^O(6Yl+7&twoAXxRNt-L;hd>lUd7_>5+;%wjdYaT@R)=2#P7dT(U>T+u$i5W1 zuB}2q@#-BPvuM)i+;>W4#&HEspe}{CiBMKkA3Py=yzfM=?V4D#1$(amsMeek84&u@ z-WQLEb%i&Z(aPsV{hQ@duP2L2}n!L1eA#Ie6rj`Y3ozoI{ z3pZ+l^&wW-C5AC1=>xPMPa56^pW;o!pHOw3TywMp24I3u)B3ir3K z6ccUF-k<)6QbMk7a|@j(_SD!+P{AsCswa-cbkH>BHD8nI*47gzO}|RtRgJAH&K!>h zMUd24F)rUo-$uFiXMl6hq&~vg$uxt#?NN7pk6Z%T4lQ*qIVqzTEe|sqifFiliUTw7 zAOT@RH^L}N!@RbpW?8tqp+Wni{s5!An-xaovR6AFmyF*g{*W>sLc@N9gm0{MOl7CR z+%=f8f!}2-;h!H^w0YOAG%*mDSY0ZaNxAFOVNWd(%_JBqyRM0_po(%d>3So8)N!pm zb53N5WJgBiTPGtIOZ`yg7Kqvu7w-I{I!2YwT_?JiNr}^ggzUCb-IsNF#`+vWJ(bKr zQ8-uwPp?4FIHQR|&-g%pwhBGHAI>3^rpJCAj_(l8^kUnp)tr3>zrM+W)aoxk`(l=^ zW}TntaTotA^}N7;`wl-Gh!wdF?@^iS85|Wa+HLKd7{51Li`TcSiaZn*x-OU+K8Le0 z#enFZaRt2xD_Pv2R&nsv>TOG^itVn)(MTh|25j=$M;Rj@1KKEG9IGt@M0TJznJ&pq zviTLi;ZV1t$2+ZtZTQI6)fX+4LYjMvN#wQwb|Wmt@ci^wb=xg88F_ieFPc{%elxh# zedCY0@4aLDqV>OjY29ys*dUHwW>V;t4a>>$H>;2ZehXvvKx%FphB)%eSX{6~Fyf(M zh3bSA*7aD7l0r_V;*P5+Z(vgW9pbl(bUL5jgR z3=A9lx&I`xGB7ZSc)B=-RK&f#yHSuakiqrh->l0`4$P}2NQ!#28mV%a3wXFPDPL%w z;3EEgjthJFy*Ky&9?L5J>Br#M{a@dqkAW$Yi6ezmVS;Ld!!&eGa(T@U5k8Mi42?R| z6&WJM;Hvx@8+Et^P6#p0#WfKcnjv(jQ-=Br@3KLQo z!H(D|B!2>ARl5S%L=-pmetq~25={hK!WFpR%>xqmYcR#h#Q8*3JQpCZO z5()IIvjAAchM5J);m3ZLec}-S`*`^QOlKh6WY@|J(sp`z0a#Tf8wc3XbfCe&(13B# z12nFM4XmsC0zR{GM+k12WV`o&4Xr>y8F={%^PB@dUp|NKlLDp}zSIcMG+$o^Eg+i% Uh(X{|@MI9>>FVdQ&MBb@08xOuZU6uP literal 0 HcmV?d00001 diff --git a/public/images/arenas/city_a.png b/public/images/arenas/city_a.png new file mode 100644 index 0000000000000000000000000000000000000000..4756d7acfedf6a95ee3d59c77706198599ac2cee GIT binary patch literal 858 zcmeAS@N?(olHy`uVBq!ia0y~yU~~YoTR7N&5jgR z3=A9lx&I`xGB7Z`@^o%5<^Bg27*N2iE!2`!cjxp$)Z;{x^h=O@ecu;1s{ ztH3F!&HCT)Z4b}vyYKQeZ%li?`;AV{?Ik?>&*Ve{jU9wwO?PiaiesEj{aYs$GGIftEaQ;3$3lKyBFW?zrEI z(!zALcS=du)$(TVJ-s%i!0Ml%``KfUFLy7{=Ms%g zUDv86wY_M4P}+Id?b?p?@9Ws!SG>RdHj)@2nVk zcDWgZi|=2M&2akDf~ST&tC}i4)$Zc*J7oG)!)&dPGf%B-d+LTylQ(GA{H)zwQol}S zbL6V9#@NTxXREhp7HQh;jmt0cvG>3Dd;6*EjjZdqo}PTM<3{Z#?RmbasQLV-{F*S>j@ExqqkyO85;hB)<-TvOJKdk%32aRgU$wiApL_b<_{ciF7Du2Fn|i|XF2$|Dli&+X5oRUBch>vh(i zX!@jOa9y)z=AWIPuCG#RSu=0Z5AH;NGwJ7YQO&@#%9k49nda-upao=eK-2D};K?AC Mr>mdKI;Vst08!0M7ytkO literal 0 HcmV?d00001 diff --git a/public/images/arenas/city_b.png b/public/images/arenas/city_b.png new file mode 100644 index 0000000000000000000000000000000000000000..38bdadae5263076f570478be91c15d430b258597 GIT binary patch literal 2051 zcmb_d`BxH%6G!8l_l1;6YJv(Tnroo4iKqyst;TwMyDZA`rq!>Sx8Pl1nwr-m4=&BM zR;}pJmeN|YOaqTr#Vrf*D9aQqMbTXLz3-o}^TW(%=FQCKy_q*}7(X9AsHY9l1^@th ze!het06@)Cg$p#dtF)v+E>Ib@q@aU%K%3C)qsjqBc?Ea@0JlqZHp2b`0BBVB5xhdu z$O~^?QOqLDx@9rs2QiciX9d3X&zsLo8rc>b8d$o9yB2p4Ht*#H&NMVCg^lJ%5q~yv zr)z9&H-K?pXWBO%i@ny9QX3EyORHGx6yb2FWo(7GzMi?LQJtQ$?DBg*ZFyio=%eEQ zcg2&aZ~YVdzZTSu*RA2ZHsvECf&PgighlHGdAUZsL$Zl9p*_`#40^i4JXGyT@!be- zk%S(@>~ef{96FJ^l@`4tX*M-E*@1jbxV7%q&e$pG^Evm?U*z(RSsFzJdFGA9Vb`L~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;Gvb7do#{sZe5M^CZ_ z&s5tuW^v>Gsj0HHD!}umP{zY$jYL9MoXE1UArnc?`dIj(;2i%gf)%b-f7 zHT+>`oip#ZBFc592^KmewUXsJX)`#9#6U4ru63q7-yFh(9Zc_kUsNY&)W^nt^#>Z> zvvjI#YB&u65hI=lsyFe`P386=TVRJ0~(g>FR~pqz1`oNpF28;(bjAHm16B2 zhu?;v*Lhgjc3Z|j_q*ubYwm}NyMA4;3H*0I+8^8xr(t=`q03IrE2_@=5y$)@0|Eec WDy;c`rs3d9po5J7 literal 0 HcmV?d00001 diff --git a/public/images/arenas/city_bg.png b/public/images/arenas/city_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..97b1071a7cd76ebb8115fc93d2e6e6c78241b231 GIT binary patch literal 635 zcmeAS@N?(olHy`uVBq!ia0y~yU~~YoTR7N&5jgR z3=A9lx&I`xGB7Z4d%8G=RK&f#tH^iAfx-2l-gjq(3AqZ2p+^H5+l&j64DLKSE0Oo% z)8*XhAM5J&2|HYP_@8@%a)ZM(2Bt_RjucLX394wEYdd1)>{^*8={P8yPUUcz#tK&z zoS<-;iDeUuz==;%JQGqGnIicd8+5n@P6#an=-CoqNa30x}<@Df|(0 zq?p2lrvfY|HldlZX5-p!pq(dyb{;FWi*9h3gm4Q^=Yu@9?l99Pkn>9;V9tjb->v`_ zsbu3wiG=&R_j=uT9sv)K^~(>ybf5h4BXKKl1YvhukYbg0s7>M$zO(Li>!Wk)>q8|CKJBY2+uTMUj{88n*)eJ;8O5p O5asFW=d#Wzp$P!9^SY1# literal 0 HcmV?d00001 diff --git a/src/arena.ts b/src/arena.ts index 2b3fc4a0f..b791d82b6 100644 --- a/src/arena.ts +++ b/src/arena.ts @@ -99,12 +99,8 @@ export class Arena { getBiomeKey(): string { switch (this.biomeType) { - case Biome.CITY: - return 'dojo'; case Biome.LAKE: return 'sea'; - case Biome.BEACH: - return 'sea'; case Biome.ABYSS: return 'wasteland'; case Biome.MEADOW: diff --git a/src/battle-phases.ts b/src/battle-phases.ts index 99eb22cef..9f618b5ed 100644 --- a/src/battle-phases.ts +++ b/src/battle-phases.ts @@ -682,25 +682,24 @@ export class CommandPhase extends FieldPhase { } break; case Command.POKEMON: + case Command.RUN: + const isSwitch = command === Command.POKEMON; const trapTag = playerPokemon.findTag(t => t instanceof TrappedTag) as TrappedTag; const trapped = new Utils.BooleanHolder(false); - const batonPass = args[0] as boolean; + const batonPass = isSwitch && args[0] as boolean; if (!batonPass) applyCheckTrappedAbAttrs(CheckTrappedAbAttr, enemyPokemon, trapped); if (batonPass || (!trapTag && !trapped.value)) { - this.scene.unshiftPhase(new SwitchSummonPhase(this.scene, cursor, true, args[0] as boolean)); + if (isSwitch) + this.scene.unshiftPhase(new SwitchSummonPhase(this.scene, cursor, true, args[0] as boolean)); + else + this.scene.unshiftPhase(new AttemptRunPhase(this.scene)); success = true; } else if (trapTag) - this.scene.ui.showText(`${this.scene.getPokemonById(trapTag.sourceId).name}'s ${trapTag.getMoveName()}\nprevents switching!`, null, () => { + this.scene.ui.showText(`${this.scene.getPokemonById(trapTag.sourceId).name}'s ${trapTag.getMoveName()}\nprevents ${isSwitch ? 'switching' : 'fleeing'}!`, null, () => { this.scene.ui.showText(null, 0); }, null, true); break; - case Command.RUN: - this.scene.unshiftPhase(new AttemptRunPhase(this.scene)); - success = true; - //this.scene.unshiftPhase(new MoveAnimTestPhase(this.scene)); - //success = true; - break; } if (success) { diff --git a/src/data/move.ts b/src/data/move.ts index fc7749555..4ec4c32dc 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -1267,14 +1267,14 @@ export class MovePowerMultiplierAttr extends VariablePowerAttr { } export abstract class ConsecutiveUsePowerMultiplierAttr extends MovePowerMultiplierAttr { - constructor(limit: integer, resetOnFail: boolean, resetOnLimit?: boolean) { + constructor(limit: integer, resetOnFail: boolean, resetOnLimit?: boolean, ...comboMoves: Moves[]) { super((user: Pokemon, target: Pokemon, move: Move): number => { const moveHistory = user.getMoveHistory().reverse().slice(0); let count = 0; let turnMove: TurnMove; - while ((turnMove = moveHistory.shift())?.move === move.id && (!resetOnFail || turnMove.result < MoveResult.NO_EFFECT)) { + while (((turnMove = moveHistory.shift())?.move === move.id || (comboMoves.length && comboMoves.indexOf(turnMove?.move) > -1)) && (!resetOnFail || turnMove.result < MoveResult.NO_EFFECT)) { if (count < (limit - 1)) count++; else if (resetOnLimit) @@ -2409,7 +2409,7 @@ export function initMoves() { new StatusMove(Moves.CHARM, "Charm", Type.FAIRY, 100, 20, 2, "Sharply lowers opponent's Attack.", -1, 0, 2) .attr(StatChangeAttr, BattleStat.ATK, -2), new AttackMove(Moves.ROLLOUT, "Rollout", Type.ROCK, MoveCategory.PHYSICAL, 30, 90, 20, -1, "Doubles in power each turn for 5 turns.", -1, 0, 2) - .attr(ConsecutiveUseDoublePowerAttr, 5, true, true), // TODO: Defense Curl logic + .attr(ConsecutiveUseDoublePowerAttr, 5, true, true, Moves.DEFENSE_CURL), new AttackMove(Moves.FALSE_SWIPE, "False Swipe (N)", Type.NORMAL, MoveCategory.PHYSICAL, 40, 100, 40, 57, "Always leaves opponent with at least 1 HP.", -1, 0, 2), new StatusMove(Moves.SWAGGER, "Swagger", Type.NORMAL, 85, 15, -1, "Confuses opponent, but sharply raises its Attack.", -1, 0, 2) .attr(StatChangeAttr, BattleStat.ATK, 2) @@ -2596,7 +2596,7 @@ export function initMoves() { .attr(AddArenaTagAttr, ArenaTagType.MUD_SPORT, 5) .target(MoveTarget.BOTH_SIDES), new AttackMove(Moves.ICE_BALL, "Ice Ball", Type.ICE, MoveCategory.PHYSICAL, 30, 90, 20, -1, "Doubles in power each turn for 5 turns.", -1, 0, 3) - .attr(ConsecutiveUseDoublePowerAttr, 5, true, true), + .attr(ConsecutiveUseDoublePowerAttr, 5, true, true, Moves.DEFENSE_CURL), new AttackMove(Moves.NEEDLE_ARM, "Needle Arm", Type.GRASS, MoveCategory.PHYSICAL, 60, 100, 15, -1, "May cause flinching.", 30, 0, 3) .attr(FlinchAttr), new SelfStatusMove(Moves.SLACK_OFF, "Slack Off", Type.NORMAL, -1, 5, -1, "User recovers half its max HP.", -1, 0, 3)