mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 15:32:18 +02:00
Initial push with roost fix
This commit is contained in:
parent
af4e9ff66e
commit
1c077d1506
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "pokemon-rogue-battle",
|
"name": "pokemon-rogue-battle",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "pokemon-rogue-battle",
|
"name": "pokemon-rogue-battle",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@material/material-color-utilities": "^0.2.7",
|
"@material/material-color-utilities": "^0.2.7",
|
||||||
"crypto-js": "^4.2.0",
|
"crypto-js": "^4.2.0",
|
||||||
|
@ -1094,6 +1094,8 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: integer, sourc
|
|||||||
return new BattlerTag(BattlerTagType.BYPASS_SLEEP, BattlerTagLapseType.TURN_END, turnCount, sourceMove);
|
return new BattlerTag(BattlerTagType.BYPASS_SLEEP, BattlerTagLapseType.TURN_END, turnCount, sourceMove);
|
||||||
case BattlerTagType.IGNORE_FLYING:
|
case BattlerTagType.IGNORE_FLYING:
|
||||||
return new BattlerTag(tagType, BattlerTagLapseType.TURN_END, turnCount, sourceMove);
|
return new BattlerTag(tagType, BattlerTagLapseType.TURN_END, turnCount, sourceMove);
|
||||||
|
case BattlerTagType.GROUNDED:
|
||||||
|
return new BattlerTag(tagType, BattlerTagLapseType.TURN_END, turnCount - 1, sourceMove);
|
||||||
case BattlerTagType.SALT_CURED:
|
case BattlerTagType.SALT_CURED:
|
||||||
return new SaltCuredTag(sourceId);
|
return new SaltCuredTag(sourceId);
|
||||||
case BattlerTagType.NONE:
|
case BattlerTagType.NONE:
|
||||||
|
@ -47,5 +47,6 @@ export enum BattlerTagType {
|
|||||||
IGNORE_ACCURACY = "IGNORE_ACCURACY",
|
IGNORE_ACCURACY = "IGNORE_ACCURACY",
|
||||||
BYPASS_SLEEP = "BYPASS_SLEEP",
|
BYPASS_SLEEP = "BYPASS_SLEEP",
|
||||||
IGNORE_FLYING = "IGNORE_FLYING",
|
IGNORE_FLYING = "IGNORE_FLYING",
|
||||||
|
GROUNDED = "GROUNDED",
|
||||||
SALT_CURED = "SALT_CURED"
|
SALT_CURED = "SALT_CURED"
|
||||||
}
|
}
|
||||||
|
@ -4315,7 +4315,7 @@ export function initMoves() {
|
|||||||
.attr(StatChangeAttr, BattleStat.SPATK, -2, true),
|
.attr(StatChangeAttr, BattleStat.SPATK, -2, true),
|
||||||
new SelfStatusMove(Moves.ROOST, "Roost", Type.FLYING, -1, 5, "The user lands and rests its body. This move restores the user's HP by up to half of its max HP.", -1, 0, 4)
|
new SelfStatusMove(Moves.ROOST, "Roost", Type.FLYING, -1, 5, "The user lands and rests its body. This move restores the user's HP by up to half of its max HP.", -1, 0, 4)
|
||||||
.attr(HealAttr, 0.5)
|
.attr(HealAttr, 0.5)
|
||||||
.attr(AddBattlerTagAttr, BattlerTagType.IGNORE_FLYING, true, false, 1)
|
.attr(AddBattlerTagAttr, BattlerTagType.GROUNDED, true, false, 1)
|
||||||
.triageMove(),
|
.triageMove(),
|
||||||
new StatusMove(Moves.GRAVITY, "Gravity", Type.PSYCHIC, -1, 5, "This move enables Flying-type Pokémon or Pokémon with the Levitate Ability to be hit by Ground-type moves. Moves that involve flying can't be used.", -1, 0, 4)
|
new StatusMove(Moves.GRAVITY, "Gravity", Type.PSYCHIC, -1, 5, "This move enables Flying-type Pokémon or Pokémon with the Levitate Ability to be hit by Ground-type moves. Moves that involve flying can't be used.", -1, 0, 4)
|
||||||
.attr(AddArenaTagAttr, ArenaTagType.GRAVITY, 5)
|
.attr(AddArenaTagAttr, ArenaTagType.GRAVITY, 5)
|
||||||
|
@ -698,6 +698,12 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
types.splice(flyingIndex, 1);
|
types.splice(flyingIndex, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (forDefend && (this.getTag(BattlerTagType.GROUNDED) || this.scene.arena.getTag(ArenaTagType.GRAVITY))) {
|
||||||
|
const flyingIndex = types.indexOf(Type.FLYING);
|
||||||
|
if (flyingIndex > -1)
|
||||||
|
types.splice(flyingIndex, 1);
|
||||||
|
}
|
||||||
|
|
||||||
if (!types.length)
|
if (!types.length)
|
||||||
types.push(Type.NORMAL);
|
types.push(Type.NORMAL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user