Game_Player.prototype.executeEncounter = function() {
if (!$gameMap.isEventRunning() && this._encounterCount <= 0) {
this.makeEncounterCount();
const troopId = this.makeEncounterTroopId();
if ($dataTroops[troopId]) {
BattleManager.setup(troopId, true, true); // 第一个true表示允许逃跑,第二个true表示允许失败,改成false则是不允许
BattleManager.onEncounter();
return true;
} else {
return false;
}
} else {
return false;
}
};
Game_Player.prototype.executeEncounter = function() {
if (!$gameMap.isEventRunning() && this._encounterCount <= 0) {
this.makeEncounterCount();
const troopId = this.makeEncounterTroopId();
if ($dataTroops[troopId]) {
BattleManager.setup(troopId, true, true); // 第一个true表示允许逃跑,第二个true表示允许失败,改成false则是不允许
BattleManager.onEncounter();
return true;
} else {
return false;
}
} else {
return false;
}
};