fix again panic + scope

This commit is contained in:
Giulio 2022-03-17 00:18:42 +01:00
parent 81e3dfb635
commit 7e98b98b1c
2 changed files with 5 additions and 2 deletions

View File

@ -208,6 +208,7 @@ class Player:
if self.attacker: if self.attacker:
ser['attacker'] = self.attacker.name ser['attacker'] = self.attacker.name
ser['sight'] = self.get_sight() 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 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: if self.character:
ser['gold_rush_discount'] = 1 if self.character.check(self.game, grch.PrettyLuzena) and self.special_use_count < 1 else 0 ser['gold_rush_discount'] = 1 if self.character.check(self.game, grch.PrettyLuzena) and self.special_use_count < 1 else 0

View File

@ -110,6 +110,7 @@ export default {
win_status: undefined, win_status: undefined,
range: 1, range: 1,
sight: 1, sight: 1,
sight_extra: 1,
can_target_sheriff: true, can_target_sheriff: true,
show_role: false, show_role: false,
attacker: undefined, attacker: undefined,
@ -171,6 +172,7 @@ export default {
this.available_cards = self.available_cards this.available_cards = self.available_cards
this.win_status = self.win_status this.win_status = self.win_status
this.sight = self.sight this.sight = self.sight
this.sight_extra = self.sight_extra
this.attacker = self.attacker this.attacker = self.attacker
this.mancato_needed = self.mancato_needed this.mancato_needed = self.mancato_needed
this.is_ghost = self.is_ghost this.is_ghost = self.is_ghost
@ -239,7 +241,7 @@ export default {
return false return false
else else
//console.log("aa" +(this.sight-1)) //console.log("aa" +(this.sight-1))
return x.dist <= this.range + this.sight -1 return x.dist <= this.range + this.sight_extra
}).map(player => { }).map(player => {
return { return {
name: player.name, name: player.name,