fix again panic + scope
This commit is contained in:
parent
81e3dfb635
commit
7e98b98b1c
@ -208,6 +208,7 @@ class Player:
|
||||
if self.attacker:
|
||||
ser['attacker'] = self.attacker.name
|
||||
ser['sight'] = self.get_sight()
|
||||
ser['sight_extra'] = self.get_sight(False) -1
|
||||
ser['can_gold_rush_discard'] = len([p for p in self.game.get_alive_players() if p != self and len([e for e in p.gold_rush_equipment if e.number <= self.gold_nuggets + 1]) > 0]) > 0
|
||||
if self.character:
|
||||
ser['gold_rush_discount'] = 1 if self.character.check(self.game, grch.PrettyLuzena) and self.special_use_count < 1 else 0
|
||||
|
@ -110,6 +110,7 @@ export default {
|
||||
win_status: undefined,
|
||||
range: 1,
|
||||
sight: 1,
|
||||
sight_extra: 1,
|
||||
can_target_sheriff: true,
|
||||
show_role: false,
|
||||
attacker: undefined,
|
||||
@ -171,6 +172,7 @@ export default {
|
||||
this.available_cards = self.available_cards
|
||||
this.win_status = self.win_status
|
||||
this.sight = self.sight
|
||||
this.sight_extra = self.sight_extra
|
||||
this.attacker = self.attacker
|
||||
this.mancato_needed = self.mancato_needed
|
||||
this.is_ghost = self.is_ghost
|
||||
@ -239,7 +241,7 @@ export default {
|
||||
return false
|
||||
else
|
||||
//console.log("aa" +(this.sight-1))
|
||||
return x.dist <= this.range + this.sight -1
|
||||
return x.dist <= this.range + this.sight_extra
|
||||
}).map(player => {
|
||||
return {
|
||||
name: player.name,
|
||||
@ -360,7 +362,7 @@ export default {
|
||||
this.$socket.emit('scrap', this.hand.indexOf(c))
|
||||
},
|
||||
play_card(card, from_equipment) {
|
||||
console.log('play' + card.name)
|
||||
console.log('play ' + card.name)
|
||||
if (from_equipment && (!card.can_be_used_now || (this.eventCard && this.eventCard.name == "Lazo"))) return;
|
||||
else if (card.usable_next_turn && !card.can_be_used_now) return this.really_play_card(card, null);
|
||||
let calamity_special = (card.name === 'Mancato!' && this.character.name === 'Calamity Janet')
|
||||
|
Loading…
Reference in New Issue
Block a user