troptrop

code

Apr 20th, 2023
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.67 KB | None | 0 0
  1. Console.WriteLine("encounter");
  2. gb.Hold(Joypad.B, gb.SYM["CalcMonStats"]);
  3.  
  4.  
  5. if (gb.CpuRead("wEnemyMonSpecies") == gb.Species["GRAVELER"].Id)
  6. {
  7. Console.WriteLine("Flaaffy Encounter");
  8. int dvs = gb.CpuRead("wEnemyMonDVs") << 8 | gb.CpuRead(gb.SYM["wEnemyMonDVs"] + 1);
  9.  
  10. //int hp = (((dvs >> 9) & 8) | ((dvs >> 6) & 4) | ((dvs >> 3) & 2) | (dvs & 1)) & 0xf;
  11. int atk = (dvs >> 12) & 0xf;
  12. int def = (dvs >> 8) & 0xf;
  13. int spd = (dvs >> 4) & 0xf;
  14. int spc = dvs & 0xf;
  15. if (spc <= 15)
  16. {
  17.  
  18. Console.WriteLine($"[{state.WastedFrames} cost] {state.Log}{edge.Action.LogString()} - 0x{dvs:x4}");
  19. continue;
  20.  
  21. }
  22. else
  23. {
  24. continue;
  25. }
  26. }
  27.  
  28. else
  29. {
  30. continue;
  31. }
  32.  
  33.  
  34. for (int i = 0; i < 2; i++)
  35. {
  36. for (int j = 0; j <= 2; j++)
  37. {
  38. mtMortar[3 + i, 21 + j].AddEdge(0, new Edge<GscTile>() { Action = Action.Right, NextTile = mtMortar[4 + i, 21 + j], NextEdgeset = 0, Cost = 8 });
  39. mtMortar[3 + i, 21 + j].AddEdge(0, new Edge<GscTile>() { Action = Action.Right | Action.A, NextTile = mtMortar[4 + i, 21 + j], NextEdgeset = 0, Cost = 8 });
  40. mtMortar[4 + i, 21 + j].AddEdge(0, new Edge<GscTile>() { Action = Action.Left, NextTile = mtMortar[3 + i, 21 + j], NextEdgeset = 0, Cost = 8 });
  41. mtMortar[4 + i, 21 + j].AddEdge(0, new Edge<GscTile>() { Action = Action.Left | Action.A, NextTile = mtMortar[3 + i, 21 + j], NextEdgeset = 0, Cost = 8 });
  42. }
  43. }
  44.  
  45. for (int i = 0; i <= 2; i++)
  46. {
  47. for (int j = 0; j < 2; j++)
  48. {
  49. mtMortar[3 + i, 21 + j].AddEdge(0, new Edge<GscTile>() { Action = Action.Down, NextTile = mtMortar[3 + i, 22 + j], NextEdgeset = 0, Cost = 8 });
  50. mtMortar[3 + i, 21 + j].AddEdge(0, new Edge<GscTile>() { Action = Action.Down | Action.A, NextTile = mtMortar[3 + i, 22 + j], NextEdgeset = 0, Cost = 8 });
  51. mtMortar[3 + i, 22 + j].AddEdge(0, new Edge<GscTile>() { Action = Action.Up, NextTile = mtMortar[3 + i, 21 + j], NextEdgeset = 0, Cost = 8 });
  52. mtMortar[3 + i, 22 + j].AddEdge(0, new Edge<GscTile>() { Action = Action.Up | Action.A, NextTile = mtMortar[3 + i, 21 + j], NextEdgeset = 0, Cost = 8 });
  53. }
  54. }
Advertisement
Add Comment
Please, Sign In to add comment