DS-Pokemon-Rom-Editor/DS_Map/ROMFiles/HeadbuttEncounter.cs
Miguel Terol Espino 0254b46a41 Added the levelscript editor
Co-authored-by: Cuddlyogre <cuddlyogre@users.noreply.github.com>
2024-03-03 17:35:34 +01:00

28 lines
662 B
C#

using System.IO;
namespace DSPRE.ROMFiles {
public class HeadbuttEncounter {
public ushort pokemonID;
public byte minLevel;
public byte maxLevel;
public HeadbuttEncounter() {
maxLevel = 0;
minLevel = 0;
pokemonID = 0;
}
public HeadbuttEncounter(BinaryReader br) {
this.pokemonID = br.ReadUInt16();
this.minLevel = br.ReadByte();
this.maxLevel = br.ReadByte();
}
public override string ToString() {
string[] pokemonNames = RomInfo.GetPokemonNames();
string pokemon = pokemonNames[pokemonID];
return $"{pokemonID,4} {pokemon,10}: {minLevel,3} - {maxLevel,3}";
}
}
}