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

[Move] Fully implement Rage #3667

Open
wants to merge 23 commits into
base: beta
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
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
26 changes: 26 additions & 0 deletions src/data/battler-tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,30 @@ export class ShellTrapTag extends BattlerTag {
}
}

export class RageTag extends BattlerTag {
ElizaAlex marked this conversation as resolved.
Show resolved Hide resolved
constructor() {
super(BattlerTagType.RAGE,[BattlerTagLapseType.MOVE_EFFECT],1,Moves.RAGE);
}
onAdd(pokemon: Pokemon) {
super.onAdd(pokemon);
/* This message might not exist on cartridge */
pokemon.scene.queueMessage(i18next.t("battlerTags:rageOnAdd", {
pokemonNameWithAffix: getPokemonNameWithAffix(pokemon)}));
}

lapse(pokemon: Pokemon, lapseType: BattlerTagLapseType): boolean {
if (lapseType === BattlerTagLapseType.MOVE_EFFECT) {
return (pokemon.scene.getCurrentPhase() as MovePhase).move.getMove().id === Moves.RAGE;
} else if (lapseType === BattlerTagLapseType.CUSTOM) {
pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [BattleStat.ATK], 1, false));
pokemon.scene.queueMessage(i18next.t("battlerTags:rageOnHit", {
pokemonNameWithAffix: getPokemonNameWithAffix(pokemon)}));
return true;
}
return false;
}
}

