[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",
|
"name": "pokemon-rogue-battle",
|
||||||
"version": "1.2.1",
|
"version": "1.2.2",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "pokemon-rogue-battle",
|
"name": "pokemon-rogue-battle",
|
||||||
"version": "1.2.1",
|
"version": "1.2.2",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@material/material-color-utilities": "^0.2.7",
|
"@material/material-color-utilities": "^0.2.7",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "pokemon-rogue-battle",
|
"name": "pokemon-rogue-battle",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.2.1",
|
"version": "1.2.2",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "vite",
|
"start": "vite",
|
||||||
|
|
|
@ -96,6 +96,14 @@ export class MoveEffectPhase extends PokemonPhase {
|
||||||
if (!isDelayedAttack) {
|
if (!isDelayedAttack) {
|
||||||
return super.end();
|
return super.end();
|
||||||
} else {
|
} 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();
|
user.resetTurnData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue