Skip to content

Commit

Permalink
Update [LOOT_193] Shimmering Courser
Browse files Browse the repository at this point in the history
  • Loading branch information
shinoi2 committed Mar 19, 2024
1 parent 18ec6bb commit caf4b9d
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 34 deletions.
1 change: 0 additions & 1 deletion fireplace/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2159,7 +2159,6 @@ def create_custom_card(zombeast):
"cant_be_targeted_by_hero_powers", "heavily_armored", "min_health",
"rush", "taunt", "poisonous", "ignore_taunt", "cannot_attack_heroes",
"unlimited_attacks", "cant_be_damaged", "lifesteal",
"cant_be_targeted_by_op_abilities", "cant_be_targeted_by_op_hero_powers",
)
for attribute in int_mergeable_attributes:
setattr(zombeast, attribute, getattr(card1, attribute) + getattr(card2, attribute))
Expand Down
5 changes: 1 addition & 4 deletions fireplace/card.py
Original file line number Diff line number Diff line change
Expand Up @@ -749,8 +749,6 @@ class Character(LiveEntity):
cant_be_targeted_by_opponents = boolean_property("cant_be_targeted_by_opponents")
cant_be_targeted_by_abilities = boolean_property("cant_be_targeted_by_abilities")
cant_be_targeted_by_hero_powers = boolean_property("cant_be_targeted_by_hero_powers")
cant_be_targeted_by_op_abilities = boolean_property("cant_be_targeted_by_op_abilities")
cant_be_targeted_by_op_hero_powers = boolean_property("cant_be_targeted_by_op_hero_powers")

heavily_armored = boolean_property("heavily_armored")
min_health = int_property("min_health")
Expand Down Expand Up @@ -999,8 +997,7 @@ class Minion(Character):
"cant_be_targeted_by_hero_powers", "charge", "divine_shield", "enrage",
"forgetful", "frozen", "has_deathrattle", "has_inspire", "lifesteal",
"poisonous", "stealthed", "taunt", "windfury", "cannot_attack_heroes", "rush",
"secret_deathrattle", "cant_be_targeted_by_op_abilities",
"cant_be_targeted_by_op_hero_powers", "has_overkill",
"secret_deathrattle", "has_overkill",
)

def __init__(self, data):
Expand Down
8 changes: 4 additions & 4 deletions fireplace/cards/kobolds/neutral_epic.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ class LOOT_161:
class LOOT_193:
"""Shimmering Courser"""
# Only you can target this with spells and Hero Powers.
tags = {
enums.CANT_BE_TARGETED_BY_OP_ABILITIES: True,
enums.CANT_BE_TARGETED_BY_OP_HERO_POWERS: True,
}
update = CurrentPlayer(OPPONENT) & Refresh(SELF, {
GameTag.CANT_BE_TARGETED_BY_HERO_POWERS: True,
GameTag.CANT_BE_TARGETED_BY_ABILITIES: True,
})


class LOOT_389:
Expand Down
12 changes: 5 additions & 7 deletions fireplace/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@
HEROPOWER_DISABLED = -19
EXTRA_END_TURN_EFFECT = -20
PASSIVE_HERO_POWER = -21
CANT_BE_TARGETED_BY_OP_ABILITIES = -22
CANT_BE_TARGETED_BY_OP_HERO_POWERS = -23
KEEP_BUFF = -24,
DAMAGED_THIS_TURN = -25
MINION_EXTRA_COMBOS = -26
MINION_EXTRA_BATTLECRIES = -27
EXTRA_TRIGGER_SECRET = -28
KEEP_BUFF = -22,
DAMAGED_THIS_TURN = -23
MINION_EXTRA_COMBOS = -24
MINION_EXTRA_BATTLECRIES = -25
EXTRA_TRIGGER_SECRET = -26


class SpellType(IntEnum):
Expand Down
2 changes: 0 additions & 2 deletions fireplace/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,6 @@ class PlayerManager(Manager):
enums.UNLIMITED_ATTACKS: "unlimited_attacks",
enums.EXTRA_END_TURN_EFFECT: "extra_end_turn_effect",
enums.PASSIVE_HERO_POWER: "passive_hero_power",
enums.CANT_BE_TARGETED_BY_OP_ABILITIES: "cant_be_targeted_by_op_abilities",
enums.CANT_BE_TARGETED_BY_OP_HERO_POWERS: "cant_be_targeted_by_op_hero_powers",
enums.KEEP_BUFF: "keep_buff",
enums.DAMAGED_THIS_TURN: "damaged_this_turn",
GameTag.CARDTEXT_ENTITY_0: "cardtext_entity_0",
Expand Down
20 changes: 4 additions & 16 deletions fireplace/targeting.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,10 @@ def is_valid_target(self, target, requirements=None):
return False
if target.immune and self.controller != target.controller:
return False
if self.type == CardType.SPELL:
if target.cant_be_targeted_by_abilities:
return False
if (
self.controller != target.controller and
target.cant_be_targeted_by_op_abilities
):
return False
if self.type == CardType.HERO_POWER:
if target.cant_be_targeted_by_hero_powers:
return False
if (
self.controller != target.controller and
target.cant_be_targeted_by_op_hero_powers
):
return False
if self.type == CardType.SPELL and target.cant_be_targeted_by_abilities:
return False
if self.type == CardType.HERO_POWER and target.cant_be_targeted_by_hero_powers:
return False

if target.cant_be_targeted_by_opponents and self.controller != target.controller:
return False
Expand Down

0 comments on commit caf4b9d

Please sign in to comment.