forked from po-devs/po-server-goodies
-
Notifications
You must be signed in to change notification settings - Fork 0
/
scripts.js
8146 lines (7568 loc) · 423 KB
/
scripts.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// This is the official Pokemon Online Scripts
// These scripts will only work on 1.0.23 or newer.
/* To avoid a load of warning for new users of the script,
create all the files that will be read further on*/
var cleanFile = function(filename) {
if (typeof sys != 'undefined')
sys.appendToFile(filename, "");
};
cleanFile("mafia_stats.json");
cleanFile("suspectvoting.json");
cleanFile("wfbset.json");
cleanFile("mafiathemes/metadata.json");
cleanFile("channelData.json");
cleanFile("mutes.txt");
cleanFile("mbans.txt");
cleanFile("smutes.txt");
cleanFile("rangebans.txt");
cleanFile("contributors.txt");
cleanFile("pastebin_user_key");
// You may change these variables as long as you keep the same type
var Config = {
bot: "Dratini",
kickbot: "Blaziken",
capsbot: "Exploud",
channelbot: "Chatot",
checkbot: "Snorlax",
coinbot: "Meowth",
countbot: "CountBot",
tourneybot: "Typhlosion",
rankingbot: "Porygon",
battlebot: "Blastoise",
commandbot: "CommandBot",
querybot: "QueryBot",
Mafia: {
bot: "Murkrow",
norepeat: 6,
stats_file: "mafia_stats.json",
max_name_length: 14
},
League: [
["M Dragon", "Elite Four"],
["Jedgi", "Elite Four"],
["Amarillo Caballero", "Elite Four"],
["Deria", "Elite Four"],
["mibuchiha", "5th Generation WiFi Ubers"],
["IFM", "5th Generation WiFi OverUsed"],
["1996ITO", "5th Generation Dream World OverUsed"],
["Jcpdragonx", "5th Generation WiFi UnderUsed"],
["Stofil", "5th Generation LittleUsed Gym"],
["Psykout22", "5th Generation WiFi Little Cup"],
["Marmoteo", "5th Generation OU Triples"],
["ZIAH", "5th Generation Monotype"],
["Manaphy", "4th Generation Ubers"],
["Fakes", "4th Generation OverUsed"],
["Vaporeon", "4th Generation UnderUsed"],
["HSOWA", "4th Generation NeverUsed"],
["CALLOUS", "3rd Generation OverUsed"],
["Jorgen", "2nd Generation OverUsed"],
["Captain Falcon", "VGC 2011"],
["Platinum", "Mixed Generation Challenge Cup"]
],
DreamWorldTiers: ["DW OU", "DW Ubers", "DW LC", "Monotype", "DW UU", "DW LU", "DW 1v1", "Challenge Cup" , "CC 1v1", "DW Uber Triples", "DW OU Triples", "DW Uber Doubles", "DW OU Doubles", "Shanai Cup", "Shanai Cup 1.5", "Shanai Cup STAT", "Original Shanai Cup TEST", "Monocolour", "Clear Skies DW"],
superAdmins: ["Lamperi", "Professor Oak", "zeroality", "[LD]Jirachier", "nixeagle"],
canJoinStaffChannel: ["Lamperi-", "Peanutsdroid"],
disallowStaffChannel: [],
}
// Don't touch anything here if you don't know what you do.
function Tournament(channel, globalObject)
{
var self = this;
self.channel = channel;
self.running = false;
self.main = false;
self.count = 0;
self.tier = "";
self.phase = "";
self.starter = "";
self.round = 0;
self.battlesStarted = [];
self.battlesLost = [];
var entrants = {};
var members = [];
var battlers = [];
var border = "»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»:";
function sendPM(id,message) {
sys.sendMessage(id, Config.tourneybot + ": " + message, self.channel);
}
function broadcast(message, bot) {
var bot = arguments.length == 1 ? false : bot;
if (bot) {
sys.sendAll(Config.tourneybot + ": " + message, self.channel);
} else {
sys.sendAll(message, self.channel);
}
}
function wall(message) {
sys.sendAll(message, self.channel);
if (self.main) {
sys.sendAll(message, 0);
}
}
function start(source, data) {
if (self.running) {
sendPM(source, "A tournament is already running!");
return;
}
if (data.indexOf(':') == -1)
var commandpart = data.split(' ');
else
var commandpart = data.split(':');
self.count = parseInt(commandpart[1]);
if (isNaN(self.count) || count <= 2){
sendPM(src, "You must specify a tournament size of 3 or more.");
return;
}
var tiers = sys.getTierList();
var found = false;
for (var x in tiers) {
if (cmp(tiers[x], commandpart[0])) {
self.tier = tiers[x];
found = true;
break;
}
}
if (!found) {
sendPM(src, "Sorry, the server does not recognise the " + commandpart[0] + " tier.");
return;
}
wall(border);
wall("*** A Tournament was started by " + sys.name(source) + "! ***");
wall("PLAYERS: " + self.count);
wall("TYPE: Single Elimination");
wall("TIER: " + self.tier);
wall("");
wall("*** Go in the #"+sys.channel(self.channel) + " channel and type /join or !join to enter the tournament! ***");
wall(border);
self.running = true;
self.phase = "entry";
self.starter = sys.name(src);
self.round = 0;
entrants = {};
members = [];
}
function isInTour(name) {
return name.toLowerCase() in entrants;
}
function remainingEntrants() {
return self.count - members.count;
}
/* Precondition: isInTour(name) is false */
function addEntrant(name) {
entrants[name.toLowerCase()] = name;
members.push(name.toLowerCase());
}
function join(source) {
if (self.phase != "entry") {
sendPM(source, "The tournament is not in signup phase at the moment");
return;
}
var name = sys.name(source);
if (isInTour(name)) {
sendPM(source, "You already joined the tournament!");
return;
}
addEntrant(name);
broadcast("~~Server~~: " + name + " joined the tournament! " + remainingEntrants() + "more spot(s) left!");
if (remainingEntrants() == 0) {
startTournament();
}
}
function startTournament() {
self.phase = "playing";
roundPairing();
}
function firstPlayer() {
return members[0];
}
function memberCount() {
return members.length;
}
function casedName(name) {
return entrants[name];
}
function roundPairing() {
self.round += 1;
battlesStarted = [];
battlers = [];
battlesLost = [];
if (memberCount() == 1) {
wall("");
wall(border);
wall("");
wall("THE WINNER OF THE " + self.tier.toUpperCase() + " TOURNAMENT IS : " + firstPlayer());
wall("");
wall("*** Congratulations, " + firstPlayer() + ", on your success! ***");
wall("");
wall(border);
wall("");
self.running = false;
// tier, time, number of participants, winner
if (self.main) {
var tier = self.tier;
var time = sys.time();
var winner = firstPlayer();
var num = self.count;
var noPoints = cmp(winner,self.starter) && sys.auth(sys.id(winner)) == 0;
globalObject.updateTourStats(tier, time, winner, num, noPoints);
}
return;
}
var finals = memberCount() == 2;
if (finals) {
self.phase = "finals";
}
if (!finals) {
broadcast("");
broadcast(border);
broadcast("*** Round " + self.round + " of " + self.tier + " tournament ***");
broadcast("");
}
else {
wall("");
wall(border);
wall("*** FINALS OF " + self.tier.toUpperCase() + " TOURNAMENT ***");
wall("");
}
var i = 0;
while (members.length >= 2) {
i += 1;
var x1 = sys.rand(0, members.length);
battlers.push(members[x1]);
var name1 = casedName(members[x1]);
members.splice(x1,1);
x1 = sys.rand(0, members.length);
battlers.push(members[x1]);
var name2 = casedName(members[x1]);
members.splice(x1,1);
if (!finals)
broadcast(i + "." + this.padd(name1) + " VS " + name2);
else {
wall (" " + this.padd(name1) + " VS " + name2);
}
}
if (members.length > 0) {
broadcast("");
broadcast("*** " + casedName(members[0]) + " is randomly selected to go to next round!");
}
var f = finals ? wall : broadcast;
f(border);
f("");
}
}
var noPlayer = '*';
var mafia = new function() {
// Remember to update this if you are updating mafia
// Otherwise mafia game won't get reloaded
this.version = "2011-12-04.1";
var CurrentGame;
var PreviousGames;
var MAFIA_SAVE_FILE = Config.Mafia.stats_file;
var savePlayedGames = function() {
sys.writeToFile(MAFIA_SAVE_FILE, JSON.stringify(PreviousGames));
}
var loadPlayedGames = function() {
try {
PreviousGames = JSON.parse(sys.getFileContent(MAFIA_SAVE_FILE));
} catch(e) {
PreviousGames = [];
}
}
loadPlayedGames();
var defaultTheme = {
name: "default",
sides: [
{ "side": "mafia", "translation": "Mafia"
},
{ "side": "mafia1", "translation": "French Canadian Mafia"
},
{ "side": "mafia2", "translation": "Italian Mafia"
},
{ "side": "village", "translation": "Good people"
},
{ "side": "werewolf", "translation": "WereWolf"
},
{ "side": "godfather", "translation": "Godfather"
}
],
roles: [{
"role": "villager",
"translation": "Villager",
"side": "village",
"help": "You dont have any special commands during the night! Vote to remove people in the day!",
"actions": {}
}, {
"role": "inspector",
"translation": "Inspector",
"side": "village",
"help": "Type /Inspect [name] to find his/her identity!",
"actions": { "night": {"inspect": {"target": "AnyButSelf", "common": "Self", "priority": 30} } }
}, {
"role": "bodyguard",
"translation": "Bodyguard",
"side": "village",
"help": "Type /Protect [name] to protect someone!",
"actions": { "night": {"protect": {"target": "AnyButSelf", "common": "Role", "priority": 5, "broadcast": "role"} },
"startup": "role-reveal"}
}, {
"role": "mafia",
"translation": "Mafia",
"side": "mafia",
"help": "Type /Kill [name] to kill someone!",
"actions": { "night": {"kill": {"target": "AnyButTeam", "common": "Team", "priority": 11, "broadcast": "team"} },
"startup": "team-reveal"}
}, {
"role": "werewolf",
"translation": "WereWolf",
"side": "werewolf",
"help": "Type /Kill [name] to kill someone!",
"actions": { "night": {"kill": {"target": "AnyButSelf", "common": "Self", "priority": 10} },
"distract": {"mode": "ChangeTarget", "hookermsg": "You tried to distract the Werewolf (what an idea, srsly), you were ravishly devoured, yum!", "msg": "The ~Distracter~ came to you last night! You devoured her instead!"},
"avoidHax": ["kill"] }
}, {
"role": "hooker",
"translation": "Pretty Lady",
"side": "village",
"help": "Type /Distract [name] to distract someone! Vote to remove people in the day!",
"actions": { "night": {"distract": {"target": "AnyButSelf", "common": "Self", "priority": 1} } }
}, {
"role": "mayor",
"translation": "Mayor",
"side": "village",
"help": "You dont have any special commands during the night! Vote to remove people in the day! (your vote counts as 2)",
"actions": { "vote": 2 }
}, {
"role": "spy",
"translation": "Spy",
"side": "village",
"help": "You can find out who is going to get killed next!(no command for this ability) Vote to remove people in the day!",
"actions": { "hax": {"kill": { "revealTeam": 0.33, "revealPlayer": 0.1} } }
}, {
"role": "godfather",
"translation": "Godfather",
"side": "godfather",
"help": "Type /Kill [name] to kill someone! You can kill 2 targets, Type /kill [name2] again to select your second target!",
"actions": { "night": {"kill": {"target": "AnyButSelf", "common": "Self", "priority": 20, "limit": 2} },
"distract": {"mode": "ChangeTarget", "hookermsg": "You tried to seduce the Godfather... you were killed instead!", "msg": "The ~Distracter~ came to you last night! You killed her instead!"},
"avoidHax": ["kill"] }
}, {
"role": "vigilante",
"translation": "Vigilante",
"side": "village",
"help": "Type /Kill [name] to kill someone!(dont kill the good people!)",
"actions": { "night": {"kill": {"target": "AnyButSelf", "common": "Self", "priority": 19} } }
}, {
"role": "mafia1",
"translation": "French Canadian Mafia",
"side": "mafia1",
"help": "Type /Kill [name] to kill someone!",
"actions": { "night": {"kill": {"target": "AnyButTeam", "common": "Team", "priority": 12, "broadcast": "team"} },
"startup": "team-reveal"}
}, {
"role": "mafia2",
"translation": "Italian Mafia",
"side": "mafia2",
"help": "Type /Kill [name] to kill someone!",
"actions": { "night": {"kill": {"target": "AnyButTeam", "common": "Team", "priority": 11, "broadcast": "team"} },
"startup": "team-reveal"}
}, {
"role": "conspirator1",
"translation": "French Canadian Conspirator",
"side": "mafia1",
"help": "You dont have any special commands during the night! You are sided French Canadian Mafia. Vote to remove people in the day!",
"actions": { "inspect": {"revealAs": "villager"},
"startup": "team-reveal"}
}, {
"role": "conspirator2",
"translation": "Italian Conspirator",
"side": "mafia2",
"help": "You dont have any special commands during the night! You are sided Italian Mafia. Vote to remove people in the day!",
"actions": { "inspect": {"revealAs": "villager"},
"startup": "team-reveal"}
}, {
"role": "mafiaboss1",
"translation": "Don French Canadian Mafia",
"side": "mafia1",
"help": "Type /Kill [name] to kill someone! You can't be distracted!",
"actions": { "night": {"kill": {"target": "AnyButTeam", "common": "Team", "priority": 12, "broadcast": "team"} },
"distract": {"mode": "ignore"},
"startup": "team-reveal"}
}, {
"role": "mafiaboss2",
"translation": "Don Italian Mafia",
"side": "mafia2",
"help": "Type /Kill [name] to kill someone! You can't be distracted!",
"actions": { "night": {"kill": {"target": "AnyButTeam", "common": "Team", "priority": 11, "broadcast": "team"} },
"distract": {"mode": "ignore"},
"startup": "team-reveal"}
}, {
"role": "samurai",
"translation": "Samurai",
"side": "village",
"help": "Type /Kill [name] during the day phase to kill someone! You will be revealed when you kill, so make wise choices! You are allied with the Good people.",
"actions": { "standby": {"kill": {"target": "AnyButSelf", "msg": "You can kill now using /kill [name] :",
"killmsg": "~Self~ pulls out a sword and strikes it through ~Target~'s chest!"} } }
}, {
"role": "miller",
"translation": "Miller",
"side": "village",
"help": "You dont have any special commands during the night! Vote to remove people in the day! Oh, and insp sees you as Mafia",
"actions": { "inspect": {"revealAs": "mafia"} }
}, {
"role": "truemiller",
"translation": "Miller",
"side": "village",
"help": "You dont have any special commands during the night! Vote to remove people in the day!",
"actions": { "inspect": {"revealAs": "mafia"}, "lynch": {"revealAs": "mafia"}, "startup": {"revealAs": "villager"}, "onlist": "mafia" }
}, {
"role": "miller1",
"translation": "Miller",
"side": "village",
"help": "You dont have any special commands during the night! Vote to remove people in the day!",
"actions": { "inspect": {"revealAs": "mafia1"}, "lynch": {"revealAs": "mafia1"}, "startup": {"revealAs": "villager"}, "onlist": "mafia2" }
}, {
"role": "miller2",
"translation": "Miller",
"side": "village",
"help": "You dont have any special commands during the night! Vote to remove people in the day!",
"actions": { "inspect": {"revealAs": "mafia2"}, "lynch": {"revealAs": "mafia2"}, "startup": {"revealAs": "villager"}, "onlist": "mafia1" }
}],
roles1: ["bodyguard", "mafia", "inspector", "werewolf", "hooker", "villager", "truemiller",
"villager", "mafia", "villager", "mayor"],
roles2: ["bodyguard", "mafia1", "mafia1", "inspector", "hooker", "villager", "mafia2",
"mafia2", "villager", "villager", "villager", "mayor", "villager", "spy", "villager",
"miller1", "miller2", "mafiaboss1", "villager", "vigilante", "villager", "godfather",
"mafiaboss2", "samurai", "villager", "villager", "werewolf", "mafia1",
"mafia2", "bodyguard"],
villageCantLoseRoles: ["mayor", "vigilante", "samurai"]
};
// Street Fighter is on a break.
var sfTheme = {"name":"Street Fighter IV","sides":[{"side":"mafia","translation":"Gen's"},{"side":"mafia1","translation":"Juri's"},{"side":"mafia2","translation":"Evil Ryu's"},{"side":"village","translation":"Good people"},{"side":"werewolf","translation":"Akuma"},{"side":"godfather","translation":"M.Bison"}],"roles":[{"role":"villager","translation":"Dan","side":"village","help":"You dont have any special commands during the night! Vote to remove people in the day!","actions":{}},{"role":"inspector","translation":"Chun-Li","side":"village","help":"Type /Inspect [name] to find his/her identity!","actions":{"night":{"inspect":{"target":"AnyButSelf","common":"Self","priority":30}}}},{"role":"bodyguard","translation":"Rufus","side":"village","help":"Type /Protect [name] to protect someone!","actions":{"night":{"protect":{"target":"AnyButSelf","common":"Role","priority":5,"broadcast":"role"}},"startup":"role-reveal"}},{"role":"mafia","translation":"Gen","side":"mafia","help":"Type /Kill [name] to kill someone!","actions":{"night":{"kill":{"target":"AnyButTeam","common":"Team","priority":11,"broadcast":"team"}},"startup":"team-reveal"}},{"role":"werewolf","translation":"Akuma","side":"werewolf","help":"Type /Kill [name] to kill someone!","actions":{"night":{"kill":{"target":"AnyButSelf","common":"Self","priority":10}},"distract":{"mode":"ChangeTarget","hookermsg":"You tried to distract AKUMA! (what an idea, srsly), you were killed with a lot of violence o.o !","msg":"The ~Distracter~ came to you last night! You devoured her instead !"},"avoidHax":["kill"]}},{"role":"hooker","translation":"Candy","side":"village","help":"Type /Distract [name] to distract someone! Vote to remove people in the day!","actions":{"night":{"distract":{"target":"AnyButSelf","common":"Self","priority":1}}}},{"role":"mayor","translation":"Ryu","side":"village","help":"You dont have any special commands during the night! Vote to remove people in the day! (your vote counts as 2)","actions":{"vote":2}},{"role":"spy","translation":"C.Viper","side":"village","help":"You can find out who is going to get killed next!(no command for this ability) Vote to remove people in the day!","actions":{"hax":{"kill":{"revealTeam":0.33,"revealPlayer":0.1}}}},{"role":"godfather","translation":"M.Bison","side":"godfather","help":"Type /Kill [name] to kill someone! You can kill 2 targets, Type /kill [name2] again to select your second target!","actions":{"night":{"kill":{"target":"AnyButSelf","common":"Self","priority":20,"limit":2}},"distract":{"mode":"ChangeTarget","hookermsg":"You tried to seduce M.Bison, you just were killed!","msg":"The ~Distracter~ came to you last night! You killed her instead!"},"avoidHax":["kill"]}},{"role":"vigilante","translation":"Dhalsim","side":"village","help":"Type /Kill [name] to kill someone!(dont kill the good people!)","actions":{"night":{"kill":{"target":"AnyButSelf","common":"Self","priority":19}}}},{"role":"mafia1","translation":"Juri","side":"mafia1","help":"Type /Kill [name] to kill someone!","actions":{"night":{"kill":{"target":"AnyButTeam","common":"Team","priority":12,"broadcast":"team"}},"startup":"team-reveal"}},{"role":"mafia2","translation":"Evil Ryu","side":"mafia2","help":"Type /Kill [name] to kill someone!","actions":{"night":{"kill":{"target":"AnyButTeam","common":"Team","priority":11,"broadcast":"team"}},"startup":"team-reveal"}},{"role":"conspirator1","translation":"French Canadian Conspirator","side":"mafia1","help":"You dont have any special commands during the night! You are sided French Canadian Mafia. Vote to remove people in the day!","actions":{"inspect":{"revealAs":"villager"},"startup":"team-reveal"}},{"role":"conspirator2","translation":"Italian Conspirator","side":"mafia2","help":"You dont have any special commands during the night! You are sided Italian Mafia. Vote to remove people in the day!","actions":{"inspect":{"revealAs":"villager"},"startup":"team-reveal"}},{"role":"mafiaboss1","translation":"Don Juri's boss","side":"mafia1","help":"Type /Kill [name] to kill someone! You can't be distracted!","actions":{"night":{"kill":{"target":"AnyButTeam","common":"Team","priority":12,"broadcast":"team"}},"distract":{"mode":"ignore"},"startup":"team-reveal"}},{"role":"mafiaboss2","translation":"Don Evil Ryu's boss","side":"mafia2","help":"Type /Kill [name] to kill someone! You can't be distracted!","actions":{"night":{"kill":{"target":"AnyButTeam","common":"Team","priority":11,"broadcast":"team"}},"distract":{"mode":"ignore"},"startup":"team-reveal"}},{"role":"samurai","translation":"Fei Long","side":"village","help":"Type /Kill [name] during the day phase to kill someone! You will be revealed when you kill, so make wise choices! You are allied with the Good people.","actions":{"standby":{"kill":{"target":"AnyButSelf","msg":"You can kill now using /kill [name] :","killmsg":"~Self~ pulls out a sword and strikes it through ~Target~'s chest!"}}}},{"role":"miller","translation":"Lolrole","side":"village","help":"You dont have any special commands during the night! Vote to remove people in the day! Oh, and insp sees you as Mafia","actions":{"inspect":{"revealAs":"mafia"}}}],"roles1":["bodyguard","mafia","inspector","werewolf","hooker","villager","mafia","villager","miller","villager","mayor"],"roles2":["bodyguard","mafia1","mafia1","inspector","hooker","villager","mafia2","mafia2","villager","villager","villager","mayor","villager","spy","villager","villager","villager","mafiaboss1","villager","vigilante","villager","godfather","mafiaboss2","samurai","villager","villager","werewolf","mafia1","mafia2","bodyguard"],"villageCantLoseRoles":["mayor","vigilante","samurai"]};
var hpTheme = {"villageCantLoseRoles": ["mayor", "hooker", "samurai"], "name": "Harry Potter", "roles": [{"translation": "Muggle", "role": "villager", "side": "village", "actions": {}, "help": "You have no magical powers, so all you can do is vote to remove people in the day!"}, {"translation": "Harry Potter", "role": "inspector", "side": "village", "actions": {"night": {"inspect": {"priority": 30, "target": "AnyButSelf", "common": "Self"}}}, "help": "Type /Inspect [name] to cast a spell to figure out a person\'s role!"}, {"translation": "Hagrid", "role": "bodyguard", "side": "village", "actions": {"startup": "role-reveal", "night": {"protect": {"priority": 5, "broadcast": "role", "target": "AnyButSelf", "common": "Role"}}}, "help": "Type /Protect [name] to protect someone, you large oaf you!"}, {"translation": "Snape", "role": "werewolf", "side": "werewolf", "actions": {"vote": 2, "avoidHax": ["kill"], "kill": {"mode": "ignore"}, "distract": {"msg": "The ~Distracter~ came to you last night! You killed the fool.", "mode": "ChangeTarget", "hookermsg": "You tried to distract Severus Snape (what an idea, srsly), and were promptly killed, sorry!"}}, "help": "You can not be killed at night. Your vote counts as two during the day, and you are immune to the charms of the Pretty Lady. You are all alone in the world!"}, {"translation": "Hermione Granger", "role": "hooker", "side": "village", "actions": {"night": {"distract": {"priority": 1, "target": "AnyButSelf", "common": "Self"}}}, "help": "Type /Distract [name] at night to Stupify them! Vote to remove people in the day!"}, {"translation": "Dumbledore", "role": "mayor", "side": "village", "actions": {"vote": 3}, "help": "You dont have any special commands during the night. Pull your rank during the day, as your votes count as three. "}, {"translation": "Argus Filch", "role": "spy", "side": "village", "actions": {"hax": {"kill": {"revealPlayer": 0.14999999999999999, "revealTeam": 0.40000000000000002}}}, "help": "You can find out who is going to get killed next!(no command for this ability) Vote to remove people in the day. Being superbly creepy, you can a bonus to detection over normal spies."}, {"translation": "Fred Weasley", "role": "mafia1", "side": "mafia1", "actions": {"startup": "team-reveal", "night": {"kill": {"priority": 12, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "Type /Kill [name] at night to dispose of someone!"}, {"translation": "George Weasley", "role": "mafia1.5", "side": "mafia1", "actions": {"startup": "team-reveal", "night": {"kill": {"priority": 12, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "Type /Kill [name] at night to dispose of someone!"}, {"translation": "Momma Weasley", "role": "mafia1.6", "side": "mafia1", "actions": {"startup": "team-reveal", "night": {"protect": {"priority": 5, "broadcast": "role", "target": "AnyButSelf", "common": "Role"}}}, "help": "Type /Kill [name] at night to dispose of someone! You are working with Fred and George (Not Ron), and you can protect one of the two per night."}, {"translation": "Death Eater", "role": "mafia2", "side": "mafia2", "actions": {"startup": "team-reveal", "night": {"kill": {"priority": 11, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "Type /Kill [name] to kill someone!"}, {"translation": "Head Death Eater", "role": "mafia2.5", "side": "mafia2", "actions": {"vote": -1, "inspect": {"revealAs": "villager"}, "startup": "team-reveal", "night": {"kill": {"priority": 11, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "Type /Kill [name] to kill someone! You are seen to the inspector as a Muggle. Your vote counts as -1. Use it to save your fellow Death Eaters!"}, {"translation": "Auror", "role": "samurai", "side": "village", "actions": {"standby": {"kill": {"msg": "You can kill now using /kill [name] :", "killmsg": "~Self~ whips out his wand and points it at ~Target~, causing ~Target~ to drop dead!", "target": "AnyButSelf"}}}, "help": "Type /Kill [name] during the day phase to kill someone! You will be revealed when you kill, so make wise choices! You are allied with the Good people."}, {"translation": "Voldemort", "role": "evilsamurai", "side": "mafia2", "actions": {"standby": {"kill": {"msg": "You can kill now using /kill [name] :", "killmsg": "Voldemort casts Avada Kedavra, and ~Target~ falls to the ground dead!", "target": "AnyButSelf"}}, "startup": "team-reveal"}, "help": "Type /Kill [name] during the day phase to kill someone! You may only kill once per day, but you will not be revealed. You are allied with the Death Eaters."}, {"translation": "Nearly Headless Nick", "role": "miller", "side": "village", "actions": {"inspect": {"revealAs": "mafia1"}}, "help": "You dont have any special commands during the night! Unfortunately, though, people are afraid of your flopping head and so the Inspector sees you as evil."}, {"translation": "Peeves", "role": "miller1.5", "side": "village", "actions": {"inspect": {"revealAs": "mafia2"}}, "help": "You dont have any special commands during the night! Unfortunately, though, everyone hates you and so the Inspector sees you as evil."}, {"translation": "Draco Malfoy", "role": "mafia3", "side": "mafia3", "actions": {"startup": "team-reveal", "night": {"kill": {"priority": 2, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "Type /Kill [name] to kill someone! Even the Bodyguard cannot stop you!"}, {"translation": "Lucius Malfoy", "role": "mafia3.5", "side": "mafia3", "actions": {"startup": "team-reveal", "night": {"kill": {"priority": 2, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "Type /Kill [name] to kill someone! Even the Bodyguard cannot stop you!"}], "sides": [{"translation": "Weasley Brothers", "side": "mafia1"}, {"translation": "Death Eaters", "side": "mafia2"}, {"translation": "Malfoys", "side": "mafia3"}, {"translation": "Hogwarts", "side": "village"}, {"translation": "Snape", "side": "werewolf"}], "roles2": ["bodyguard", "mafia1", "mafia1.5", "inspector", "hooker", "villager", "mafia2", "mafia2", "villager", "villager", "werewolf", "mayor", "evilsamurai", "spy", "samurai", "villager", "miller", "mafia1.6", "mafia2.5", "samurai", "villager", "villager", "miller1.5", "villager", "villager", "mafia3", "mafia3.5"], "roles1": ["bodyguard", "mafia1", "inspector", "mafia1.5", "hooker", "villager", "villager", "miller", "villager", "mayor"]};
var potatoTheme = {"villageCantLoseRoles": ["mayor", "vigilante", "samurai"], "name": "Potato", "roles": [{"translation": "Potato", "role": "villager", "side": "village", "actions": {}, "help": "You are delicious victim. You dont have any special commands during the night! Vote to remove people in the day!"}, {"translation": "Mr. Potato", "role": "inspector", "side": "village", "actions": {"night": {"inspect": {"priority": 30, "target": "AnyButSelf", "common": "Self"}}}, "help": "Thanks to the fact you have eyes, you check out who is bad and who\'s good. Type /Inspect [name] to find his/her identity!"}, {"translation": "Ms. Potato", "role": "bodyguard", "side": "village", "actions": {"startup": "role-reveal", "night": {"protect": {"priority": 5, "broadcast": "role", "target": "AnyButSelf", "common": "Role"}}}, "help": "You are the lovely Mr. Potato wife. You love him so much, you can even protect him from dying. Thankfully, you can use this abilities on other people as well. Type /Protect [name] to protect someone!"}, {"translation": "Rabbit", "role": "mafia", "side": "mafia", "actions": {"startup": "team-reveal", "night": {"kill": {"priority": 11, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "You LOVE potatos. Type /Kill [name] to eat someone!"}, {"translation": "Mean Rabbit", "role": "werewolf", "side": "werewolf", "actions": {"avoidHax": ["kill"], "distract": {"msg": "The French Fries came to you last night! You devoured her instead !", "mode": "ChangeTarget", "hookermsg": "You tried to distract the Mean Rabbit (what an idea, srsly), you were ravishly devoured, yum !"}, "night": {"kill": {"priority": 10, "target": "AnyButSelf", "common": "Self"}}}, "help": "You look like innocent rabbit, but you ADORE potatos. Type /kill to kill. If you see the delicous French Fries, you eat her instead."}, {"translation": "French Fries", "role": "hooker", "side": "village", "actions": {"night": {"distract": {"priority": 1, "target": "AnyButSelf", "common": "Self"}}}, "help": "Thanks to your AMAZING tanning, you look like an adorable potato. Type /Distract [name] to distract someone! Vote to remove people in the day! Note: You are part of the good people - the potatos"}, {"translation": "Sweet Potato", "role": "mayor", "side": "village", "actions": {"vote": 4}, "help": "You have an amazing taste. Thanks to this, you can attract many people to vote with you off. You dont have any special commands during the night! Vote to remove people in the day! (your vote counts as 4)"}, {"translation": "Watermelon", "role": "godfather", "side": "village", "actions": {"night": {"inspect": {"priority": 30, "target": "AnyButSelf", "common": "Self"}}}, "help": "You are the orange\'s biggest enemy. You are the only one to know that the orange role is a bad person, who the inspector sees as a French Fries. You must tell him that he is bad. But how? You are able to inspect people, to find out who is the orange. But make sure you are not confusing the real pl with the orange!"}, {"translation": "Orange", "role": "godfather1", "side": "godfather", "actions": {"inspect": {"revealAs": "hooker"}, "kill": {"mode": "ignore"}, "night": {"inspect": {"priority": 30, "target": "AnyButSelf", "common": "Self"}}}, "help": "You just look like a potato. however, your shell is really bitter. Thanks to this, you can\'t die. Your partner is the Mean deer(godfather). You must find him yourself, which may be hard. But don\'t worry, /inspect will help you doing the. when you get inspected you are seen as the French Fries (pl)"}, {"translation": "Mean Deer", "role": "godfather2", "side": "godfather1", "actions": {"avoidHax": ["kill"], "distract": {"msg": "The ~Distracter~ came to you last night! You killed her instead!", "mode": "ChangeTarget", "hookermsg": "You tried to seduce the Godfather, you just were killed!"}, "night": {"kill": {"priority": 20, "limit": 2, "target": "AnyButSelf", "common": "Self"}}}, "help": "You look like an innocent dear, but you are evil deer who likes potatos and rabbits. Type /Kill [name] to kill someone! You are able to kill 2 people a day. Your partner is the Orange. He don\'t know who you are and he don\'t know who he is. he can find you using his inspecting skills."}, {"translation": "outlaw", "role": "vigilante", "side": "village", "actions": {"night": {"kill": {"priority": 19, "target": "AnyButSelf", "common": "Self"}}}, "help": "You love the potatoes, but hate see them dying. You decide by your own to kill (/kill) someone each night, hoping it\'s a bad guy."}, {"translation": "French Rabbits", "role": "mafia1", "side": "mafia1", "actions": {"startup": "team-reveal", "night": {"kill": {"priority": 12, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "You LOVE potatoes. Type /Kill [name] to kill someone!"}, {"translation": "Italian Deers", "role": "mafia2", "side": "mafia2", "actions": {"startup": "team-reveal", "night": {"kill": {"priority": 11, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "You LOVE potatoes. Type /Kill [name] to kill someone!"}, {"translation": "French Rabbit Conspirator", "role": "conspirator1", "side": "mafia1", "actions": {"inspect": {"revealAs": "villager"}, "startup": "team-reveal"}, "help": "You LOVE potatoes. You dont have any special commands during the night! You are sided French Canadian Mafia. Vote to remove people in the day!"}, {"translation": "Italian Deer Conspirator", "role": "conspirator2", "side": "mafia2", "actions": {"inspect": {"revealAs": "villager"}, "startup": "team-reveal"}, "help": "You LOVE potatoes. You dont have any special commands during the night! You are sided Italian Mafia. Vote to remove people in the day!"}, {"translation": "Don French Rabbit Mafia", "role": "mafiaboss1", "side": "mafia1", "actions": {"startup": "team-reveal", "distract": {"mode": "ignore"}, "night": {"kill": {"priority": 12, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "You LOVE potatoes. Type /Kill [name] to kill someone! You can\'t be distracted!"}, {"translation": "Don Italian Deer Mafia", "role": "mafiaboss2", "side": "mafia2", "actions": {"startup": "team-reveal", "distract": {"mode": "ignore"}, "night": {"kill": {"priority": 11, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "You LOVE potatoes. Type /Kill [name] to kill someone! You can\'t be distracted!"}, {"translation": "Potato Cowboy", "role": "samurai", "side": "village", "actions": {"standby": {"kill": {"msg": "You can kill now using /kill [name] :", "killmsg": "~Self~ pulls out a sword and strikes it through ~Target~\'s chest!", "target": "AnyButSelf"}}}, "help": "Type /Kill [name] during the day phase to kill someone! You will be revealed when you kill, so make wise choices! You are allied with the Good people."}, {"translation": "Potato Sadface", "role": "miller", "side": "village", "actions": {"inspect": {"revealAs": "mafia"}, "night": {"protect": {"priority": 5, "broadcast": "role", "target": "AnyButSelf", "common": "Role"}}}, "help": "and insp sees you as Mafia, However, you protect him."}], "sides": [{"translation": "Rabbit", "side": "mafia"}, {"translation": "French Rabbits", "side": "mafia1"}, {"translation": "Italian Deers", "side": "mafia2"}, {"translation": "Potatoes", "side": "village"}, {"translation": "Mean Rabbit", "side": "werewolf"}, {"translation": "Mean Deer", "side": "godfather"}], "roles2": ["bodyguard", "mafia1", "mafia1", "inspector", "hooker", "villager", "mafia2", "mafia2", "villager", "villager", "villager", "mayor", "villager", "spy", "villager", "villager", "villager", "mafiaboss1", "villager", "vigilante", "villager", "godfather2", "godfather1", "godfather0", "mafiaboss2", "samurai", "villager", "villager", "werewolf", "mafia1", "mafia2", "bodyguard"], "roles1": ["bodyguard", "mafia", "inspector", "werewolf", "hooker", "villager", "mafia", "villager", "miller", "villager", "mayor"]};
var ssbbTheme = {"villageCantLoseRoles": ["mayor", "vigilante", "samurai", "samus"], "name": "SSBB", "roles": [{"translation": "Mario", "role": "villager", "side": "village", "actions": {}, "help": "You dont have any special commands during the night! Vote to remove people in the day!"}, {"translation": "Lucas", "role": "inspector", "side": "village", "actions": {"night": {"inspect": {"priority": 30, "target": "AnyButSelf", "common": "Self"}}}, "help": "Type /Inspect [name] to find his/her identity!"}, {"translation": "Donkey Kong", "role": "bodyguard", "side": "village", "actions": {"startup": "role-reveal", "night": {"protect": {"priority": 5, "broadcast": "role", "target": "AnyButSelf", "common": "Role"}}}, "help": "Type /Protect [name] to protect someone!"}, {"translation": "Bowser", "role": "mafia", "side": "mafia", "actions": {"startup": "team-reveal", "night": {"kill": {"priority": 11, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "Type /Kill [name] to kill someone!"}, {"translation": "Wolf", "role": "werewolf", "side": "wolf", "actions": {"avoidHax": ["kill"], "distract": {"msg": "The ~Distracter~ came to you last night! You devoured her instead !", "mode": "ChangeTarget", "hookermsg": "You tried to distract Wolf (what an idea, srsly), you were ravishly shot at!"}, "night": {"kill": {"priority": 10, "target": "AnyButSelf", "common": "Self"}}}, "help": "Type /Kill [name] to kill someone!"}, {"translation": "Peach", "role": "hooker", "side": "village", "actions": {"night": {"distract": {"priority": 1, "target": "AnyButSelf", "common": "Self"}}}, "help": "Type /Distract [name] to distract someone! Vote to remove people in the day!"}, {"translation": "Captain Falcon", "role": "mayor", "side": "village", "actions": {"vote": 3, "standby": {"kill": {"msg": "You can kill now using /kill [name] :", "killmsg": "~Self~ pulls out a fist and punches it through ~Target~\'s chest!", "target": "AnyButSelf"}}}, "help": "You dont have any special commands during the night! Vote to remove people in the day! /Kill To remove people people with a falcon punch! (your vote counts as 3)"}, {"translation": "Snake", "role": "spy", "side": "village", "actions": {"hax": {"kill": {"revealPlayer": 0.20000000000000001, "revealTeam": 0.40000000000000002}}}, "help": "You can find out who is going to get killed next!(no command for this ability) Vote to remove people in the day!"}, {"translation": "Jigglypuff", "role": "godfather", "side": "godfather", "actions": {"avoidHax": ["kill"], "distract": {"msg": "The ~Distracter~ came to you last night! You killed her instead!", "mode": "ChangeTarget", "hookermsg": "You tried to seduce the Marshmallow, you just were rested!"}, "night": {"kill": {"priority": 20, "limit": 2, "target": "AnyButSelf", "common": "Self"}}}, "help": "Type /Kill [name] to kill someone! You can kill 2 targets, Type /kill [name2] again to select your second target!"}, {"translation": "Ike", "role": "vigilante", "side": "village", "actions": {"night": {"kill": {"priority": 19, "target": "AnyButSelf", "common": "Self"}}}, "help": "Type /Kill [name] to kill someone using a sword!(dont kill the good people!)"}, {"translation": "Samus", "role": "samus", "side": "village", "actions": {"distract": {"priority": 1, "target": "AnyButSelf", "common": "Self"}, "night": {"kill": {"priority": 19, "target": "AnyButSelf", "common": "Self"}}}, "help": "Type /Kill [name] to kill someone using a missile! (dont kill the good people!) Type /distract to distract someone"}, {"translation": "Ganondorf", "role": "mafia1", "side": "mafia1", "actions": {"startup": "team-reveal", "night": {"kill": {"priority": 12, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "Type /Kill [name] to kill someone!"}, {"translation": "Wario", "role": "mafia2", "side": "mafia2", "actions": {"startup": "team-reveal", "night": {"kill": {"priority": 11, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "Type /Kill [name] to kill someone!"}, {"translation": "Waddle Doo", "role": "mafia3", "side": "mafia3", "actions": {"startup": "team-reveal", "night": {"kill": {"priority": 11, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "Type /Kill [name] to kill someone!"}, {"translation": "Moblin", "role": "conspirator1", "side": "mafia1", "actions": {"inspect": {"revealAs": "villager"}, "startup": "team-reveal"}, "help": "You dont have any special commands during the night! You are sided Hyrulian Mafia. Vote to remove people in the day!"}, {"translation": "Waluigi", "role": "conspirator2", "side": "mafia2", "actions": {"inspect": {"revealAs": "villager"}, "startup": "team-reveal"}, "help": "You dont have any special commands during the night! You are sided Italian Mafia. Vote to remove people in the day!"}, {"translation": "WaddleDee", "role": "conspirator3", "side": "mafia3", "actions": {"inspect": {"revealAs": "villager"}, "startup": "team-reveal"}, "help": "You dont have any special commands during the night! You are sided Penguin Mafia. Vote to remove people in the day!"}, {"translation": "Ganon", "role": "mafiaboss1", "side": "mafia1", "actions": {"startup": "team-reveal", "distract": {"mode": "ignore"}, "night": {"kill": {"priority": 12, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "Type /Kill [name] to kill someone! You can\'t be distracted!"}, {"translation": "Wario-Man", "role": "mafiaboss2", "side": "mafia2", "actions": {"startup": "team-reveal", "distract": {"mode": "ignore"}, "night": {"kill": {"priority": 11, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "Type /Kill [name] to kill someone! You can\'t be distracted!"}, {"translation": "King Dedede", "role": "mafiaboss3", "side": "mafia3", "actions": {"startup": "team-reveal", "distract": {"mode": "ignore"}, "night": {"kill": {"priority": 11, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "Type /Kill [name] to kill someone! You can\'t be distracted!"}, {"translation": "Marth", "role": "samurai", "side": "village", "actions": {"standby": {"kill": {"msg": "You can kill now using /kill [name] :", "killmsg": "Marth pulls out a sword and strikes it through ~Target~\'s chest!", "target": "AnyButSelf"}}}, "help": "Type /Kill [name] during the day phase to kill someone! You will not be revealed when you kill! You are allied with the Good people."}, {"translation": "MetaKnight", "role": "miller", "side": "village", "actions": {"inspect": {"revealAs": "mafia"}}, "help": "You dont have any special commands during the night! Vote to remove people in the day! Oh, and insp sees you as Mafia"}], "sides": [{"translation": "Koopa", "side": "mafia"}, {"translation": "Hyrulian Mafia", "side": "mafia1"}, {"translation": "Italian Mafia", "side": "mafia2"}, {"translation": "Penguin Mafia", "side": "mafia3"}, {"translation": "Good people", "side": "village"}, {"translation": "Wolf", "side": "wolf"}, {"translation": "Marshmellow", "side": "godfather"}], "roles2": ["bodyguard", "mafia1", "mafia1", "inspector", "hooker", "villager", "mafia2", "mafia2", "villager", "villager", "villager", "mayor", "villager", "spy", "mafia3", "mafia3", "villager", "mafiaboss1", "villager", "vigilante", "samus", "godfather", "mafiaboss2", "samurai", "villager", "mafiaboss3", "werewolf", "mafia1", "mafia2", "bodyguard"], "roles1": ["bodyguard", "mafia", "inspector", "werewolf", "hooker", "villager", "mafia", "villager", "miller", "villager", "mayor"]};
var ffTheme = {"villageCantLoseRoles": ["mayor", "vigilante", "samurai"], "name": "FF", "roles": [{"translation": "Moogle", "role": "villager", "side": "village", "actions": {}, "help": "As a moogle, it is your job to get the village to win by voting during the day!"}, {"translation": "Locke", "role": "inspector", "side": "village", "actions": {"night": {"inspect": {"priority": 30, "target": "AnyButSelf", "common": "Self"}}}, "help": "Type /Inspect [name] to find his/her identity! Be careful to not die!"}, {"translation": "Auron", "role": "bodyguard", "side": "village", "actions": {"startup": "role-reveal", "night": {"protect": {"priority": 5, "broadcast": "role", "target": "AnyButSelf", "common": "Role"}}}, "help": "Type /Protect [name] to protect someone! Try to survive!"}, {"translation": "Garland", "role": "mafia", "side": "mafia", "actions": {"startup": "team-reveal", "night": {"kill": {"priority": 15, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "Type /Kill [name] to kill someone! You, Garland, will knock them all down!"}, {"translation": "Kefka", "role": "werewolf", "side": "werewolf", "actions": {"avoidHax": ["kill"], "distract": {"msg": "The ~Distracter~ came to you last night! You destroyed her instead !", "mode": "ChangeTarget", "hookermsg": "You tried to distract Kefka (how foolish...), you were killed instead !"}, "night": {"kill": {"priority": 3, "target": "AnyButTeam", "common": "Self"}}}, "help": "With insane agility, you outspeed even bodyguards. Strike hard with /kill [name]!"}, {"translation": "Tifa", "role": "hooker", "side": "village", "actions": {"night": {"distract": {"priority": 2, "target": "AnyButSelf", "common": "Self"}}}, "help": "Type /Distract [name] to fool around with someone! Those you mess with can do nothing!"}, {"translation": "Cecil", "role": "mayor", "side": "village", "actions": {"vote": -1}, "help": "Conflicted to the core, your vote counts as -1. Use this to lead the village to victory."}, {"translation": "Kuja", "role": "mayor2", "side": "werewolf", "actions": {"vote": 2}, "help": "You\'re just here for a bit of fun. If you can find and partner up with Kefka, hopefully you can screw the heroes over! Your vote counts as 2."}, {"translation": "Zidane", "role": "spy", "side": "village", "actions": {"hax": {"kill": {"revealPlayer": 0.14999999999999999, "revealTeam": 0.40000000000000002}}}, "help": "You have the ability to sense danger. Use these skills to figure out who is going to die!"}, {"translation": "Sephiroth", "role": "godfather", "side": "godfather", "actions": {"standby": {"kill": {"msg": "You can kill now using /kill [name] :", "killmsg": "Sephiroth pulls out a sword and swiftly strikes it through ~Target~\'s chest!", "target": "AnyButSelf"}}, "avoidHax": ["kill"], "distract": {"msg": "The ~Distracter~ came to you last night! You killed her instead!", "mode": "ChangeTarget", "hookermsg": "You tried to mess with Sephiroth, you just were killed!"}, "night": {"kill": {"priority": 20, "limit": 1, "target": "AnyButSelf", "common": "Self"}}}, "help": "Type /Kill [name] to kill someone! You can kill twice, once during standby and once at night. You will not be revealed, so have fun! "}, {"translation": "Lightning", "role": "vigilante", "side": "village", "actions": {"night": {"kill": {"priority": 19, "target": "AnyButSelf", "common": "Self"}}}, "help": "Allied with the heroes, it is your goal to assist them and win! Type /kill [name] during the night."}, {"translation": "Jecht", "role": "mafia1", "side": "mafia1", "actions": {"startup": "team-reveal", "night": {"kill": {"priority": 12, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "Team up with Seymour and Yunalesca to bring Sin to victory! Type /kill [name] during the night!"}, {"translation": "Larsa Solidor", "role": "mafia2", "side": "mafia2", "actions": {"startup": "team-reveal", "night": {"kill": {"priority": 11, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "House Solidor unite! Use /kill [name] to weaken the heroes."}, {"translation": "Yunalesca", "role": "conspirator1", "side": "mafia1", "actions": {"startup": "team-reveal", "night": {"distract": {"priority": 1, "target": "AnyButSelf", "common": "Self"}}}, "help": "Stop those who threaten to ruin Sin\'s plans. Type /distract [name] during the night."}, {"translation": "Judge Gabranth", "role": "conspirator2", "side": "mafia2", "actions": {"startup": "team-reveal", "night": {"protect": {"priority": 4, "broadcast": "role", "target": "AnyButSelf", "common": "Role"}}}, "help": "You\'re House Solidor\'s personal bodyguard. Type /protect [name] to defend Larsa or Vayne!"}, {"translation": "Seymour", "role": "mafiaboss1", "side": "mafia1", "actions": {"startup": "team-reveal", "distract": {"mode": "ignore"}, "night": {"kill": {"priority": 12, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "Type /Kill [name] to kill someone! You can\'t be distracted by foolish mortals."}, {"translation": "Vayne Solidor", "role": "mafiaboss2", "side": "mafia2", "actions": {"startup": "team-reveal", "distract": {"mode": "ignore"}, "night": {"kill": {"priority": 11, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "As head of House Solidor, it is your duty to crush the heroes. Type /kill [name]. You cannot be distracted."}, {"translation": "Cloud", "role": "samurai", "side": "village", "actions": {"standby": {"kill": {"msg": "You can kill now using /kill [name] :", "killmsg": "~Self~ pulls out a Buster Sword and strikes it through ~Target~\'s chest!", "target": "AnyButSelf"}}}, "help": "Lead the heroes to victory by typing /kill [name] during a standby phase! "}, {"translation": "Cactuar", "role": "miller", "side": "village", "actions": {"inspect": {"revealAs": "werewolf"}}, "help": "You dont have any special commands during the night! Vote to remove people in the day! Inspector will think you\'re a bad guy!"}], "sides": [{"translation": "Garland", "side": "mafia"}, {"translation": "Sin", "side": "mafia1"}, {"translation": "House Solidor", "side": "mafia2"}, {"translation": "Heroes", "side": "village"}, {"translation": "Kefka\'s Posse", "side": "werewolf"}, {"translation": "Sephiroth", "side": "godfather"}], "roles2": ["bodyguard", "mafia1", "conspirator1", "inspector", "hooker", "villager", "mafia2", "conspirator2", "villager", "miller", "vigilante", "mayor", "werewolf", "spy", "villager", "villager", "mafia", "mafiaboss1", "mafiaboss2", "godfather", "villager", "samurai", "mayor2", "miller", "villager", "villager", "villager", "miller", "miller", "mafia"], "roles1": ["bodyguard", "mafia", "inspector", "werewolf", "hooker", "villager", "mafia", "mayor", "miller", "villager", "villager"]};
var darknessTheme = {"villageCantLoseRoles": ["mayor", "vigilante", "samurai"], "name": "Darkness", "roles": [{"translation": "Scared People", "role": "villager", "side": "village", "actions": {}, "help": "You dont have any special commands during the night of course you are so frightened! Vote to remove people in the day!"}, {"translation": "Detective", "role": "inspector", "side": "village", "actions": {"night": {"inspect": {"priority": 30, "target": "AnyButSelf", "common": "Self"}}}, "help": "Type /Inspect [name] to find his/her identity!"}, {"translation": "Charm", "role": "bodyguard", "side": "village", "actions": {"startup": "role-reveal", "night": {"protect": {"priority": 5, "broadcast": "role", "target": "AnyButSelf", "common": "Role"}}}, "help": "Type /Protect [name] to protect someone and hope not to die!"}, {"translation": "Ghosts", "role": "mafia", "side": "mafia", "actions": {"startup": "team-reveal", "night": {"kill": {"priority": 11, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "Type /Kill [name] to kill someone with your scream!"}, {"translation": "Anubis", "role": "werewolf", "side": "werewolf", "actions": {"avoidHax": ["kill"], "distract": {"msg": "The ~Distracter~ came to you last night! You devoured her instead and was delighted!", "mode": "ChangeTarget", "hookermsg": "You tried to distract Anubis (what an idea, srsly), you were ravishly devoured, for a treat and tributed to Anubis!"}, "night": {"kill": {"priority": 10, "target": "AnyButSelf", "common": "Self"}}}, "help": "Type /Kill [name] to kill someone with your dark underworld powers of Egypt!"}, {"translation": "Lady Ghastly", "role": "hooker", "side": "village", "actions": {"night": {"distract": {"priority": 1, "target": "AnyButSelf", "common": "Self"}}}, "help": "Type /Distract [name] to distract someone! Vote to remove people in the day!"}, {"translation": "President", "role": "mayor", "side": "village", "actions": {"vote": 5}, "help": "You dont have any special commands during the night! Vote to remove people in the day! (your vote counts as 5)"}, {"translation": "Sneaky", "role": "spy", "side": "village", "actions": {"hax": {"kill": {"revealPlayer": 0.10000000000000001, "revealTeam": 0.33000000000000002}}}, "help": "You can find out who is going to get killed next!(no command for this ability) Vote to remove people in the day!"}, {"translation": "Grim Reaper", "role": "godfather", "side": "godfather", "actions": {"vote": 5, "avoidHax": ["kill"], "distract": {"msg": "The ~Distracter~ came to you last night! You killed her instead and sent her below!", "mode": "ChangeTarget", "hookermsg": "You tried to seduce the Grim Reaper, you just were killed and sent to the Underworld!"}, "night": {"kill": {"priority": 20, "limit": 2, "target": "AnyButSelf", "common": "Self"}}}, "help": "Type /Kill [name] to kill someone! You can kill 2 targets, Type /kill [name2] again to select your second target! (your vote counts as 5)"}, {"translation": "Angels", "role": "vigilante", "side": "village", "actions": {"night": {"kill": {"priority": 19, "target": "AnyButSelf", "common": "Self"}, "distract": {"priority": 1, "target": "AnyButSelf", "common": "Self"}}}, "help": "Type /Kill [name] to kill someone with holy engergy!(dont kill the scared people!) You are also cute enough to distract people! Type /Distract [name] to distract someone!"}, {"translation": "Vampires", "role": "mafia1", "side": "mafia1", "actions": {"startup": "team-reveal", "night": {"kill": {"priority": 12, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "Type /Kill [name] to kill someone with your fangs!"}, {"translation": "Deadly Ghosts", "role": "mafia2", "side": "mafia2", "actions": {"startup": "team-reveal", "night": {"kill": {"priority": 11, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "Type /Kill [name] to kill someone with an evil laughter and a scream!"}, {"translation": "Prince Vamp", "role": "conspirator1", "side": "mafia1", "actions": {"inspect": {"revealAs": "villager"}, "startup": "team-reveal"}, "help": "You dont have any special commands during the night of course you are a good looking bat/vampire! You are sided Vampires. Vote to remove people in the day!"}, {"translation": "Prince Ghost", "role": "conspirator2", "side": "mafia2", "actions": {"inspect": {"revealAs": "villager"}, "startup": "team-reveal"}, "help": "You dont have any special commands during the night of course your scared of the night but you aren\'t of the day! You are sided Deadly Ghosts. Vote to remove people in the day!"}, {"translation": "Lord Vamp", "role": "mafiaboss1", "side": "mafia1", "actions": {"startup": "team-reveal", "distract": {"mode": "ignore"}, "night": {"kill": {"priority": 12, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "Type /Kill [name] to kill someone! You can\'t be distracted, meaning your teeth keep you safe!"}, {"translation": "Lord Ghost", "role": "mafiaboss2", "side": "mafia2", "actions": {"startup": "team-reveal", "distract": {"mode": "ignore"}, "night": {"kill": {"priority": 11, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "Type /Kill [name] to kill someone! You can\'t be distracted of course it goes just straight through your heart!"}, {"translation": "Holy Orb", "role": "samurai", "side": "village", "actions": {"standby": {"kill": {"msg": "You can kill now using /kill [name] :", "killmsg": "~Self~ A light comes out and strikes it through ~Target~\'s body!", "target": "AnyButSelf"}}}, "help": "Type /Kill [name] during the day phase to kill someone! You will be revealed when you kill, so make wise choices! You are allied with the Good people."}, {"translation": "Holy Orb", "role": "samurai", "side": "village", "actions": {"standby": {"kill": {"msg": "You can kill now using /kill [name] :", "killmsg": "~Self~ A holy light comes out and strikes it through ~Target~\'s body!", "target": "AnyButSelf"}}}, "help": "Type /Kill [name] during the day phase to kill someone! You will be revealed when you kill, so make wise choices! You are allied with the Good people."}, {"translation": "Hades", "role": "samurai", "side": "mafia2", "actions": {"standby": {"kill": {"msg": "You can kill now using /kill [name] :", "killmsg": "~Hades~ A dark blade is pulled out and is thrust through ~Target~\'s body with an evil laugh!", "target": "AnyButSelf"}}}, "help": "Type /Kill [name] during the day phase to kill someone! You not will be revealed when you kill, so make wise choices! You are allied with mafia2."}, {"translation": "Mr. Ghost", "role": "miller", "side": "village", "actions": {"inspect": {"revealAs": "mafia"}}, "help": "You dont have any special commands during the night of course your just a ghost and love the daylight! Vote to remove people in the day! Oh, and insp sees you as Mafia"}], "sides": [{"translation": "Ghosts", "side": "mafia"}, {"translation": "Vampires", "side": "mafia1"}, {"translation": "Deadly Ghosts", "side": "mafia2"}, {"translation": "Scared People", "side": "village"}, {"translation": "Anubis", "side": "werewolf"}, {"translation": "Grim Reaper", "side": "godfather"}], "roles2": ["bodyguard", "mafia1", "mafia1", "inspector", "hooker", "villager", "mafia2", "mafia2", "villager", "villager", "villager", "mayor", "villager", "spy", "villager", "villager", "villager", "mafiaboss1", "villager", "vigilante", "villager", "godfather", "mafiaboss2", "samurai", "villager", "villager", "werewolf", "mafia1", "mafia2", "bodyguard"], "roles1": ["bodyguard", "mafia", "inspector", "werewolf", "hooker", "villager", "mafia", "villager", "miller", "villager", "mayor"]};
var internetTheme = {"villageCantLoseRoles": ["mayor", "vigilante", "samurai"], "name": "Internet", "roles": [{"translation": "Fish", "role": "villager", "side": "village", "actions": {}, "help": "Your cannon fodder! Vote to remove people in the day!"}, {"translation": "PRO", "role": "inspector", "side": "village", "actions": {"night": {"inspect": {"priority": 30, "target": "AnyButSelf", "common": "Self"}}}, "help": "Type /Inspect [name] to find his/her identity!"}, {"translation": "Scapegoat", "role": "bodyguard", "side": "village", "actions": {"startup": "role-reveal", "night": {"protect": {"priority": 5, "broadcast": "role", "target": "AnyButSelf", "common": "Role"}}}, "help": "I\'m sure you know what this means. Type /Protect [name] to protect someone!"}, {"translation": "Mooks", "role": "mafia", "side": "mafia", "actions": {"startup": "team-reveal", "night": {"kill": {"priority": 11, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "Type /Kill [name] to kill someone!"}, {"translation": "Munchkin", "role": "werewolf", "side": "werewolf", "actions": {"avoidHax": ["kill"], "distract": {"msg": "The ~Distracter~ came to you last night! You pwned them instead !", "mode": "ChangeTarget", "hookermsg": "You tried to edit the Munchkin, and he crushed you with his cheapness!"}, "night": {"kill": {"priority": 10, "target": "AnyButSelf", "common": "Self"}}}, "help": "Type /Kill [name] to pwn someone! FUNTIME!"}, {"translation": "Ninja Editor", "role": "hooker", "side": "village", "actions": {"night": {"distract": {"priority": 1, "target": "AnyButSelf", "common": "Self"}}}, "help": "Type /Distract [name] to distract someone! Vote to remove people in the day!"}, {"translation": "Big Fish", "role": "mayor", "side": "village", "actions": {"vote": 3}, "help": "You lead the cannon fodder! Vote to remove people in the day! (your vote counts as 3)"}, {"translation": "Haxer", "role": "spy", "side": "village", "actions": {"hax": {"kill": {"revealPlayer": 0.14999999999999999, "revealTeam": 0.53000000000000003}}}, "help": "You can find out who is going to get killed next!(no command for this ability) Vote to remove people in the day!"}, {"translation": "Ubertroll", "role": "godfather", "side": "godfather", "actions": {"avoidHax": ["kill"], "distract": {"msg": "The ~Distracter~ came to you last night! You killed her instead!", "mode": "ChangeTarget", "hookermsg": "You tried to edit the Ubertroll, how dumb can you be?! You got trolled!"}, "night": {"kill": {"priority": 20, "limit": 3, "target": "AnyButSelf", "common": "Self"}}}, "help": "Type /Kill [name] to kill someone! You can kill 3 targets!"}, {"translation": "Noob Hunter", "role": "vigilante", "side": "village", "actions": {"night": {"kill": {"priority": 19, "target": "AnyButSelf", "common": "Self"}}}, "help": "Type /Kill [name] to kill someone!(dont kill the users!)"}, {"translation": "Noobs", "role": "mafia1", "side": "mafia1", "actions": {"startup": "team-reveal", "night": {"kill": {"priority": 12, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "Type /Kill [name] to kill someone!"}, {"translation": "Trolls", "role": "mafia2", "side": "mafia2", "actions": {"startup": "team-reveal", "night": {"kill": {"priority": 11, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "Type /Kill [name] to kill someone!"}, {"translation": "Noob Worshipper", "role": "conspirator1", "side": "mafia1", "actions": {"inspect": {"revealAs": "villager"}, "startup": "team-reveal"}, "help": "You dont have any special commands during the night! You are sided with the Noobs. Vote to remove people in the day!"}, {"translation": "Troll Worshipper", "role": "conspirator2", "side": "mafia2", "actions": {"inspect": {"revealAs": "villager"}, "startup": "team-reveal"}, "help": "You dont have any special commands during the night! You are sided with the Trolls. Vote to remove people in the day!"}, {"translation": "Noob Supreme", "role": "mafiaboss1", "side": "mafia1", "actions": {"startup": "team-reveal", "distract": {"mode": "ignore"}, "night": {"kill": {"priority": 12, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "Type /Kill [name] to kill someone! You can\'t be distracted!"}, {"translation": "Troll Supreme", "role": "mafiaboss2", "side": "mafia2", "actions": {"startup": "team-reveal", "distract": {"mode": "ignore"}, "night": {"kill": {"priority": 11, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "Type /Kill [name] to kill someone! You can\'t be distracted!"}, {"translation": "Troll Hunter", "role": "samurai", "side": "village", "actions": {"standby": {"kill": {"msg": "You can kill now using /kill [name] :", "killmsg": "~Self~ deletes ~Target~ from the current mafia game!", "target": "AnyButSelf"}}}, "help": "Type /Kill [name] during the day phase to delete someone! You will be revealed when you delete, so make wise choices! You are allied with the Good people."}, {"translation": "Unlucky Sap", "role": "miller", "side": "village", "actions": {"vote": 0, "inspect": {"revealAs": "mafia"}}, "help": "You dont have any special commands during the night! And you can\'t vote in the day! Oh, and PRO sees you as Mook. You really drew the short straw!"}, {"translation": "Pathetic Sap", "role": "sap", "side": "village", "actions": {"vote": 0, "inspect": {"revealAs": "godfather"}}, "help": "You dont have any special commands during the night! And you can\'t vote in the day! Oh, and PRO sees you as Ubertroll. You really drew the short straw!"}, {"translation": "Administrator", "role": "admin", "side": "authority", "actions": {"standby": {"kill": {"msg": "You can kill now using /kill [name] :", "killmsg": "~Self~ bans ~Target~ from the current mafia game!", "target": "Any"}}}, "help": "Type /Kill [name] during the day phase to ban someone! You will be revealed when you ban, so make wise choices! You are allied with the Authority! You can\'t see the mod, but he can see you."}, {"translation": "Moderator", "role": "mod", "side": "authority", "actions": {"startup": "team-reveal", "distract": {"mode": "ignore"}, "night": {"protect": {"priority": 2, "broadcast": "role", "target": "AnyButSelf", "common": "Role"}, "kill": {"priority": 21, "broadcast": "role", "target": "Any", "common": "Role"}}}, "help": "Use /protect to protect the Admin! You are allied with authority! You can also /kill someone in the same night that you protect the admin [you strike last]. The Ninja Editor can\'t distract you either!"}], "sides": [{"translation": "Mooks", "side": "mafia"}, {"translation": "Noobs", "side": "mafia1"}, {"translation": "Trolls", "side": "mafia2"}, {"translation": "Users", "side": "village"}, {"translation": "Auth", "side": "authority"}, {"translation": "Munchkin", "side": "werewolf"}, {"translation": "Ubertroll", "side": "godfather"}], "roles2": ["bodyguard", "mafia1", "mafia1", "inspector", "hooker", "villager", "mafia2", "mafia2", "villager", "sap", "villager", "mayor", "villager", "spy", "admin", "villager", "vigilante", "mod", "mafiaboss1", "vigilante", "villager", "godfather", "samurai", "mafiaboss2", "villager", "villager", "werewolf", "mafia1", "mafia2", "bodyguard", "villager", "conspiritor1", "conspiritor2"], "roles1": ["bodyguard", "mafia", "inspector", "werewolf", "hooker", "villager", "mafia", "villager", "miller", "villager", "mayor"]};
//var mafiaTheme = {"villageCantLoseRoles": ["Mayor", "Vigilante", "Samurai"], "name": "Mafia", "roles": [{"translation": "Fish", "role": "villager", "side": "village", "actions": {}, "help": "Your cannon fodder! Vote to remove people in the day!"}, {"translation": "PRO", "role": "inspector", "side": "village", "actions": {"night": {"inspect": {"priority": 30, "target": "AnyButSelf", "common": "Self"}}}, "help": "Type /Inspect [name] to find his/her identity!"}, {"translation": "Meat Shield", "role": "bodyguard", "side": "village", "actions": {"startup": "role-reveal", "night": {"protect": {"priority": 5, "broadcast": "role", "target": "AnyButSelf", "common": "Role"}}}, "help": "I\'m sure you know what this means. Type /Protect [name] to protect someone!"}, {"translation": "Mooks", "role": "mafia", "side": "mafia", "actions": {"startup": "team-reveal", "night": {"kill": {"priority": 11, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "Type /Kill [name] to kill someone!"}, {"translation": "Munchkin", "role": "werewolf", "side": "werewolf", "actions": {"avoidHax": ["kill"], "distract": {"msg": "The ~Distracter~ came to you last night! You devoured her instead !", "mode": "ChangeTarget", "hookermsg": "You tried to distract the Munchkin,and he crushed you with his cheapness!"}, "night": {"kill": {"priority": 10, "target": "AnyButSelf", "common": "Self"}}}, "help": "Type /Kill [name] to kill someone! DINNERTIME!"}, {"translation": "Rand Bait", "role": "hooker", "side": "village", "actions": {"night": {"distract": {"priority": 1, "target": "AnyButSelf", "common": "Self"}}}, "help": "Type /Distract [name] to distract someone! Vote to remove people in the day!"}, {"translation": "Big Fish", "role": "mayor", "side": "village", "actions": {"vote": 3}, "help": "You lead the cannon fodder! Vote to remove people in the day! (your vote counts as 3)"}, {"translation": "Haxer", "role": "spy", "side": "village", "actions": {"hax": {"kill": {"revealPlayer": 0.14999999999999999, "revealTeam": 0.53000000000000003}}}, "help": "You can find out who is going to get killed next!(no command for this ability) Vote to remove people in the day!"}, {"translation": "Ubertroll", "role": "godfather", "side": "godfather", "actions": {"avoidHax": ["kill"], "distract": {"msg": "The ~Distracter~ came to you last night! You killed her instead!", "mode": "ChangeTarget", "hookermsg": "You tried to seduce the Ubertroll, how dumb can you be?! You got trolled!"}, "night": {"kill": {"priority": 20, "limit": 3, "target": "AnyButSelf", "common": "Self"}}}, "help": "Type /Kill [name] to kill someone! You can kill 3 targets!"}, {"translation": "Noob Hunter", "role": "vigilante", "side": "village", "actions": {"night": {"kill": {"priority": 19, "target": "AnyButSelf", "common": "Self"}}}, "help": "Type /Kill [name] to kill someone!(dont kill the good people!)"}, {"translation": "Noobs", "role": "mafia1", "side": "mafia1", "actions": {"startup": "team-reveal", "night": {"kill": {"priority": 12, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "Type /Kill [name] to kill someone!"}, {"translation": "Trolls", "role": "mafia2", "side": "mafia2", "actions": {"startup": "team-reveal", "night": {"kill": {"priority": 11, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "Type /Kill [name] to kill someone!"}, {"translation": "Noob Worshipper", "role": "conspirator1", "side": "mafia1", "actions": {"inspect": {"revealAs": "villager"}, "startup": "team-reveal"}, "help": "You dont have any special commands during the night! You are sided French Canadian Mafia. Vote to remove people in the day!"}, {"translation": "Troll Worshipper", "role": "conspirator2", "side": "mafia2", "actions": {"inspect": {"revealAs": "villager"}, "startup": "team-reveal"}, "help": "You dont have any special commands during the night! You are sided Italian Mafia. Vote to remove people in the day!"}, {"translation": "Noob Supreme", "role": "mafiaboss1", "side": "mafia1", "actions": {"startup": "team-reveal", "distract": {"mode": "ignore"}, "night": {"kill": {"priority": 12, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "Type /Kill [name] to kill someone! You can\'t be distracted!"}, {"translation": "Troll Supreme", "role": "mafiaboss2", "side": "mafia2", "actions": {"startup": "team-reveal", "distract": {"mode": "ignore"}, "night": {"kill": {"priority": 11, "broadcast": "team", "target": "AnyButTeam", "common": "Team"}}}, "help": "Type /Kill [name] to kill someone! You can\'t be distracted!"}, {"translation": "Troll Hunter", "role": "samurai", "side": "village", "actions": {"standby": {"kill": {"msg": "You can kill now using /kill [name] :", "killmsg": "~Self~ bans ~Target~ from the current mafia game!", "target": "AnyButSelf"}}}, "help": "Type /Kill [name] during the day phase to kill someone! You will be revealed when you kill, so make wise choices! You are allied with the Good people."}, {"translation": "Unlucky Sap", "role": "miller", "side": "village", "actions": {"vote": 0, "inspect": {"revealAs": "mafia"}}, "help": "You dont have any special commands during the night! And you can\'t vote in the day! Oh, and insp sees you as Mook. You really drew the short straw!"}, {"translation": "Pathetic Sap", "role": "sap", "side": "village", "actions": {"vote": 0, "inspect": {"revealAs": "godfather"}}, "help": "You dont have any special commands during the night! And you can\'t vote in the day! Oh, and insp sees you as Ubertroll. You really drew the short straw!"}], "sides": [{"translation": "Mooks", "side": "mafia"}, {"translation": "Noobs", "side": "mafia1"}, {"translation": "Trolls", "side": "mafia2"}, {"translation": "PROs", "side": "village"}, {"translation": "Munchkin", "side": "werewolf"}, {"translation": "Ubertroll", "side": "godfather"}], "roles2": ["bodyguard", "mafia1", "mafia1", "inspector", "hooker", "villager", "mafia2", "mafia2", "villager", "villager", "villager", "mayor", "villager", "spy", "villager", "villager", "villager", "mafiaboss1", "villager", "vigilante", "villager", "godfather", "mafiaboss2", "samurai", "villager", "villager", "werewolf", "mafia1", "mafia2", "bodyguard", "sap", "conspiritor1", "conspiritor2"], "roles1": ["bodyguard", "mafia", "inspector", "werewolf", "hooker", "villager", "mafia", "villager", "miller", "villager", "mayor"]};
/* ThemeManager is a object taking care of saving and loading themes
* in mafia game */
function ThemeManager() {
this.themeInfo = [];
this.themes = {};
}
ThemeManager.prototype.toString = function() { return "[object ThemeManager]"; }
ThemeManager.prototype.save = function(name, url, resp) {
var fname = "mafiathemes/theme_" + name.replace("/", "").toLowerCase();
sys.writeToFile(fname, resp);
var done = false;
for (var i = 0; i < this.themeInfo.length; ++i) {
if (cmp(name, this.themeInfo[i][0])) {
done = true;
this.themeInfo[i] = [name, url, fname, true];
break;
}
}
if (!done) {
this.themeInfo.push([name, url, fname, true]);
}
sys.writeToFile("mafiathemes/metadata.json", JSON.stringify({'meta': this.themeInfo}));
}
ThemeManager.prototype.loadTheme = function(plain_theme) {
var theme = new Theme();
try {
theme.sideTranslations = {};
theme.roles = {};
theme.nightPriority = [];
theme.standbyRoles = [];
theme.haxRoles = {};
// Init from the theme
for (var i in plain_theme.sides) {
theme.addSide(plain_theme.sides[i]);
}
for (var i in plain_theme.roles) {
theme.addRole(plain_theme.roles[i]);
}
theme.roles1 = plain_theme.roles1;
var i = 2;
while ("roles"+i in plain_theme) {
theme["roles"+i] = plain_theme["roles"+i];
++i;
}
theme.roleLists = i-1;
theme.villageCantLoseRoles = plain_theme.villageCantLoseRoles;
theme.name = plain_theme.name;
theme.author = plain_theme.author;
theme.killmsg = plain_theme.killmsg;
theme.killusermsg = plain_theme.killusermsg;
theme.generateRoleInfo();
theme.enabled = true;
return theme;
} catch (err) {
if (typeof sys == 'object')
mafiabot.sendAll("Couldn't use theme " + plain_theme.name + ": "+err+".", mafiachan);
else
print(Config.Mafia.bot + ": Couldn't use theme: " + plain_theme.name + ": "+err+".");
}
}
ThemeManager.prototype.loadThemes = function() {
if (typeof sys !== "object") return;
this.themes = {};
this.themes["default"] = this.loadTheme(defaultTheme);
var content = sys.getFileContent("mafiathemes/metadata.json");
if (!content) return;
var parsed = JSON.parse(content);
if (parsed.hasOwnProperty("meta")) {
this.themeInfo = parsed.meta;
}
for (var i = 0; i < this.themeInfo.length; ++i) {
if (!this.themeInfo[i][3]) continue;
try {
var theme = this.loadTheme(JSON.parse(sys.getFileContent(this.themeInfo[i][2])));
this.themes[theme.name.toLowerCase()] = theme;
} catch(err) {
mafiabot.sendAll("Error loading cached theme \"" + this.themeInfo[i][0] + "\": " + err, mafiachan);
}
}
}
ThemeManager.prototype.saveToFile = function(plain_theme) {
if (typeof sys != "object") return;
var fname = "mafiathemes/theme_" + plain_theme.name.toLowerCase();
sys.writeToFile(fname, JSON.stringify(plain_theme));
this.themeInfo.push([plain_theme.name, "", fname, true]);
sys.writeToFile("mafiathemes/metadata.json", JSON.stringify({'meta': this.themeInfo}));
}
ThemeManager.prototype.loadWebTheme = function(url, announce, update) {
if (typeof sys != 'object') return;
var manager = this;
sys.webCall(url, function(resp) {
try {
var plain_theme = JSON.parse(resp);
var theme = manager.loadTheme(plain_theme);
var lower = theme.name.toLowerCase();
if (manager.themes.hasOwnProperty(lower) && !update) {
mafiabot.sendAll("Won't update " + theme.name + " with /add, use /update to force an update", mafiachan);
return;
}
manager.themes[lower] = theme;
manager.save(theme.name, url, resp, update);
if (announce) {
mafiabot.sendAll("Loaded theme " + theme.name, mafiachan);
}
} catch (err) {
mafiabot.sendAll("Couldn't download theme from "+url, mafiachan);
mafiabot.sendAll("" + err, mafiachan);
return;
}
});
}
ThemeManager.prototype.remove = function(src, name) {
name = name.toLowerCase()
if (name in this.themes) {
delete this.themes[name];
for (var i = 0; i < this.themeInfo.length; ++i) {
if (cmp(name, this.themeInfo[i][0])) {
//this.themeInfo[i][3] = false;
this.themeInfo.splice(i,1);
break;
}
}
sys.writeToFile("mafiathemes/metadata.json", JSON.stringify({'meta': this.themeInfo}));
mafiabot.sendChanMessage(src, "theme " + name + " removed.");
}
}
ThemeManager.prototype.enable = function(src, name) {
name = name.toLowerCase()
if (name in this.themes) {
this.themes[name].enabled = true;
mafiabot.sendChanMessage(src, "theme " + name + " enabled.");
}
}
ThemeManager.prototype.disable = function(src, name) {
name = name.toLowerCase()
if (name in this.themes) {
this.themes[name].enabled = false;
mafiabot.sendChanMessage(src, "theme " + name + " disabled.");
}
}
/* Theme is a small helper to organize themes
* inside the mafia game */
function Theme() {}
Theme.prototype.toString = function() { return "[object Theme]"; }
Theme.prototype.addSide = function(obj) {
this.sideTranslations[obj.side] = obj.translation;
}
Theme.prototype.addRole = function(obj) {
this.roles[obj.role] = obj;
if ("hax" in obj.actions) {
for(var i in obj.actions.hax) {
var action = i;
if (!(action in this.haxRoles)) {
this.haxRoles[action] = [];
}
this.haxRoles[action].push(obj.role);
}
}
if ("night" in obj.actions) {
for (var i in obj.actions.night) {
var priority = obj.actions.night[i].priority;
var action = i;
var role = obj.role;
this.nightPriority.push({'priority': priority, 'action': action, 'role': role});
}
this.nightPriority.sort(function(a,b) { return a.priority - b.priority });
}
if ("standby" in obj.actions) {
for (var i in obj.actions.standby) {
this.standbyRoles.push(obj.role);
}
}
}
Theme.prototype.generateRoleInfo = function() {
var sep = "*** *********************************************************************** ***";
var roles = [sep];
for (var r in this.roles) {
try {
var role = this.roles[r];
roles.push("±Role: " + role.translation);
// check which abilities the role has
var abilities = "";
if (role.actions.night) {
for (var a in role.actions.night) {
var ability = role.actions.night[a];
abilities += "Can " + a + " " + ("limit" in ability ? ability.limit + " persons" : "one person") +" during the night. ";
if ("avoidHax" in role.actions && role.actions.avoidHax.indexOf(a) != -1) {
abilities += "(Can't be detected by spies.) ";
}
}
}
if (role.actions.standby) {
for (var a in role.actions.standby) {
var ability = role.actions.standby[a];
abilities += "Can " + a + " " + ("limit" in ability ? ability.limit + " persons" : "one person") +" during the standby. ";
}
}
if ("vote" in role.actions) {
abilities += "Vote counts as " + role.actions.vote + ". ";
}
if ("kill" in role.actions && role.actions.kill.mode == "ignore") {
abilities += "Can't be nightkilled. ";
}
if ("hax" in role.actions && Object.keys) {
var haxy = Object.keys(role.actions.hax);
abilities += "Gets hax on " + (haxy.length > 1 ? haxy.splice(0,haxy.length-1).join(", ")+" and ":"") + haxy + ". ";
}
if ("inspect" in role.actions) {
abilities += "Reveals as " + this.roles[role.actions.inspect.revealAs].translation + " when inspected. ";
}
if ("distract" in role.actions) {
if (role.actions.distract.mode == "ChangeTarget")
abilities += "Kills any distractors. ";
if (role.actions.distract.mode == "ignore")
abilities += "Ignores any distractors. ";
}
if (typeof role.side == "string") {
abilities += "Sided with " + this.trside(role.side) + ". ";
} else if (typeof role.side == "object") {
var plop = Object.keys(role.side.random);
var tran = [];
for(var p in plop) {
tran.push(this.trside(p));
}
abilities += "Sided with " + (tran.length > 1 ? tran.splice(0,tran.length-1).join(", ")+" or ":"") + tran + ". ";
}
roles.push("±Ability: " + abilities);
// check on which player counts the role appears
var parts = [];
var end = 0;
for(var i = 1; i <= this.roleLists; ++i) {
var r = "roles"+i;
var start = this[r].indexOf(role.role);
var last = end;
end = this[r].length;
if (start >= 0) {
++start;
start = start > last ? start : 1+last;
if(parts.length > 0 && parts[parts.length-1][1] == start-1) {
parts[parts.length-1][1] = end;
} else {
parts.push([start,end]);
if (parts.length > 1) {
parts[parts.length-2] = parts[parts.length-2][0] < parts[parts.length-2][1] ? parts[parts.length-2].join("-") : parts[parts.length-2][1];
}
}
}
}
if (parts.length > 0) {
parts[parts.length-1] = parts[parts.length-1][0] < parts[parts.length-1][1] ? parts[parts.length-1].join("-") : parts[parts.length-1][1];
}
roles.push("±Game: " + parts.join(", ") + " Players");
roles.push(sep);
} catch (err) {
mafiabot.sendAll("Error adding role " + role.translation + "(" + role.role + ") to /roles", mafiachan);
throw err;
}
}
this.roleInfo = roles;
}
/* Theme Loading and Storing */
Theme.prototype.trside = function(side) {
return this.sideTranslations[side];
}
Theme.prototype.trrole = function(role) {
return this.roles[role].translation;
}
Theme.prototype.getHaxRolesFor = function(command) {
if (command in this.haxRoles) {
return this.haxRoles[command];
}
return [];
}
this.isInGame = function(player) {
if (mafia.state == "entry") {
return this.signups.indexOf(player) != -1;
}
return player in this.players;
};
// init
this.themeManager = new ThemeManager();
this.hasCommand = function(name, command, state) {
var player = this.players[name];
return (state in player.role.actions && command in player.role.actions[state]);
};
this.correctCase = function(string) {
var lstring = string.toLowerCase();
for (var x in this.players) {
if (x.toLowerCase() == lstring)
return this.players[x].name;
}
return noPlayer;
};
this.clearVariables = function() {
/* hash : playername => playerstruct */
this.players = {};
this.signups = [];
this.state = "blank";
this.ticks = 0;
this.votes = {};
this.voteCount = 0;
this.ips = [];
this.resetTargets();
};
this.lastAdvertise = 0;
this.resetTargets = function() {
this.teamTargets = {};
this.roleTargets = {};
for (var p in this.players) {
this.players[p].targets = {};
this.players[p].dayKill = undefined;
this.players[p].guarded = undefined;
this.players[p].safeguarded = undefined;
}
};
this.clearVariables();
/* callback for /start */
this.startGame = function(src, commandData) {
if (mafia.state != "blank") {
sys.sendMessage(src, "±Game: A game is going on. Wait until it's finished to start another one", mafiachan);
sys.sendMessage(src, "±Game: You can join the game by typing /join !", mafiachan);
return;
}
/* // No banned combos currently since we don't have the author of every theme
var bannedCombos = {'deria': ['ff', 'castle']};
if (bannedCombos.hasOwnProperty(sys.name(src).toLowerCase()) && bannedCombos[sys.name(src).toLowerCase()].indexOf(commandData.toLowerCase()) != -1) {
sys.sendMessage(src, "±Game: Sorry, you aren't allowed to choose this theme!", mafiachan);
return;
}
*/
var previous = mafia.theme ? mafia.theme.name : undefined;
var themeName = commandData == noPlayer ? "default" : commandData.toLowerCase();
// games need to go default, theme, default, theme...
/*
if (sys.auth(src) < 1 && previous !== undefined) {
if (previous == "default" && themeName == "default") {
sys.sendMessage(src, "±Game: Can't repeat normal game!", mafiachan);
return;
}
else if (previous !== "default" && themeName !== "default") {
sys.sendMessage(src, "±Game: Can't repeat themed game!", mafiachan);
return;
}
}
*/
// Prevent a single player from dominating the theme selections.
// We exclude mafia admins from this.
var PlayerCheck = PreviousGames.slice(-5).reverse();
if (!mafia.isMafiaAdmin(src)) {
for (var i = 0; i < PlayerCheck.length; i++) {
var who = PlayerCheck[i].who;
if (who == sys.name(src)) {
sys.sendMessage(src, "±Game: Sorry, you have started a game " + i + " games ago, let someone else have a chance!",mafiachan);
return;
}
}
}
var Check = PreviousGames.slice(-Config.Mafia.norepeat).reverse();
for (var i = 0; i < Check.length; ++i) {
if (Check[i].what == themeName && themeName != "default") {
sys.sendMessage(src, "±Game: This was just played " + i + " games ago, no repeating!", mafiachan);
return;
}
}
if (themeName in mafia.themeManager.themes) {
if (!mafia.themeManager.themes[themeName].enabled) {
sys.sendMessage(src, "±Game: This theme is disabled!", mafiachan);
return;
}
mafia.theme = mafia.themeManager.themes[themeName];
} else {
sys.sendMessage(src, "±Game: No such theme!", mafiachan);
return;
}
CurrentGame = {who: sys.name(src), what: themeName, when: parseInt(sys.time()), playerCount: 0};
// For random theme
//mafia.theme = mafia.themeManager.themes[Object.keys(mafia.themeManager.themes)[parseInt(Object.keys(mafia.themeManager.themes).length * Math.random())]];
sys.sendAll("", mafiachan);
sys.sendAll("*** ************************************************************************************", mafiachan);
if (mafia.theme.name == "default") {
sys.sendAll("±Game: " + sys.name(src) + " started a game!", mafiachan);
} else {
sys.sendAll("±Game: " + sys.name(src) + " started a game with theme "+mafia.theme.name+"!", mafiachan);
}
sys.sendAll("±Game: Type /Join to enter the game!", mafiachan);
sys.sendAll("*** ************************************************************************************", mafiachan);
sys.sendAll("", mafiachan);
//if (sys.playersOfChannel(mafiachan).length < 25) {
var time = parseInt(sys.time());
if (time > mafia.lastAdvertise + 60*15) {
mafia.lastAdvertise = time;
sys.sendAll("", 0);
sys.sendAll("*** ************************************************************************************", 0);
sys.sendAll("±Game: " + sys.name(src) + " started a mafia game!", 0);
sys.sendAll("±Game: Go in the #" + sys.channel(mafiachan) + " and type /Join to enter the game!", 0);
sys.sendAll("*** ************************************************************************************", 0);
sys.sendAll("", 0);
}
//}
mafia.clearVariables();
mafia.state = "entry";
mafia.ticks = 60;
};
/* callback for /end */
this.endGame = function(src) {
if (mafia.state == "blank") {
sys.sendMessage(src, "±Game: No game is going on.",mafiachan);
return;
}
sys.sendAll("*** ************************************************************************************", mafiachan);
sys.sendAll("±Game: " + (src ? sys.name(src) : Config.Mafia.bot) + " has stopped the game!", mafiachan);
sys.sendAll("*** ************************************************************************************", mafiachan);
sys.sendAll("", mafiachan);
mafia.clearVariables();
};
/* called every second */
this.tickDown = function() {
if (this.ticks <= 0) {
return;
}
this.ticks = this.ticks - 1;
if (this.ticks == 0)
this.callHandler(this.state);
else {
if (this.ticks == 30 && this.state == "entry") {
sys.sendAll("", mafiachan);
sys.sendAll("±Game: Hurry up, you only have "+this.ticks+" seconds more to join!", mafiachan);
sys.sendAll("", mafiachan);
}
}
};
this.sendPlayer = function(player, message) {
var id = sys.id(player);
if (id == undefined)
return;
sys.sendMessage(id, message, mafiachan);
};
// Grab a list of all roles belonging to a given team.
this.getRolesForTeam = function(side) {
var team = [];
for (var p in this.players) {
var player = this.players[p];
if (player.role.side == side) {
team.push(player.role.translation);
}
}
return team.sort(); // Sort as to not give out the order.
};
this.getRolesForTeamS = function (side) {
return mafia.getRolesForTeam(side).join(", ");
};
this.getPlayersForTeam = function(side) {
var team = [];
for (var p in this.players) {
var player = this.players[p];
if (player.role.side == side) {
team.push(player.name);
}
}
return team;
};
this.getPlayersForTeamS = function(side) {
return mafia.getPlayersForTeam(side).join(", ");
};
this.getPlayersForRole = function(role) {