Merge branch 'pagefaultgames:main' into IndigoDiskLearnsets
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 49 KiB |
BIN
public/images/items/burn_drive.png
Normal file
After Width: | Height: | Size: 303 B |
BIN
public/images/items/chill_drive.png
Normal file
After Width: | Height: | Size: 303 B |
BIN
public/images/items/douse_drive.png
Normal file
After Width: | Height: | Size: 303 B |
BIN
public/images/items/shock_drive.png
Normal file
After Width: | Height: | Size: 303 B |
BIN
public/images/ui/candy.png
Normal file
After Width: | Height: | Size: 415 B |
BIN
public/images/ui/candy_overlay.png
Normal file
After Width: | Height: | Size: 211 B |
BIN
public/images/ui/legacy/candy.png
Normal file
After Width: | Height: | Size: 415 B |
BIN
public/images/ui/legacy/candy_overlay.png
Normal file
After Width: | Height: | Size: 211 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 3.6 KiB |
@ -2104,6 +2104,13 @@ export class StatChangeMultiplierAbAttr extends AbAttr {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class StatChangeCopyAbAttr extends AbAttr {
|
||||||
|
apply(pokemon: Pokemon, passive: boolean, cancelled: Utils.BooleanHolder, args: any[]): boolean | Promise<boolean> {
|
||||||
|
pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, (args[0] as BattleStat[]), (args[1] as integer), true, false, false));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export class BypassBurnDamageReductionAbAttr extends AbAttr {
|
export class BypassBurnDamageReductionAbAttr extends AbAttr {
|
||||||
constructor() {
|
constructor() {
|
||||||
super(false);
|
super(false);
|
||||||
@ -3484,7 +3491,7 @@ export function initAbilities() {
|
|||||||
.attr(PostBiomeChangeTerrainChangeAbAttr, TerrainType.ELECTRIC)
|
.attr(PostBiomeChangeTerrainChangeAbAttr, TerrainType.ELECTRIC)
|
||||||
.conditionalAttr(getTerrainCondition(TerrainType.ELECTRIC), BattleStatMultiplierAbAttr, BattleStat.SPATK, 4 / 3),
|
.conditionalAttr(getTerrainCondition(TerrainType.ELECTRIC), BattleStatMultiplierAbAttr, BattleStat.SPATK, 4 / 3),
|
||||||
new Ability(Abilities.OPPORTUNIST, 9)
|
new Ability(Abilities.OPPORTUNIST, 9)
|
||||||
.unimplemented(),
|
.attr(StatChangeCopyAbAttr),
|
||||||
new Ability(Abilities.CUD_CHEW, 9)
|
new Ability(Abilities.CUD_CHEW, 9)
|
||||||
.unimplemented(),
|
.unimplemented(),
|
||||||
new Ability(Abilities.SHARPNESS, 9)
|
new Ability(Abilities.SHARPNESS, 9)
|
||||||
|
@ -115,7 +115,7 @@ export const speciesEggMoves = {
|
|||||||
[Species.PHANPY]: [ Moves.SHORE_UP, Moves.HEAD_SMASH, Moves.MOUNTAIN_GALE, Moves.VOLT_TACKLE ],
|
[Species.PHANPY]: [ Moves.SHORE_UP, Moves.HEAD_SMASH, Moves.MOUNTAIN_GALE, Moves.VOLT_TACKLE ],
|
||||||
[Species.STANTLER]: [ Moves.HORN_LEECH, Moves.HIGH_JUMP_KICK, Moves.BULK_UP, Moves.HEAD_CHARGE ],
|
[Species.STANTLER]: [ Moves.HORN_LEECH, Moves.HIGH_JUMP_KICK, Moves.BULK_UP, Moves.HEAD_CHARGE ],
|
||||||
[Species.SMEARGLE]: [ Moves.BATON_PASS, Moves.BURNING_BULWARK, Moves.SALT_CURE, Moves.SPORE ],
|
[Species.SMEARGLE]: [ Moves.BATON_PASS, Moves.BURNING_BULWARK, Moves.SALT_CURE, Moves.SPORE ],
|
||||||
[Species.TYROGUE]: [ Moves.MACH_PUNCH, Moves.WICKED_TORQUE, Moves.METEOR_MASH, Moves.COLLISION_COURSE ],
|
[Species.TYROGUE]: [ Moves.VICTORY_DANCE, Moves.WICKED_TORQUE, Moves.METEOR_MASH, Moves.COLLISION_COURSE ],
|
||||||
[Species.SMOOCHUM]: [ Moves.EXPANDING_FORCE, Moves.AURA_SPHERE, Moves.FREEZY_FROST, Moves.TAKE_HEART ],
|
[Species.SMOOCHUM]: [ Moves.EXPANDING_FORCE, Moves.AURA_SPHERE, Moves.FREEZY_FROST, Moves.TAKE_HEART ],
|
||||||
[Species.ELEKID]: [ Moves.DRAIN_PUNCH, Moves.TIDY_UP, Moves.ICE_HAMMER, Moves.PLASMA_FISTS ],
|
[Species.ELEKID]: [ Moves.DRAIN_PUNCH, Moves.TIDY_UP, Moves.ICE_HAMMER, Moves.PLASMA_FISTS ],
|
||||||
[Species.MAGBY]: [ Moves.STORED_POWER, Moves.EARTH_POWER, Moves.ARMOR_CANNON, Moves.FLEUR_CANNON ],
|
[Species.MAGBY]: [ Moves.STORED_POWER, Moves.EARTH_POWER, Moves.ARMOR_CANNON, Moves.FLEUR_CANNON ],
|
||||||
|
@ -2216,6 +2216,36 @@ export class VariableMoveTypeAttr extends MoveAttr {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class TechnoBlastTypeAttr extends VariableMoveTypeAttr {
|
||||||
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||||
|
if ([user.species.speciesId, user.fusionSpecies?.speciesId].includes(Species.GENESECT)) {
|
||||||
|
const form = user.species.speciesId === Species.GENESECT ? user.formIndex : user.fusionSpecies.formIndex;
|
||||||
|
const type = (args[0] as Utils.IntegerHolder);
|
||||||
|
|
||||||
|
switch (form) {
|
||||||
|
case 1: // Shock Drive
|
||||||
|
type.value = Type.ELECTRIC;
|
||||||
|
break;
|
||||||
|
case 2: // Burn Drive
|
||||||
|
type.value = Type.FIRE;
|
||||||
|
break;
|
||||||
|
case 3: // Chill Drive
|
||||||
|
type.value = Type.ICE;
|
||||||
|
break;
|
||||||
|
case 4: // Douse Drive
|
||||||
|
type.value = Type.WATER;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
type.value = Type.NORMAL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export class AuraWheelTypeAttr extends VariableMoveTypeAttr {
|
export class AuraWheelTypeAttr extends VariableMoveTypeAttr {
|
||||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||||
if ([user.species.speciesId, user.fusionSpecies?.speciesId].includes(Species.MORPEKO)) {
|
if ([user.species.speciesId, user.fusionSpecies?.speciesId].includes(Species.MORPEKO)) {
|
||||||
@ -3707,6 +3737,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 failOnGravityCondition: MoveConditionFunc = (user, target, move) => !user.scene.arena.getTag(ArenaTagType.GRAVITY);
|
||||||
|
|
||||||
const failOnBossCondition: MoveConditionFunc = (user, target, move) => !target.isBossImmune();
|
const failOnBossCondition: MoveConditionFunc = (user, target, move) => !target.isBossImmune();
|
||||||
@ -3787,7 +3833,10 @@ export type MoveTargetSet = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getMoveTargets(user: Pokemon, move: Moves): 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();
|
const opponents = user.getOpponents();
|
||||||
|
|
||||||
let set: Pokemon[] = [];
|
let set: Pokemon[] = [];
|
||||||
@ -4717,8 +4766,7 @@ export function initMoves() {
|
|||||||
.attr(StatusEffectAttr, StatusEffect.SLEEP)
|
.attr(StatusEffectAttr, StatusEffect.SLEEP)
|
||||||
.soundBased(),
|
.soundBased(),
|
||||||
new StatusMove(Moves.TICKLE, Type.NORMAL, 100, 20, -1, 0, 3)
|
new StatusMove(Moves.TICKLE, Type.NORMAL, 100, 20, -1, 0, 3)
|
||||||
.attr(StatChangeAttr, BattleStat.ATK, -1)
|
.attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.DEF ], -1),
|
||||||
.attr(StatChangeAttr, BattleStat.DEF, -1),
|
|
||||||
new SelfStatusMove(Moves.COSMIC_POWER, Type.PSYCHIC, -1, 20, -1, 0, 3)
|
new SelfStatusMove(Moves.COSMIC_POWER, Type.PSYCHIC, -1, 20, -1, 0, 3)
|
||||||
.attr(StatChangeAttr, [ BattleStat.DEF, BattleStat.SPDEF ], 1, true),
|
.attr(StatChangeAttr, [ BattleStat.DEF, BattleStat.SPDEF ], 1, true),
|
||||||
new AttackMove(Moves.WATER_SPOUT, Type.WATER, MoveCategory.SPECIAL, 150, 100, 5, -1, 0, 3)
|
new AttackMove(Moves.WATER_SPOUT, Type.WATER, MoveCategory.SPECIAL, 150, 100, 5, -1, 0, 3)
|
||||||
@ -5315,7 +5363,7 @@ export function initMoves() {
|
|||||||
.ballBombMove()
|
.ballBombMove()
|
||||||
.target(MoveTarget.ALL_NEAR_OTHERS),
|
.target(MoveTarget.ALL_NEAR_OTHERS),
|
||||||
new AttackMove(Moves.TECHNO_BLAST, Type.NORMAL, MoveCategory.SPECIAL, 120, 100, 5, -1, 0, 5)
|
new AttackMove(Moves.TECHNO_BLAST, Type.NORMAL, MoveCategory.SPECIAL, 120, 100, 5, -1, 0, 5)
|
||||||
.partial(),
|
.attr(TechnoBlastTypeAttr),
|
||||||
new AttackMove(Moves.RELIC_SONG, Type.NORMAL, MoveCategory.SPECIAL, 75, 100, 10, 10, 0, 5)
|
new AttackMove(Moves.RELIC_SONG, Type.NORMAL, MoveCategory.SPECIAL, 75, 100, 10, 10, 0, 5)
|
||||||
.attr(StatusEffectAttr, StatusEffect.SLEEP)
|
.attr(StatusEffectAttr, StatusEffect.SLEEP)
|
||||||
.soundBased()
|
.soundBased()
|
||||||
@ -5758,8 +5806,7 @@ export function initMoves() {
|
|||||||
.ignoresAbilities()
|
.ignoresAbilities()
|
||||||
.partial(),
|
.partial(),
|
||||||
new StatusMove(Moves.TEARFUL_LOOK, Type.NORMAL, -1, 20, 100, 0, 7)
|
new StatusMove(Moves.TEARFUL_LOOK, Type.NORMAL, -1, 20, 100, 0, 7)
|
||||||
.attr(StatChangeAttr, BattleStat.ATK, -1)
|
.attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.SPATK ], -1),
|
||||||
.attr(StatChangeAttr, BattleStat.SPATK, -1),
|
|
||||||
new AttackMove(Moves.ZING_ZAP, Type.ELECTRIC, MoveCategory.PHYSICAL, 80, 100, 10, 30, 0, 7)
|
new AttackMove(Moves.ZING_ZAP, Type.ELECTRIC, MoveCategory.PHYSICAL, 80, 100, 10, 30, 0, 7)
|
||||||
.attr(FlinchAttr),
|
.attr(FlinchAttr),
|
||||||
new AttackMove(Moves.NATURES_MADNESS, Type.FAIRY, MoveCategory.SPECIAL, -1, 90, 10, -1, 0, 7)
|
new AttackMove(Moves.NATURES_MADNESS, Type.FAIRY, MoveCategory.SPECIAL, -1, 90, 10, -1, 0, 7)
|
||||||
@ -5938,8 +5985,7 @@ export function initMoves() {
|
|||||||
new AttackMove(Moves.BODY_PRESS, Type.FIGHTING, MoveCategory.PHYSICAL, 80, 100, 10, -1, 0, 8)
|
new AttackMove(Moves.BODY_PRESS, Type.FIGHTING, MoveCategory.PHYSICAL, 80, 100, 10, -1, 0, 8)
|
||||||
.attr(DefAtkAttr),
|
.attr(DefAtkAttr),
|
||||||
new StatusMove(Moves.DECORATE, Type.FAIRY, -1, 15, 100, 0, 8)
|
new StatusMove(Moves.DECORATE, Type.FAIRY, -1, 15, 100, 0, 8)
|
||||||
.attr(StatChangeAttr, BattleStat.ATK, 2)
|
.attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.SPATK ], 2),
|
||||||
.attr(StatChangeAttr, BattleStat.SPATK, 2),
|
|
||||||
new AttackMove(Moves.DRUM_BEATING, Type.GRASS, MoveCategory.PHYSICAL, 80, 100, 10, 100, 0, 8)
|
new AttackMove(Moves.DRUM_BEATING, Type.GRASS, MoveCategory.PHYSICAL, 80, 100, 10, 100, 0, 8)
|
||||||
.attr(StatChangeAttr, BattleStat.SPD, -1)
|
.attr(StatChangeAttr, BattleStat.SPD, -1)
|
||||||
.makesContact(false),
|
.makesContact(false),
|
||||||
@ -5989,7 +6035,8 @@ export function initMoves() {
|
|||||||
new AttackMove(Moves.STEEL_BEAM, Type.STEEL, MoveCategory.SPECIAL, 140, 95, 5, -1, 0, 8)
|
new AttackMove(Moves.STEEL_BEAM, Type.STEEL, MoveCategory.SPECIAL, 140, 95, 5, -1, 0, 8)
|
||||||
.attr(HalfSacrificialAttr),
|
.attr(HalfSacrificialAttr),
|
||||||
new AttackMove(Moves.EXPANDING_FORCE, Type.PSYCHIC, MoveCategory.SPECIAL, 80, 100, 10, -1, 0, 8)
|
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)
|
new AttackMove(Moves.STEEL_ROLLER, Type.STEEL, MoveCategory.PHYSICAL, 130, 100, 5, -1, 0, 8)
|
||||||
.attr(ClearTerrainAttr)
|
.attr(ClearTerrainAttr)
|
||||||
.condition((user, target, move) => !!user.scene.arena.terrain),
|
.condition((user, target, move) => !!user.scene.arena.terrain),
|
||||||
|
@ -82,7 +82,11 @@ export enum FormChangeItem {
|
|||||||
SHADOW_REINS_OF_UNITY,
|
SHADOW_REINS_OF_UNITY,
|
||||||
WELLSPRING_MASK,
|
WELLSPRING_MASK,
|
||||||
HEARTHFLAME_MASK,
|
HEARTHFLAME_MASK,
|
||||||
CORNERSTONE_MASK
|
CORNERSTONE_MASK,
|
||||||
|
SHOCK_DRIVE,
|
||||||
|
BURN_DRIVE,
|
||||||
|
CHILL_DRIVE,
|
||||||
|
DOUSE_DRIVE
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SpeciesFormChangeConditionPredicate = (p: Pokemon) => boolean;
|
export type SpeciesFormChangeConditionPredicate = (p: Pokemon) => boolean;
|
||||||
@ -542,6 +546,12 @@ export const pokemonFormChanges: PokemonFormChanges = {
|
|||||||
new SpeciesFormChange(Species.MELOETTA, 'pirouette', 'aria', new SpeciesFormChangePostMoveTrigger(Moves.RELIC_SONG), true),
|
new SpeciesFormChange(Species.MELOETTA, 'pirouette', 'aria', new SpeciesFormChangePostMoveTrigger(Moves.RELIC_SONG), true),
|
||||||
new SpeciesFormChange(Species.MELOETTA, 'pirouette', 'aria', new SpeciesFormChangeActiveTrigger(false), true)
|
new SpeciesFormChange(Species.MELOETTA, 'pirouette', 'aria', new SpeciesFormChangeActiveTrigger(false), true)
|
||||||
],
|
],
|
||||||
|
[Species.GENESECT]: [
|
||||||
|
new SpeciesFormChange(Species.GENESECT, '', 'shock', new SpeciesFormChangeItemTrigger(FormChangeItem.SHOCK_DRIVE)),
|
||||||
|
new SpeciesFormChange(Species.GENESECT, '', 'burn', new SpeciesFormChangeItemTrigger(FormChangeItem.BURN_DRIVE)),
|
||||||
|
new SpeciesFormChange(Species.GENESECT, '', 'chill', new SpeciesFormChangeItemTrigger(FormChangeItem.CHILL_DRIVE)),
|
||||||
|
new SpeciesFormChange(Species.GENESECT, '', 'douse', new SpeciesFormChangeItemTrigger(FormChangeItem.DOUSE_DRIVE))
|
||||||
|
],
|
||||||
[Species.GRENINJA]: [
|
[Species.GRENINJA]: [
|
||||||
new SpeciesFormChange(Species.GRENINJA, 'battle-bond', 'ash', new SpeciesFormChangeManualTrigger(), true),
|
new SpeciesFormChange(Species.GRENINJA, 'battle-bond', 'ash', new SpeciesFormChangeManualTrigger(), true),
|
||||||
new SpeciesFormChange(Species.GRENINJA, 'ash', 'battle-bond', new SpeciesFormChangeManualTrigger(), true)
|
new SpeciesFormChange(Species.GRENINJA, 'ash', 'battle-bond', new SpeciesFormChangeManualTrigger(), true)
|
||||||
|
@ -31,6 +31,8 @@ export class LoadingScene extends SceneBase {
|
|||||||
this.loadAtlas('bg', 'ui');
|
this.loadAtlas('bg', 'ui');
|
||||||
this.loadImage('command_fight_labels', 'ui');
|
this.loadImage('command_fight_labels', 'ui');
|
||||||
this.loadAtlas('prompt', 'ui');
|
this.loadAtlas('prompt', 'ui');
|
||||||
|
this.loadImage('candy', 'ui');
|
||||||
|
this.loadImage('candy_overlay', 'ui');
|
||||||
this.loadImage('cursor', 'ui');
|
this.loadImage('cursor', 'ui');
|
||||||
this.loadImage('cursor_reverse', 'ui');
|
this.loadImage('cursor_reverse', 'ui');
|
||||||
for (let wv of Utils.getEnumValues(WindowVariant)) {
|
for (let wv of Utils.getEnumValues(WindowVariant)) {
|
||||||
|
@ -9,7 +9,7 @@ export const battle: SimpleTranslationEntries = {
|
|||||||
"trainerComeBack": "{{trainerName}} retire {{pokemonName}} !",
|
"trainerComeBack": "{{trainerName}} retire {{pokemonName}} !",
|
||||||
"playerGo": "{{pokemonName}} ! Go !",
|
"playerGo": "{{pokemonName}} ! Go !",
|
||||||
"trainerGo": "{{pokemonName}} est envoyé par\n{{trainerName}} !",
|
"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}} !`,
|
"trainerDefeated": `Vous avez battu\n{{trainerName}} !`,
|
||||||
"pokemonCaught": "Vous avez attrapé {{pokemonName}} !",
|
"pokemonCaught": "Vous avez attrapé {{pokemonName}} !",
|
||||||
"pokemon": "Pokémon",
|
"pokemon": "Pokémon",
|
||||||
|
@ -1151,7 +1151,7 @@ const enemyBuffModifierPool: ModifierPool = {
|
|||||||
new WeightedModifierType(modifierTypes.ENEMY_ATTACK_FREEZE_CHANCE, 2),
|
new WeightedModifierType(modifierTypes.ENEMY_ATTACK_FREEZE_CHANCE, 2),
|
||||||
new WeightedModifierType(modifierTypes.ENEMY_ATTACK_BURN_CHANCE, 2),
|
new WeightedModifierType(modifierTypes.ENEMY_ATTACK_BURN_CHANCE, 2),
|
||||||
new WeightedModifierType(modifierTypes.ENEMY_STATUS_EFFECT_HEAL_CHANCE, 10),
|
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)
|
new WeightedModifierType(modifierTypes.ENEMY_FUSED_CHANCE, 1)
|
||||||
].map(m => { m.setTier(ModifierTier.COMMON); return m; }),
|
].map(m => { m.setTier(ModifierTier.COMMON); return m; }),
|
||||||
[ModifierTier.GREAT]: [
|
[ModifierTier.GREAT]: [
|
||||||
@ -1162,12 +1162,12 @@ const enemyBuffModifierPool: ModifierPool = {
|
|||||||
new WeightedModifierType(modifierTypes.ENEMY_FUSED_CHANCE, 1)
|
new WeightedModifierType(modifierTypes.ENEMY_FUSED_CHANCE, 1)
|
||||||
].map(m => { m.setTier(ModifierTier.GREAT); return m; }),
|
].map(m => { m.setTier(ModifierTier.GREAT); return m; }),
|
||||||
[ModifierTier.ULTRA]: [
|
[ModifierTier.ULTRA]: [
|
||||||
new WeightedModifierType(modifierTypes.ENEMY_DAMAGE_BOOSTER, 5),
|
new WeightedModifierType(modifierTypes.ENEMY_DAMAGE_BOOSTER, 10),
|
||||||
new WeightedModifierType(modifierTypes.ENEMY_DAMAGE_REDUCTION, 5),
|
new WeightedModifierType(modifierTypes.ENEMY_DAMAGE_REDUCTION, 10),
|
||||||
new WeightedModifierType(modifierTypes.ENEMY_HEAL, 5),
|
new WeightedModifierType(modifierTypes.ENEMY_HEAL, 10),
|
||||||
new WeightedModifierType(modifierTypes.ENEMY_STATUS_EFFECT_HEAL_CHANCE, 5),
|
new WeightedModifierType(modifierTypes.ENEMY_STATUS_EFFECT_HEAL_CHANCE, 10),
|
||||||
new WeightedModifierType(modifierTypes.ENEMY_ENDURE_CHANCE, 5),
|
new WeightedModifierType(modifierTypes.ENEMY_ENDURE_CHANCE, 10),
|
||||||
new WeightedModifierType(modifierTypes.ENEMY_FUSED_CHANCE, 300)
|
new WeightedModifierType(modifierTypes.ENEMY_FUSED_CHANCE, 5)
|
||||||
].map(m => { m.setTier(ModifierTier.ULTRA); return m; }),
|
].map(m => { m.setTier(ModifierTier.ULTRA); return m; }),
|
||||||
[ModifierTier.ROGUE]: [ ].map(m => { m.setTier(ModifierTier.ROGUE); return m; }),
|
[ModifierTier.ROGUE]: [ ].map(m => { m.setTier(ModifierTier.ROGUE); return m; }),
|
||||||
[ModifierTier.MASTER]: [ ].map(m => { m.setTier(ModifierTier.MASTER); return m; })
|
[ModifierTier.MASTER]: [ ].map(m => { m.setTier(ModifierTier.MASTER); return m; })
|
||||||
|
@ -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 { default as Pokemon, PlayerPokemon, EnemyPokemon, PokemonMove, MoveResult, DamageResult, FieldPosition, HitResult, TurnMove } from "./field/pokemon";
|
||||||
import * as Utils from './utils';
|
import * as Utils from './utils';
|
||||||
import { Moves } from "./data/enums/moves";
|
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 { 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";
|
||||||
@ -30,7 +30,7 @@ import { Weather, WeatherType, getRandomWeatherType, getTerrainBlockMessage, get
|
|||||||
import { TempBattleStat } from "./data/temp-battle-stat";
|
import { TempBattleStat } from "./data/temp-battle-stat";
|
||||||
import { ArenaTagSide, ArenaTrapTag, MistTag, TrickRoomTag } from "./data/arena-tag";
|
import { ArenaTagSide, ArenaTrapTag, MistTag, TrickRoomTag } from "./data/arena-tag";
|
||||||
import { ArenaTagType } from "./data/enums/arena-tag-type";
|
import { ArenaTagType } from "./data/enums/arena-tag-type";
|
||||||
import { CheckTrappedAbAttr, IgnoreOpponentStatChangesAbAttr, PostAttackAbAttr, PostBattleAbAttr, PostDefendAbAttr, PostSummonAbAttr, PostTurnAbAttr, PostWeatherLapseAbAttr, PreSwitchOutAbAttr, PreWeatherDamageAbAttr, ProtectStatAbAttr, RedirectMoveAbAttr, RunSuccessAbAttr, StatChangeMultiplierAbAttr, SuppressWeatherEffectAbAttr, SyncEncounterNatureAbAttr, applyAbAttrs, applyCheckTrappedAbAttrs, applyPostAttackAbAttrs, applyPostBattleAbAttrs, applyPostDefendAbAttrs, applyPostSummonAbAttrs, applyPostTurnAbAttrs, applyPostWeatherLapseAbAttrs, applyPreStatChangeAbAttrs, applyPreSwitchOutAbAttrs, applyPreWeatherEffectAbAttrs, BattleStatMultiplierAbAttr, applyBattleStatMultiplierAbAttrs, IncrementMovePriorityAbAttr, applyPostVictoryAbAttrs, PostVictoryAbAttr, applyPostBattleInitAbAttrs, PostBattleInitAbAttr, BlockNonDirectDamageAbAttr as BlockNonDirectDamageAbAttr, applyPostKnockOutAbAttrs, PostKnockOutAbAttr, PostBiomeChangeAbAttr, applyPostFaintAbAttrs, PostFaintAbAttr, IncreasePpAbAttr, PostStatChangeAbAttr, applyPostStatChangeAbAttrs, AlwaysHitAbAttr, PreventBerryUseAbAttr } from "./data/ability";
|
import { CheckTrappedAbAttr, IgnoreOpponentStatChangesAbAttr, PostAttackAbAttr, PostBattleAbAttr, PostDefendAbAttr, PostSummonAbAttr, PostTurnAbAttr, PostWeatherLapseAbAttr, PreSwitchOutAbAttr, PreWeatherDamageAbAttr, ProtectStatAbAttr, RedirectMoveAbAttr, RunSuccessAbAttr, StatChangeMultiplierAbAttr, SuppressWeatherEffectAbAttr, SyncEncounterNatureAbAttr, applyAbAttrs, applyCheckTrappedAbAttrs, applyPostAttackAbAttrs, applyPostBattleAbAttrs, applyPostDefendAbAttrs, applyPostSummonAbAttrs, applyPostTurnAbAttrs, applyPostWeatherLapseAbAttrs, applyPreStatChangeAbAttrs, applyPreSwitchOutAbAttrs, applyPreWeatherEffectAbAttrs, BattleStatMultiplierAbAttr, applyBattleStatMultiplierAbAttrs, IncrementMovePriorityAbAttr, applyPostVictoryAbAttrs, PostVictoryAbAttr, applyPostBattleInitAbAttrs, PostBattleInitAbAttr, BlockNonDirectDamageAbAttr as BlockNonDirectDamageAbAttr, applyPostKnockOutAbAttrs, PostKnockOutAbAttr, PostBiomeChangeAbAttr, applyPostFaintAbAttrs, PostFaintAbAttr, IncreasePpAbAttr, PostStatChangeAbAttr, applyPostStatChangeAbAttrs, AlwaysHitAbAttr, PreventBerryUseAbAttr, StatChangeCopyAbAttr } from "./data/ability";
|
||||||
import { Unlockables, getUnlockableName } from "./system/unlockables";
|
import { Unlockables, getUnlockableName } from "./system/unlockables";
|
||||||
import { getBiomeKey } from "./field/arena";
|
import { getBiomeKey } from "./field/arena";
|
||||||
import { BattleType, BattlerIndex, TurnCommand } from "./battle";
|
import { BattleType, BattlerIndex, TurnCommand } from "./battle";
|
||||||
@ -2400,7 +2400,7 @@ export class MoveEffectPhase extends PokemonPhase {
|
|||||||
|
|
||||||
const targetHitChecks = Object.fromEntries(targets.map(p => [ p.getBattlerIndex(), this.hitCheck(p) ]));
|
const targetHitChecks = Object.fromEntries(targets.map(p => [ p.getBattlerIndex(), this.hitCheck(p) ]));
|
||||||
const activeTargets = targets.map(t => t.isActive(true));
|
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.hitCount = 1;
|
||||||
user.turnData.hitsLeft = 1;
|
user.turnData.hitsLeft = 1;
|
||||||
if (activeTargets.length) {
|
if (activeTargets.length) {
|
||||||
@ -2661,8 +2661,9 @@ export class StatChangePhase extends PokemonPhase {
|
|||||||
private levels: integer;
|
private levels: integer;
|
||||||
private showMessage: boolean;
|
private showMessage: boolean;
|
||||||
private ignoreAbilities: boolean;
|
private ignoreAbilities: boolean;
|
||||||
|
private canBeCopied: boolean;
|
||||||
|
|
||||||
constructor(scene: BattleScene, battlerIndex: BattlerIndex, selfTarget: boolean, stats: BattleStat[], levels: integer, showMessage: boolean = true, ignoreAbilities: boolean = false) {
|
constructor(scene: BattleScene, battlerIndex: BattlerIndex, selfTarget: boolean, stats: BattleStat[], levels: integer, showMessage: boolean = true, ignoreAbilities: boolean = false, canBeCopied: boolean = true) {
|
||||||
super(scene, battlerIndex);
|
super(scene, battlerIndex);
|
||||||
|
|
||||||
this.selfTarget = selfTarget;
|
this.selfTarget = selfTarget;
|
||||||
@ -2670,6 +2671,7 @@ export class StatChangePhase extends PokemonPhase {
|
|||||||
this.levels = levels;
|
this.levels = levels;
|
||||||
this.showMessage = showMessage;
|
this.showMessage = showMessage;
|
||||||
this.ignoreAbilities = ignoreAbilities;
|
this.ignoreAbilities = ignoreAbilities;
|
||||||
|
this.canBeCopied = canBeCopied;
|
||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
@ -2717,8 +2719,12 @@ export class StatChangePhase extends PokemonPhase {
|
|||||||
for (let stat of filteredStats)
|
for (let stat of filteredStats)
|
||||||
pokemon.summonData.battleStats[stat] = Math.max(Math.min(pokemon.summonData.battleStats[stat] + levels.value, 6), -6);
|
pokemon.summonData.battleStats[stat] = Math.max(Math.min(pokemon.summonData.battleStats[stat] + levels.value, 6), -6);
|
||||||
|
|
||||||
|
if (levels.value > 0 && this.canBeCopied)
|
||||||
|
for (let opponent of pokemon.getOpponents())
|
||||||
|
applyAbAttrs(StatChangeCopyAbAttr, opponent, null, this.stats, levels.value);
|
||||||
|
|
||||||
applyPostStatChangeAbAttrs(PostStatChangeAbAttr, pokemon, filteredStats, this.levels, this.selfTarget);
|
applyPostStatChangeAbAttrs(PostStatChangeAbAttr, pokemon, filteredStats, this.levels, this.selfTarget);
|
||||||
|
|
||||||
pokemon.updateInfo();
|
pokemon.updateInfo();
|
||||||
|
|
||||||
handleTutorial(this.scene, Tutorial.Stat_Change).then(() => super.end());
|
handleTutorial(this.scene, Tutorial.Stat_Change).then(() => super.end());
|
||||||
@ -4344,7 +4350,7 @@ export class SelectModifierPhase extends BattlePhase {
|
|||||||
const isMoveModifier = modifierType instanceof PokemonMoveModifierType;
|
const isMoveModifier = modifierType instanceof PokemonMoveModifierType;
|
||||||
const isTmModifier = modifierType instanceof TmModifierType;
|
const isTmModifier = modifierType instanceof TmModifierType;
|
||||||
const isRememberMoveModifier = modifierType instanceof RememberMoveModifierType;
|
const isRememberMoveModifier = modifierType instanceof RememberMoveModifierType;
|
||||||
const isPpRestoreModifier = modifierType instanceof PokemonPpRestoreModifierType;
|
const isPpRestoreModifier = (modifierType instanceof PokemonPpRestoreModifierType || modifierType instanceof PokemonPpUpModifierType);
|
||||||
const partyUiMode = isMoveModifier ? PartyUiMode.MOVE_MODIFIER
|
const partyUiMode = isMoveModifier ? PartyUiMode.MOVE_MODIFIER
|
||||||
: isTmModifier ? PartyUiMode.TM_MODIFIER
|
: isTmModifier ? PartyUiMode.TM_MODIFIER
|
||||||
: isRememberMoveModifier ? PartyUiMode.REMEMBER_MOVE_MODIFIER
|
: isRememberMoveModifier ? PartyUiMode.REMEMBER_MOVE_MODIFIER
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
import BattleScene, { Button } from "../battle-scene";
|
import BattleScene, { Button, starterColors } from "../battle-scene";
|
||||||
import { Mode } from "./ui";
|
import { Mode } from "./ui";
|
||||||
import UiHandler from "./ui-handler";
|
import UiHandler from "./ui-handler";
|
||||||
import * as Utils from "../utils";
|
import * as Utils from "../utils";
|
||||||
import { PlayerPokemon } from "../field/pokemon";
|
import { PlayerPokemon } from "../field/pokemon";
|
||||||
|
import { default as PokemonSpecies, PokemonSpeciesForm, SpeciesFormKey, getFusedSpeciesName, getPokemonSpecies, getPokemonSpeciesForm, getStarterValueFriendshipCap, speciesStarters, starterPassiveAbilities } from '../data/pokemon-species';
|
||||||
|
import { argbFromRgba } from "@material/material-color-utilities";
|
||||||
import { Type, getTypeRgb } from "../data/type";
|
import { Type, getTypeRgb } from "../data/type";
|
||||||
import { TextStyle, addBBCodeTextObject, addTextObject, getBBCodeFrag, getTextColor } from "./text";
|
import { TextStyle, addBBCodeTextObject, addTextObject, getBBCodeFrag, getTextColor } from "./text";
|
||||||
import Move, { MoveCategory } from "../data/move";
|
import Move, { MoveCategory } from "../data/move";
|
||||||
@ -44,6 +46,9 @@ export default class SummaryUiHandler extends UiHandler {
|
|||||||
private genderText: Phaser.GameObjects.Text;
|
private genderText: Phaser.GameObjects.Text;
|
||||||
private shinyIcon: Phaser.GameObjects.Image;
|
private shinyIcon: Phaser.GameObjects.Image;
|
||||||
private fusionShinyIcon: Phaser.GameObjects.Image;
|
private fusionShinyIcon: Phaser.GameObjects.Image;
|
||||||
|
private candyShadow: Phaser.GameObjects.Sprite;
|
||||||
|
private candyIcon: Phaser.GameObjects.Sprite;
|
||||||
|
private candyOverlay: Phaser.GameObjects.Sprite;
|
||||||
private statusContainer: Phaser.GameObjects.Container;
|
private statusContainer: Phaser.GameObjects.Container;
|
||||||
private status: Phaser.GameObjects.Image;
|
private status: Phaser.GameObjects.Image;
|
||||||
private summaryPageContainer: Phaser.GameObjects.Container;
|
private summaryPageContainer: Phaser.GameObjects.Container;
|
||||||
@ -136,6 +141,20 @@ export default class SummaryUiHandler extends UiHandler {
|
|||||||
this.pokeball.setOrigin(0, 1);
|
this.pokeball.setOrigin(0, 1);
|
||||||
this.summaryContainer.add(this.pokeball);
|
this.summaryContainer.add(this.pokeball);
|
||||||
|
|
||||||
|
this.candyShadow = this.scene.add.sprite(13, -140, 'candy');
|
||||||
|
this.candyShadow.setTint(0x141414)
|
||||||
|
this.candyShadow.setScale(0.8);
|
||||||
|
this.candyShadow.setInteractive(new Phaser.Geom.Rectangle(0, 0, 16, 16), Phaser.Geom.Rectangle.Contains);
|
||||||
|
this.summaryContainer.add(this.candyShadow);
|
||||||
|
|
||||||
|
this.candyIcon = this.scene.add.sprite(13, -140, 'candy');
|
||||||
|
this.candyIcon.setScale(0.8);
|
||||||
|
this.summaryContainer.add(this.candyIcon);
|
||||||
|
|
||||||
|
this.candyOverlay = this.scene.add.sprite(13, -140, 'candy_overlay');
|
||||||
|
this.candyOverlay.setScale(0.8);
|
||||||
|
this.summaryContainer.add(this.candyOverlay);
|
||||||
|
|
||||||
this.levelText = addTextObject(this.scene, 36, -17, '', TextStyle.SUMMARY_ALT);
|
this.levelText = addTextObject(this.scene, 36, -17, '', TextStyle.SUMMARY_ALT);
|
||||||
this.levelText.setOrigin(0, 1);
|
this.levelText.setOrigin(0, 1);
|
||||||
this.summaryContainer.add(this.levelText);
|
this.summaryContainer.add(this.levelText);
|
||||||
@ -222,6 +241,10 @@ export default class SummaryUiHandler extends UiHandler {
|
|||||||
|
|
||||||
this.shinyOverlay.setVisible(this.pokemon.isShiny());
|
this.shinyOverlay.setVisible(this.pokemon.isShiny());
|
||||||
|
|
||||||
|
const colorScheme = starterColors[this.pokemon.species.getRootSpeciesId()];
|
||||||
|
this.candyIcon.setTint(argbFromRgba(Utils.rgbHexToRgba(colorScheme[0])));
|
||||||
|
this.candyOverlay.setTint(argbFromRgba(Utils.rgbHexToRgba(colorScheme[1])));
|
||||||
|
|
||||||
this.numberText.setText(Utils.padInt(this.pokemon.species.speciesId, 4));
|
this.numberText.setText(Utils.padInt(this.pokemon.species.speciesId, 4));
|
||||||
this.numberText.setColor(this.getTextColor(!this.pokemon.isShiny() ? TextStyle.SUMMARY : TextStyle.SUMMARY_GOLD));
|
this.numberText.setColor(this.getTextColor(!this.pokemon.isShiny() ? TextStyle.SUMMARY : TextStyle.SUMMARY_GOLD));
|
||||||
this.numberText.setShadowColor(this.getTextColor(!this.pokemon.isShiny() ? TextStyle.SUMMARY : TextStyle.SUMMARY_GOLD, true));
|
this.numberText.setShadowColor(this.getTextColor(!this.pokemon.isShiny() ? TextStyle.SUMMARY : TextStyle.SUMMARY_GOLD, true));
|
||||||
@ -251,6 +274,21 @@ export default class SummaryUiHandler extends UiHandler {
|
|||||||
this.splicedIcon.on('pointerout', () => (this.scene as BattleScene).ui.hideTooltip());
|
this.splicedIcon.on('pointerout', () => (this.scene as BattleScene).ui.hideTooltip());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var currentFriendship = this.scene.gameData.starterData[this.pokemon.species.getRootSpeciesId()].friendship;
|
||||||
|
if (!currentFriendship || currentFriendship === undefined)
|
||||||
|
currentFriendship = 0;
|
||||||
|
|
||||||
|
const friendshipCap = getStarterValueFriendshipCap(speciesStarters[this.pokemon.species.getRootSpeciesId()]);
|
||||||
|
const candyCropY = 16 - (16 * (currentFriendship / friendshipCap));
|
||||||
|
|
||||||
|
if (this.candyShadow.visible) {
|
||||||
|
this.candyShadow.on('pointerover', () => (this.scene as BattleScene).ui.showTooltip(null, `${currentFriendship}/${friendshipCap}`, true));
|
||||||
|
this.candyShadow.on('pointerout', () => (this.scene as BattleScene).ui.hideTooltip());
|
||||||
|
}
|
||||||
|
|
||||||
|
this.candyIcon.setCrop(0,candyCropY,16, 16);
|
||||||
|
this.candyOverlay.setCrop(0,candyCropY,16, 16);
|
||||||
|
|
||||||
const doubleShiny = isFusion && this.pokemon.shiny && this.pokemon.fusionShiny;
|
const doubleShiny = isFusion && this.pokemon.shiny && this.pokemon.fusionShiny;
|
||||||
const baseVariant = !doubleShiny ? this.pokemon.getVariant() : this.pokemon.variant;
|
const baseVariant = !doubleShiny ? this.pokemon.getVariant() : this.pokemon.variant;
|
||||||
|
|
||||||
|