Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random normal always random #10165

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
delete empty lines
  • Loading branch information
magralo committed Feb 10, 2024
commit 575163aedea5c6192fe3a78df91db105440a81e8
8 changes: 2 additions & 6 deletions sim/battle-actions.ts
Original file line number Diff line number Diff line change
@@ -224,11 +224,8 @@ export class BattleActions {
zMove?: string, externalMove?: boolean, maxMove?: string, originalTarget?: Pokemon
) {
pokemon.activeMoveActions++;
let target = this.battle.getTarget(pokemon, maxMove || zMove || moveOrMoveName, targetLoc, originalTarget);


let target = this.battle.getTarget(pokemon, maxMove || zMove || moveOrMoveName, targetLoc, originalTarget);
let baseMove = this.dex.getActiveMove(moveOrMoveName);

const pranksterBoosted = baseMove.pranksterBoosted;
if (baseMove.id !== 'struggle' && !zMove && !maxMove && !externalMove) {
const changedMove = this.battle.runEvent('OverrideAction', pokemon, target, baseMove);
@@ -244,8 +241,7 @@ export class BattleActions {
} else if (maxMove) {
move = this.getActiveMaxMove(baseMove, pokemon);
}
//console.log(move)
let target_aux

if (move.target === 'randomNormal'){
target = this.battle.getRandomTarget(pokemon, move);
}