Merge branch 'pagefaultgames:main' into main
commit
9c49f4673d
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
Binary file not shown.
After Width: | Height: | Size: 217 B |
|
@ -43,7 +43,7 @@ export const battle: SimpleTranslationEntries = {
|
||||||
"noEscapeTrainer": "Du kannst nicht\naus einem Trainerkampf fliehen!",
|
"noEscapeTrainer": "Du kannst nicht\naus einem Trainerkampf fliehen!",
|
||||||
"noEscapePokemon": "{{pokemonName}}'s {{moveName}}\nverhindert {{escapeVerb}}!",
|
"noEscapePokemon": "{{pokemonName}}'s {{moveName}}\nverhindert {{escapeVerb}}!",
|
||||||
"runAwaySuccess": "Du bist entkommen!",
|
"runAwaySuccess": "Du bist entkommen!",
|
||||||
"runAwayCannotEscape": 'Flucht unmöglich!',
|
"runAwayCannotEscape": 'Flucht gescheitert!',
|
||||||
"escapeVerbSwitch": "auswechseln",
|
"escapeVerbSwitch": "auswechseln",
|
||||||
"escapeVerbFlee": "flucht",
|
"escapeVerbFlee": "flucht",
|
||||||
"skipItemQuestion": "Bist du sicher, dass du kein Item nehmen willst?",
|
"skipItemQuestion": "Bist du sicher, dass du kein Item nehmen willst?",
|
||||||
|
|
|
@ -925,6 +925,9 @@ export const modifierTypes = {
|
||||||
FOCUS_BAND: () => new PokemonHeldItemModifierType('Focus Band', 'Adds a 10% chance to survive with 1 HP after being damaged enough to faint',
|
FOCUS_BAND: () => new PokemonHeldItemModifierType('Focus Band', 'Adds a 10% chance to survive with 1 HP after being damaged enough to faint',
|
||||||
(type, args) => new Modifiers.SurviveDamageModifier(type, (args[0] as Pokemon).id)),
|
(type, args) => new Modifiers.SurviveDamageModifier(type, (args[0] as Pokemon).id)),
|
||||||
|
|
||||||
|
QUICK_CLAW: () => new PokemonHeldItemModifierType('Quick Claw', 'Adds a 10% chance to move first regardless of speed (after priority)',
|
||||||
|
(type, args) => new Modifiers.BypassSpeedChanceModifier(type, (args[0] as Pokemon).id)),
|
||||||
|
|
||||||
KINGS_ROCK: () => new PokemonHeldItemModifierType('King\'s Rock', 'Adds a 10% chance an attack move will cause the opponent to flinch',
|
KINGS_ROCK: () => new PokemonHeldItemModifierType('King\'s Rock', 'Adds a 10% chance an attack move will cause the opponent to flinch',
|
||||||
(type, args) => new Modifiers.FlinchChanceModifier(type, (args[0] as Pokemon).id)),
|
(type, args) => new Modifiers.FlinchChanceModifier(type, (args[0] as Pokemon).id)),
|
||||||
|
|
||||||
|
@ -1087,6 +1090,7 @@ const modifierPool: ModifierPool = {
|
||||||
new WeightedModifierType(modifierTypes.SOOTHE_BELL, 4),
|
new WeightedModifierType(modifierTypes.SOOTHE_BELL, 4),
|
||||||
new WeightedModifierType(modifierTypes.ABILITY_CHARM, 6),
|
new WeightedModifierType(modifierTypes.ABILITY_CHARM, 6),
|
||||||
new WeightedModifierType(modifierTypes.FOCUS_BAND, 5),
|
new WeightedModifierType(modifierTypes.FOCUS_BAND, 5),
|
||||||
|
new WeightedModifierType(modifierTypes.QUICK_CLAW, 3),
|
||||||
new WeightedModifierType(modifierTypes.KINGS_ROCK, 3),
|
new WeightedModifierType(modifierTypes.KINGS_ROCK, 3),
|
||||||
new WeightedModifierType(modifierTypes.LOCK_CAPSULE, 3),
|
new WeightedModifierType(modifierTypes.LOCK_CAPSULE, 3),
|
||||||
new WeightedModifierType(modifierTypes.SUPER_EXP_CHARM, 10),
|
new WeightedModifierType(modifierTypes.SUPER_EXP_CHARM, 10),
|
||||||
|
@ -1138,6 +1142,7 @@ const trainerModifierPool: ModifierPool = {
|
||||||
new WeightedModifierType(modifierTypes.REVIVER_SEED, 2),
|
new WeightedModifierType(modifierTypes.REVIVER_SEED, 2),
|
||||||
new WeightedModifierType(modifierTypes.FOCUS_BAND, 2),
|
new WeightedModifierType(modifierTypes.FOCUS_BAND, 2),
|
||||||
new WeightedModifierType(modifierTypes.LUCKY_EGG, 4),
|
new WeightedModifierType(modifierTypes.LUCKY_EGG, 4),
|
||||||
|
new WeightedModifierType(modifierTypes.QUICK_CLAW, 1),
|
||||||
new WeightedModifierType(modifierTypes.GRIP_CLAW, 1),
|
new WeightedModifierType(modifierTypes.GRIP_CLAW, 1),
|
||||||
new WeightedModifierType(modifierTypes.WIDE_LENS, 1),
|
new WeightedModifierType(modifierTypes.WIDE_LENS, 1),
|
||||||
].map(m => { m.setTier(ModifierTier.ROGUE); return m; }),
|
].map(m => { m.setTier(ModifierTier.ROGUE); return m; }),
|
||||||
|
@ -1198,6 +1203,7 @@ const dailyStarterModifierPool: ModifierPool = {
|
||||||
new WeightedModifierType(modifierTypes.GRIP_CLAW, 5),
|
new WeightedModifierType(modifierTypes.GRIP_CLAW, 5),
|
||||||
new WeightedModifierType(modifierTypes.BATON, 2),
|
new WeightedModifierType(modifierTypes.BATON, 2),
|
||||||
new WeightedModifierType(modifierTypes.FOCUS_BAND, 5),
|
new WeightedModifierType(modifierTypes.FOCUS_BAND, 5),
|
||||||
|
new WeightedModifierType(modifierTypes.QUICK_CLAW, 3),
|
||||||
new WeightedModifierType(modifierTypes.KINGS_ROCK, 3),
|
new WeightedModifierType(modifierTypes.KINGS_ROCK, 3),
|
||||||
].map(m => { m.setTier(ModifierTier.ROGUE); return m; }),
|
].map(m => { m.setTier(ModifierTier.ROGUE); return m; }),
|
||||||
[ModifierTier.MASTER]: [
|
[ModifierTier.MASTER]: [
|
||||||
|
|
|
@ -731,6 +731,40 @@ export class SurviveDamageModifier extends PokemonHeldItemModifier {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class BypassSpeedChanceModifier extends PokemonHeldItemModifier {
|
||||||
|
constructor(type: ModifierType, pokemonId: integer, stackCount?: integer) {
|
||||||
|
super(type, pokemonId, stackCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
matchType(modifier: Modifier) {
|
||||||
|
return modifier instanceof BypassSpeedChanceModifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
clone() {
|
||||||
|
return new BypassSpeedChanceModifier(this.type, this.pokemonId, this.stackCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
shouldApply(args: any[]): boolean {
|
||||||
|
return super.shouldApply(args) && args.length === 2 && args[1] instanceof Utils.BooleanHolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
apply(args: any[]): boolean {
|
||||||
|
const pokemon = args[0] as Pokemon;
|
||||||
|
const bypassSpeed = args[1] as Utils.BooleanHolder;
|
||||||
|
|
||||||
|
if (!bypassSpeed.value && pokemon.randSeedInt(10) < this.getStackCount()) {
|
||||||
|
bypassSpeed.value = true;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
getMaxHeldItemCount(pokemon: Pokemon): integer {
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export class FlinchChanceModifier extends PokemonHeldItemModifier {
|
export class FlinchChanceModifier extends PokemonHeldItemModifier {
|
||||||
constructor(type: ModifierType, pokemonId: integer, stackCount?: integer) {
|
constructor(type: ModifierType, pokemonId: integer, stackCount?: integer) {
|
||||||
super(type, pokemonId, stackCount);
|
super(type, pokemonId, stackCount);
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { allMoves, applyMoveAttrs, BypassSleepAttr, ChargeAttr, applyFilteredMov
|
||||||
import { Mode } from './ui/ui';
|
import { Mode } from './ui/ui';
|
||||||
import { Command } from "./ui/command-ui-handler";
|
import { Command } from "./ui/command-ui-handler";
|
||||||
import { Stat } from "./data/pokemon-stat";
|
import { Stat } from "./data/pokemon-stat";
|
||||||
import { BerryModifier, ContactHeldItemTransferChanceModifier, EnemyAttackStatusEffectChanceModifier, EnemyPersistentModifier, EnemyStatusEffectHealChanceModifier, EnemyTurnHealModifier, ExpBalanceModifier, ExpBoosterModifier, ExpShareModifier, ExtraModifierModifier, FlinchChanceModifier, FusePokemonModifier, HealingBoosterModifier, HitHealModifier, LapsingPersistentModifier, MapModifier, Modifier, MultipleParticipantExpBonusModifier, PersistentModifier, PokemonExpBoosterModifier, PokemonHeldItemModifier, PokemonInstantReviveModifier, SwitchEffectTransferModifier, TempBattleStatBoosterModifier, TurnHealModifier, TurnHeldItemTransferModifier, MoneyMultiplierModifier, MoneyInterestModifier, IvScannerModifier, LapsingPokemonHeldItemModifier, PokemonMultiHitModifier, PokemonMoveAccuracyBoosterModifier, overrideModifiers, overrideHeldItems } from "./modifier/modifier";
|
import { BerryModifier, ContactHeldItemTransferChanceModifier, EnemyAttackStatusEffectChanceModifier, EnemyPersistentModifier, EnemyStatusEffectHealChanceModifier, EnemyTurnHealModifier, ExpBalanceModifier, ExpBoosterModifier, ExpShareModifier, ExtraModifierModifier, FlinchChanceModifier, FusePokemonModifier, HealingBoosterModifier, HitHealModifier, LapsingPersistentModifier, MapModifier, Modifier, MultipleParticipantExpBonusModifier, PersistentModifier, PokemonExpBoosterModifier, PokemonHeldItemModifier, PokemonInstantReviveModifier, SwitchEffectTransferModifier, TempBattleStatBoosterModifier, TurnHealModifier, TurnHeldItemTransferModifier, MoneyMultiplierModifier, MoneyInterestModifier, IvScannerModifier, LapsingPokemonHeldItemModifier, PokemonMultiHitModifier, PokemonMoveAccuracyBoosterModifier, overrideModifiers, overrideHeldItems, BypassSpeedChanceModifier } from "./modifier/modifier";
|
||||||
import PartyUiHandler, { PartyOption, PartyUiMode } from "./ui/party-ui-handler";
|
import PartyUiHandler, { PartyOption, PartyUiMode } from "./ui/party-ui-handler";
|
||||||
import { doPokeballBounceAnim, getPokeballAtlasKey, getPokeballCatchMultiplier, getPokeballTintColor, PokeballType } from "./data/pokeball";
|
import { doPokeballBounceAnim, getPokeballAtlasKey, getPokeballCatchMultiplier, getPokeballTintColor, PokeballType } from "./data/pokeball";
|
||||||
import { CommonAnim, CommonBattleAnim, MoveAnim, initMoveAnim, loadMoveAnimAssets } from "./data/battle-anims";
|
import { CommonAnim, CommonBattleAnim, MoveAnim, initMoveAnim, loadMoveAnimAssets } from "./data/battle-anims";
|
||||||
|
@ -1970,6 +1970,14 @@ export class TurnStartPhase extends FieldPhase {
|
||||||
const field = this.scene.getField();
|
const field = this.scene.getField();
|
||||||
const order = this.getOrder();
|
const order = this.getOrder();
|
||||||
|
|
||||||
|
const battlerBypassSpeed = {};
|
||||||
|
|
||||||
|
this.scene.getField(true).filter(p => p.summonData).map(p => {
|
||||||
|
const bypassSpeed = new Utils.BooleanHolder(false);
|
||||||
|
this.scene.applyModifiers(BypassSpeedChanceModifier, p.isPlayer(), p, bypassSpeed);
|
||||||
|
battlerBypassSpeed[p.getBattlerIndex()] = bypassSpeed;
|
||||||
|
});
|
||||||
|
|
||||||
const moveOrder = order.slice(0);
|
const moveOrder = order.slice(0);
|
||||||
|
|
||||||
moveOrder.sort((a, b) => {
|
moveOrder.sort((a, b) => {
|
||||||
|
@ -1994,6 +2002,9 @@ export class TurnStartPhase extends FieldPhase {
|
||||||
if (aPriority.value !== bPriority.value)
|
if (aPriority.value !== bPriority.value)
|
||||||
return aPriority.value < bPriority.value ? 1 : -1;
|
return aPriority.value < bPriority.value ? 1 : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (battlerBypassSpeed[a].value !== battlerBypassSpeed[b].value)
|
||||||
|
return battlerBypassSpeed[a].value ? -1 : 1;
|
||||||
|
|
||||||
const aIndex = order.indexOf(a);
|
const aIndex = order.indexOf(a);
|
||||||
const bIndex = order.indexOf(b);
|
const bIndex = order.indexOf(b);
|
||||||
|
|
Loading…
Reference in New Issue