From f5d41d3068bf2e39c6a619815ef3d221c778eea3 Mon Sep 17 00:00:00 2001 From: dusk Date: Sun, 18 Feb 2024 23:18:11 +0100 Subject: [PATCH] Add fix file --- src/fix.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/fix.py diff --git a/src/fix.py b/src/fix.py new file mode 100644 index 0000000..77a76d8 --- /dev/null +++ b/src/fix.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python3 + +import config + +def open_onikakushi() -> str: + outpath = 'tmp/onikakushi.txt' + origfile = open(config.get('original_path'), 'r', encoding='shift_jisx0213') + outfile = open(outpath, 'w', encoding='shift_jisx0213') + + replacements = { + 1202: '「ゴ・メ・ン・ナ・サ・イ!sd!w800って言ってみな。@言わないならぁ……!」@', + 1630: '「…圭ちゃんは食らうの初めてだよね。@…今日のはまだ!s100…甘い方…。」!sd', + 1823: '「け!w300……圭ちゃんがしてよ……!s300。おじさんは応援してる……。」!sd@', + 1991: '「それで、今の人は入江診療所の看護婦のみよさん。@趣味は野鳥の観察と撮影だって。」@', + 2373: '「…ぇ…え?@!s200……ぇぇと!sd………その!w1000………は、恥ずかしいな……教えなきゃだめ?………どうしても?」@', + 2404: '', + 2406: ' どしゃぁあぁッ!!!@', + 2417: ' 奇声を発しながら次々とりんごを…俺の口に…!d200…!d200次々!d200…!d200…!d200りん!d200…!d200…!d200ご………!d200…¥', + 2474: '「…え、……えぇえぇえぇぇぇえぇえッ?!?!@!sd 逆転負けぇえぇッ?!?!」@', + } + + for i, line in enumerate(origfile): + outfile.write(replacements.get(i, line[:-1])+'\n') + + outfile.close() + origfile.close() + + return outpath