Skip to content

Commit

Permalink
Merge branch 'pagefaultgames:main' into implement-foresight
Browse files Browse the repository at this point in the history
  • Loading branch information
DayKev authored Jul 5, 2024
2 parents 88a9a4a + 09ab89a commit 160cf1a
Show file tree
Hide file tree
Showing 92 changed files with 2,485 additions and 5,501 deletions.
2,873 changes: 523 additions & 2,350 deletions public/images/pokemon/196.json

Large diffs are not rendered by default.

Binary file modified public/images/pokemon/196.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2,873 changes: 523 additions & 2,350 deletions public/images/pokemon/shiny/196.json

Large diffs are not rendered by default.

Binary file modified public/images/pokemon/shiny/196.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 10 additions & 10 deletions public/images/pokemon/variant/196.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,42 @@
"7b4a7b": "204024",
"101010": "101010",
"efbdef": "bddd9e",
"e6a5d6": "6c9e63",
"e7a5d6": "6c9e63",
"b57bb5": "416240",
"314273": "a86a2c",
"4a73b5": "ffb554",
"c52152": "ffa80e",
"c62152": "ffa80e",
"ffffff": "ffffff",
"8c2152": "c54200",
"8463b5": "ffa72a",
"c5c5c5": "c5c5c5"
"c6c6c6": "c5c5c5"
},
"1": {
"7b4a7b": "581747",
"101010": "101010",
"efbdef": "e99eae",
"e6a5d6": "d1759c",
"e7a5d6": "d1759c",
"b57bb5": "953b6c",
"314273": "537fde",
"4a73b5": "90b7f9",
"c52152": "31d9ff",
"c62152": "31d9ff",
"ffffff": "ffffff",
"8c2152": "15a7d2",
"8463b5": "1662bf",
"c5c5c5": "c5c5c5"
"c6c6c6": "c5c5c5"
},
"2": {
"7b4a7b": "9b5250",
"101010": "101010",
"efbdef": "f5f3e1",
"e6a5d6": "ded0af",
"e7a5d6": "ded0af",
"b57bb5": "ce987a",
"314273": "194540",
"4a73b5": "39816d",
"c52152": "00de92",
"c62152": "00de92",
"ffffff": "ffffff",
"8c2152": "00ad7f",
"8463b5": "006b5b",
"c5c5c5": "c5c5c5"
"c6c6c6": "c5c5c5"
}
}
}
3 changes: 2 additions & 1 deletion src/battle-scene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ import { PlayerGender } from "#enums/player-gender";
import { Species } from "#enums/species";
import { UiTheme } from "#enums/ui-theme";
import { TimedEventManager } from "#app/timed-event-manager.js";
import i18next from "i18next";

export const bypassLogin = import.meta.env.VITE_BYPASS_LOGIN === "1";

Expand Down Expand Up @@ -463,7 +464,7 @@ export default class BattleScene extends SceneBase {
this.luckText.setVisible(false);
this.fieldUI.add(this.luckText);

this.luckLabelText = addTextObject(this, (this.game.canvas.width / 6) - 2, 0, "Luck:", TextStyle.PARTY, { fontSize: "54px" });
this.luckLabelText = addTextObject(this, (this.game.canvas.width / 6) - 2, 0, i18next.t("common:luckIndicator"), TextStyle.PARTY, { fontSize: "54px" });
this.luckLabelText.setName("text-luck-label");
this.luckLabelText.setOrigin(1, 0.5);
this.luckLabelText.setVisible(false);
Expand Down
2 changes: 1 addition & 1 deletion src/data/ability.ts
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ export class PostDefendContactDamageAbAttr extends PostDefendAbAttr {
}

applyPostDefend(pokemon: Pokemon, passive: boolean, attacker: Pokemon, move: Move, hitResult: HitResult, args: any[]): boolean {
if (move.checkFlag(MoveFlags.MAKES_CONTACT, attacker, pokemon)) {
if (move.checkFlag(MoveFlags.MAKES_CONTACT, attacker, pokemon) && !attacker.hasAbilityWithAttr(BlockNonDirectDamageAbAttr)) {
attacker.damageAndUpdate(Math.ceil(attacker.getMaxHp() * (1 / this.damageRatio)), HitResult.OTHER);
attacker.turnData.damageTaken += Math.ceil(attacker.getMaxHp() * (1 / this.damageRatio));
return true;
Expand Down
2 changes: 1 addition & 1 deletion src/data/move.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ export class SacrificialAttr extends MoveEffectAttr {
**/
export class SacrificialAttrOnHit extends MoveEffectAttr {
constructor() {
super(true, MoveEffectTrigger.POST_TARGET);
super(true, MoveEffectTrigger.HIT);
}

/**
Expand Down
Loading

0 comments on commit 160cf1a

Please sign in to comment.