mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-26 01:09:29 +02:00
One last beta push for tonight
This commit is contained in:
commit
cbc17bb92a
@ -1163,12 +1163,12 @@ export class FixedDamageAttr extends MoveAttr {
|
||||
}
|
||||
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||
(args[0] as Utils.IntegerHolder).value = this.getDamage(user, target, move, args[1], args[2]);
|
||||
(args[0] as Utils.IntegerHolder).value = this.getDamage(user, target, move);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
getDamage(user: Pokemon, target: Pokemon, move: Move, extra1?: any, extra2?: any): integer {
|
||||
getDamage(user: Pokemon, target: Pokemon, move: Move): integer {
|
||||
return this.damage;
|
||||
}
|
||||
}
|
||||
@ -1269,7 +1269,7 @@ export class RandomLevelDamageAttr extends FixedDamageAttr {
|
||||
if (isHigh) {
|
||||
return Utils.toDmgValue(user.level * 1.5);
|
||||
}
|
||||
return Utils.toDmgValue(user.level * (user.randSeedIntRange(50, 150, "Random damage") * 0.01));
|
||||
return Utils.toDmgValue(user.level * (user.randSeedIntRange(50, 150, "Random Damage") * 0.01));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1980,13 +1980,6 @@ export class StatusEffectAttr extends MoveEffectAttr {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (user !== target && target.scene.arena.getTagOnSide(ArenaTagType.SAFEGUARD, target.isPlayer() ? ArenaTagSide.PLAYER : ArenaTagSide.ENEMY)) {
|
||||
if (move.category === MoveCategory.STATUS) {
|
||||
user.scene.queueMessage(i18next.t("moveTriggers:safeguard", { targetName: getPokemonNameWithAffix(target)}));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if ((!pokemon.status || (pokemon.status.effect === this.effect && moveChance < 0))
|
||||
&& pokemon.trySetStatus(this.effect, true, user, this.cureTurn)) {
|
||||
applyPostAttackAbAttrs(ConfusionOnStatusEffectAbAttr, user, target, move, null, false, this.effect);
|
||||
@ -4717,17 +4710,6 @@ export class ConfuseAttr extends AddBattlerTagAttr {
|
||||
constructor(selfTarget?: boolean) {
|
||||
super(BattlerTagType.CONFUSED, selfTarget, false, 2, 5);
|
||||
}
|
||||
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||
if (!this.selfTarget && target.scene.arena.getTagOnSide(ArenaTagType.SAFEGUARD, target.isPlayer() ? ArenaTagSide.PLAYER : ArenaTagSide.ENEMY)) {
|
||||
if (move.category === MoveCategory.STATUS) {
|
||||
user.scene.queueMessage(i18next.t("moveTriggers:safeguard", { targetName: getPokemonNameWithAffix(target)}));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
return super.apply(user, target, move, args);
|
||||
}
|
||||
}
|
||||
|
||||
export class RechargeAttr extends AddBattlerTagAttr {
|
||||
@ -6106,57 +6088,6 @@ export class DestinyBondAttr extends MoveEffectAttr {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Attribute to apply a battler tag to the target if they have had their stats boosted this turn.
|
||||
* @extends AddBattlerTagAttr
|
||||
*/
|
||||
export class AddBattlerTagIfBoostedAttr extends AddBattlerTagAttr {
|
||||
constructor(tag: BattlerTagType) {
|
||||
super(tag, false, false, 2, 5);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param user {@linkcode Pokemon} using this move
|
||||
* @param target {@linkcode Pokemon} target of this move
|
||||
* @param move {@linkcode Move} being used
|
||||
* @param {any[]} args N/A
|
||||
* @returns true
|
||||
*/
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||
if (target.turnData.battleStatsIncreased) {
|
||||
super.apply(user, target, move, args);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Attribute to apply a status effect to the target if they have had their stats boosted this turn.
|
||||
* @extends MoveEffectAttr
|
||||
*/
|
||||
export class StatusIfBoostedAttr extends MoveEffectAttr {
|
||||
public effect: StatusEffect;
|
||||
|
||||
constructor(effect: StatusEffect) {
|
||||
super(true, MoveEffectTrigger.HIT);
|
||||
this.effect = effect;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param user {@linkcode Pokemon} using this move
|
||||
* @param target {@linkcode Pokemon} target of this move
|
||||
* @param move {@linkcode Move} N/A
|
||||
* @param {any[]} args N/A
|
||||
* @returns true
|
||||
*/
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||
if (target.turnData.battleStatsIncreased) {
|
||||
target.trySetStatus(this.effect, true, user);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
export class LastResortAttr extends MoveAttr {
|
||||
getCondition(): MoveConditionFunc {
|
||||
return (user: Pokemon, target: Pokemon, move: Move) => {
|
||||
@ -7083,7 +7014,7 @@ export function initMoves() {
|
||||
.attr(FriendshipPowerAttr, true),
|
||||
new StatusMove(Moves.SAFEGUARD, Type.NORMAL, -1, 25, -1, 0, 2)
|
||||
.target(MoveTarget.USER_SIDE)
|
||||
.attr(AddArenaTagAttr, ArenaTagType.SAFEGUARD, 5, true, true),
|
||||
.unimplemented(),
|
||||
new StatusMove(Moves.PAIN_SPLIT, Type.NORMAL, -1, 20, -1, 0, 2)
|
||||
.attr(HpSplitAttr)
|
||||
.condition(failOnBossCondition),
|
||||
@ -7272,7 +7203,7 @@ export function initMoves() {
|
||||
.attr(RemoveScreensAttr),
|
||||
new StatusMove(Moves.YAWN, Type.NORMAL, -1, 10, -1, 0, 3)
|
||||
.attr(AddBattlerTagAttr, BattlerTagType.DROWSY, false, true)
|
||||
.condition((user, target, move) => !target.status && !target.scene.arena.getTagOnSide(ArenaTagType.SAFEGUARD, target.isPlayer() ? ArenaTagSide.PLAYER : ArenaTagSide.ENEMY)),
|
||||
.condition((user, target, move) => !target.status),
|
||||
new AttackMove(Moves.KNOCK_OFF, Type.DARK, MoveCategory.PHYSICAL, 65, 100, 20, -1, 0, 3)
|
||||
.attr(MovePowerMultiplierAttr, (user, target, move) => target.getHeldItems().filter(i => i.isTransferrable).length > 0 ? 1.5 : 1)
|
||||
.attr(RemoveHeldItemAttr, false),
|
||||
@ -8622,7 +8553,7 @@ export function initMoves() {
|
||||
.partial(),
|
||||
new SelfStatusMove(Moves.NO_RETREAT, Type.FIGHTING, -1, 5, -1, 0, 8)
|
||||
.attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.DEF, BattleStat.SPATK, BattleStat.SPDEF, BattleStat.SPD ], 1, true)
|
||||
.attr(AddBattlerTagAttr, BattlerTagType.NO_RETREAT, true, false)
|
||||
.attr(AddBattlerTagAttr, BattlerTagType.TRAPPED, true, false, 1)
|
||||
.condition((user, target, move) => user.getTag(TrappedTag)?.sourceMove !== Moves.NO_RETREAT), // fails if the user is currently trapped by No Retreat
|
||||
new StatusMove(Moves.TAR_SHOT, Type.ROCK, 100, 15, -1, 0, 8)
|
||||
.attr(StatChangeAttr, BattleStat.SPD, -1)
|
||||
@ -8814,10 +8745,10 @@ export function initMoves() {
|
||||
new AttackMove(Moves.SKITTER_SMACK, Type.BUG, MoveCategory.PHYSICAL, 70, 90, 10, 100, 0, 8)
|
||||
.attr(StatChangeAttr, BattleStat.SPATK, -1),
|
||||
new AttackMove(Moves.BURNING_JEALOUSY, Type.FIRE, MoveCategory.SPECIAL, 70, 100, 5, 100, 0, 8)
|
||||
.attr(StatusIfBoostedAttr, StatusEffect.BURN)
|
||||
.target(MoveTarget.ALL_NEAR_ENEMIES),
|
||||
.target(MoveTarget.ALL_NEAR_ENEMIES)
|
||||
.partial(),
|
||||
new AttackMove(Moves.LASH_OUT, Type.DARK, MoveCategory.PHYSICAL, 75, 100, 5, -1, 0, 8)
|
||||
.attr(MovePowerMultiplierAttr, (user, target, move) => user.turnData.battleStatsDecreased ? 2 : 1),
|
||||
.partial(),
|
||||
new AttackMove(Moves.POLTERGEIST, Type.GHOST, MoveCategory.PHYSICAL, 110, 90, 5, -1, 0, 8)
|
||||
.attr(AttackedByItemAttr)
|
||||
.makesContact(false),
|
||||
@ -9263,11 +9194,12 @@ export function initMoves() {
|
||||
new AttackMove(Moves.HARD_PRESS, Type.STEEL, MoveCategory.PHYSICAL, -1, 100, 10, -1, 0, 9)
|
||||
.attr(OpponentHighHpPowerAttr, 100),
|
||||
new StatusMove(Moves.DRAGON_CHEER, Type.DRAGON, -1, 15, -1, 0, 9)
|
||||
.attr(AddBattlerTagAttr, BattlerTagType.DRAGON_CHEER, false, true)
|
||||
.target(MoveTarget.NEAR_ALLY),
|
||||
.attr(AddBattlerTagAttr, BattlerTagType.CRIT_BOOST, false, true)
|
||||
.target(MoveTarget.NEAR_ALLY)
|
||||
.partial(),
|
||||
new AttackMove(Moves.ALLURING_VOICE, Type.FAIRY, MoveCategory.SPECIAL, 80, 100, 10, -1, 0, 9)
|
||||
.attr(AddBattlerTagIfBoostedAttr, BattlerTagType.CONFUSED)
|
||||
.soundBased(),
|
||||
.soundBased()
|
||||
.partial(),
|
||||
new AttackMove(Moves.TEMPER_FLARE, Type.FIRE, MoveCategory.PHYSICAL, 75, 100, 10, -1, 0, 9)
|
||||
.attr(MovePowerMultiplierAttr, (user, target, move) => user.getLastXMoves(2)[1]?.result === MoveResult.MISS || user.getLastXMoves(2)[1]?.result === MoveResult.FAIL ? 2 : 1),
|
||||
new AttackMove(Moves.SUPERCELL_SLAM, Type.ELECTRIC, MoveCategory.PHYSICAL, 100, 95, 15, -1, 0, 9)
|
||||
@ -9290,4 +9222,4 @@ export function initMoves() {
|
||||
selfStatLowerMoves.push(m.id);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -14,6 +14,8 @@ import { GachaType } from "#app/enums/gacha-types";
|
||||
import i18next from "i18next";
|
||||
import { EggTier } from "#enums/egg-type";
|
||||
|
||||
const showFuture: boolean = true;
|
||||
|
||||
export default class EggGachaUiHandler extends MessageUiHandler {
|
||||
private eggGachaContainer: Phaser.GameObjects.Container;
|
||||
private eggGachaMessageBox: Phaser.GameObjects.NineSlice;
|
||||
@ -145,7 +147,23 @@ export default class EggGachaUiHandler extends MessageUiHandler {
|
||||
pokemonIcon.setScale(0.5);
|
||||
pokemonIcon.setOrigin(0, 0.5);
|
||||
|
||||
const pokemonIcon_3 = this.scene.add.sprite(5, pokemonIconY + 13, "pokemon_icons_0");
|
||||
const pokemonIcon_2 = this.scene.add.sprite(-7, pokemonIconY + 15, "pokemon_icons_0");
|
||||
const pokemonIcon_1 = this.scene.add.sprite(-19, pokemonIconY + 13, "pokemon_icons_0");
|
||||
pokemonIcon_1.setScale(0.4);
|
||||
pokemonIcon_1.setOrigin(0, 0.5);
|
||||
pokemonIcon_1.setVisible(showFuture);
|
||||
pokemonIcon_2.setScale(0.4);
|
||||
pokemonIcon_2.setOrigin(0, 0.5);
|
||||
pokemonIcon_2.setVisible(showFuture);
|
||||
pokemonIcon_3.setScale(0.4);
|
||||
pokemonIcon_3.setOrigin(0, 0.5);
|
||||
pokemonIcon_3.setVisible(showFuture);
|
||||
|
||||
gachaInfoContainer.add(pokemonIcon);
|
||||
gachaInfoContainer.add(pokemonIcon_1);
|
||||
gachaInfoContainer.add(pokemonIcon_2);
|
||||
gachaInfoContainer.add(pokemonIcon_3);
|
||||
break;
|
||||
case GachaType.MOVE:
|
||||
if (["de", "es", "fr", "pt-BR"].includes(currentLanguage)) {
|
||||
@ -547,13 +565,21 @@ export default class EggGachaUiHandler extends MessageUiHandler {
|
||||
const infoContainer = this.gachaInfoContainers[gachaType];
|
||||
switch (gachaType as GachaType) {
|
||||
case GachaType.LEGENDARY:
|
||||
const species = getPokemonSpecies(getLegendaryGachaSpeciesForTimestamp(this.scene, new Date().getTime()));
|
||||
const pokemonIcon = infoContainer.getAt(1) as Phaser.GameObjects.Sprite;
|
||||
pokemonIcon.setTexture(species.getIconAtlasKey(), species.getIconId(false));
|
||||
break;
|
||||
this.updateGachaIcon(infoContainer)
|
||||
if (showFuture) {
|
||||
this.updateGachaIcon(infoContainer, 1)
|
||||
this.updateGachaIcon(infoContainer, 2)
|
||||
this.updateGachaIcon(infoContainer, 3)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
updateGachaIcon(infoContainer: Phaser.GameObjects.Container, offset: integer = 0): void {
|
||||
const species = getPokemonSpecies(getLegendaryGachaSpeciesForTimestamp(this.scene, new Date().getTime() + offset*86400000));
|
||||
const pokemonIcon = infoContainer.getAt(1 + offset) as Phaser.GameObjects.Sprite;
|
||||
pokemonIcon.setTexture(species.getIconAtlasKey(), species.getIconId(false));
|
||||
}
|
||||
|
||||
consumeVouchers(voucherType: VoucherType, count: integer): void {
|
||||
this.scene.gameData.voucherCounts[voucherType] = Math.max(this.scene.gameData.voucherCounts[voucherType] - count, 0);
|
||||
this.updateVoucherCounts();
|
||||
|
Loading…
Reference in New Issue
Block a user