hinamizawa-downporter/src/fix.py

55 lines
3.7 KiB
Python
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/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 = {
# Misc
12: 'caption"Onikakushi-hen"',
23: 'rmenu "Save",save,"Load",load,"Skip",skip,"Hide UI",windowerase,"Log",lookback,"Exit",reset',
# onik_000
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 逆転負けぇえぇッ」@',
2813: '「きゃ…!d200…!d200きゃ…、花も恥らう乙女になんて口の聞き方〜ッ」@',
2964: '!s250……まさか!sd¥',
2993: '「くっくっく!@ 圭ちゃんの手札を右から言うぜ?@ 3、!d400、!d400、!d400、!d400。」@',
3013: '!s200「お…鬼だ…!sdこいつらは鬼だ…@ レナ…は…鬼じゃないよな…?」@',
3030: ' 多分、クラス全員が無人島で自爆首輪付きで殺し合いなんて状況下では水を得た魚と化すだろうな。@',
3316: '!s200……俺の……!sd逆転勝利だッッ/',
3394: '!s200……………!sdお、@',
3410: '「!s150や、や、やめろおぉおおぉおぉ……ぉ……ぉ…」!sd@',
4105: '「え?@!s100……あ。」!sd¥',
4288: ' っと!@!s200………お!sd、誰かが下に来るぞ。@',
4989: '「…うんうん……なんでもしまっちゃうよ☆@ はぅ……かぁいい…。」/',
5090: '「セ、センスねぇーッ!!@ なんだよそのネーミングは!!」@',
5300: '「9!@ いないですの?!!w400 !w300 @ あがりでございます!!」/',
5426: '「……撫でた。!w400……これで!w500……いい…」!sd@',
5594: '!s100「あ、………!sdな、なんだ……あははは……は。」@',
5792: '……くっくっく!!sd うつけ者めッ@',
5966:'「ぎゃぎゃ!s250………!s80ぎゃああぁあぁあぁあぁああッ」!sd¥',
6224:' とりとめのないおしゃべり。@',
# onik_009
6645:'quakey 5,200',
6646:'………あれ?@ 圭一くんと梨花ちゃんは…なんでスタートしないんだろ? しないんだろ?」@',
6647:' 魅音と沙都子は猛ダッシュで会場に散ったが、俺と梨花ちゃんは焦る様子もなく、ただ立ったままだ。¥',
}
for i, line in enumerate(origfile):
outfile.write(replacements.get(i, line[:-1])+'\n')
outfile.close()
origfile.close()
return outpath