Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
akatsuki105 committed Oct 6, 2023
0 parents commit a7820e5
Show file tree
Hide file tree
Showing 16 changed files with 4,210 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
dist
out
.gitignore
18 changes: 18 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pnpm-lock.yaml
LICENSE.md
tsconfig.json
tsconfig.*.json
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"bracketSpacing": true,
"printWidth": 1000,
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"useTabs": false
}
122 changes: 122 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
# mmxpg

Megaman X Password Generator (ロックマンX パスワードジェネレーター)

## パスワードの仕組み(Japanese only)

ロックマンXは同じセーブデータを表すパスワードが複数存在します。ここではそのうちの1つのパスワードの仕組みを説明します。

ロックマンXのパスワードが記録するのは24のbool値だけです。この24個のbool値で8体のボスを倒したか倒してないか、どのライフアップを取ったか、どのサブタンクを取ったか、どの強化パーツを取ったかのみを記録しています。

```
Oxxx
xxxx
xxxx
```

この数字は、ボスを倒すたびに影響を受ける。 ただし、この数字は2種類しかない: 4か1だ。 具体的には、ボスを倒した数が偶数か奇数かを記録する。 4は偶数、1は奇数だ。 つまり、3体のボスを倒した場合、その数は1となる、 1になりますが、8体全部倒した場合は4になります。

他の桁の数字もこのように機能する。 ほとんどの場合、ボスとアイテムの組み合わせを記録している。しかし、どれも桁を変化させる要因のリストを持っており、その要因を偶数個発動させたか、奇数個発動させたかによって、桁は常に2つの数字のどちらかになる。

しかし、もうひとつ複雑な問題がある。 各桁は1組の数字しか使えないにもかかわらず、どの組を使うかを変える要素が常に2つあるのだ。左上の桁の例に戻ろう。 先ほども言ったように、ボスを何体倒したかによって4か1のどちらかになるのが一般的だ。 しかし、チルペンギンのステージでハートタンクを回収した場合、使用される数字は4と1ではなく、2と7になる。 つまり、ゲームを起動して2体のボスと戦った場合、この数字は4→1→4と変化するが、その後チルペンギンのステージでハートタンクを回収した場合は2に変化し、その後ボスと戦うたびに7と2の間で反転する。

各桁には、これらの "外部変数"がいくつ影響するかに応じて、 上の例では `4 or 1`である。 ペンギーゴのステージでライフアップを手に入れている場合は`2 or 7`。 アーマー・アルマージのステージでサブタンクを手に入れている場合は`6 or 5`です。 ライフアップとサブタンクの両方をゲットしている場合は `8 or 3`になる。

まとめると、各桁に影響を与える要因は基本的に2種類ある。 メイン・ファクターは、新しいメイン・ファクターを集めるごとに、2つの数字のペアの間で桁が反転する。ごちゃごちゃしていますが、この説明ではよくわからなくても、以下に示すガイドラインを読めば、(比較的)簡単に自分のパスワードを作ることができるはずです。

以下の数字の山に飛び込む前に、すべての用語の意味をよりよく理解しておく必要があると思います。 各パスワードの桁の基本構造は以下の通りである。

```
----------------------------------------------------
| Position (#,#) - N[#,#] X[#,#] Y[#,#] XY[#,#] |
| X Factor: (ボス or アイテム) |
| Y Factor: (ボス or アイテム) |
| Main Factors: (List of bosses and/or items) |
----------------------------------------------------
```

では、そのプロセスを順を追って見ていこう。 まず、パスワードでカバーしたい項目をリストアップします。 次に、各桁を1つずつ確認し、どの数字が各桁に入るかを決定する必要があります。各桁の位置は以下のようになります。

Digits are labeled based on standard graphing coordinates, with the first number representing the horizontal axis and the second representing the vertical axis, numbers increasing as you move right and up. For example, it starts with (1,1), one right and one up.

```
Digit = N[M%2] or X[M%2] or Y[M%2] or XY[M%2]
X, Y を両方満たしているならXY, どっちも満たしていないならN
M は 書かれた条件を満たした数(Mが書かれていないDigitは、M=0として扱う)
ライフアップ: 🩷
サブタンク: 🔋
撃破済み: 💀
Digit:
A B C D
E F G H
I J K L
A:
N[4,1] X[2,7] Y[6,5] XY[8,3]
X: ペンギーゴ🩷
Y: アルマジロ🔋
M: ペンギーゴ💀, ナウマンダー💀, オクトパルド🩷, カメリーオ🩷, マンドリラー🔋, イーグリード🔋, 頭パーツ, 胸パーツ, 腕パーツ
B:
N[3,2] X[7,8] Y[4,1] XY[6,5]
X: ナウマンダー💀
Y: 頭パーツ
M: アルマジロ🩷, クワンガー🩷, ペンギーゴ🩷, ナウマンダー🩷, オクトパルド🩷, マンドリラー🩷, カメリーオ🩷, イーグリード🩷
C:
N[2] X[4] Y[6] XY[7]
X: ナウマンダー🩷
Y: ナウマンダー🔋
D:
N[5] X[3] Y[2] XY[6]
X: イーグリード💀
Y: イーグリード🩷
E:
N[5,7] X[3,2] Y[1,8] XY[6,4]
X: オクトパルド💀
Y: 胸パーツ
M: アルマジロ💀, クワンガー💀, ペンギーゴ💀, ナウマンダー💀, アルマジロ🩷, クワンガー🩷, アルマジロ🔋, 腕パーツ
F:
N[8,2] X[4,7] Y[1,3] XY[6,5]
X: クワンガー💀
Y: クワンガー🩷
M: アルマジロ🔋, ナウマンダー🔋, マンドリラー🔋, イーグリード🔋, 足パーツ, 頭パーツ, 胸パーツ, 腕パーツ
G:
N[5,4] X[8,1] Y[3,7] XY[6,2]
X: アルマジロ💀
Y: 腕パーツ
M: オクトパルド💀, イーグリード💀, ペンギーゴ🩷, ナウマンダー🩷, イーグリード🔋, 頭パーツ
H:
N[2] X[6] Y[8] XY[7]
X: マンドリラー💀
Y: カメリーオ🔋
I:
N[1,8] X[4,6] Y[3,7] XY[2,5]
X: アルマジロ🩷
Y: 足パーツ
M: アルマジロ💀, クワンガー💀, クワンガー🩷, ペンギーゴ🩷, ナウマンダー🩷, オクトパルド🩷, カメリーオ🩷, マンドリラー🔋, 胸パーツ
J:
N[8] X[3] Y[2] XY[1]
X: カメリーオ💀
Y: イーグリード🔋
K:
N[2,6] X[8,7] Y[5,3] XY[4,1]
X: オクトパルド🩷
Y: マンドリラー🔋
M: アルマジロ💀, クワンガー💀, ペンギーゴ💀, ナウマンダー💀, オクトパルド💀, マンドリラー💀, カメリーオ💀, イーグリード💀
L:
N[1] X[4] Y[6] XY[8]
X: ペンギーゴ💀
Y: マンドリラー🩷
```
13 changes: 13 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>MMX Password Generator</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
35 changes: 35 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "mmxpg",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"postinstall": "typesync"
},
"dependencies": {
"@chakra-ui/react": "^2.8.1",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"framer-motion": "^10.16.4",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/eslint": "^8.44.3",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@vitejs/plugin-react-swc": "^3.3.2",
"eslint": "^8.45.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.3",
"typescript": "^5.0.2",
"typesync": "^0.11.1",
"vite": "^4.4.5"
}
}
Loading

0 comments on commit a7820e5

Please sign in to comment.