Skip to content

Commit

Permalink
add Furina
Browse files Browse the repository at this point in the history
  • Loading branch information
flick-ai committed Jun 6, 2024
1 parent dce6ef1 commit 8ce23df
Show file tree
Hide file tree
Showing 6 changed files with 454 additions and 12 deletions.
13 changes: 13 additions & 0 deletions genius_invocation/card/action/equipment/talent/talents/HearMe.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from genius_invocation.card.action.equipment.talent.import_head import *
from genius_invocation.card.character.characters.Furina import *

class HearMe(TalentCard):
id: int = 212111
name: str = "Hear Me — Let Us Raise the Chalice of Love!"
name_ch = "「诸君听我颂,共举爱之杯!」"
is_action = True
cost = [{'cost_num': 3, 'cost_type': CostType.HYDRO.value}]
cost_power = 0
character = Furina
def __init__(self) -> None:
super().__init__()
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,21 @@ class Fresh_Wind_of_Freedom_Entity(Combat_Status):
def __init__(self, game: 'GeniusGame', from_player: 'GeniusPlayer', from_character=None):
super().__init__(game, from_player, from_character)

# 更新:大鹤归
def on_after_skill(self, game:'GeniusGame'):
def on_die(self, game:'GeniusGame'):
if game.active_player_index == self.from_player.index:
if game.current_skill.from_character == self.from_character:
self.from_player.change_to_next_character()
game.is_change_player = False
self.on_destroy(game)

def on_end(self, game:'GeniusGame'):
if game.active_player_index == self.from_player.index:
self.on_destroy(game)

def update_listener_list(self):
self.listeners = [
(EventType.AFTER_USE_SKILL, ZoneType.ACTIVE_ZONE, self.on_after_skill),
(EventType.CHARACTER_DIE, ZoneType.ACTIVE_ZONE, self.on_die),
(EventType.END_PHASE, ZoneType.ACTIVE_ZONE, self.on_end),
]


class Fresh_Wind_of_Freedom(ActionCard):
id: int = 330004
name = "Fresh Wind of Freedom"
Expand All @@ -45,7 +43,7 @@ def on_played(self, game: 'GeniusGame') -> None:
from_player=game.active_player,
from_character=None
))

def find_target(self, game: 'GeniusGame'):
if game.active_player.play_arcane_legend:
return []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ def on_call(self, game: 'GeniusGame'):

max_idx = max_count_card(self.from_character.from_player.hand_zone.card)
card = self.from_character.from_player.hand_zone.discard_card(max_idx)
if self.from_character.talent and self.talent_round != game.round:
if self.from_character.talent and self.from_character.talent_round != game.round:
self.from_character.heal(card.calculate_dice(), game)
self.from_character.talent_round = game.round
# after skill
game.manager.invoke(EventType.AFTER_USE_SKILL, game)

Expand All @@ -74,12 +75,12 @@ class RavagingDevourer(ElementalBurst):

# damage
damage_type: SkillType = SkillType.ELEMENTAL_BURST
main_damage_element: ElementType = ElementType.DENDRO
main_damage_element: ElementType = ElementType.HYDRO
main_damage: int = 1
piercing_damage: int = 1

# cost
cost = [{'cost_num': 3, 'cost_type': CostType.DENDRO}]
cost = [{'cost_num': 3, 'cost_type': CostType.HYDRO}]

energy_cost: int = 3
energy_gain: int = 0
Expand Down Expand Up @@ -196,7 +197,7 @@ def after_any_action(self, game: 'GeniusGame'):
if len(self.from_player.hand_zone.card) <= 1:
damage = Damage.create_damage(
game=game,
damage_type=SkillType.OTHER,
damage_type=SkillType.SUMMON,
main_damage_element=ElementType.ELECTRO,
main_damage=self.damage,
piercing_damage=0,
Expand All @@ -215,7 +216,7 @@ def end_phase(self, game: 'GeniusGame'):
game,
damage_type=SkillType.SUMMON,
main_damage=self.damage,
main_damage_element=self.element,
main_damage_element=ElementType.ELECTRO,
piercing_damage=0,
damage_from=self,
damage_to=get_opponent_active_character(game),
Expand Down
Loading

0 comments on commit 8ce23df

Please sign in to comment.