Skip to content

Commit

Permalink
Merge pull request #662 from hakoniwawind/patch-3
Browse files Browse the repository at this point in the history
New Role:Hitokotonushinokami
  • Loading branch information
uhyo authored Mar 29, 2020
2 parents ba152ca + acd7e8d commit 22ab3bf
Show file tree
Hide file tree
Showing 5 changed files with 55 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 @@ -45,7 +45,7 @@ exports.jobs=["Human","Werewolf","Diviner","Psychic","Madman","Guard","Couple","
# ねじれ天国
"Bomber","Blasphemy","Ushinotokimairi","DualPersonality","GachaAddicted",
# 人狼式
"Emma","EyesWolf","TongueWolf","Oracle"
"Emma","EyesWolf","TongueWolf","Oracle","Hitokotonushinokami"
# えけけ鯖
"MadHunter","Ascetic"
# 人狼パーティー
Expand Down Expand Up @@ -93,7 +93,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"]
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"]
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"]
Fox:["Fox","TinyFox","Immoral","Blasphemy","XianFox","NightRabbit"]
Devil:["Devil"]
Expand Down Expand Up @@ -135,7 +135,7 @@ exports.gachaData =
]
3: ["Fugitive", "Cursed", "Spellcaster", "Prince", "PI", "OccultMania",
"RedHood", "WanderingGuard", "Phantom", "Pyrotechnist", "Forensic",
"Ninja", "Emma", "HomeComer", "Samurai", "Sacrifice", "Oracle", "Poet","GachaAddicted"]
"Ninja", "Emma", "HomeComer", "Samurai", "Sacrifice", "Oracle", "Poet","GachaAddicted","Hitokotonushinokami"]
4: ["Poisoner", "Merchant", "MadWolf", "Light", "Cat", "Witch", "Dictator",
"Miko", "HolyMarked", "TroubleMaker", "FrankensteinsMonster",
"SantaClaus", "Baker", "SpiritPossessed", "Hunter", "Idol", "Elementaler","Fate",
Expand Down Expand Up @@ -848,6 +848,8 @@ exports.jobinfo=
color:"#eefeff"
Tarzan:
color:"#b3925a"
Hitokotonushinokami:
color:"#e6e397"

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 @@ -110,6 +110,7 @@ messages:
Elementaler: '護衛する相手を選択してください'
Sacrifice: '守る相手を選択してください'
Synesthete: '色を見る相手を選択してください'
Hitokotonushinokami: '占う相手を選択してください'
GameMaster: 'GM用コマンド'

# Texts for GameMaster form.
Expand Down
1 change: 1 addition & 0 deletions language/ja/roles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ jobname:
QueenOfNight: '月下美人'
Tarzan: '野生児'
CurseWolf: '呪狼'
Hitokotonushinokami: '一言主神'
GameMaster: 'ゲームマスター'
Helper: 'ヘルパー'
Waiting: '待機中'
Expand Down
6 changes: 6 additions & 0 deletions manual/ja/jobs/Hitokotonushinokami.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
p 「人狼式」に存在する役職。
h2 特殊能力
p 占い先に痛恨を付与します。それ以外は占い師と同じです。
p 痛恨を受けた人は投票時稀に得票数が+100票されます。
h2 勝利条件
p 村人陣営の勝利。
49 changes: 42 additions & 7 deletions server/rpc/game/game.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -1361,7 +1361,7 @@ class Game
if @rule.scapegoat=="on" && @day==1 && player.isWerewolf() && player.isAttacker()
# 身代わり襲撃は例外的にtrue
@ninja_data[player.id] = true
if @rule.firstnightdivine == "auto" && @day == 1 && (player.isJobType("Diviner") || player.isJobType("Satori"))
if @rule.firstnightdivine == "auto" && @day == 1 && (player.isJobType("Diviner") || player.isJobType("Satori") || player.isJobType("Hitokotonushinokami"))
# 初日白通知ありの占い師・サトリもtrue
@ninja_data[player.id] = true
else
Expand Down Expand Up @@ -2931,11 +2931,14 @@ class VotingBox
o.voteto=obj.to.id # 投票先情報を付け加える
table.push o
for pl in alives
vote = gots[pl.id]
if vote?
vote = pl.modifyMyVote @game, vote
gots[pl.id] = vote
tos[pl.id] = vote.votes
vote = gots[pl.id] ? {
votes:0
priority:0
}
vote = pl.modifyMyVote @game, vote
if vote.votes > 0 || gots[pl.id]
gots[pl.id] = vote
tos[pl.id] = vote.votes

# 獲得票数が少ない順に並べる
cands=Object.keys(gots).sort (a,b)=>
Expand Down Expand Up @@ -3759,7 +3762,7 @@ class Diviner extends Player
# 占い対象
targets = game.players.filter (x)->!x.dead

if @type == "Diviner" && game.day == 1 && game.rule.firstnightdivine == "auto"
if (@type == "Diviner" || @type == "Hitokotonushinokami") && game.day == 1 && game.rule.firstnightdivine == "auto"
# 自動白通知
targets2 = targets.filter (x)=> x.id != @id && x.getFortuneResult() == FortuneResult.human && x.id != "身代わりくん" && !x.isJobType("Fox") && !x.isJobType("XianFox")
if targets2.length > 0
Expand Down Expand Up @@ -10307,6 +10310,20 @@ class CurseWolf extends Werewolf
pl.die game, "curse", @id
@addGamelog game,"cursekill",null,pl.id

class Hitokotonushinokami extends Diviner
type:"Hitokotonushinokami"
divineeffect:(game)->
p=game.getPlayer game.skillTargetHook.get @target
if p?
# 痛恨は重複させない
if !p.isCmplType("FatalStrike") && !p.isJobType("AbsoluteWolf")
newpl=Player.factory null, game, p,null,FatalStrike
p.transProfile newpl
newpl.cmplFlag=@id
p.transform game,newpl,true
# 痛恨付与後に占いを実施
p.divined game,this

# ============================
# 処理上便宜的に使用
class GameMaster extends Player
Expand Down Expand Up @@ -11758,6 +11775,21 @@ class Fascinated extends Complex
if pl? && pl.dead
@die game, "fascinatesuicide"

# 痛恨の一撃
class FatalStrike extends Complex
cmplType:"FatalStrike"
modifyMyVote:(game, vote)->
if @sub?
vote = @sub.modifyMyVote game, vote
vote = @mcall game, @main.modifyMyVote, game, vote

me = game.getPlayer @id
# 自分への投票を稀に100票増やす
if Math.random()<0.05 && !me.isCmplType("VoteGuarded")
vote.votes = vote.votes + 100
kami = game.getPlayer @cmplFlag
kami.addGamelog game, "fatastrike", null, @id
vote

# 決定者
class Decider extends Complex
Expand Down Expand Up @@ -12138,6 +12170,7 @@ jobs=
QueenOfNight:QueenOfNight
Tarzan:Tarzan
CurseWolf:CurseWolf
Hitokotonushinokami:Hitokotonushinokami

# 特殊
GameMaster:GameMaster
Expand Down Expand Up @@ -12189,6 +12222,7 @@ complexes=
SpentVotesForGacha:SpentVotesForGacha
StreamerTrial:StreamerTrial
Fascinated:Fascinated
FatalStrike:FatalStrike

# 役職ごとの強さ
jobStrength=
Expand Down Expand Up @@ -12333,6 +12367,7 @@ jobStrength=
QueenOfNight:20
Tarzan:15
CurseWolf:60
Hitokotonushinokami:28

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

0 comments on commit 22ab3bf

Please sign in to comment.