mirror of
https://github.com/haven1433/HexManiacAdvance.git
synced 2026-10-02 13:16:35 -05:00
Updates for Gaia
All tests pass now. The results for gaia are a bit different, but still acceptable.
This commit is contained in:
@@ -101,6 +101,7 @@ namespace HavenSoft.HexManiac.Core.Models.Runs {
|
||||
while (Start + byteLength + ElementLength <= nextRun.Start && DataMatchesElementFormat(owner, Start + byteLength, ElementContent, flags, nextRun)) {
|
||||
byteLength += ElementLength;
|
||||
elementCount++;
|
||||
if (elementCount == 100) flags |= FormatMatchFlags.AllowJunkAfterText;
|
||||
}
|
||||
LengthFromAnchor = string.Empty;
|
||||
ElementCount = Math.Max(1, elementCount); // if the user said there's a format here, then there is, even if the format it wrong.
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace HavenSoft.HexManiac.Tests {
|
||||
|
||||
var address = model.GetAddressFromAnchor(noChange, -1, EggMoveRun.PokemonNameTable);
|
||||
var run = (ArrayRun)model.GetNextAnchor(address);
|
||||
if (game.Contains("Gaia")) Assert.Equal(925, run.ElementCount);
|
||||
if (game.Contains("Gaia")) Assert.Equal(1111, run.ElementCount);
|
||||
else Assert.Equal(412, run.ElementCount);
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ namespace HavenSoft.HexManiac.Tests {
|
||||
var address = model.GetAddressFromAnchor(noChange, -1, "types");
|
||||
var run = (ArrayRun)model.GetNextAnchor(address);
|
||||
if (game.Contains("Clover")) Assert.Equal(24, run.ElementCount);
|
||||
else if (game.Contains("Gaia")) Assert.Equal(24, run.ElementCount);
|
||||
else if (game.Contains("Gaia")) Assert.Equal(25, run.ElementCount);
|
||||
else Assert.Equal(18, run.ElementCount);
|
||||
}
|
||||
|
||||
@@ -233,8 +233,7 @@ namespace HavenSoft.HexManiac.Tests {
|
||||
var compatibilityLocation = model.GetAddressFromAnchor(noChange, -1, AutoSearchModel.TutorCompatibility);
|
||||
|
||||
// ruby and sapphire have no tutors
|
||||
// Gaia has move tutors, but it does a bunch of custom stuff (multiple tables) so I don't feel bad about not supporting it by default.
|
||||
if (game.Contains("Ruby") || game.Contains("Sapphire") || game.Contains("Gaia")) {
|
||||
if (game.Contains("Ruby") || game.Contains("Sapphire")) {
|
||||
Assert.Equal(Pointer.NULL, movesLocation);
|
||||
Assert.Equal(Pointer.NULL, compatibilityLocation);
|
||||
return;
|
||||
@@ -284,9 +283,9 @@ namespace HavenSoft.HexManiac.Tests {
|
||||
editor.Add(viewPort);
|
||||
var expandTutors = editor.QuickEdits.Single(edit => edit.Name == "Make Tutors Expandable");
|
||||
|
||||
// ruby/sapphire/gaia do not support this quick-edit
|
||||
// ruby/sapphire do not support this quick-edit
|
||||
var canRun = expandTutors.CanRun(viewPort);
|
||||
if (game.Contains("Ruby") || game.Contains("Sapphire") || game.Contains("Gaia")) {
|
||||
if (game.Contains("Ruby") || game.Contains("Sapphire")) {
|
||||
Assert.False(canRun);
|
||||
return;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user