jose delgrado
This commit is contained in:
parent
03febf9887
commit
c937a322fe
@ -92,6 +92,13 @@ class PatBrennan(Character):
|
|||||||
self.desc_eng = "Instead of drawing he can steal a card from the equipment of another player."
|
self.desc_eng = "Instead of drawing he can steal a card from the equipment of another player."
|
||||||
self.icon = '🤗'
|
self.icon = '🤗'
|
||||||
|
|
||||||
|
class JoseDelgrado(Character):
|
||||||
|
def __init__(self):
|
||||||
|
super().__init__("José Delgrado", max_lives=4)
|
||||||
|
self.desc = "Può scartare una carta blu per pescare 2 carte."
|
||||||
|
self.desc_eng = "He can discard a blue card to draw 2 cards."
|
||||||
|
self.icon = '🎒'
|
||||||
|
|
||||||
def all_characters() -> List[Character]:
|
def all_characters() -> List[Character]:
|
||||||
return [
|
return [
|
||||||
PixiePete(),
|
PixiePete(),
|
||||||
@ -107,6 +114,7 @@ def all_characters() -> List[Character]:
|
|||||||
VeraCuster(),
|
VeraCuster(),
|
||||||
ChuckWengam(),
|
ChuckWengam(),
|
||||||
PatBrennan(),
|
PatBrennan(),
|
||||||
|
JoseDelgrado(),
|
||||||
]
|
]
|
||||||
|
|
||||||
#Apache Kid: il suo effetto non conta nei duelli
|
#Apache Kid: il suo effetto non conta nei duelli
|
||||||
|
@ -677,10 +677,14 @@ class Player:
|
|||||||
def scrap(self, card_index):
|
def scrap(self, card_index):
|
||||||
if self.is_my_turn or isinstance(self.character, chars.SidKetchum):
|
if self.is_my_turn or isinstance(self.character, chars.SidKetchum):
|
||||||
self.scrapped_cards += 1
|
self.scrapped_cards += 1
|
||||||
|
card = self.hand.pop(card_index)
|
||||||
if isinstance(self.character, chars.SidKetchum) and self.scrapped_cards == 2:
|
if isinstance(self.character, chars.SidKetchum) and self.scrapped_cards == 2:
|
||||||
self.scrapped_cards = 0
|
self.scrapped_cards = 0
|
||||||
self.lives = min(self.lives+1, self.max_lives)
|
self.lives = min(self.lives+1, self.max_lives)
|
||||||
self.game.deck.scrap(self.hand.pop(card_index))
|
elif isinstance(self.character, chd.JoseDelgrado) and card.is_equipment:
|
||||||
|
self.hand.append(self.game.deck.draw())
|
||||||
|
self.hand.append(self.game.deck.draw())
|
||||||
|
self.game.deck.scrap(card)
|
||||||
self.notify_self()
|
self.notify_self()
|
||||||
|
|
||||||
def chuck_lose_hp_draw(self):
|
def chuck_lose_hp_draw(self):
|
||||||
|
@ -20,8 +20,9 @@
|
|||||||
<transition name="list">
|
<transition name="list">
|
||||||
<p v-if="desc"><i>{{desc}}</i></p>
|
<p v-if="desc"><i>{{desc}}</i></p>
|
||||||
</transition>
|
</transition>
|
||||||
<button v-if="is_my_turn && character.name === 'Sid Ketchum'" @click="sidWantsScrapForHealth=true">{{$t('special_ability')}}</button>
|
<button v-if="is_my_turn && character.name === 'Sid Ketchum' && lives < max_lives && hand.length > 1" @click="sidWantsScrapForHealth=true">{{$t('special_ability')}}</button>
|
||||||
<button v-if="is_my_turn && character.name === 'Chuck Wengam' && lives > 1" @click="chuckSpecial">{{$t('special_ability')}}</button>
|
<button v-if="is_my_turn && character.name === 'Chuck Wengam' && lives > 1" @click="chuckSpecial">{{$t('special_ability')}}</button>
|
||||||
|
<button v-if="is_my_turn && character.name === 'José Delgrado' && hand.filter(x => x.is_equipment).length > 0" @click="joseScrap=true">{{$t('special_ability')}}</button>
|
||||||
<div v-if="lives > 0" style="position:relative">
|
<div v-if="lives > 0" style="position:relative">
|
||||||
<span id="hand_text">{{$t('hand')}}</span>
|
<span id="hand_text">{{$t('hand')}}</span>
|
||||||
<transition-group name="list" tag="div" class="hand">
|
<transition-group name="list" tag="div" class="hand">
|
||||||
@ -48,6 +49,8 @@
|
|||||||
<Chooser v-if="showScrapScreen" :text="`${$t('discard')} ${hand.length}/${lives}`" :cards="hand" :select="scrap" :cancel="cancelEndingTurn"/>
|
<Chooser v-if="showScrapScreen" :text="`${$t('discard')} ${hand.length}/${lives}`" :cards="hand" :select="scrap" :cancel="cancelEndingTurn"/>
|
||||||
<Chooser v-if="sidWantsScrapForHealth && sidScrapForHealth.length < 2" :text="`${$t('discard')} ${2 - sidScrapForHealth.length} ${$t('to_regain_1_hp')}`"
|
<Chooser v-if="sidWantsScrapForHealth && sidScrapForHealth.length < 2" :text="`${$t('discard')} ${2 - sidScrapForHealth.length} ${$t('to_regain_1_hp')}`"
|
||||||
:cards="sidScrapHand" :select="sidScrap" :cancel="() => {sidWantsScrapForHealth = false;sidScrapForHealth=[]}"/>
|
:cards="sidScrapHand" :select="sidScrap" :cancel="() => {sidWantsScrapForHealth = false;sidScrapForHealth=[]}"/>
|
||||||
|
<Chooser v-if="joseScrap" :text="`${$t('discard')}`"
|
||||||
|
:cards="hand.filter(x => x.is_equipment)" :select="(card) => {joseScrap=false;scrap(card)}" :cancel="() => {joseScrap=false}"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -94,6 +97,7 @@ export default {
|
|||||||
desc: '',
|
desc: '',
|
||||||
sidScrapForHealth: [],
|
sidScrapForHealth: [],
|
||||||
sidWantsScrapForHealth: false,
|
sidWantsScrapForHealth: false,
|
||||||
|
joseScrap:false,
|
||||||
mancato_needed: 0,
|
mancato_needed: 0,
|
||||||
name: '',
|
name: '',
|
||||||
}),
|
}),
|
||||||
|
Loading…
Reference in New Issue
Block a user