[Hotfix] Prevent more Future Sight crash with new catches (#4910)
This commit is contained in:
parent
dd904fe782
commit
0c920ba195
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "pokemon-rogue-battle",
|
||||
"version": "1.2.1",
|
||||
"version": "1.2.2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "pokemon-rogue-battle",
|
||||
"version": "1.2.1",
|
||||
"version": "1.2.2",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"@material/material-color-utilities": "^0.2.7",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "pokemon-rogue-battle",
|
||||
"private": true,
|
||||
"version": "1.2.1",
|
||||
"version": "1.2.2",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"start": "vite",
|
||||
|
|
|
@ -96,6 +96,14 @@ export class MoveEffectPhase extends PokemonPhase {
|
|||
if (!isDelayedAttack) {
|
||||
return super.end();
|
||||
} else {
|
||||
if (!user.scene) {
|
||||
/**
|
||||
* This happens if the Pokemon that used the delayed attack gets caught and released
|
||||
* on the turn the attack would have triggered. Having access to the global scene
|
||||
* in the future may solve this entirely, so for now we just cancel the hit
|
||||
*/
|
||||
return super.end();
|
||||
}
|
||||
user.resetTurnData();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue