townsquare/js/app.36085a96.js

2 lines
9.5 KiB
JavaScript

(function(e){function t(t){for(var i,o,n=t[0],l=t[1],u=t[2],f=0,c=[];f<n.length;f++)o=n[f],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&c.push(a[o][0]),a[o]=0;for(i in l)Object.prototype.hasOwnProperty.call(l,i)&&(e[i]=l[i]);h&&h(t);while(c.length)c.shift()();return s.push.apply(s,u||[]),r()}function r(){for(var e,t=0;t<s.length;t++){for(var r=s[t],i=!0,n=1;n<r.length;n++){var l=r[n];0!==a[l]&&(i=!1)}i&&(s.splice(t--,1),e=o(o.s=r[0]))}return e}var i={},a={app:0},s=[];function o(t){if(i[t])return i[t].exports;var r=i[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.m=e,o.c=i,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)o.d(r,i,function(t){return e[t]}.bind(null,i));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/townsquare/";var n=window["webpackJsonp"]=window["webpackJsonp"]||[],l=n.push.bind(n);n.push=t,n=n.slice();for(var u=0;u<n.length;u++)t(n[u]);var h=l;s.push(["1d50","chunk-vendors"]),r()})({"1d50":function(e,t,r){"use strict";r.r(t);var i=r("2b0e"),a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"square",class:{public:e.isPublic},attrs:{id:"townsquare"}},[r("TownSquare",{attrs:{"is-public":e.isPublic}}),r("div",{staticClass:"controls"},[r("button",{on:{click:e.togglePublic}},[e._v("Toggle")])])],1)},s=[],o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("ul",{staticClass:"circle",class:["size-"+e.players.length]},e._l(e.players,(function(t){return r("Player",{key:t.name,attrs:{player:t,roles:e.roles,"is-public":e.isPublic}})})),1)},n=[],l=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("li",[r("div",{staticClass:"player",class:{dead:e.player.hasDied,"no-vote":e.player.hasVoted}},[r("div",{staticClass:"shroud",on:{click:function(t){return e.toggleStatus()}}}),r("div",{staticClass:"token",class:[e.player.role],on:{click:function(t){return e.changeRole()}}},[e.role.firstNight?r("span",{staticClass:"leaf-left"}):e._e(),e.role.otherNight?r("span",{staticClass:"leaf-right"}):e._e(),e.role.reminders.length?r("span",{class:["leaf-top"+e.role.reminders.length]}):e._e(),e.role.setup?r("span",{staticClass:"leaf-orange"}):e._e(),r("div",[e._v(e._s(e.role.name))])]),e.role.ability?r("div",{staticClass:"ability"},[e._v(e._s(e.role.ability))]):e._e(),r("div",{staticClass:"name"},[e._v(e._s(e.player.name))])]),r("div",{staticClass:"reminder add"})])},u=[],h={props:{player:{type:Object,required:!0},roles:{type:Map,required:!0},isPublic:{type:Boolean,required:!0}},data(){return{role:this.roles.get(this.player.role)||{reminders:[]}}},methods:{toggleStatus(){this.isPublic&&this.player.hasDied?this.$set(this.player,"hasVoted",!this.player.hasVoted):(this.$set(this.player,"hasDied",!this.player.hasDied),this.player.hasDied||this.$set(this.player,"hasVoted",!1))},changeRole(){this.isPublic?this.toggleStatus():console.log("role change")}}},f=h,c=(r("3dc8"),r("2877")),d=Object(c["a"])(f,l,u,!1,null,null,null),m=d.exports,p=r("3107"),y={components:{Player:m},props:["isPublic"],data(){return{players:[{name:"Steffen",role:"baron"},{name:"Tino",role:"imp"},{name:"Basti",role:"chef"},{name:"Bernd",role:"ravenkeeper"},{name:"Tim",role:"drunk"},{name:"Yann",role:"librarian"},{name:"Marie",role:"empath"},{name:"Bogdan",role:"scarletwoman"},{name:"Sean",role:"recluse"},{name:"Petra",role:"undertaker"}],roles:new Map(p.map(e=>[e.id,e]))}}},g=y,b=(r("213a"),Object(c["a"])(g,o,n,!1,null,null,null)),v=b.exports,w={components:{TownSquare:v},data:()=>({isPublic:!1}),methods:{togglePublic(){this.isPublic=!this.isPublic}}},k=w,N=(r("1f1f"),Object(c["a"])(k,a,s,!1,null,null,null)),T=N.exports;i["a"].config.productionTip=!1,new i["a"]({el:"#app",template:"<App/>",components:{App:T}})},"1f1f":function(e,t,r){"use strict";var i=r("2573"),a=r.n(i);a.a},"213a":function(e,t,r){"use strict";var i=r("5298"),a=r.n(i);a.a},2573:function(e,t,r){},3107:function(e){e.exports=JSON.parse('[{"id":"washerwoman","name":"Washerwoman","set":"TB","team":"townsfolk","firstNight":true,"otherNight":false,"reminders":["Townsfolk","Decoy"],"setup":false,"ability":"You start knowing 1 of 2 players is a particular Townsfolk."},{"id":"librarian","name":"Librarian","set":"TB","team":"townsfolk","firstNight":true,"otherNight":false,"reminders":["Outsider","Decoy"],"setup":false,"ability":"You start knowing that 1 of 2 players is a particular Outsider. (Or that zero are in play)"},{"id":"investigator","name":"Investigator","set":"TB","team":"townsfolk","firstNight":true,"otherNight":false,"reminders":["Minion","Decoy"],"setup":false,"ability":"You start knowing 1 of 2 players is a particular Minion."},{"id":"chef","name":"Chef","set":"TB","team":"townsfolk","firstNight":true,"otherNight":false,"reminders":[],"setup":false,"ability":"You start knowing how many pairs of evil players there are."},{"id":"empath","name":"Empath","set":"TB","team":"townsfolk","firstNight":true,"otherNight":true,"reminders":[],"setup":false,"ability":"Each night, you learn how many of your 2 alive neighbours are evil."},{"id":"fortuneteller","name":"Fortune Teller","set":"TB","team":"townsfolk","firstNight":true,"otherNight":true,"reminders":["Decoy"],"setup":false,"ability":"Each night, choose 2 players: you learn if either is a Demon. There is 1 good player that registers falsely to you."},{"id":"undertaker","name":"Undertaker","set":"TB","team":"townsfolk","firstNight":false,"otherNight":true,"reminders":["Executed"],"setup":false,"ability":"Each night*, you learn which character died by execution today."},{"id":"monk","name":"Monk","set":"TB","team":"townsfolk","firstNight":false,"otherNight":true,"reminders":["Protected"],"setup":false,"ability":"Each night*, choose a player (not yourself): they are safe from the Demon tonight."},{"id":"ravenkeeper","name":"Ravenkeeper","set":"TB","team":"townsfolk","firstNight":false,"otherNight":true,"reminders":[],"setup":false,"ability":"If you die at night, you are woken to choose a player: you learn their character."},{"id":"mayor","name":"Mayor","set":"TB","team":"townsfolk","firstNight":false,"otherNight":false,"reminders":[],"setup":false,"ability":"If only 3 players live & no execution occurs, your team wins. If you die at night, another player might die instead."},{"id":"slayer","name":"Slayer","set":"TB","team":"townsfolk","firstNight":false,"otherNight":false,"reminders":["Used"],"setup":false,"ability":"Once per game, during the day, publicly choose a player: if they are the Demon, they die."},{"id":"soldier","name":"Soldier","set":"TB","team":"townsfolk","firstNight":false,"otherNight":false,"reminders":[],"setup":false,"ability":"You are safe from the Demon."},{"id":"virgin","name":"Virgin","set":"TB","team":"townsfolk","firstNight":false,"otherNight":false,"reminders":["Used"],"setup":false,"ability":"The first time you are nominated, if the nominator is a Townsfolk, they are executed immediately."},{"id":"butler","name":"Butler","set":"TB","team":"outsider","firstNight":true,"otherNight":true,"reminders":["Master"],"setup":false,"ability":"Each night, choose a player (not yourself): tomorrow, you may only vote if they are voting too."},{"id":"drunk","name":"Drunk","set":"TB","team":"outsider","firstNight":false,"otherNight":false,"reminders":["Drunk"],"setup":true,"ability":"You do not know you are the Drunk. You think you are a Townsfolk, but your ability malfunctions."},{"id":"recluse","name":"Recluse","set":"TB","team":"outsider","firstNight":false,"otherNight":false,"reminders":[],"setup":false,"ability":"You might register as evil and as a Minion or Demon, even if dead."},{"id":"saint","name":"Saint","set":"TB","team":"outsider","firstNight":false,"otherNight":false,"reminders":[],"setup":false,"ability":"If you die by execution, your team loses."},{"id":"baron","name":"Baron","set":"TB","team":"minion","firstNight":false,"otherNight":false,"reminders":[],"setup":true,"ability":"There are extra Outsiders in play. [+2 Outsiders]"},{"id":"poisoner","name":"Poisoner","set":"TB","team":"minion","firstNight":true,"otherNight":true,"reminders":["Poisoned"],"setup":false,"ability":"Each night, choose a player: their ability malfunctions tonight and tomorrow day."},{"id":"spy","name":"Spy","set":"TB","team":"minion","firstNight":true,"otherNight":true,"reminders":[],"setup":false,"ability":"Each night, you see the Grimoire. You might register as good and as a Townsfolk or Outsider, even if dead."},{"id":"scarletwoman","name":"Scarlet Woman","set":"TB","team":"minion","firstNight":false,"otherNight":true,"reminders":["Demon"],"setup":false,"ability":"If there are 5 or more players alive (Travellers don\'t count) and the Demon dies, you become the Demon."},{"id":"imp","name":"Imp","set":"TB","team":"demon","firstNight":false,"otherNight":true,"reminders":["Die"],"setup":false,"ability":"Each night*, choose a player: they die. If you kill yourself this way, a Minion becomes the Imp."}]')},"3dc8":function(e,t,r){"use strict";var i=r("6018"),a=r.n(i);a.a},5298:function(e,t,r){},6018:function(e,t,r){}});
//# sourceMappingURL=app.36085a96.js.map