mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-16 21:32:18 +02:00
Make the move fail in boss battles
This commit is contained in:
parent
727db35c7a
commit
8343426110
@ -4261,9 +4261,14 @@ export class DestinyBondAttr extends MoveEffectAttr {
|
|||||||
* @param {Pokemon} target N/A
|
* @param {Pokemon} target N/A
|
||||||
* @param {Move} move {@linkcode Move.DESTINY_BOND}
|
* @param {Move} move {@linkcode Move.DESTINY_BOND}
|
||||||
* @param {any[]} args N/A
|
* @param {any[]} args N/A
|
||||||
* @returns true
|
* @returns false in boss battle, true otherwise
|
||||||
*/
|
*/
|
||||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||||
|
if (user.scene.getField().some(p => p.isBossImmune())) {
|
||||||
|
user.scene.queueMessage('But it failed!');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
user.scene.queueMessage(`${getPokemonMessage(user, ' is trying\nto take its foe down with it!')}`);
|
user.scene.queueMessage(`${getPokemonMessage(user, ' is trying\nto take its foe down with it!')}`);
|
||||||
user.addTag(BattlerTagType.DESTINY_BOND, undefined, move.id, user.id);
|
user.addTag(BattlerTagType.DESTINY_BOND, undefined, move.id, user.id);
|
||||||
return true;
|
return true;
|
||||||
@ -4964,8 +4969,7 @@ export function initMoves() {
|
|||||||
.unimplemented(),
|
.unimplemented(),
|
||||||
new SelfStatusMove(Moves.DESTINY_BOND, Type.GHOST, -1, 5, -1, 0, 2)
|
new SelfStatusMove(Moves.DESTINY_BOND, Type.GHOST, -1, 5, -1, 0, 2)
|
||||||
.ignoresProtect()
|
.ignoresProtect()
|
||||||
.attr(DestinyBondAttr)
|
.attr(DestinyBondAttr),
|
||||||
.condition(failOnBossCondition),
|
|
||||||
new StatusMove(Moves.PERISH_SONG, Type.NORMAL, -1, 5, -1, 0, 2)
|
new StatusMove(Moves.PERISH_SONG, Type.NORMAL, -1, 5, -1, 0, 2)
|
||||||
.attr(FaintCountdownAttr)
|
.attr(FaintCountdownAttr)
|
||||||
.ignoresProtect()
|
.ignoresProtect()
|
||||||
|
Loading…
Reference in New Issue
Block a user