Ejemplo n.º 1
0
var showCards = function(showName) {
	$('#player-cards > *').hide();
	$('#cards-'+showName).show();

	if (showName == 'vote') {
		$('#cards-vote .card').removeClass('selected');
	} else if (showName == 'policy') {
		$('#veto-request').toggle(State.canVeto && State.isLocalChancellor());
	}
};
Ejemplo n.º 2
0
var policyDiscarded = function(data) {
	var directive, cards;
	if (State.isLocalChancellor()) {
		updatePolicyChoices(data.secret.policies);
		directive = 'Select a policy to <strong>enact</strong>';
		if (State.canVeto) {
			directive += ', or request a <strong>veto</strong>';
		}
		cards = 'policy';
	} else {
		var chancellor = State.getChancellor();
		directive = 'Chancellor ' + Util.nameSpan(chancellor) + ' to enact a policy';
		cards = null;
	}
	Chat.setDirective(directive);
	Cards.show(cards);
	discardPolicyCards(1);
};
Ejemplo n.º 3
0
var vetoRequest = function(data) {
	var directive, cards;
	var chancellor = State.getChancellor();
	if (State.isLocalPresident()) {
		directive = 'Confirm or override Chancellor ' + Util.nameSpan(chancellor) + '\'s veto request';
		cards = 'veto';
	} else {
		if (State.isLocalChancellor()) {
			var president = State.getPresident();
			directive = 'Awaiting confirmation from President ' + Util.nameSpan(president.name);
		} else {
			directive = 'Chancellor ' + Util.nameSpan(chancellor.name) + ' is requesting a veto, awaiting confirmation';
		}
		cards = null;
	}
	Chat.setDirective(directive);
	Cards.show(cards);
};