Archived
Check for faction combos only using locked cards
This commit is contained in:
+11
-24
@@ -121,53 +121,40 @@ card_effect_all_behaviours = {
|
|||||||
# Effect Times
|
# Effect Times
|
||||||
def effect_times_same_faction(effect: Effect, turn: "Turn"):
|
def effect_times_same_faction(effect: Effect, turn: "Turn"):
|
||||||
times = 0
|
times = 0
|
||||||
for c in turn.player.board:
|
for c in turn.cards_locked:
|
||||||
if c.faction == effect.card.faction and c in turn.cards_locked:
|
if c.faction == effect.card.faction:
|
||||||
times += 1
|
times += 1
|
||||||
return times
|
return times
|
||||||
|
|
||||||
|
|
||||||
def effect_times_other_same_faction(effect: Effect, turn: "Turn"):
|
def effect_times_other_same_faction(effect: Effect, turn: "Turn"):
|
||||||
times = 0
|
times = 0
|
||||||
for c in turn.player.board:
|
for c in turn.cards_locked:
|
||||||
if (
|
if c.faction == effect.card.faction and c != effect.card:
|
||||||
c.faction == effect.card.faction
|
|
||||||
and c != effect.card
|
|
||||||
and c in turn.cards_locked
|
|
||||||
):
|
|
||||||
times += 1
|
times += 1
|
||||||
return times
|
return times
|
||||||
|
|
||||||
|
|
||||||
def effect_times_champion(effect: Effect, turn: "Turn"):
|
def effect_times_champion(effect: Effect, turn: "Turn"):
|
||||||
times = 0
|
times = 0
|
||||||
for c in turn.player.board:
|
for c in turn.cards_locked:
|
||||||
if c.card_type == CardType.CHAMPION and c in turn.cards_locked:
|
if c.card_type == CardType.CHAMPION:
|
||||||
times += 1
|
times += 1
|
||||||
return times
|
return times
|
||||||
|
|
||||||
|
|
||||||
def effect_times_other_champion(effect: Effect, turn: "Turn"):
|
def effect_times_other_champion(effect: Effect, turn: "Turn"):
|
||||||
times = 0
|
times = 0
|
||||||
for c in turn.player.board:
|
for c in turn.cards_locked:
|
||||||
if (
|
if c.card_type == CardType.CHAMPION and c != effect.card:
|
||||||
c.card_type == CardType.CHAMPION
|
|
||||||
and c != effect.card
|
|
||||||
and c in turn.cards_locked
|
|
||||||
):
|
|
||||||
times += 1
|
times += 1
|
||||||
return times
|
return times
|
||||||
|
|
||||||
|
|
||||||
def effect_times_other_guard(effect: Effect, turn: "Turn"):
|
def effect_times_other_guard(effect: Effect, turn: "Turn"):
|
||||||
times = 0
|
times = 0
|
||||||
for c in turn.player.board:
|
for c in turn.cards_locked:
|
||||||
if (
|
if c.card_type == CardType.CHAMPION and c.guard is True and c != effect.card:
|
||||||
c.card_type == CardType.CHAMPION
|
|
||||||
and c.guard is True
|
|
||||||
and c != effect.card
|
|
||||||
and c in turn.cards_locked
|
|
||||||
):
|
|
||||||
times += 1
|
times += 1
|
||||||
return times
|
return times
|
||||||
|
|
||||||
@@ -183,7 +170,7 @@ effect_times_all_behaviours = {
|
|||||||
|
|
||||||
def create_effect_behaviour(effect: EffectParser) -> Awaitable[None]:
|
def create_effect_behaviour(effect: EffectParser) -> Awaitable[None]:
|
||||||
|
|
||||||
async def effect_type_behaviour(_e: Effect, _t: "Turn"):
|
async def effect_type_behaviour(e: Effect, t: "Turn"):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
if effect.effect_type in effect_types_all_behaviours:
|
if effect.effect_type in effect_types_all_behaviours:
|
||||||
|
|||||||
Reference in New Issue
Block a user