あべこべを実装する

This commit is contained in:
yuuki
2024-12-08 19:40:13 +09:00
parent 59fb5f5ac9
commit ebf57a832c
3 changed files with 39 additions and 2 deletions

View File

@@ -516,6 +516,23 @@
var string = line.toUpperCase().split("")
for(let symbol of string){
const abekobe = localStorage.getItem("abekobe") ?? "false";
if (abekobe === "true") {
if (symbol === "1") {
symbol = "2";
} else if (symbol === "2") {
symbol = "1";
} else if (symbol === "3") {
symbol = "4";
} else if (symbol === "4") {
symbol = "3";
} else if (symbol === "A") {
symbol = "B";
} else if (symbol === "B") {
symbol - "A";
}
}
var error = false
switch(symbol){

View File

@@ -250,6 +250,12 @@ class SongSelect{
action: "doron",
});
this.songs.push({
title: "あべこべ",
skin: this.songSkin.customSettings,
action: "abekobe",
});
this.songs.push({
title: strings.back,
skin: this.songSkin.back,
@@ -941,6 +947,20 @@ class SongSelect{
}
localStorage.setItem("doron", doron);
}, 100);
} else if (currentSong.action === "abekobe") {
this.playSound("se_don");
setTimeout(() => {
let abekobe = localStorage.getItem("abekobe") ?? "false";
const input = prompt("あべこべを有効にするには\"true\"を入力してね!", abekobe);
if (input === null) {
// キャンセル
} else if (input === "") {
input = "false";
} else {
abekobe = input;
}
localStorage.setItem("abekobe", abekobe);
}, 100);
}
}
this.pointer(false)

View File

@@ -1708,7 +1708,7 @@
const doron = localStorage.getItem("doron") ?? "false";
if((!fade || fade < 1) && doron === "false"){
if((!fade || fade < 1) && doron !== "true"){
// Main circle
ctx.fillStyle = fill
ctx.beginPath()