[Bug] Change confuse chance from 2/3 to 1/3 (#1827)

This commit is contained in:
Tempoanon 2024-06-05 21:05:44 -04:00 committed by GitHub
parent 283714bd0f
commit 6d35399c31
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -200,6 +200,9 @@ export class InterruptedTag extends BattlerTag {
}
}
/**
* BattlerTag that represents the {@link https://bulbapedia.bulbagarden.net/wiki/Confusion_(status_condition)}
*/
export class ConfusedTag extends BattlerTag {
constructor(turnCount: integer, sourceMove: Moves) {
super(BattlerTagType.CONFUSED, BattlerTagLapseType.MOVE, turnCount, sourceMove);
@ -235,7 +238,8 @@ export class ConfusedTag extends BattlerTag {
pokemon.scene.queueMessage(getPokemonMessage(pokemon, " is\nconfused!"));
pokemon.scene.unshiftPhase(new CommonAnimPhase(pokemon.scene, pokemon.getBattlerIndex(), undefined, CommonAnim.CONFUSION));
if (pokemon.randSeedInt(3)) {
// 1/3 chance of hitting self with a 40 base power move
if (pokemon.randSeedInt(3) === 0) {
const atk = pokemon.getBattleStat(Stat.ATK);
const def = pokemon.getBattleStat(Stat.DEF);
const damage = Math.ceil(((((2 * pokemon.level / 5 + 2) * 40 * atk / def) / 50) + 2) * (pokemon.randSeedInt(15, 85) / 100));