Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Silver dummyGb = new Silver();
- GscMap mtMortar = dummyGb.Maps["Route14"];
- GscTile startTile = mtMortar[4, 3];
- for (int i = 0; i < 5; i++)
- {
- for (int j = 0; j <= 5; j++)
- {
- mtMortar[4 + i, 0 + j].AddEdge(0, new Edge<GscTile>() { Action = Action.Right, NextTile = mtMortar[5 + i, 0 + j], NextEdgeset = 0, Cost = 8 });
- mtMortar[4 + i, 0 + j].AddEdge(0, new Edge<GscTile>() { Action = Action.Right | Action.A, NextTile = mtMortar[5 + i, 0 + j], NextEdgeset = 0, Cost = 8 });
- mtMortar[5 + i, 0 + j].AddEdge(0, new Edge<GscTile>() { Action = Action.Left, NextTile = mtMortar[4 + i, 0 + j], NextEdgeset = 0, Cost = 8 });
- mtMortar[5 + i, 0 + j].AddEdge(0, new Edge<GscTile>() { Action = Action.Left | Action.A, NextTile = mtMortar[4 + i, 0 + j], NextEdgeset = 0, Cost = 8 });
- }
- }
- for (int i = 0; i <= 5; i++)
- {
- for (int j = 0; j < 5; j++)
- {
- mtMortar[4 + i, 0 + j].AddEdge(0, new Edge<GscTile>() { Action = Action.Down, NextTile = mtMortar[4 + i, 1 + j], NextEdgeset = 0, Cost = 8 });
- mtMortar[4 + i, 0 + j].AddEdge(0, new Edge<GscTile>() { Action = Action.Down | Action.A, NextTile = mtMortar[4 + i, 1 + j], NextEdgeset = 0, Cost = 8 });
- mtMortar[4 + i, 1 + j].AddEdge(0, new Edge<GscTile>() { Action = Action.Up, NextTile = mtMortar[4 + i, 0 + j], NextEdgeset = 0, Cost = 8 });
- mtMortar[4 + i, 1 + j].AddEdge(0, new Edge<GscTile>() { Action = Action.Up | Action.A, NextTile = mtMortar[4 + i, 0 + j], NextEdgeset = 0, Cost = 8 });
- }
- }
- for(int i = 0; i < 2; i++)
- {
- mtMortar[4, 6 + i].AddEdge(0, new Edge<GscTile>() { Action = Action.Down, NextTile = mtMortar[4, 7 + i], NextEdgeset = 0, Cost = 8 });
- mtMortar[4, 7 + i].AddEdge(0, new Edge<GscTile>() { Action = Action.Up, NextTile = mtMortar[4, 6 + i], NextEdgeset = 0, Cost = 8 });
- }
- mtMortar[4, 6].AddEdge(0, new Edge<GscTile>() { Action = Action.Up, NextTile = mtMortar[4, 7], NextEdgeset = 0, Cost = 8 });
- gb.Hold(Joypad.B, gb.SYM["CalcMonStats"]);
- if (gb.CpuRead("wEnemyMonSpecies") == gb.Species["CHANSEY"].Id)
- {
- Console.WriteLine("Chansey Encounter");
- int dvs = gb.CpuRead("wEnemyMonDVs") << 8 | gb.CpuRead(gb.SYM["wEnemyMonDVs"] + 1);
- int item = gb.CpuRead("wEnemyMonItem") | gb.CpuRead(gb.SYM["wEnemyMonItem"] + 1);
- //int hp = (((dvs >> 9) & 8) | ((dvs >> 6) & 4) | ((dvs >> 3) & 2) | (dvs & 1)) & 0xf;
- int atk = (dvs >> 12) & 0xf;
- int def = (dvs >> 8) & 0xf;
- int spd = (dvs >> 4) & 0xf;
- int spc = dvs & 0xf;
- if (item != 0)
- {
- Console.WriteLine($"[{state.WastedFrames} cost] {state.Log}{edge.Action.LogString()} - {item}");
- continue;
- }
- else
- {
- continue;
- }
- }
- else
- {
- continue;
- }
Advertisement
Add Comment
Please, Sign In to add comment