BloonsTowerDefense5.asl 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /*
  2. state("BTD5-Win", "Version 1.1")
  3. {
  4. int Round : "BTD5-Win.exe", 0x0080D4AC, 0x78, 0x14;
  5. int Menu : "BTD5-Win.exe", 0x80D290;
  6. }
  7. */
  8. state("BTD5-Win", "Version 3.35")
  9. {
  10. int Round : 0x00A30A10, 0x7C, 0x14;
  11. string40 CurrentLevelName : 0x00A30A04, 0x0, 0x0, 0x28, 0x3C, 0x1C;
  12. }
  13. init
  14. {
  15. vars.TimerStart = false;
  16. vars.DoSplit = false;
  17. vars.doneMaps = new List<string>();
  18. switch (modules.First().ModuleMemorySize)
  19. {
  20. case 12582912: version = "Version 3.35";
  21. break;
  22. default: version = "Version 1.1";
  23. break;
  24. }
  25. }
  26. startup
  27. {
  28. settings.Add("SPR", true, "Split Per Round?");
  29. settings.Add("SPL", false, "Split per level?");
  30. settings.Add("SODC", false, "Split on map difficulty change?");
  31. vars.DifficutlyChangeList = new List<string>()
  32. {
  33. "/autumn_leaves/", // Intermediate, autumn leaves
  34. "/day_of_the_undead/", // Advanced, Day of the undead
  35. "/double_double_crossover/", // Expert, Double Double Cross
  36. "/toxic_waste/", // Extreme, Toxic Waste
  37. };
  38. }
  39. update
  40. {
  41. if (vars.TimerStart)
  42. {
  43. if ((settings["SPR"]) && (current.Round != old.Round) && (current.Round != 0))
  44. {
  45. vars.DoSplit = true;
  46. }
  47. if ((settings["SPL"]) && (current.CurrentLevelName != old.CurrentLevelName) && (!vars.doneMaps.Contains(current.CurrentLevelName)))
  48. {
  49. vars.doneMaps.Add(current.CurrentLevelName);
  50. vars.DoSplit = true;
  51. }
  52. if ((settings["SODC"]) && (vars.DifficutlyChangeList.Contains(current.CurrentLevelName) && (!vars.doneMaps.Contains(current.CurrentLevelName))))
  53. {
  54. vars.doneMaps.Add(current.CurrentLevelName);
  55. vars.DoSplit = true;
  56. }
  57. }
  58. }
  59. start
  60. {
  61. return (current.Round == 1 && old.Round == 0);
  62. }
  63. onStart
  64. {
  65. vars.TimerStart = true;
  66. }
  67. onReset
  68. {
  69. vars.doneMaps.Clear();
  70. vars.TimerStart = false;
  71. }
  72. split
  73. {
  74. if (vars.DoSplit)
  75. {
  76. vars.DoSplit = false;
  77. return true;
  78. }
  79. }