Skip to content

Commit

Permalink
Merge branch 'role-202206'
Browse files Browse the repository at this point in the history
  • Loading branch information
uhyo committed Jun 27, 2022
2 parents 1d4ed69 + ca2f3fa commit b3ae44e
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 10 deletions.
8 changes: 5 additions & 3 deletions client/code/shared/game.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ exports.jobs=["Human","Werewolf","Diviner","Psychic","Madman","Guard","Couple","
# 真紅の狼
"DestroyCraziest","Actress","StraySheep",
# 牢獄の悪夢
"PsychoKiller","Cosplayer",
"PsychoKiller","Cosplayer","DarkPsychic",
# 人狼NET
"Satori",
# わんないと人狼
Expand Down Expand Up @@ -118,7 +118,7 @@ exports.blacks=["Werewolf","WolfDiviner","MadWolf","Lycan","LoneWolf","WolfCub",

# チームたち
exports.teams=teams=
Human:["Human","Diviner","Psychic","Guard","Couple","Poisoner","ToughGuy","Noble","Slave","Magician","Fugitive","Merchant","QueenSpectator","MadWolf","Liar","Light","Cursed","ApprenticeSeer","Diseased","Spellcaster","Lycan","Priest","Prince","PI","Cat","Witch","Oldman","OccultMania","Dog","Dictator","SeersMama","Trapper","RedHood","Counselor","Miko","HolyMarked","WanderingGuard","TroubleMaker","FrankensteinsMonster","BloodyMary","King","SantaClaus","Phantom","DrawGirl","Pyrotechnist","Baker","SpiritPossessed","GotChocolate","Forensic","Cosplayer","TinyGhost","Ninja","Twin","Hunter","Emma","Idol","HomeComer","Illusionist","DragonKnight","Samurai","Elementaler","Poet","Sacrifice","Oracle","GachaAddicted","Fate","Synesthete","Reindeer","Streamer","Tarzan","Hitokotonushinokami","RemoteWorker","Gambler","Sleepwalker","Disguised","Saint","SpaceWerewolfCrew","SpaceWerewolfObserver","SpaceWerewolfGuard","Hanami","Reincarnator","MementoDisposer","Interpreter","Dreamer","Assassin","StraySheep","Secretary","HouseKeeper"]
Human:["Human","Diviner","Psychic","Guard","Couple","Poisoner","ToughGuy","Noble","Slave","Magician","Fugitive","Merchant","QueenSpectator","MadWolf","Liar","Light","Cursed","ApprenticeSeer","Diseased","Spellcaster","Lycan","Priest","Prince","PI","Cat","Witch","Oldman","OccultMania","Dog","Dictator","SeersMama","Trapper","RedHood","Counselor","Miko","HolyMarked","WanderingGuard","TroubleMaker","FrankensteinsMonster","BloodyMary","King","SantaClaus","Phantom","DrawGirl","Pyrotechnist","Baker","SpiritPossessed","GotChocolate","Forensic","Cosplayer","TinyGhost","Ninja","Twin","Hunter","Emma","Idol","HomeComer","Illusionist","DragonKnight","Samurai","Elementaler","Poet","Sacrifice","Oracle","GachaAddicted","Fate","Synesthete","Reindeer","Streamer","Tarzan","Hitokotonushinokami","RemoteWorker","Gambler","Sleepwalker","Disguised","Saint","SpaceWerewolfCrew","SpaceWerewolfObserver","SpaceWerewolfGuard","Hanami","Reincarnator","MementoDisposer","Interpreter","Dreamer","Assassin","StraySheep","Secretary","HouseKeeper","DarkPsychic"]
Werewolf:["Werewolf","Madman","BigWolf","Fanatic","Spy","WolfDiviner","Spy2","Sorcerer","LoneWolf","MinionSelector","WolfCub","WhisperingMad","WolfBoy","GreedyWolf","FascinatingWolf","SolitudeWolf","ToughWolf","ThreateningWolf","ObstructiveMad","PsychoKiller","CautiousWolf","Bomber","Ushinotokimairi","MadDog","Hypnotist","CraftyWolf","Pumpkin","MadScientist","MadHunter","MadCouple","EyesWolf","TongueWolf","BlackCat","LurkingMad","DecoyWolf","Satori","AbsoluteWolf","QueenOfNight","CurseWolf","IntuitionWolf","Faker","SealWolf","CynthiaWolf","NetherWolf","DarkWolf","SpaceWerewolfImposter","Acrobat","BloodWolf","Shadow","AttractiveWoman","DestroyCraziest","RainyBoy"]
Fox:["Fox","TinyFox","Immoral","Blasphemy","XianFox","NightRabbit","Trickster","VariationFox","Actress"]
Devil:["Devil"]
Expand Down Expand Up @@ -162,7 +162,7 @@ exports.gachaData =
"TinyGhost", "Twin", "Sleepwalker", "Disguised", "Hanami"]
2: ["Diviner", "Psychic", "Guard", "Magician", "ToughGuy", "ApprenticeSeer",
"Diseased", "Dog", "SeersMama", "DrawGirl", "Cosplayer","Reindeer", "Tarzan",
"RemoteWorker", "Dreamer", "StraySheep"
"RemoteWorker", "Dreamer", "StraySheep", "DarkPsychic"
]
3: ["Fugitive", "Cursed", "Spellcaster", "Prince", "PI", "OccultMania",
"RedHood", "WanderingGuard", "Phantom", "Pyrotechnist", "Forensic",
Expand Down Expand Up @@ -938,6 +938,8 @@ exports.jobinfo=
color:"#d8e9f2"
HouseKeeper:
color:"#b1dbf0"
DarkPsychic:
color:"#6f1d8c"

Werewolf:
color:"#DD0000"
Expand Down
1 change: 1 addition & 0 deletions language/ja/game.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ foundDetail:
oni: '人攫い'
selfdestruct: '自爆'
assassinate: '暗殺'
ghostrevenge: '亡霊の怨念'
fallback: '不明'
situation: '{{name}}の死因は{{detail}}でした。'

Expand Down
3 changes: 3 additions & 0 deletions language/ja/roles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ jobname:
ResidualHaunting: '地縛霊'
HouseKeeper: '家政婦'
RainyBoy: '雨男'
DarkPsychic: '闇の霊媒師'

# Name of special subjobs.
GameMaster: 'ゲームマスター'
Expand Down Expand Up @@ -780,6 +781,8 @@ Emma:
selfdestruct: '{{name}}は自爆したようです。'
# Killed by Assassin
assassinate: '{{name}}は暗殺されたようです。'
# Killed by DarkPsychic
ghostrevenge: '{{name}}は亡霊の怨念に殺されたようです。'

EyesWolf:
# EyesWolf result strings
Expand Down
8 changes: 8 additions & 0 deletions manual/ja/jobs/DarkPsychic.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
p 「牢獄の悪夢」に登場する村人陣営の役職。

h2 特殊能力
p 霊能者と同様に、処刑された人が人狼かどうかを知ることができる。
p また、処刑により死亡した場合、怨霊となりその夜に狩人系役職を全員殺害する。

h2 勝利条件
p 村人陣営の勝利。
47 changes: 40 additions & 7 deletions server/rpc/game/game.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ DIVINER_NOIMMEDIATE_JOBS = ["WolfBoy", "ObstructiveMad", "Pumpkin", "Patissiere"
LOG_PEEKING_JOBS = ["NightRabbit"]
# 村人だと思い込む役職
HUMAN_DISP_JOBS = ["Oracle","Fate","Sleepwalker","Dreamer"]
# 狩人仲間の役職
GUARD_JOBS = ["Guard", "Cosplayer", "WanderingGuard", "Samurai", "Trapper", "DragonKnight", "Elementaler"]

# 配信者が獲得できる役職
STREAMER_AVAILABLE_JOBS = [
Expand Down Expand Up @@ -193,14 +195,17 @@ loadGame = (roomid, ss, callback)->
if games[roomid]?
callback null, games[roomid]
else
M.games.findOne {id:roomid}, { logs: 0 } (err,doc)=>
M.games.findOne {id:roomid}, { logs: 0 }, (err,doc)=>
if err?
console.error err
callback err,null
callback err, null
else if !doc?
callback i18n.t("error.common.noSuchGame"),null
callback i18n.t("error.common.noSuchGame"), null
else if games[roomid]?
# prevents duplicate instantiation of Game
callback null, games[roomid]
else
games[roomid] = Game.unserialize doc,ss
games[roomid] = Game.unserialize doc, ss
callback null, games[roomid]
#内部用
module.exports=
Expand Down Expand Up @@ -1918,7 +1923,7 @@ class Game
x = obj.pl
situation=switch obj.found
#死因
when "werewolf","werewolf2","trickedWerewolf","poison","hinamizawa","vampire","vampire2","witch","dog","trap","marycurse","psycho","crafty","greedy","tough","lunaticlover","hooligan","dragon","samurai","elemental","sacrifice","lorelei","oni","selfdestruct","assassinate"
when "werewolf","werewolf2","trickedWerewolf","poison","hinamizawa","vampire","vampire2","witch","dog","trap","marycurse","psycho","crafty","greedy","tough","lunaticlover","hooligan","dragon","samurai","elemental","sacrifice","lorelei","oni","selfdestruct","assassinate","ghostrevenge"
@i18n.t "found.normal", {name: x.name}
when "curse" # 呪殺
if @rule.deadfox=="obvious"
Expand Down Expand Up @@ -1961,7 +1966,7 @@ class Game
"foxsuicide","friendsuicide","twinsuicide","dragonknightsuicide","vampiresuicide","santasuicide","fascinatesuicide","loreleisuicide"
"infirm","hunter",
"gmpunish","gone-day","gone-night","crafty","greedy","tough","lunaticlover",
"hooligan","dragon","samurai","elemental","sacrifice","lorelei","oni","selfdestruct","assassinate"
"hooligan","dragon","samurai","elemental","sacrifice","lorelei","oni","selfdestruct","assassinate","ghostrevenge"
].includes obj.found
detail = @i18n.t "foundDetail.#{obj.found}"
else
Expand Down Expand Up @@ -2032,6 +2037,8 @@ class Game
"selfdestruct"
when "assassinate"
"assassinate"
when "ghostrevenge"
"ghostrevenge"
else
null
if emma_log?
Expand Down Expand Up @@ -11675,7 +11682,30 @@ class RainyBoy extends Madman
[]
else super


class DarkPsychic extends Psychic
type: "DarkPsychic"
hasDeadlyWeapon:-> true
dying:(game, found, from)->
super
unless found == "punish"
return
# 処刑された場合は亡霊モードになる
@setFlag "punished"
midnightAlways:(game)->
unless @flag == "punished"
return
@setFlag "done"
# 狩人を全て殺害する
for p in game.players
if p.dead
continue
pls = p.accessMainLevel()
isGuard = pls.some (pl)->
pl.type in GUARD_JOBS
unless isGuard
continue
p.die game, "ghostrevenge"
@addGamelog game, "ghostrevenge", null, p.id



Expand Down Expand Up @@ -13939,6 +13969,7 @@ jobs=
ResidualHaunting:ResidualHaunting
HouseKeeper: HouseKeeper
RainyBoy:RainyBoy
DarkPsychic:DarkPsychic
SpaceWerewolfCrew:SpaceWerewolfCrew
SpaceWerewolfImposter:SpaceWerewolfImposter
SpaceWerewolfObserver:SpaceWerewolfObserver
Expand Down Expand Up @@ -14189,6 +14220,8 @@ jobStrength=
Secretary:18
ResidualHaunting:10
HouseKeeper: 15
RainyBoy: 10
DarkPsychic: 8

module.exports.actions=(req,res,ss)->
req.use 'user.fire.wall'
Expand Down

0 comments on commit b3ae44e

Please sign in to comment.