mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-26 17:29:30 +02:00
Revert "Reapply "Merge branch 'main' of https://github.com/PokeRogue-Projects/Pathing-Tool""
This reverts commit c122d417cf
.
This commit is contained in:
parent
c122d417cf
commit
8efdda8528
31
.github/workflows/auto-update.yml
vendored
31
.github/workflows/auto-update.yml
vendored
@ -1,31 +0,0 @@
|
|||||||
name: Update Fork
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: '0 0 * * *' # Runs every day at midnight
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
update-fork:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout fork
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
repository: PokeRogue-Projects/Pathing-Tool
|
|
||||||
ref: Automerge
|
|
||||||
|
|
||||||
- name: Add upstream
|
|
||||||
run: git remote add upstream https://github.com/pagefaultgames/pokerogue.git
|
|
||||||
|
|
||||||
- name: Fetch upstream
|
|
||||||
run: git fetch upstream
|
|
||||||
|
|
||||||
- name: Merge upstream changes
|
|
||||||
run: |
|
|
||||||
git checkout main
|
|
||||||
git merge upstream/main
|
|
||||||
git push origin Automerge
|
|
@ -721,21 +721,6 @@ export function getWave(drpd: DRPD, floor: integer, scene: BattleScene): Wave {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (wv == undefined) {
|
if (wv == undefined) {
|
||||||
if (scene.gameMode.modeId != GameModes.DAILY) {
|
|
||||||
drpd.waves.push({
|
|
||||||
id: floor,
|
|
||||||
reload: false,
|
|
||||||
//type: floor % 10 == 0 ? "boss" : (floor % 10 == 5 ? "trainer" : "wild"),
|
|
||||||
type: floor % 10 == 0 ? "boss" : "wild",
|
|
||||||
double: scene.currentBattle.double,
|
|
||||||
actions: [],
|
|
||||||
shop: "",
|
|
||||||
biome: getBiomeName(scene.arena.biomeType),
|
|
||||||
clearActionsFlag: false,
|
|
||||||
//pokemon: []
|
|
||||||
})
|
|
||||||
return drpd.waves[drpd.waves.length - 1]
|
|
||||||
}
|
|
||||||
console.error("Out of wave slots??")
|
console.error("Out of wave slots??")
|
||||||
scene.ui.showText("Out of wave slots!\nClearing duplicates...", null, () => {
|
scene.ui.showText("Out of wave slots!\nClearing duplicates...", null, () => {
|
||||||
for (var i = 0; i < drpd.waves.length - 1; i++) {
|
for (var i = 0; i < drpd.waves.length - 1; i++) {
|
||||||
@ -1404,7 +1389,7 @@ export function generateEditHandler(scene: BattleScene, logId: string, callback:
|
|||||||
export function logActions(scene: BattleScene, floor: integer, action: string) {
|
export function logActions(scene: BattleScene, floor: integer, action: string) {
|
||||||
if (localStorage.getItem(getLogID(scene)) == null) localStorage.setItem(getLogID(scene), JSON.stringify(newDocument(getMode(scene) + " Run")))
|
if (localStorage.getItem(getLogID(scene)) == null) localStorage.setItem(getLogID(scene), JSON.stringify(newDocument(getMode(scene) + " Run")))
|
||||||
var drpd = getDRPD(scene)
|
var drpd = getDRPD(scene)
|
||||||
console.log(`Logging an action: "${action}"`)
|
console.log("Log Action", drpd)
|
||||||
var wv: Wave = getWave(drpd, floor, scene)
|
var wv: Wave = getWave(drpd, floor, scene)
|
||||||
if (wv.double == undefined)
|
if (wv.double == undefined)
|
||||||
wv.double = false
|
wv.double = false
|
||||||
@ -1414,7 +1399,7 @@ export function logActions(scene: BattleScene, floor: integer, action: string) {
|
|||||||
wv.actions = []
|
wv.actions = []
|
||||||
}
|
}
|
||||||
wv.actions.push(action)
|
wv.actions.push(action)
|
||||||
console.log("--> ", drpd)
|
console.log(drpd)
|
||||||
localStorage.setItem(getLogID(scene), JSON.stringify(drpd))
|
localStorage.setItem(getLogID(scene), JSON.stringify(drpd))
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -1428,43 +1413,18 @@ export function logActions(scene: BattleScene, floor: integer, action: string) {
|
|||||||
export function appendAction(scene: BattleScene, floor: integer, action: string) {
|
export function appendAction(scene: BattleScene, floor: integer, action: string) {
|
||||||
if (localStorage.getItem(getLogID(scene)) == null) localStorage.setItem(getLogID(scene), JSON.stringify(newDocument(getMode(scene) + " Run")))
|
if (localStorage.getItem(getLogID(scene)) == null) localStorage.setItem(getLogID(scene), JSON.stringify(newDocument(getMode(scene) + " Run")))
|
||||||
var drpd = getDRPD(scene)
|
var drpd = getDRPD(scene)
|
||||||
|
console.log("Append to Action", drpd)
|
||||||
var wv: Wave = getWave(drpd, floor, scene)
|
var wv: Wave = getWave(drpd, floor, scene)
|
||||||
|
if (wv.double == undefined)
|
||||||
|
wv.double = false
|
||||||
if (wv.clearActionsFlag) {
|
if (wv.clearActionsFlag) {
|
||||||
console.log("Triggered clearActionsFlag")
|
console.log("Triggered clearActionsFlag")
|
||||||
wv.clearActionsFlag = false
|
wv.clearActionsFlag = false
|
||||||
wv.actions = []
|
wv.actions = []
|
||||||
}
|
}
|
||||||
console.log(`Appending to an action: "${wv.actions[wv.actions.length - 1]}" + "${action}"`)
|
|
||||||
if (wv.double == undefined)
|
|
||||||
wv.double = false
|
|
||||||
wv.actions[wv.actions.length - 1] = wv.actions[wv.actions.length - 1] + action
|
wv.actions[wv.actions.length - 1] = wv.actions[wv.actions.length - 1] + action
|
||||||
console.log("--> ", drpd)
|
|
||||||
localStorage.setItem(getLogID(scene), JSON.stringify(drpd))
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Logs the actions that the player took.
|
|
||||||
*
|
|
||||||
* This includes attacks you perform, items you transfer during the shop, Poke Balls you throw, running from battl, (or attempting to), and switching (including pre-switches).
|
|
||||||
* @param scene The BattleScene. Used to get the log ID.
|
|
||||||
* @param floor The wave index to write to.
|
|
||||||
* @param action The text you want to add to the actions list.
|
|
||||||
*
|
|
||||||
* @see resetWaveActions
|
|
||||||
*/
|
|
||||||
export function getActionCount(scene: BattleScene, floor: integer) {
|
|
||||||
if (localStorage.getItem(getLogID(scene)) == null) localStorage.setItem(getLogID(scene), JSON.stringify(newDocument(getMode(scene) + " Run")))
|
|
||||||
var drpd = getDRPD(scene)
|
|
||||||
console.log(`Checking action count`)
|
|
||||||
console.log(drpd)
|
console.log(drpd)
|
||||||
var wv: Wave = getWave(drpd, floor, scene)
|
localStorage.setItem(getLogID(scene), JSON.stringify(drpd))
|
||||||
if (wv.double == undefined)
|
|
||||||
wv.double = false
|
|
||||||
if (wv.clearActionsFlag) {
|
|
||||||
console.log("Triggered clearActionsFlag")
|
|
||||||
wv.clearActionsFlag = false
|
|
||||||
wv.actions = []
|
|
||||||
}
|
|
||||||
return (wv.actions.length)
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Logs that a Pokémon was captured.
|
* Logs that a Pokémon was captured.
|
||||||
@ -1475,11 +1435,11 @@ export function getActionCount(scene: BattleScene, floor: integer) {
|
|||||||
export function logCapture(scene: BattleScene, floor: integer, target: EnemyPokemon) {
|
export function logCapture(scene: BattleScene, floor: integer, target: EnemyPokemon) {
|
||||||
//if (localStorage.getItem(getLogID(scene)) == null) localStorage.setItem(getLogID(scene), JSON.stringify(newDocument(getMode(scene) + " Run")))
|
//if (localStorage.getItem(getLogID(scene)) == null) localStorage.setItem(getLogID(scene), JSON.stringify(newDocument(getMode(scene) + " Run")))
|
||||||
var drpd = getDRPD(scene)
|
var drpd = getDRPD(scene)
|
||||||
console.log(`Logging successful capture: ${target.name}`)
|
console.log("Log Capture", drpd)
|
||||||
var wv: Wave = getWave(drpd, floor, scene)
|
var wv: Wave = getWave(drpd, floor, scene)
|
||||||
var pkslot = target.partyslot
|
var pkslot = target.partyslot
|
||||||
wv.pokemon[pkslot].captured = true;
|
wv.pokemon[pkslot].captured = true;
|
||||||
console.log("--> ", drpd)
|
console.log(drpd)
|
||||||
localStorage.setItem(getLogID(scene), JSON.stringify(drpd))
|
localStorage.setItem(getLogID(scene), JSON.stringify(drpd))
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -1491,12 +1451,12 @@ export function logCapture(scene: BattleScene, floor: integer, target: EnemyPoke
|
|||||||
export function logPlayerTeam(scene: BattleScene) {
|
export function logPlayerTeam(scene: BattleScene) {
|
||||||
if (localStorage.getItem(getLogID(scene)) == null) localStorage.setItem(getLogID(scene), JSON.stringify(newDocument(getMode(scene) + " Run")))
|
if (localStorage.getItem(getLogID(scene)) == null) localStorage.setItem(getLogID(scene), JSON.stringify(newDocument(getMode(scene) + " Run")))
|
||||||
var drpd = getDRPD(scene)
|
var drpd = getDRPD(scene)
|
||||||
console.log(`Logging player starters: ${scene.getParty().map(p => p.name).join(", ")}`)
|
console.log("Log Player Starters", drpd)
|
||||||
var P = scene.getParty()
|
var P = scene.getParty()
|
||||||
for (var i = 0; i < P.length; i++) {
|
for (var i = 0; i < P.length; i++) {
|
||||||
drpd.starters[i] = exportPokemon(P[i])
|
drpd.starters[i] = exportPokemon(P[i])
|
||||||
}
|
}
|
||||||
console.log("--> ", drpd)
|
console.log(drpd)
|
||||||
localStorage.setItem(getLogID(scene), JSON.stringify(drpd))
|
localStorage.setItem(getLogID(scene), JSON.stringify(drpd))
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -1511,7 +1471,7 @@ export function logPokemon(scene: BattleScene, floor: integer = undefined, slot:
|
|||||||
if (floor == undefined) floor = scene.currentBattle.waveIndex
|
if (floor == undefined) floor = scene.currentBattle.waveIndex
|
||||||
if (localStorage.getItem(getLogID(scene)) == null) localStorage.setItem(getLogID(scene), JSON.stringify(newDocument(getMode(scene) + " Run")))
|
if (localStorage.getItem(getLogID(scene)) == null) localStorage.setItem(getLogID(scene), JSON.stringify(newDocument(getMode(scene) + " Run")))
|
||||||
var drpd = getDRPD(scene)
|
var drpd = getDRPD(scene)
|
||||||
console.log(`Logging opposing team member: ${pokemon.name}`)
|
console.log("Log Enemy Pokemon", drpd)
|
||||||
var wv: Wave = getWave(drpd, floor, scene)
|
var wv: Wave = getWave(drpd, floor, scene)
|
||||||
var pk: PokeData = exportPokemon(pokemon, encounterRarity)
|
var pk: PokeData = exportPokemon(pokemon, encounterRarity)
|
||||||
pk.source = pokemon
|
pk.source = pokemon
|
||||||
@ -1578,7 +1538,7 @@ export function logPokemon(scene: BattleScene, floor: integer = undefined, slot:
|
|||||||
//wv.actions = []
|
//wv.actions = []
|
||||||
wv.clearActionsFlag = false;
|
wv.clearActionsFlag = false;
|
||||||
wv.shop = ""
|
wv.shop = ""
|
||||||
console.log("--> ", drpd)
|
console.log(drpd)
|
||||||
localStorage.setItem(getLogID(scene), JSON.stringify(drpd))
|
localStorage.setItem(getLogID(scene), JSON.stringify(drpd))
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -1590,10 +1550,10 @@ export function logPokemon(scene: BattleScene, floor: integer = undefined, slot:
|
|||||||
export function logShop(scene: BattleScene, floor: integer, action: string) {
|
export function logShop(scene: BattleScene, floor: integer, action: string) {
|
||||||
if (localStorage.getItem(getLogID(scene)) == null) localStorage.setItem(getLogID(scene), JSON.stringify(newDocument(getMode(scene) + " Run")))
|
if (localStorage.getItem(getLogID(scene)) == null) localStorage.setItem(getLogID(scene), JSON.stringify(newDocument(getMode(scene) + " Run")))
|
||||||
var drpd = getDRPD(scene)
|
var drpd = getDRPD(scene)
|
||||||
console.log(`Logging shop result: "${action}"`)
|
console.log("Log Shop Item", drpd)
|
||||||
var wv: Wave = getWave(drpd, floor, scene)
|
var wv: Wave = getWave(drpd, floor, scene)
|
||||||
wv.shop = action
|
wv.shop = action
|
||||||
console.log("--> ", drpd)
|
console.log(drpd)
|
||||||
localStorage.setItem(getLogID(scene), JSON.stringify(drpd))
|
localStorage.setItem(getLogID(scene), JSON.stringify(drpd))
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -1606,12 +1566,12 @@ export function logTrainer(scene: BattleScene, floor: integer = undefined) {
|
|||||||
if (localStorage.getItem(getLogID(scene)) == null) localStorage.setItem(getLogID(scene), JSON.stringify(newDocument(getMode(scene) + " Run")))
|
if (localStorage.getItem(getLogID(scene)) == null) localStorage.setItem(getLogID(scene), JSON.stringify(newDocument(getMode(scene) + " Run")))
|
||||||
var drpd: DRPD = JSON.parse(localStorage.getItem(getLogID(scene))) as DRPD;
|
var drpd: DRPD = JSON.parse(localStorage.getItem(getLogID(scene))) as DRPD;
|
||||||
drpd = updateLog(drpd);
|
drpd = updateLog(drpd);
|
||||||
console.log(`Logging trainer: ${scene.currentBattle.trainer.getTitleOnly()} ${scene.currentBattle.trainer.getNameOnly()}`)
|
console.log("Log Trainer", drpd)
|
||||||
var wv: Wave = getWave(drpd, floor, scene)
|
var wv: Wave = getWave(drpd, floor, scene)
|
||||||
var t: TrainerData = exportTrainer(scene.currentBattle.trainer)
|
var t: TrainerData = exportTrainer(scene.currentBattle.trainer)
|
||||||
wv.trainer = t
|
wv.trainer = t
|
||||||
wv.type = "trainer"
|
wv.type = "trainer"
|
||||||
console.log("--> ", drpd)
|
console.log(drpd)
|
||||||
localStorage.setItem(getLogID(scene), JSON.stringify(drpd))
|
localStorage.setItem(getLogID(scene), JSON.stringify(drpd))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1633,7 +1593,7 @@ export function flagReset(scene: BattleScene, floor: integer = undefined) {
|
|||||||
console.log("Flag Reset", drpd)
|
console.log("Flag Reset", drpd)
|
||||||
var wv = getWave(drpd, floor, scene)
|
var wv = getWave(drpd, floor, scene)
|
||||||
wv.reload = true;
|
wv.reload = true;
|
||||||
console.log("--> ", drpd)
|
console.log(drpd)
|
||||||
localStorage.setItem(getLogID(scene), JSON.stringify(drpd))
|
localStorage.setItem(getLogID(scene), JSON.stringify(drpd))
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -1662,7 +1622,7 @@ export function flagResetIfExists(scene: BattleScene, floor: integer = undefined
|
|||||||
console.log("Flag reset as wave was already played before", drpd)
|
console.log("Flag reset as wave was already played before", drpd)
|
||||||
var wv = getWave(drpd, floor, scene)
|
var wv = getWave(drpd, floor, scene)
|
||||||
wv.reload = true;
|
wv.reload = true;
|
||||||
console.log("--> ", drpd)
|
console.log(drpd)
|
||||||
localStorage.setItem(getLogID(scene), JSON.stringify(drpd))
|
localStorage.setItem(getLogID(scene), JSON.stringify(drpd))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1687,7 +1647,7 @@ export function resetWaveActions(scene: BattleScene, floor: integer = undefined,
|
|||||||
} else {
|
} else {
|
||||||
wv.actions = []
|
wv.actions = []
|
||||||
}
|
}
|
||||||
console.log("--> ", drpd)
|
console.log(drpd, wv)
|
||||||
localStorage.setItem(getLogID(scene), JSON.stringify(drpd))
|
localStorage.setItem(getLogID(scene), JSON.stringify(drpd))
|
||||||
}
|
}
|
||||||
//#endregion
|
//#endregion
|
||||||
|
@ -551,20 +551,18 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
|
|||||||
}
|
}
|
||||||
var total_visible = 0
|
var total_visible = 0
|
||||||
for (var i = 0; i < P.length; i++) {
|
for (var i = 0; i < P.length; i++) {
|
||||||
if (P[i] != undefined) {
|
states[i] = "ball"
|
||||||
states[i] = "ball"
|
if (!party[i].hp) {
|
||||||
if (!party[i].hp) {
|
states[i] = "faint"
|
||||||
states[i] = "faint"
|
} else if (party[i].status) {
|
||||||
} else if (party[i].status) {
|
states[i] = (this.scene as BattleScene).showTeamSprites ? "ball" : "status"
|
||||||
states[i] = (this.scene as BattleScene).showTeamSprites ? "ball" : "status"
|
|
||||||
}
|
|
||||||
if (P[i].isOnField()) {
|
|
||||||
//console.log(P[i].name + " is in battle; set it as seen")
|
|
||||||
P[i].usedInBattle = true
|
|
||||||
}
|
|
||||||
if (P[i].usedInBattle) total_visible++;
|
|
||||||
//console.log(P[i].name, P[i].getIconAtlasKey(true))
|
|
||||||
}
|
}
|
||||||
|
if (P[i].isOnField()) {
|
||||||
|
//console.log(P[i].name + " is in battle; set it as seen")
|
||||||
|
P[i].usedInBattle = true
|
||||||
|
}
|
||||||
|
if (P[i].usedInBattle) total_visible++;
|
||||||
|
//console.log(P[i].name, P[i].getIconAtlasKey(true))
|
||||||
}
|
}
|
||||||
console.log("Updating ball icons for party (" + P.length + ")")
|
console.log("Updating ball icons for party (" + P.length + ")")
|
||||||
if (staticparty.length > 0) {
|
if (staticparty.length > 0) {
|
||||||
@ -715,7 +713,6 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
|
|||||||
|
|
||||||
if (this.lastStatus !== StatusEffect.NONE) {
|
if (this.lastStatus !== StatusEffect.NONE) {
|
||||||
this.statusIndicator.setFrame(StatusEffect[this.lastStatus].toLowerCase());
|
this.statusIndicator.setFrame(StatusEffect[this.lastStatus].toLowerCase());
|
||||||
this.statusIndicator.setVisible(!!this.lastStatus);
|
|
||||||
} else if (this.player) {
|
} else if (this.player) {
|
||||||
this.statusIndicator.setVisible(!!this.lastStatus);
|
this.statusIndicator.setVisible(!!this.lastStatus);
|
||||||
} else {
|
} else {
|
||||||
@ -990,9 +987,8 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
|
|||||||
targets: this.statusIndicator,
|
targets: this.statusIndicator,
|
||||||
duration: Utils.fixedInt(125),
|
duration: Utils.fixedInt(125),
|
||||||
ease: "Sine.easeInOut",
|
ease: "Sine.easeInOut",
|
||||||
alpha: visible && this.iconsActive ? 0 : (this.lastStatus == 0 ? 0 : 1)
|
alpha: visible && this.iconsActive ? 0 : (!!this.lastStatus ? 1 : 0)
|
||||||
});
|
});
|
||||||
console.log(this.iconsActive, this.lastStatus, this.statusIndicator.visible, this.statusIndicator.alpha)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user