Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.92 KB | None | 0 0
  1. lint 地域/迷宮探索(lint iim)
  2. {
  3. lint rr = 0;
  4. lint ra = 0;
  5. lint aa = 0;
  6. lint loop = 0;
  7. lint 平均数 = 0;
  8. lint iic = 0;
  9. lint ii2 = 0;
  10. lint ii = 0;
  11. lint aa1 = 0;
  12. lint aa2 = 0;
  13. lint bb = 0;
  14. lint 特殊戦闘 = 0;
  15. lint exit = 0;
  16. lint 今回踏破階数 = 0;
  17. GF[100] = 0;
  18. locations[iim].dungeonDepth = locations[iim].dungeonClear;
  19. if (locations[iim].dungeonDepth >= locations[iim].dungeonLevelCount)
  20. {
  21. locations[iim].dungeonDepth = locations[iim].dungeonLevelCount - 1;
  22. }
  23. for (; ; )
  24. {
  25. if (iim == 18 && setEventFlagOrCheckIfHasBeenSeen("大和/平城京/初", hasBeenSeen) == false && playerHasCharacters(Sill, null, null, null) == true)
  26. {
  27. 大和/平城京/初();
  28. break;
  29. }
  30. if (iim == 23 && GF[7] == 0 && setEventFlagOrCheckIfHasBeenSeen("元就/妖怪の秘密/竜馬", hasBeenSeen) == true && playerHasCharacters(SakamotoRyouma, Sill, null, null) == true)
  31. {
  32. 出雲/黄泉平坂/だいだーら/入り口();
  33. break;
  34. }
  35. if (iim == 13 && setEventFlagOrCheckIfHasBeenSeen("早雲/石油穴で発見A", hasBeenSeen) == false && setEventFlagOrCheckIfHasBeenSeen("蘭/約束", hasBeenSeen) == true && playerHasCharacters(NanjouRan, null, null, null) == true)
  36. {
  37. 美濃/まむし油田/早雲探し();
  38. break;
  39. }
  40. 迷宮前/汎用();
  41. break;
  42. }
  43. ◆迷宮戦闘 = 1;
  44. initializePlayerBattleCharacters();
  45. rr = P武将/参加選択(5, iim, 0, 0, 9, 10357);
  46. if (rr == 0)
  47. {
  48. ◆迷宮戦闘 = 0;
  49. return 1;
  50. }
  51. GF[101]--;
  52. for (; ; )
  53. {
  54. 特殊戦闘 = 0;
  55. if (iim == 23 && GF[7] == 0 && setEventFlagOrCheckIfHasBeenSeen("元就/妖怪の秘密/竜馬", hasBeenSeen) == true && locations[iim].dungeonDepth > 5 && playerHasCharacters(SakamotoRyouma, null, null, null) == true)
  56. {
  57. 特殊戦闘 = 1;
  58. }
  59. ◆currentBattleID = 0;
  60. 迷宮/モンスター(iim, locations[iim].dungeonDepth + 1, 特殊戦闘);
  61. ◆battleType = solo;
  62. ◆迷宮戦闘 = 1;
  63. ◆battlefieldType = dungeon;
  64. ◆currentBattleLocation = iim;
  65. ◆currentBattleEnemyCountry = 0;
  66. ◆battleAttackingSide = 3;
  67. ◆戦闘時間制限 = 1;
  68. rr = startBattle(3); \\=1 if you win, =2 if you lose
  69. ◆battleType = army;
  70. ◆currentBattleID = 0;
  71. ◆戦闘時間制限 = 0;
  72. for (iic = 11; iic < 17; iic++)
  73. {
  74. gs[ii][iic].dungeonCurrentActionPoints = gs[ii][iic].currentActionPoints;
  75. }
  76. exit = 0;
  77. if (rr == 1) \\you won the dungeon battle
  78. {
  79. 今回踏破階数++;
  80. GF[28]++;
  81. locations[iim].dungeonDepth++;
  82. if (locations[iim].dungeonDepth > locations[iim].dungeonLevelCount)
  83. {
  84. locations[iim].dungeonDepth = locations[iim].dungeonLevelCount;
  85. }
  86. exit = 迷宮/勝利後(iim, 特殊戦闘); \\This is the function that controls most dungeon item drops and events.
  87. \\Three cases where this can be 1. The first is when Ran pops or you enter her route. The second is when you either get the Ryuuguu Sword or the textbook that replaces is. The third is when you go back to the girl who gives you the sword, but fail to beat her game because you didn't talk to Suzume. I think 1 means "you won the fight but got kicked out of the dungeon anyway".
  88. \\There's also three cases when this can equal 2 - When you finish the final floor of a dungeon for the first time or when you choose to either fight Orochi (it's 2 after you win) or not (goes to 2 immediately).
  89. \\It's 0 otherwise. In other words, 0 when you've done a floor, something's happened (even an ogre bone drop) and the dungeon carries on.
  90. if (exit == 0)
  91. {
  92. rr = P迷宮/選択(iim); \\When I look at the code I think that it's always 0, but I think it's really "1 if you pick to go on to the next floor, 2 if you pick not to"
  93. if (rr != 1) \\so I think this is the retreat code. After testing, I've seen every one of these drops on a retreat and nothing else.
  94. {
  95. ra = randInt1toN_preSeeded(7);
  96. moveCharacterToCountry0Index1(getRandomPlayerCharacterIndexInBattle(), 0);
  97. if (ra == 1)
  98. {
  99. SM(foundItem, 12, 0); \\cup
  100. }
  101. if (ra == 2)
  102. {
  103. SM(foundItem, 13, 0); \\scroll
  104. }
  105. if (ra == 3)
  106. {
  107. SM(foundItem, 14, 0); \\drum
  108. }
  109. if (ra == 4)
  110. {
  111. SM(foundItem, 15, 0); \\screen
  112. }
  113. if (ra == 5)
  114. {
  115. SM(foundItem, 8, 0); \\Seirogan
  116. }
  117. if (ra == 6)
  118. {
  119. SM(foundItem, 9, 0); \\Medicine Sake
  120. }
  121. if (ra == 7)
  122. {
  123. SM(foundItem, 11, 0); \\Motivation Paper
  124. }
  125. aa = 今回踏破階数 / 3;
  126. if (aa == 0)
  127. {
  128. aa = 1;
  129. }
  130. if (locations[iim].dungeonLevelCount > locations[iim].dungeonClear)
  131. {
  132. locations[iim].dungeonClear += true;
  133. }
  134. for (; ; )
  135. {
  136. if (iim == 13 && setEventFlagOrCheckIfHasBeenSeen("早雲/石油穴で発見A", hasBeenSeen) == false && setEventFlagOrCheckIfHasBeenSeen("蘭/約束", hasBeenSeen) == true && playerHasCharacters(NanjouRan, null, null, null) == true)
  137. {
  138. 迷宮/脱出/早雲探し();
  139. break;
  140. }
  141. 迷宮内/脱出();
  142. break;
  143. }
  144. exit = 1;
  145. }
  146. }
  147. }
  148. if (rr == 2)\\if you lost the dungeon battle
  149. {
  150. 迷宮内/脱出(); \\retreat event
  151. exit = 1;
  152. }
  153. if (exit != 0)
  154. {
  155. if (exit == 1)
  156. {
  157. moveCharacterToCountry0Index1(getRandomPlayerCharacterIndexInBattle(), 0);
  158. if (今回踏破階数 > 2)
  159. {
  160. if (今回踏破階数 > 4)
  161. {
  162. SM(foundItem, 9, 0);
  163. }
  164. else
  165. {
  166. SM(foundItem, 8, 0);
  167. }
  168. }
  169. }
  170. resetBattleStatsForPlayerCharacters();
  171. if (exit == 2)
  172. {
  173. SM(5060, 0, 0);
  174. for (iic = 1; iic < 32; iic++)
  175. {
  176. if (gs[◆playerCountryID][iic].id != null)
  177. {
  178. aa = increaseCharacterLevel(1, iic, 999);
  179. }
  180. }
  181. }
  182. ◆迷宮戦闘 = 0;
  183. return 1;
  184. }
  185. }
  186. ◆迷宮戦闘 = 0;
  187. return 0;
  188. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement