mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-26 09:19:31 +02:00
Auto show stats
Automatically displays arena flyout in battle
This commit is contained in:
parent
4124bb67ce
commit
ff51e7f9be
@ -1912,7 +1912,10 @@ export class EncounterPhase extends BattlePhase {
|
||||
}
|
||||
}
|
||||
}
|
||||
handleTutorial(this.scene, Tutorial.Access_Menu).then(() => super.end());
|
||||
handleTutorial(this.scene, Tutorial.Access_Menu).then(() => {
|
||||
this.scene.arenaFlyout.toggleFlyout(true)
|
||||
super.end()
|
||||
});
|
||||
}
|
||||
|
||||
tryOverrideForBattleSpec(): boolean {
|
||||
|
@ -210,7 +210,47 @@ export class ArenaFlyout extends Phaser.GameObjects.Container {
|
||||
this.flyoutTextPlayer.setFontSize(48);
|
||||
}
|
||||
|
||||
public printIVs() {
|
||||
display1() {
|
||||
this.flyoutTextPlayer.text = ""
|
||||
this.flyoutTextField.text = ""
|
||||
this.flyoutTextEnemy.text = ""
|
||||
this.flyoutTextHeaderField.text = ""
|
||||
this.flyoutTextHeaderPlayer.text = ""
|
||||
this.flyoutTextHeaderEnemy.text = ""
|
||||
this.flyoutTextHeader.text = "Game Logs"
|
||||
this.flyoutTextPlayer.setPosition(6, 4)
|
||||
this.flyoutTextPlayer.setFontSize(30);
|
||||
var instructions = []
|
||||
var drpd = LoggerTools.getDRPD(this.scene as BattleScene);
|
||||
var doWaveInstructions = true;
|
||||
for (var i = 0; i < drpd.waves.length && drpd.waves[i] != undefined && doWaveInstructions; i++) {
|
||||
if (drpd.waves[i].id > (this.scene as BattleScene).currentBattle.waveIndex) {
|
||||
doWaveInstructions = false;
|
||||
} else {
|
||||
instructions.push("")
|
||||
instructions.push("Wave " + drpd.waves[i].id)
|
||||
for (var j = 0; j < drpd.waves[i].actions.length; j++) {
|
||||
instructions.push("- " + drpd.waves[i].actions[j])
|
||||
}
|
||||
if (drpd.waves[i].shop != "")
|
||||
instructions.push("Reward: " + drpd.waves[i].shop)
|
||||
}
|
||||
}
|
||||
for (var i = instructions.length - 10; i < instructions.length; i++) {
|
||||
if (i >= 0) {
|
||||
this.flyoutTextPlayer.text += instructions[i]
|
||||
}
|
||||
this.flyoutTextPlayer.text += "\n"
|
||||
}
|
||||
if (true)
|
||||
for (var i = 0; i < LoggerTools.enemyPlan.length; i++) {
|
||||
if (LoggerTools.enemyPlan[i] != "") {
|
||||
this.flyoutTextEnemy.text += LoggerTools.enemyPlan[i] + "\n"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
display2() {
|
||||
this.clearText()
|
||||
var poke = (this.scene as BattleScene).getEnemyField()
|
||||
this.flyoutTextPlayer.text = ""
|
||||
@ -238,6 +278,10 @@ export class ArenaFlyout extends Phaser.GameObjects.Container {
|
||||
}
|
||||
}
|
||||
|
||||
public printIVs() {
|
||||
this.display1()
|
||||
}
|
||||
|
||||
/** Parses through all set Arena Effects and puts them into the proper {@linkcode Phaser.GameObjects.Text} object */
|
||||
public updateFieldText() {
|
||||
this.clearText();
|
||||
@ -279,43 +323,7 @@ export class ArenaFlyout extends Phaser.GameObjects.Container {
|
||||
|
||||
textObject.text += "\n";
|
||||
}
|
||||
this.flyoutTextPlayer.text = ""
|
||||
this.flyoutTextField.text = ""
|
||||
this.flyoutTextEnemy.text = ""
|
||||
this.flyoutTextHeaderField.text = ""
|
||||
this.flyoutTextHeaderPlayer.text = ""
|
||||
this.flyoutTextHeaderEnemy.text = ""
|
||||
this.flyoutTextHeader.text = "Game Logs"
|
||||
this.flyoutTextPlayer.setPosition(6, 4)
|
||||
this.flyoutTextPlayer.setFontSize(30);
|
||||
var instructions = []
|
||||
var drpd = LoggerTools.getDRPD(this.scene as BattleScene);
|
||||
var doWaveInstructions = true;
|
||||
for (var i = 0; i < drpd.waves.length && drpd.waves[i] != undefined && doWaveInstructions; i++) {
|
||||
if (drpd.waves[i].id > (this.scene as BattleScene).currentBattle.waveIndex) {
|
||||
doWaveInstructions = false;
|
||||
} else {
|
||||
instructions.push("")
|
||||
instructions.push("Wave " + drpd.waves[i].id)
|
||||
for (var j = 0; j < drpd.waves[i].actions.length; j++) {
|
||||
instructions.push("- " + drpd.waves[i].actions[j])
|
||||
}
|
||||
if (drpd.waves[i].shop != "")
|
||||
instructions.push("Reward: " + drpd.waves[i].shop)
|
||||
}
|
||||
}
|
||||
for (var i = instructions.length - 10; i < instructions.length; i++) {
|
||||
if (i >= 0) {
|
||||
this.flyoutTextPlayer.text += instructions[i]
|
||||
}
|
||||
this.flyoutTextPlayer.text += "\n"
|
||||
}
|
||||
if (true)
|
||||
for (var i = 0; i < LoggerTools.enemyPlan.length; i++) {
|
||||
if (LoggerTools.enemyPlan[i] != "") {
|
||||
this.flyoutTextEnemy.text += LoggerTools.enemyPlan[i] + "\n"
|
||||
}
|
||||
}
|
||||
this.display2()
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user