Compare commits

...

8 Commits

Author SHA1 Message Date
nrawicz
cd7de10722
Expanding force hotfix (#459)
* Expanding Force Implementation

Added target change attribute based on terrain

* Class change I guess

* Expanding Force Implementation

Added target change attribute based on terrain

Class change I guess

Squashed weird split commit

* Fixed removed commits

My bad

* ACTUALLY fixed removed commits

* Expanding Force Hotfix

Fixes a bug where Expanding Force would not act as a multi-target move in the MoveEffectPhase while in psychic terrain
2024-05-04 13:28:44 -05:00
Benjamin Odom
f53c699d04 Updated Learnset of Gen1 to Indigo Disc
Not many changes here for how much time it takes to comb through, but here it is.

Only notable change is Power-Up Punch got removed this gen so it had to be removed from Hitmonchan's learnset. Are we okay with this change? If so, this is good to go for Gen 1.
2024-05-04 13:43:07 -04:00
Flashfyre
a7af14b8e2 Fix fusion token weight at 1000 2024-05-04 11:54:00 -04:00
nrawicz
da5615eb4a
Implement Expanding Force (#417)
* Expanding Force Implementation

Added target change attribute based on terrain

* Class change I guess

* Expanding Force Implementation

Added target change attribute based on terrain

Class change I guess

Squashed weird split commit

* Fixed removed commits

My bad

* ACTUALLY fixed removed commits
2024-05-04 10:52:24 -05:00
Flashfyre
3d2f31eb4f Fix endure token weight 2024-05-04 11:50:15 -04:00
Lugiad
d77ae729c0 Minor Update to French battle.ts
Thanks to @Dakurei for this nice compromise
2024-05-04 11:01:18 -04:00
Lugiad
3de4b9cd12 Minor Update to French battle.ts 2024-05-04 10:49:50 -04:00
dpMelian
c58a2fdee3 feat: replace steel type sprite with new version for consistency 2024-05-04 09:49:21 -04:00
6 changed files with 48 additions and 29 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -3707,6 +3707,22 @@ export class LastResortAttr extends MoveAttr {
}
}
export class VariableTargetAttr extends MoveAttr {
private targetChangeFunc: (user: Pokemon, target: Pokemon, move: Move) => number;
constructor(targetChange: (user: Pokemon, target: Pokemon, move: Move) => number) {
super();
this.targetChangeFunc = targetChange;
}
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
const targetVal = args[0] as Utils.NumberHolder;
targetVal.value = this.targetChangeFunc(user, target, move);
return true;
}
}
const failOnGravityCondition: MoveConditionFunc = (user, target, move) => !user.scene.arena.getTag(ArenaTagType.GRAVITY);
const failOnBossCondition: MoveConditionFunc = (user, target, move) => !target.isBossImmune();
@ -3787,7 +3803,10 @@ export type MoveTargetSet = {
}
export function getMoveTargets(user: Pokemon, move: Moves): MoveTargetSet {
const moveTarget = move ? allMoves[move].moveTarget : move === undefined ? MoveTarget.NEAR_ENEMY : [];
const variableTarget = new Utils.NumberHolder(0);
user.getOpponents().forEach(p => applyMoveAttrs(VariableTargetAttr, user, p, allMoves[move], variableTarget));
const moveTarget = allMoves[move].getAttrs(VariableTargetAttr).length ? variableTarget.value : move ? allMoves[move].moveTarget : move === undefined ? MoveTarget.NEAR_ENEMY : [];
const opponents = user.getOpponents();
let set: Pokemon[] = [];
@ -5989,7 +6008,8 @@ export function initMoves() {
new AttackMove(Moves.STEEL_BEAM, Type.STEEL, MoveCategory.SPECIAL, 140, 95, 5, -1, 0, 8)
.attr(HalfSacrificialAttr),
new AttackMove(Moves.EXPANDING_FORCE, Type.PSYCHIC, MoveCategory.SPECIAL, 80, 100, 10, -1, 0, 8)
.partial(),
.attr(MovePowerMultiplierAttr, (user, target, move) => user.scene.arena.getTerrainType() === TerrainType.PSYCHIC && user.isGrounded() ? 1.5 : 1)
.attr(VariableTargetAttr, (user, target, move) => user.scene.arena.getTerrainType() === TerrainType.PSYCHIC && user.isGrounded() ? 6 : 3),
new AttackMove(Moves.STEEL_ROLLER, Type.STEEL, MoveCategory.PHYSICAL, 130, 100, 5, -1, 0, 8)
.attr(ClearTerrainAttr)
.condition((user, target, move) => !!user.scene.arena.terrain),

View File

@ -30,7 +30,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[ 24, Moves.SWEET_SCENT ],
[ 27, Moves.SYNTHESIS ],
[ 30, Moves.WORRY_SEED ],
[ 33, Moves.DOUBLE_EDGE ],
[ 33, Moves.POWER_WHIP ],
[ 36, Moves.SOLAR_BEAM ],
],
[Species.IVYSAUR]: [
@ -47,16 +47,16 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[ 30, Moves.SWEET_SCENT ],
[ 35, Moves.SYNTHESIS ],
[ 40, Moves.WORRY_SEED ],
[ 45, Moves.DOUBLE_EDGE ],
[ 45, Moves.POWER_WHIP ],
[ 50, Moves.SOLAR_BEAM ],
],
[Species.VENUSAUR]: [
[ 0, Moves.PETAL_BLIZZARD ],
[ 1, Moves.GROWTH ],
[ 1, Moves.PETAL_DANCE ],
[ 1, Moves.VINE_WHIP ],
[ 1, Moves.TACKLE ],
[ 1, Moves.GROWL ],
[ 1, Moves.GROWTH ],
[ 1, Moves.PETAL_DANCE ],
[ 9, Moves.LEECH_SEED ],
[ 12, Moves.RAZOR_LEAF ],
[ 15, Moves.POISON_POWDER ],
@ -66,7 +66,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[ 30, Moves.SWEET_SCENT ],
[ 37, Moves.SYNTHESIS ],
[ 44, Moves.WORRY_SEED ],
[ 51, Moves.DOUBLE_EDGE ],
[ 51, Moves.POWER_WHIP ],
[ 58, Moves.SOLAR_BEAM ],
],
[Species.CHARMANDER]: [
@ -127,7 +127,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[ 27, Moves.SHELL_SMASH ],
[ 30, Moves.IRON_DEFENSE ],
[ 33, Moves.HYDRO_PUMP ],
[ 36, Moves.SKULL_BASH ],
[ 36, Moves.WAVE_CRASH ],
],
[Species.WARTORTLE]: [
[ 1, Moves.TACKLE ],
@ -143,7 +143,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[ 35, Moves.SHELL_SMASH ],
[ 40, Moves.IRON_DEFENSE ],
[ 45, Moves.HYDRO_PUMP ],
[ 50, Moves.SKULL_BASH ],
[ 50, Moves.WAVE_CRASH ],
],
[Species.BLASTOISE]: [
[ 0, Moves.FLASH_CANNON ],
@ -160,7 +160,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[ 35, Moves.SHELL_SMASH ],
[ 42, Moves.IRON_DEFENSE ],
[ 49, Moves.HYDRO_PUMP ],
[ 56, Moves.SKULL_BASH ],
[ 56, Moves.WAVE_CRASH ],
],
[Species.CATERPIE]: [
[ 1, Moves.TACKLE ],
@ -341,9 +341,9 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[ 12, Moves.GLARE ],
[ 17, Moves.SCREECH ],
[ 20, Moves.ACID ],
[ 25, Moves.SWALLOW ],
[ 25, Moves.STOCKPILE ],
[ 25, Moves.SPIT_UP ],
[ 25, Moves.SWALLOW ],
[ 28, Moves.ACID_SPRAY ],
[ 33, Moves.SLUDGE_BOMB ],
[ 36, Moves.GASTRO_ACID ],
@ -1780,14 +1780,15 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[ 4, Moves.DOUBLE_KICK ],
[ 8, Moves.LOW_KICK ],
[ 12, Moves.ENDURE ],
[ 16, Moves.REVENGE ],
[ 16, Moves.SUCKER_PUNCH ],
[ 21, Moves.WIDE_GUARD ],
[ 24, Moves.BLAZE_KICK ],
[ 28, Moves.MIND_READER ],
[ 28, Moves.FEINT ],
[ 32, Moves.MEGA_KICK ],
[ 36, Moves.CLOSE_COMBAT ],
[ 40, Moves.REVERSAL ],
[ 44, Moves.HIGH_JUMP_KICK ],
[ 50, Moves.AXE_KICK ],
],
[Species.HITMONCHAN]: [
[ 0, Moves.DRAIN_PUNCH ],
@ -1796,16 +1797,14 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[ 1, Moves.FAKE_OUT ],
[ 1, Moves.HELPING_HAND ],
[ 1, Moves.FEINT ],
[ 1, Moves.VACUUM_WAVE ],
[ 1, Moves.BULLET_PUNCH ],
[ 4, Moves.MACH_PUNCH ],
[ 8, Moves.POWER_UP_PUNCH ],
[ 8, Moves.VACUUM_WAVE ],
[ 12, Moves.DETECT ],
[ 16, Moves.REVENGE ],
[ 16, Moves.BULLET_PUNCH ],
[ 21, Moves.QUICK_GUARD ],
[ 24, Moves.FIRE_PUNCH ],
[ 24, Moves.ICE_PUNCH ],
[ 24, Moves.THUNDER_PUNCH ],
[ 24, Moves.ICE_PUNCH ],
[ 24, Moves.FIRE_PUNCH ],
[ 28, Moves.AGILITY ],
[ 32, Moves.MEGA_PUNCH ],
[ 36, Moves.CLOSE_COMBAT ],

View File

@ -9,7 +9,7 @@ export const battle: SimpleTranslationEntries = {
"trainerComeBack": "{{trainerName}} retire {{pokemonName}} !",
"playerGo": "{{pokemonName}} ! Go !",
"trainerGo": "{{pokemonName}} est envoyé par\n{{trainerName}} !",
"switchQuestion": "Voulez-vous changer\n{{pokemonName}} ?",
"switchQuestion": "Voulez-vous changer\nvotre {{pokemonName}} ?",
"trainerDefeated": `Vous avez battu\n{{trainerName}} !`,
"pokemonCaught": "Vous avez attrapé {{pokemonName}} !",
"pokemon": "Pokémon",

View File

@ -1151,7 +1151,7 @@ const enemyBuffModifierPool: ModifierPool = {
new WeightedModifierType(modifierTypes.ENEMY_ATTACK_FREEZE_CHANCE, 2),
new WeightedModifierType(modifierTypes.ENEMY_ATTACK_BURN_CHANCE, 2),
new WeightedModifierType(modifierTypes.ENEMY_STATUS_EFFECT_HEAL_CHANCE, 10),
new WeightedModifierType(modifierTypes.ENEMY_ENDURE_CHANCE, 10000),
new WeightedModifierType(modifierTypes.ENEMY_ENDURE_CHANCE, 5),
new WeightedModifierType(modifierTypes.ENEMY_FUSED_CHANCE, 1)
].map(m => { m.setTier(ModifierTier.COMMON); return m; }),
[ModifierTier.GREAT]: [
@ -1162,12 +1162,12 @@ const enemyBuffModifierPool: ModifierPool = {
new WeightedModifierType(modifierTypes.ENEMY_FUSED_CHANCE, 1)
].map(m => { m.setTier(ModifierTier.GREAT); return m; }),
[ModifierTier.ULTRA]: [
new WeightedModifierType(modifierTypes.ENEMY_DAMAGE_BOOSTER, 5),
new WeightedModifierType(modifierTypes.ENEMY_DAMAGE_REDUCTION, 5),
new WeightedModifierType(modifierTypes.ENEMY_HEAL, 5),
new WeightedModifierType(modifierTypes.ENEMY_STATUS_EFFECT_HEAL_CHANCE, 5),
new WeightedModifierType(modifierTypes.ENEMY_ENDURE_CHANCE, 5),
new WeightedModifierType(modifierTypes.ENEMY_FUSED_CHANCE, 300)
new WeightedModifierType(modifierTypes.ENEMY_DAMAGE_BOOSTER, 10),
new WeightedModifierType(modifierTypes.ENEMY_DAMAGE_REDUCTION, 10),
new WeightedModifierType(modifierTypes.ENEMY_HEAL, 10),
new WeightedModifierType(modifierTypes.ENEMY_STATUS_EFFECT_HEAL_CHANCE, 10),
new WeightedModifierType(modifierTypes.ENEMY_ENDURE_CHANCE, 10),
new WeightedModifierType(modifierTypes.ENEMY_FUSED_CHANCE, 5)
].map(m => { m.setTier(ModifierTier.ULTRA); return m; }),
[ModifierTier.ROGUE]: [ ].map(m => { m.setTier(ModifierTier.ROGUE); return m; }),
[ModifierTier.MASTER]: [ ].map(m => { m.setTier(ModifierTier.MASTER); return m; })

View File

@ -2,7 +2,7 @@ import BattleScene, { bypassLogin, startingWave } from "./battle-scene";
import { default as Pokemon, PlayerPokemon, EnemyPokemon, PokemonMove, MoveResult, DamageResult, FieldPosition, HitResult, TurnMove } from "./field/pokemon";
import * as Utils from './utils';
import { Moves } from "./data/enums/moves";
import { allMoves, applyMoveAttrs, BypassSleepAttr, ChargeAttr, applyFilteredMoveAttrs, HitsTagAttr, MissEffectAttr, MoveAttr, MoveEffectAttr, MoveFlags, MultiHitAttr, OverrideMoveEffectAttr, VariableAccuracyAttr, MoveTarget, OneHitKOAttr, getMoveTargets, MoveTargetSet, MoveEffectTrigger, CopyMoveAttr, AttackMove, SelfStatusMove, DelayedAttackAttr, RechargeAttr, PreMoveMessageAttr, HealStatusEffectAttr, IgnoreOpponentStatChangesAttr, NoEffectAttr, FixedDamageAttr, OneHitKOAccuracyAttr, ForceSwitchOutAttr } from "./data/move";
import { allMoves, applyMoveAttrs, BypassSleepAttr, ChargeAttr, applyFilteredMoveAttrs, HitsTagAttr, MissEffectAttr, MoveAttr, MoveEffectAttr, MoveFlags, MultiHitAttr, OverrideMoveEffectAttr, VariableAccuracyAttr, MoveTarget, OneHitKOAttr, getMoveTargets, MoveTargetSet, MoveEffectTrigger, CopyMoveAttr, AttackMove, SelfStatusMove, DelayedAttackAttr, RechargeAttr, PreMoveMessageAttr, HealStatusEffectAttr, IgnoreOpponentStatChangesAttr, NoEffectAttr, FixedDamageAttr, OneHitKOAccuracyAttr, ForceSwitchOutAttr, VariableTargetAttr } from "./data/move";
import { Mode } from './ui/ui';
import { Command } from "./ui/command-ui-handler";
import { Stat } from "./data/pokemon-stat";
@ -2400,7 +2400,7 @@ export class MoveEffectPhase extends PokemonPhase {
const targetHitChecks = Object.fromEntries(targets.map(p => [ p.getBattlerIndex(), this.hitCheck(p) ]));
const activeTargets = targets.map(t => t.isActive(true));
if (!activeTargets.length || (!this.move.getMove().isMultiTarget() && !targetHitChecks[this.targets[0]])) {
if (!activeTargets.length || (!this.move.getMove().getAttrs(VariableTargetAttr).length && !this.move.getMove().isMultiTarget() && !targetHitChecks[this.targets[0]])) {
user.turnData.hitCount = 1;
user.turnData.hitsLeft = 1;
if (activeTargets.length) {