export class TrappedTag extends BattlerTag {
constructor(tagType: BattlerTagType, lapseType: BattlerTagLapseType, turnCount: number, sourceMove: Moves, sourceId: number) {
super(tagType, lapseType, turnCount, sourceMove, sourceId);
Expand Down Expand Up @@ -1962,6 +1986,8 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: number, source
case BattlerTagType.GULP_MISSILE_ARROKUDA:
case BattlerTagType.GULP_MISSILE_PIKACHU:
return new GulpMissileTag(tagType, sourceMove);
case BattlerTagType.RAGE:
return new RageTag();
case BattlerTagType.NONE:
default:
return new BattlerTag(tagType, BattlerTagLapseType.CUSTOM, turnCount, sourceMove, sourceId);
Expand Down
2 changes: 1 addition & 1 deletion src/data/move.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6450,7 +6450,7 @@ export function initMoves() {
.attr(StatChangeAttr, BattleStat.SPD, 2, true),
new AttackMove(Moves.QUICK_ATTACK, Type.NORMAL, MoveCategory.PHYSICAL, 40, 100, 30, -1, 1, 1),
new AttackMove(Moves.RAGE, Type.NORMAL, MoveCategory.PHYSICAL, 20, 100, 20, -1, 0, 1)
.partial(),
.attr(AddBattlerTagAttr, BattlerTagType.RAGE, true, false, 0, 0, false, true),
new SelfStatusMove(Moves.TELEPORT, Type.PSYCHIC, -1, 20, -1, -6, 1)
.attr(ForceSwitchOutAttr, true)
.hidesUser(),
Expand Down
3 changes: 2 additions & 1 deletion src/enums/battler-tag-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,6 @@ export enum BattlerTagType {
GULP_MISSILE_ARROKUDA = "GULP_MISSILE_ARROKUDA",
GULP_MISSILE_PIKACHU = "GULP_MISSILE_PIKACHU",
BEAK_BLAST_CHARGING = "BEAK_BLAST_CHARGING",
SHELL_TRAP = "SHELL_TRAP"
SHELL_TRAP = "SHELL_TRAP",
RAGE = "RAGE"
}
2 changes: 2 additions & 0 deletions src/locales/de/battler-tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,6 @@ export const battlerTags: SimpleTranslationEntries = {
"cursedOnAdd": "{{pokemonNameWithAffix}} nimmt einen Teil seiner KP und legt einen Fluch auf {{pokemonName}}!",
"cursedLapse": "{{pokemonNameWithAffix}} wurde durch den Fluch verletzt!",
"stockpilingOnAdd": "{{pokemonNameWithAffix}} stockpiled {{stockpiledCount}}!",
"rageOnAdd": "{{pokemonNameWithAffix}}'s rage is starting to build.",
"rageOnHit": "{{pokemonNameWithAffix}}'s rage is building."
} as const;
2 changes: 2 additions & 0 deletions src/locales/en/battler-tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,6 @@ export const battlerTags: SimpleTranslationEntries = {
"cursedOnAdd": "{{pokemonNameWithAffix}} cut its own HP and put a curse on the {{pokemonName}}!",
"cursedLapse": "{{pokemonNameWithAffix}} is afflicted by the Curse!",
"stockpilingOnAdd": "{{pokemonNameWithAffix}} stockpiled {{stockpiledCount}}!",
"rageOnAdd": "{{pokemonNameWithAffix}}'s rage is starting to build.",
"rageOnHit": "{{pokemonNameWithAffix}}'s rage is building."
} as const;
2 changes: 2 additions & 0 deletions src/locales/es/battler-tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,6 @@ export const battlerTags: SimpleTranslationEntries = {
"cursedOnAdd": "{{pokemonNameWithAffix}} cut its own HP and put a curse on the {{pokemonName}}!",
"cursedLapse": "{{pokemonNameWithAffix}} is afflicted by the Curse!",
"stockpilingOnAdd": "{{pokemonNameWithAffix}} stockpiled {{stockpiledCount}}!",
"rageOnAdd": "{{pokemonNameWithAffix}}'s rage is starting to build.",
"rageOnHit": "{{pokemonNameWithAffix}}'s rage is building.",
ElizaAlex marked this conversation as resolved.
Show resolved Hide resolved
} as const;
2 changes: 2 additions & 0 deletions src/locales/fr/battler-tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,6 @@ export const battlerTags: SimpleTranslationEntries = {
"cursedOnAdd": "{{pokemonNameWithAffix}} sacrifie des PV\net lance une malédiction sur {{pokemonName}} !",
"cursedLapse": "{{pokemonNameWithAffix}} est touché par la malédiction !",
"stockpilingOnAdd": "{{pokemonNameWithAffix}} utilise\nla capacité Stockage {{stockpiledCount}} fois !",
"rageOnAdd": "La Frénésie s’empare\nde {{pokemonNameWithAffix}} !",
"rageOnHit": "La Frénésie de {{pokemonNameWithAffix}}\naugmente !"
} as const;
2 changes: 2 additions & 0 deletions src/locales/it/battler-tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,6 @@ export const battlerTags: SimpleTranslationEntries = {
"cursedOnAdd": "{{pokemonNameWithAffix}} ha sacrificato metà dei suoi PS per\nlanciare una maledizione su {{pokemonName}}!",
"cursedLapse": "{{pokemonNameWithAffix}} subisce la maledizione!",
"stockpilingOnAdd": "{{pokemonNameWithAffix}} ha usato Accumulo per la\n{{stockpiledCount}}ª volta!",
"rageOnAdd": "{{pokemonNameWithAffix}} comincia ad accumulare ira!",
"rageOnHit": "L’ira di {{pokemonNameWithAffix}} aumenta!"
} as const;
2 changes: 2 additions & 0 deletions src/locales/ja/battler-tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,6 @@ export const battlerTags: SimpleTranslationEntries = {
"cursedOnAdd": "{{pokemonNameWithAffix}}は 自分の 体力を 削って\n{{pokemonName}}に のろいを かけた!",
"cursedLapse": "{{pokemonNameWithAffix}}は のろわれている!",
"stockpilingOnAdd": "{{pokemonNameWithAffix}}は {{stockpiledCount}}つ たくわえた!",
"rageOnAdd": "{{pokemonNameWithAffix}}'s rage is starting to build.",
"rageOnHit": "{{pokemonNameWithAffix}}'s rage is building."
} as const;
2 changes: 2 additions & 0 deletions src/locales/ko/battler-tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,6 @@ export const battlerTags: SimpleTranslationEntries = {
"cursedOnAdd": "{{pokemonNameWithAffix}}[[는]] 자신의 체력을 깎아서\n{{pokemonName}}에게 저주를 걸었다!",
"cursedLapse": "{{pokemonNameWithAffix}}[[는]]\n저주받고 있다!",
"stockpilingOnAdd": "{{pokemonNameWithAffix}}[[는]]\n{{stockpiledCount}}개 비축했다!",
"rageOnAdd": "{{pokemonNameWithAffix}}'s rage is starting to build.",
"rageOnHit": "{{pokemonNameWithAffix}}'s rage is building."
ElizaAlex marked this conversation as resolved.
Show resolved Hide resolved
} as const;
2 changes: 2 additions & 0 deletions src/locales/pt_BR/battler-tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,6 @@ export const battlerTags: SimpleTranslationEntries = {
"cursedOnAdd": "{{pokemonNameWithAffix}} cortou seus PS pela metade e amaldiçoou {{pokemonName}}!",
"cursedLapse": "{{pokemonNameWithAffix}} foi ferido pelo Curse!",
"stockpilingOnAdd": "{{pokemonNameWithAffix}} estocou {{stockpiledCount}}!",
"rageOnAdd": "A raiva de {{pokemonNameWithAffix}} está começando a aumentar.",
"rageOnHit": "A raiva de {{pokemonNameWithAffix}} está aumentando."
} as const;
2 changes: 2 additions & 0 deletions src/locales/zh_CN/battler-tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,6 @@ export const battlerTags: SimpleTranslationEntries = {
"cursedOnAdd": "{{pokemonNameWithAffix}}削减了自己的体力,\n并诅咒了{{pokemonName}}!",
"cursedLapse": "{{pokemonNameWithAffix}}\n正受到诅咒!",
"stockpilingOnAdd": "{{pokemonNameWithAffix}}蓄力了{{stockpiledCount}}次!",
"rageOnAdd": "{{pokemonNameWithAffix}}'s rage is starting to build.",
"rageOnHit": "{{pokemonNameWithAffix}}'s rage is building."
ElizaAlex marked this conversation as resolved.
Show resolved Hide resolved
} as const;
2 changes: 2 additions & 0 deletions src/locales/zh_TW/battler-tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,6 @@ export const battlerTags: SimpleTranslationEntries = {
"cursedOnAdd": "{{pokemonNameWithAffix}}削減了自己的體力,並詛咒了{{pokemonName}}!",
"cursedLapse": "{{pokemonNameWithAffix}}正受到詛咒!",
"stockpilingOnAdd": "{{pokemonNameWithAffix}} stockpiled {{stockpiledCount}}!",
"rageOnAdd": "{{pokemonNameWithAffix}}'s rage is starting to build.",
"rageOnHit": "{{pokemonNameWithAffix}}'s rage is building."
ElizaAlex marked this conversation as resolved.
Show resolved Hide resolved
} as const;
3 changes: 3 additions & 0 deletions src/phases/move-effect-phase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,9 @@ export class MoveEffectPhase extends PokemonPhase {
if (move.category === MoveCategory.PHYSICAL && user.isPlayer() !== target.isPlayer()) {
target.lapseTag(BattlerTagType.SHELL_TRAP);
}
if (hitResult < HitResult.NO_EFFECT && move.category !== MoveCategory.STATUS) {
target.lapseTag(BattlerTagType.RAGE);
}
if (!user.isPlayer() && this.move.getMove() instanceof AttackMove) {
user.scene.applyShuffledModifiers(this.scene, EnemyAttackStatusEffectChanceModifier, false, target);
}
Expand Down
Loading
Loading