Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lint 地域/迷宮探索(lint iim)
- {
- lint rr = 0;
- lint ra = 0;
- lint aa = 0;
- lint loop = 0;
- lint 平均数 = 0;
- lint iic = 0;
- lint ii2 = 0;
- lint ii = 0;
- lint aa1 = 0;
- lint aa2 = 0;
- lint bb = 0;
- lint 特殊戦闘 = 0;
- lint exit = 0;
- lint 今回踏破階数 = 0;
- GF[100] = 0;
- locations[iim].dungeonDepth = locations[iim].dungeonClear;
- if (locations[iim].dungeonDepth >= locations[iim].dungeonLevelCount)
- {
- locations[iim].dungeonDepth = locations[iim].dungeonLevelCount - 1;
- }
- for (; ; )
- {
- if (iim == 18 && setEventFlagOrCheckIfHasBeenSeen("大和/平城京/初", hasBeenSeen) == false && playerHasCharacters(Sill, null, null, null) == true)
- {
- 大和/平城京/初();
- break;
- }
- if (iim == 23 && GF[7] == 0 && setEventFlagOrCheckIfHasBeenSeen("元就/妖怪の秘密/竜馬", hasBeenSeen) == true && playerHasCharacters(SakamotoRyouma, Sill, null, null) == true)
- {
- 出雲/黄泉平坂/だいだーら/入り口();
- break;
- }
- if (iim == 13 && setEventFlagOrCheckIfHasBeenSeen("早雲/石油穴で発見A", hasBeenSeen) == false && setEventFlagOrCheckIfHasBeenSeen("蘭/約束", hasBeenSeen) == true && playerHasCharacters(NanjouRan, null, null, null) == true)
- {
- 美濃/まむし油田/早雲探し();
- break;
- }
- 迷宮前/汎用();
- break;
- }
- ◆迷宮戦闘 = 1;
- initializePlayerBattleCharacters();
- rr = P武将/参加選択(5, iim, 0, 0, 9, 10357);
- if (rr == 0)
- {
- ◆迷宮戦闘 = 0;
- return 1;
- }
- GF[101]--;
- for (; ; )
- {
- 特殊戦闘 = 0;
- if (iim == 23 && GF[7] == 0 && setEventFlagOrCheckIfHasBeenSeen("元就/妖怪の秘密/竜馬", hasBeenSeen) == true && locations[iim].dungeonDepth > 5 && playerHasCharacters(SakamotoRyouma, null, null, null) == true)
- {
- 特殊戦闘 = 1;
- }
- ◆currentBattleID = 0;
- 迷宮/モンスター(iim, locations[iim].dungeonDepth + 1, 特殊戦闘);
- ◆battleType = solo;
- ◆迷宮戦闘 = 1;
- ◆battlefieldType = dungeon;
- ◆currentBattleLocation = iim;
- ◆currentBattleEnemyCountry = 0;
- ◆battleAttackingSide = 3;
- ◆戦闘時間制限 = 1;
- rr = startBattle(3); \\=1 if you win, =2 if you lose
- ◆battleType = army;
- ◆currentBattleID = 0;
- ◆戦闘時間制限 = 0;
- for (iic = 11; iic < 17; iic++)
- {
- gs[ii][iic].dungeonCurrentActionPoints = gs[ii][iic].currentActionPoints;
- }
- exit = 0;
- if (rr == 1) \\you won the dungeon battle
- {
- 今回踏破階数++;
- GF[28]++;
- locations[iim].dungeonDepth++;
- if (locations[iim].dungeonDepth > locations[iim].dungeonLevelCount)
- {
- locations[iim].dungeonDepth = locations[iim].dungeonLevelCount;
- }
- exit = 迷宮/勝利後(iim, 特殊戦闘); \\This is the function that controls most dungeon item drops and events.
- \\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".
- \\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).
- \\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.
- if (exit == 0)
- {
- 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"
- 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.
- {
- ra = randInt1toN_preSeeded(7);
- moveCharacterToCountry0Index1(getRandomPlayerCharacterIndexInBattle(), 0);
- if (ra == 1)
- {
- SM(foundItem, 12, 0); \\cup
- }
- if (ra == 2)
- {
- SM(foundItem, 13, 0); \\scroll
- }
- if (ra == 3)
- {
- SM(foundItem, 14, 0); \\drum
- }
- if (ra == 4)
- {
- SM(foundItem, 15, 0); \\screen
- }
- if (ra == 5)
- {
- SM(foundItem, 8, 0); \\Seirogan
- }
- if (ra == 6)
- {
- SM(foundItem, 9, 0); \\Medicine Sake
- }
- if (ra == 7)
- {
- SM(foundItem, 11, 0); \\Motivation Paper
- }
- aa = 今回踏破階数 / 3;
- if (aa == 0)
- {
- aa = 1;
- }
- if (locations[iim].dungeonLevelCount > locations[iim].dungeonClear)
- {
- locations[iim].dungeonClear += true;
- }
- for (; ; )
- {
- if (iim == 13 && setEventFlagOrCheckIfHasBeenSeen("早雲/石油穴で発見A", hasBeenSeen) == false && setEventFlagOrCheckIfHasBeenSeen("蘭/約束", hasBeenSeen) == true && playerHasCharacters(NanjouRan, null, null, null) == true)
- {
- 迷宮/脱出/早雲探し();
- break;
- }
- 迷宮内/脱出();
- break;
- }
- exit = 1;
- }
- }
- }
- if (rr == 2)\\if you lost the dungeon battle
- {
- 迷宮内/脱出(); \\retreat event
- exit = 1;
- }
- if (exit != 0)
- {
- if (exit == 1)
- {
- moveCharacterToCountry0Index1(getRandomPlayerCharacterIndexInBattle(), 0);
- if (今回踏破階数 > 2)
- {
- if (今回踏破階数 > 4)
- {
- SM(foundItem, 9, 0);
- }
- else
- {
- SM(foundItem, 8, 0);
- }
- }
- }
- resetBattleStatsForPlayerCharacters();
- if (exit == 2)
- {
- SM(5060, 0, 0);
- for (iic = 1; iic < 32; iic++)
- {
- if (gs[◆playerCountryID][iic].id != null)
- {
- aa = increaseCharacterLevel(1, iic, 999);
- }
- }
- }
- ◆迷宮戦闘 = 0;
- return 1;
- }
- }
- ◆迷宮戦闘 = 0;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement