mirror of
https://github.com/asphyxia-core/plugins.git
synced 2026-12-04 19:20:29 -06:00
otoca: end the letters with the 8th and give the wallpaper then
A full pass over the mission code showed the previous analysis read the achievement check one slot off: mission k (2-9) is checked against the flag recorded for k-1 (FUN_100219c0's jump table), so mission 1 is the first play and Nyandora's 8 letters are missions 2-9. SELECTCARD plays the "wallpaper complete" animation when mission 9 is done. The plugin stopped at 9 and gave the wallpaper when reaching it, one letter early, then ignored the report of 9, so the 8th letter came back every play. Now reporting 9 adds wallpaper 29 and moves to 10, which the game treats as no mission. Wallpaper 29 is confirmed by afp_letter.ifs, which completes card_bg 0018.
This commit is contained in:
@@ -50,7 +50,8 @@ Server-side rules (from the arcade as documented by the fan wiki and the officia
|
||||
- One stamp per play; a full card of 10 gives one star powder. New players start with one powder
|
||||
and the first rival card ticket. The first key card comes with the Pink March Ribbon.
|
||||
- "New doll" unlocks once any doll reaches level 5.
|
||||
- All 8 letters from Nyandora give a wallpaper (which one is inferred from the data).
|
||||
- Nyandora's 8 letters are missions 2-9 (mission 1 is the first play). The 8th letter completes the
|
||||
wallpaper (card_bg 0018, the one the game's letter data shows), and then the missions end.
|
||||
- No questionnaires, and old campaign gift cards answer "expired". The game's own offline card
|
||||
(printed when setCardInfo fails) gives its apology gift and a stamp once.
|
||||
|
||||
|
||||
@@ -30,6 +30,9 @@ export const ACCESSORY_OFFSET = [
|
||||
[[80, 100], [100, 100], [100, 100], [80, 100]],
|
||||
];
|
||||
export const FIRST_KEY_ACCESSORY = 144; // ピンクマーチリボン, made in the tailor tutorial when the first key is made
|
||||
export const LETTER_WALLPAPER = 29; // guess: card_bg_0018 (nyandora night sky), the reward for all 8 letters
|
||||
// cardbg.csv 29 = card_bg 0018 (Nyandora's night sky), the wallpaper afp_letter.ifs completes; no release table
|
||||
// unlocks it, so it only comes through closet/cardbg.
|
||||
export const LETTER_WALLPAPER = 29;
|
||||
export const LAST_MISSION = 9; // the 8th letter
|
||||
export const TEMP_ASEQ = 1000000000; // the game's own placeholder seqs for this play's drops (sell scene)
|
||||
export const MAX_BALANCE = 9999999;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// What a play reports: battle results, gold and friend points, stamps, letters and questionnaires.
|
||||
import { LETTER_WALLPAPER, MAX_BALANCE } from '../data';
|
||||
import { LAST_MISSION, LETTER_WALLPAPER, MAX_BALANCE } from '../data';
|
||||
import { getDoll, getUser, saveDoll, saveUser } from '../db';
|
||||
import { updateRelease } from '../player';
|
||||
import { now, u32 } from '../utils';
|
||||
@@ -63,13 +63,16 @@ export const addStamp: EPR = async (info, data, send) => {
|
||||
});
|
||||
};
|
||||
|
||||
// Missions: 1 is the first play (always done, no letter); 2-9 are Nyandora's 8 letters, each checked against the
|
||||
// flag the previous number records (game.dll FUN_100219c0); finishing 9 completes the wallpaper. The game only
|
||||
// reports and never advances mission_no itself, and anything above 9 means no mission.
|
||||
export const reportMission: EPR = async (info, data, send) => {
|
||||
const u = await getUser($(data).number('user_seq'));
|
||||
const n = $(data).number('mission_no', 0);
|
||||
if (u && u.mission_no === n) {
|
||||
u.mission_no = Math.min(n + 1, 9); // the game treats every mission below mission_no as done
|
||||
// all 8 letters: the original wallpaper (closet/cardbg adds to the wallpapers the game offers)
|
||||
if (u.mission_no === 9 && !u.cardbg.includes(LETTER_WALLPAPER) && u.cardbg.length < 4) u.cardbg.push(LETTER_WALLPAPER);
|
||||
if (u && n >= 1 && n <= LAST_MISSION && u.mission_no === n) {
|
||||
u.mission_no = n + 1;
|
||||
// the 8th letter: the original wallpaper (closet/cardbg adds to the wallpapers the game offers)
|
||||
if (n === LAST_MISSION && !u.cardbg.includes(LETTER_WALLPAPER) && u.cardbg.length < 4) u.cardbg.push(LETTER_WALLPAPER);
|
||||
await saveUser(u);
|
||||
}
|
||||
send.success();
|
||||
|
||||
Reference in New Issue
Block a user