uhyo / jinrou Goto Github PK
View Code? Open in Web Editor NEWAre you a werewolf?
License: Other
Are you a werewolf?
License: Other
node-mongodb-native
~/jinrou# node app.js
Failed to load config file.
Copy config.default/app.coffee to config/app.coffee, edit app.coffee, and retry.
[Error: Use CoffeeScript.register() or require the coffee-script/register module to require .coffee.md files.]
I have already copied and edited config/app.coffee, but still failed to load config file.
Here is my npm list:
~/jinrou# npm list
[email protected] /root/jinrou
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ └─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ └─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ └─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ └─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ └─┬ [email protected]
│ ├── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └─┬ [email protected]
│ │ └── [email protected]
│ └─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ └── [email protected]
├── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └─┬ [email protected]
│ │ ├── [email protected]
│ │ └─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └─┬ [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ └─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ └─┬ [email protected]
│ │ └─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ └─┬ [email protected]
│ │ │ └── [email protected]
│ │ └─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected]
│ │ │ └── [email protected]
│ │ └─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └─┬ [email protected]
│ │ │ └─┬ [email protected]
│ │ │ └─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ └── [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected]
│ │ │ └─┬ [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected]
│ │ │ └─┬ [email protected]
│ │ │ └── [email protected]
│ │ └─┬ [email protected]
│ │ └─┬ [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ └─┬ [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ └─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └── [email protected]
└─┬ [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ └── [email protected]
└─┬ [email protected]
├── [email protected]
├─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ └─┬ [email protected]
│ ├── [email protected]
│ └── [email protected]
├── [email protected]
├── [email protected]
└─┬ [email protected]
└── [email protected]
https://twitter.com/Leisure8_Nost/status/842374542592901120
決選投票の時に突然死が起きたり再度処刑が発生したりすると処刑の候補者が1人になってしまう問題
I got reported a bug that a Guard(Decider)
, who protected himself and got bitten by Werewolf, was found dead at sunrise. According to my tests, those Guards without Decider survives normally. Is this related with the deepest Darkness?
And please take your thesis as the most important thing. This bug does not appear very often.
Guard created by Merchant seems not have Dead Resistance, as hasDeadResistance
is not defined in class Complex
I am not sure whether it is a negligence or your designing.
As there are 41% chance that player who GotChocolate would have his fortuneResult changed. What about lift GotChocolate.midnightSort
to 90?
By the way, I am not really sure if it would be better to take Patissiere as same as WolfBoy.
When new dead was found in this loop, such as a Friend or Blasphemy had suicided, we can expect that FrankensteinsMonster.beforebury()
will be called for many times.
If the earlier dead player is of Human team, he would got eatten for many times.
Now 検索 is closed!
category_Human and others are overwritten even though it is specified by user? (not confirmed yet)
as it was proved on my server that long strings in DB slows down the service.
A new config will be added to config.default/app.coffee
.
First of all, thank you very much for developing Chemical Werewolf. It is so attractive that my friends and I just spent a whole night on it. Yet, it seems exist something would make players confused and some bugs those I cannot handle with.
Advices:
Bugs:
Before moving to HTTPS, it is preferable to allow users to switch between HTTP and HTTPS,
in case a user does not remember his password but is logging in using his password saved in localStorage.
If a user is using spaces as a name, it is not linked in rooms.
BloodyMary's night skill will not work when BloodyMary is class Complex
.
$("#jobform")
of BloodyMary is submitted, it would be reset immediately like there was nothing happened after the click. Player cannot get a splashlog
, nor a Error alert at this time.db.games→gamelogs
, like {
"id" : "A",
"type" : "BloodyMary",
"target" : "B",
"event" : "job",
"flag" : null,
"day" : 5
},
And this log may appear for multiple times, if the player tried that.
Just found this line:
x.die game,"hinamizawa"
Is “女王観戦者” kind of misspelling?
As you didn't take Pumpkin as same as ObstructiveMad and WolfBoy,
is impossible while divineresult=="immediate"
There is no filter for logs of QuantumWerewolf.
I wanna filter and read them.
GMが押すと投票時間が延びるやつ(投票だけでなく昼や夜も時間をのばせる?)
In complicated case.
ReferenceError: callback is not defined
at https://github.com/uhyo/jinrou/blob/master/server/rpc/game/game.coffee#L8684
A user can choose to show following information to others:
It may be good to show recent information besides his all history.
Requires:
Sadly, some rooms stops working while not ended, mainly due to bugs.
Provide an admin interface to terminate such rooms.
Update room.mode
to "end"
and game.finished
to true
,
and delete the instance of Game
.
Under mode runoff, if it needs 2 or more players got punished, like the DrawGirl was bitten, first player would got punished as usual, but the candidate keeps to be player of tops. It leads to a Sudden Death of the candidate, as the only candidate could not vote to himself (although this could be avoided by setting ). After that, it comes to be Sudden Death of everyone, because there is no alive candidate but the system asks a vote.
A banned account writes a user's cookie, localStorage and other storage so that a user is restricted on making accounts and other activities on that browser.
Also, the ban system should be extended so that activities other than entering rooms can be restricted.
Advices:
Bugs:
Lonely Friend still exists. It seems that not only occurs when BadLady proposed to someone. In [this room](http://www.werewolf.online/room/26833) (Chinese), 2 Cupids created 2 pairs of Friends separately, one pair acts normally and the other pair not.
flag
not defined in class Chemical
.if @players.some((x)->x.isJobType "Devil" && x.flag=="winner" && x.team=="Devil")
team="Devil"
x.isJobType "Devil" # true
x.flag=="winner" # false
x.target
is undefined.runners=game.players.filter (x)=>!x.dead && x.isJobType("Fugitive") && x.target==t.id
x.isJobType "Fugitive" # true
x.target==t.id #false
midnightSort
didn't got redefined in class Chemical
. midnightSort
of Ushinotokimairi×sth is 100
as default instead of 90
for Ushinotokimairi. And we can imagine the mess of all other Jobs whose midnightSort
is not 100.setDead
himself normally, while the mainjob Sth and the top Object class Chemical doesn't. Sth×ToughGuy becomes Walking Dead. The Heaven is visible to him. And what’s worse, ToughGuy @setFlag null
for himself, Sth×ToughGuy becomes Invincible to Werewolf.{
"type": "Complex",
"dead": false,
"flag": null
"Complex_main": {
"type": "Couple",
"dead": false,
"flag": null
},
"Complex_sub": {
"type": "ToughGuy",
"dead": true,
"flag": null
},
"Complex_type": "Chemical",
"Complex_flag": null
}
フランケンシュタインの怪物 says,
以下の能力は吸収できません。
...
貴族が奴隷を身代わりにする能力
奴隷が貴族の身代わりになる能力
However this would make FrankensteinsMonster sacrificed for Noble. Which would you like to change, code or document?
身代わりくんを占ってしまうことがある
パスワード・メールアドレスを変更するときに現在のメールアドレスにメールを送り確認するオプションを追加
Related: #47
No response when entered wrong ID/password to the login form.
When using HTTPS, loading HTTP contents is called "mixed content" and is considered not secure.
In our service it occurs mainly because users' icons are served using HTTP.
We need to automatically switch to HTTPS as much as possible.
Only if such jobs are visible while building job rules in "特殊ルール.自由配役", "特殊ルール.一部闇鍋", they could get excluded.
My friends and I carried out a test in this room. According to the same test at my server, I am sure there is something wrong with TrapGuarded now.
In this room, the Diviner got Guarded, TrapGuarded, and Bitten at same night, and the Werewolf get killed together with the Guard. It seems that the TrapGuarded
failed to @uncomplex game
after he had killed the Guard in @checkGuard()
https://twitter.com/keisanbeta/status/829218671872634880
投票が引き分け時の動作を決めるオプションを追加
忍者はサイコキラー選択を行動の対象になった時、は次の日出を死亡しない。
https://twitter.com/vivi_0044/status/829677003074723840
連続ガードあり/なしのオプションを追加。デフォルトはあり。次の役職に影響
The upgraded blacklist system may enable automatic limitation to user who did 突然死 several times.
You may try this on your server.
const crypto = require('crypto');
// mongoexport --db jinrou --collection users --jsonArray --out user.json
const users = require("./user.json")
var list = {}
for (let i in users) {
let user = users[i];
if (user.userid) {
let hashid = crypto.createHash("md5")
hashid.update(user.userid)
user.userid = hashid.digest("hex")
if (list[user.userid] == undefined) {
list[user.userid] = 1
} else {
list[user.userid]++;
}
}
}
var result = JSON.parse(JSON.stringify(list, (key, value) => {
if (value && value <= 1) {
return undefined
} else {
return value
}
}))
console.log(JSON.stringify(result, null, 4))
console.log(`${Object.keys(result).length} users duplicated`)
process.exit(0)
I got 50 users duplicated
Guarded(Werewolf)
could be Counseled by Counselor
because of this. At this line, we would get a undefined
if target is any class which extended form class Complex
but is not class Chemical
, such as Friend, Guarded, HolyProtected, BombTrapped and so on, as their .getMyChemicalTeam()
is defined in class Complex
but would not work.
ユーザーのパスワードをsalt付きで保存する(既存のデータはログイン時にアップグレード)
Related: #47
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.