Open Route 31, Violet City and Sprout Tower (#31)
Enable Route 31 and its gate, Dark Cave's Violet entrance, Violet City with its buildings and Sprout Tower. Port the script commands they use: gettrainername, askforphonenumber (with AddPhoneNumber's room for Mom and Elm; addcellnum now reports failure as the original does), checkpokemail, loadmenu/_2dmenu/closewindow, giveegg and trade (NPCTrade, with wTradeFlags saved). Eggs keep their species with an egg flag, as wPartySpecies does. The pack's TM/HM counts receive, check and toss TMs and HMs, which are named TM01-HM07. The playthrough continues through Route 31 (with Mom's call), Violet City and Sprout Tower to Elder Li's Flash. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ec3d1cd5c4
commit
7909302db1
16 files changed
+585
-63
No files matched your search
@@ -1391,7 +1391,7 @@ export class Battle {
|
||||
private *useItemSelectMon(): Gen<number> {
|
||||
const slot = yield* this.partyMenu(BATTLE.UseOnWhichPKMNString, false, true);
|
||||
if (slot < 0) return -1;
|
||||
if (this.options.party[slot].species === C.EGG) {
|
||||
if (this.options.party[slot].egg) {
|
||||
yield* this.say(BATTLE.ItemCantUseOnEggText);
|
||||
return -1;
|
||||
}
|
||||
@@ -3465,7 +3465,7 @@ export class Battle {
|
||||
}
|
||||
const mon = party[this.beatUpMon];
|
||||
if (!mon) throw new UnsupportedBattle("Beat Up ran past the party.");
|
||||
if (party.some((member) => member.species === C.EGG))
|
||||
if (party.some((member) => member.egg))
|
||||
throw new UnsupportedBattle("Beat Up with an Egg in the party is not ported yet.");
|
||||
// The player's members go by nickname, a trainer's by species name.
|
||||
this.strings[RAM.stringBuffer1] = player ? mon.nickname : data.speciesName(mon.species);
|
||||
@@ -5467,7 +5467,7 @@ export class Battle {
|
||||
const mon = this.options.party[slot];
|
||||
if (mon.hp) return true;
|
||||
if (!this.battleHasJustStarted)
|
||||
yield* this.say(mon.species === C.EGG ? BATTLE.BattleText_AnEGGCantBattle : BATTLE.BattleText_TheresNoWillToBattle);
|
||||
yield* this.say(mon.egg ? BATTLE.BattleText_AnEGGCantBattle : BATTLE.BattleText_TheresNoWillToBattle);
|
||||
return false;
|
||||
}
|
||||
/** PickSwitchMonInBattle: a fit Pokémon other than the one out, or -1. */
|
||||
@@ -5953,7 +5953,7 @@ export class Battle {
|
||||
* only when wCurPartyMon equals wPartyMenuCursor, which is 1-based. */
|
||||
private changeHappiness(index: number, action: number) {
|
||||
const mon = this.options.party[index];
|
||||
if (mon.species === C.EGG) return;
|
||||
if (mon.egg) return;
|
||||
const tier = mon.happiness < 100 ? 0 : mon.happiness < 200 ? 1 : 2;
|
||||
mon.happiness = changedHappiness(
|
||||
mon.happiness,
|
||||
|
||||
Reference in new issue
Block a user