Skip to content

Commit

Permalink
add Secretary
Browse files Browse the repository at this point in the history
  • Loading branch information
uhyo committed Feb 27, 2022
1 parent 1f591f1 commit 2888f50
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 3 deletions.
8 changes: 5 additions & 3 deletions client/code/shared/game.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ exports.jobs=["Human","Werewolf","Diviner","Psychic","Madman","Guard","Couple","
"BadLady", # 蒼汁天国、人狼天国
# ねじれ天国
"Bomber","Blasphemy","Ushinotokimairi","DualPersonality","GachaAddicted",
"Gambler","Faker","NetherWolf","Interpreter","Hierarch",
"Gambler","Faker","NetherWolf","Interpreter","Hierarch","Secretary",
# 人狼式
"Emma","EyesWolf","TongueWolf","Oracle","Hitokotonushinokami",
"SealWolf","Oni","GoldOni","Duelist","FrontOni","BackOni",
Expand Down Expand Up @@ -115,7 +115,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"]
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"]
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"]
Fox:["Fox","TinyFox","Immoral","Blasphemy","XianFox","NightRabbit","Trickster","VariationFox","Actress"]
Devil:["Devil"]
Expand Down Expand Up @@ -168,7 +168,7 @@ exports.gachaData =
4: ["Poisoner", "Merchant", "Light", "Cat", "Witch", "Dictator",
"Miko", "HolyMarked", "TroubleMaker", "FrankensteinsMonster",
"SantaClaus", "Baker", "SpiritPossessed", "Hunter", "Idol", "Elementaler","Fate",
"Synesthete", "Streamer", "Reincarnator", "Interpreter", "Assassin"]
"Synesthete", "Streamer", "Reincarnator", "Interpreter", "Assassin","Secretary"]
5: ["QueenSpectator", "MadWolf", "Priest", "Trapper", "Counselor", "BloodyMary", "King",
"Illusionist", "DragonKnight"]
6: ["Neet", "Helper", "Watching"]
Expand Down Expand Up @@ -929,6 +929,8 @@ exports.jobinfo=
color:"#660200"
StraySheep:
color:"#5ffa5c"
Secretary:
color:"#d8e9f2"

Werewolf:
color:"#DD0000"
Expand Down
1 change: 1 addition & 0 deletions language/ja/game_client_form.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ messages:
StraySheep: '能力を使用する場合は選択してください'
FrontOni: '人攫いの対象を選択してください'
BackOni: '人攫いの対象を選択してください'
Secretary: '補佐する相手を選択してください'

# Message for normal selection form of special subjobs. normalMessage:
SpaceWerewolfObserver: '観察する対象を選択してください'
Expand Down
4 changes: 4 additions & 0 deletions language/ja/roles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ jobname:
SpaceWerewolfSabotage: '破壊者'
FrontOni: '前鬼'
BackOni: '後鬼'
Secretary: '秘書'

# Name of special subjobs.
GameMaster: 'ゲームマスター'
Expand Down Expand Up @@ -1074,6 +1075,9 @@ Actress:
StraySheep:
select: '{{name}}は身代わりになろうとしています。'

Secretary:
select: '{{name}}は{{target}}を補佐しました。'

# Werewolf
SpaceWerewolfImposter:
# Selected a target.
Expand Down
6 changes: 6 additions & 0 deletions manual/ja/jobs/Secretary.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
p 「ねじれ天国」に登場する役職。村人陣営。
h2 特殊能力
p 毎晩補佐の対象を選択することができる。補佐された人は、次の昼の投票で投票数が1票増える。
h2 勝利条件
p 村人陣営の勝利。

44 changes: 44 additions & 0 deletions server/rpc/game/game.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -11517,6 +11517,34 @@ class BackOni extends Oni
wolves = game.players.filter (pl)-> pl.getTeam() == "Fox"
return wolves.every (pl)-> pl.dead

class Secretary extends Player
type: "Secretary"
formType: FormType.optional
sleeping:-> true
jobdone:-> @target?
sunset:(game)->
@setTarget null
job:(game, playerid)->
@setTarget playerid
pl=game.getPlayer playerid
pl.touched game,@id
log=
mode:"skill"
to:@id
comment: game.i18n.t "roles:Secretary.select", {name: @name, target: pl.name}
splashlog game.id,game,log
null
midnight:(game, midnightSort)->
# 複合させる
pl = game.getPlayer game.skillTargetHook.get @target
unless pl?
return
newpl = Player.factory null, game, pl, null, OnedayAuthority
pl.transProfile newpl
newpl.cmplFlag = @id
pl.transform game, newpl, true
@addGamelog game, "secretary", pl.type, pl.id
null

# ============================
# Roles for Space Werewolf
Expand Down Expand Up @@ -13328,6 +13356,19 @@ class RaidProtected extends Complex
@sub?.sunrise? game
@uncomplex game

# 権力者(1日のみ)
class OnedayAuthority extends Complex
cmplType:"OnedayAuthority"
dovote:(game,target)->
result=@mcall game,@main.dovote,game,target
return result if result?
game.votingbox.votePower this,1 #票をひとつ増やす
null
sunsetAlways:(game)->
@mcall game,@main.sunsetAlways,game
@sub?.sunsetAlways? game
@uncomplex game

# 決定者
class Decider extends Complex
cmplType:"Decider"
Expand Down Expand Up @@ -13747,6 +13788,7 @@ jobs=
StraySheep:StraySheep
FrontOni:FrontOni
BackOni:BackOni
Secretary:Secretary
SpaceWerewolfCrew:SpaceWerewolfCrew
SpaceWerewolfImposter:SpaceWerewolfImposter
SpaceWerewolfObserver:SpaceWerewolfObserver
Expand Down Expand Up @@ -13814,6 +13856,7 @@ complexes=
WomanAttracted:WomanAttracted
NoGuarded:NoGuarded
RaidProtected:RaidProtected
OnedayAuthority:OnedayAuthority

# 役職ごとの強さ
jobStrength=
Expand Down Expand Up @@ -13992,6 +14035,7 @@ jobStrength=
StraySheep:8
FrontOni:10
BackOni:10
Secretary:18

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

0 comments on commit 2888f50

Please sign in to comment.