-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:flick-ai/Genius-Invokation
- Loading branch information
Showing
59 changed files
with
1,574 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
genius_invocation/card/action/equipment/artifact/artifacts/GladiatorsTriumphus.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
from genius_invocation.utils import * | ||
from genius_invocation.card.action.equipment.artifact.base import ArtifactCard | ||
from genius_invocation.entity.status import Artifact | ||
from typing import TYPE_CHECKING | ||
|
||
if TYPE_CHECKING: | ||
from genius_invocation.game.game import GeniusGame | ||
from genius_invocation.game.player import GeniusPlayer | ||
|
||
|
||
class GladiatorsTriumphusEntity(Artifact): | ||
id = 31202991 | ||
name: str = "Gladiator's Triumphus" | ||
name_ch = "角斗士的凯旋" | ||
max_usage = 1 | ||
def __init__(self, game: 'GeniusGame', from_player: 'GeniusPlayer', from_character = None, artifact_card = None): | ||
super().__init__(game, from_player, from_character, artifact_card) | ||
self.round_usage = 1 | ||
|
||
def on_calculate(self, game: 'GeniusGame'): | ||
if self.round_usage > 0: | ||
if game.active_player_index == self.from_player.index: | ||
if game.current_dice.from_character == self.from_character: | ||
if game.current_dice.use_type == SkillType.NORMAL_ATTACK: | ||
if game.current_dice.cost[1]['cost_num'] > 0: | ||
game.current_dice.cost[1]['cost_num'] -= 1 | ||
return True | ||
return False | ||
|
||
def on_skill(self, game: 'GeniusGame'): | ||
if self.on_calculate(game): | ||
self.round_usage = 0 | ||
|
||
def on_end(self, game: 'GeniusGame'): | ||
self.round_usage = 1 | ||
|
||
def update_listener_list(self): | ||
self.listeners = [ | ||
(EventType.ON_USE_SKILL, ZoneType.CHARACTER_ZONE, self.on_skill), | ||
(EventType.CALCULATE_DICE, ZoneType.CHARACTER_ZONE, self.on_calculate), | ||
(EventType.FINAL_END, ZoneType.CHARACTER_ZONE, self.on_end) | ||
] | ||
|
||
|
||
|
||
class GladiatorsTriumphus(ArtifactCard): | ||
id: int = 312029 | ||
name: str = "Gladiator's Triumphus" | ||
name_ch = "角斗士的凯旋" | ||
time = 4.8 | ||
cost_num: int = 0 | ||
cost_type: CostType = None | ||
|
||
def __init__(self) -> None: | ||
super().__init__() | ||
self.artifact_entity = GladiatorsTriumphusEntity | ||
|
||
def on_played(self, game: 'GeniusGame') -> None: | ||
super().on_played(game) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
genius_invocation/card/action/equipment/talent/talents/RimeflowRapier.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from genius_invocation.card.action.equipment.talent.import_head import * | ||
from genius_invocation.card.character.characters.Navia import * | ||
|
||
class RimeflowRapier(TalentCard): | ||
id: int = 221041 | ||
name: str = "Rimeflow Rapier" | ||
name_ch = "冰雅刺剑" | ||
time = 4.8 | ||
is_action = True | ||
cost = [{'cost_num': 3, 'cost_type': CostType.GEO.value}] | ||
cost_power = 0 | ||
character = Navia | ||
def __init__(self) -> None: | ||
super().__init__() |
14 changes: 14 additions & 0 deletions
14
genius_invocation/card/action/equipment/talent/talents/UndisclosedDistributionChannels.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from genius_invocation.card.action.equipment.talent.import_head import * | ||
from genius_invocation.card.character.characters.FrostOperative import * | ||
|
||
class UndisclosedDistributionChannels(TalentCard): | ||
id: int = 216081 | ||
name: str = "Undisclosed Distribution Channels" | ||
name_ch = "不明流通渠道" | ||
time = 4.8 | ||
is_action = True | ||
cost = [{'cost_num': 3, 'cost_type': CostType.CRYO.value}] | ||
cost_power = 0 | ||
character = FrostOperative | ||
def __init__(self) -> None: | ||
super().__init__() |
23 changes: 23 additions & 0 deletions
23
genius_invocation/card/action/equipment/talent/talents/VanguardsCoordinatedTactics.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from genius_invocation.card.action.equipment.talent.import_head import * | ||
from genius_invocation.card.character.characters.Chevreuse import * | ||
|
||
class VanguardsCoordinatedTactics(TalentCard): | ||
id: int = 213131 | ||
name: str = "Vanguard's Coordinated Tactics" | ||
name_ch = "尖兵协同战法" | ||
time = 4.8 | ||
is_action = False | ||
cost = [{'cost_num': 2, 'cost_type': CostType.PYRO.value}] | ||
cost_power = 0 | ||
character = Chevreuse | ||
def __init__(self) -> None: | ||
super().__init__() | ||
|
||
def find_target(self, game: 'GeniusGame'): | ||
for idx, character in enumerate(game.active_player.character_list): | ||
if isinstance(character, self.character): | ||
if character.is_alive: | ||
unique_element_set = character.from_player.element_set | ||
if len(unique_element_set) == 2 and ElementType.PYRO in unique_element_set and ElementType.ELECTRO in unique_element_set: | ||
return [idx+2] | ||
return [] |
56 changes: 56 additions & 0 deletions
56
genius_invocation/card/action/equipment/weapon/weapons/MagicSword.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
from genius_invocation.utils import * | ||
from genius_invocation.card.action.equipment.weapon.base import WeaponCard | ||
from typing import TYPE_CHECKING | ||
from genius_invocation.entity.status import Weapon | ||
|
||
if TYPE_CHECKING: | ||
from genius_invocation.game.game import GeniusGame | ||
|
||
|
||
class MagicSwordWeapon(Weapon): | ||
id: int = 31130881 | ||
name: str = "Ultimate Overlord's Mega Magic Sword" | ||
name_ch = "「究极霸王超级魔剑」" | ||
def __init__(self, game: 'GeniusGame', from_player: 'GeniusPlayer', from_character = None, weapon_card = None): | ||
super().__init__(game, from_player, from_character, weapon_card) | ||
self.support = 0 | ||
for card_name in from_player.played_cards: | ||
if card_name not in self.from_player.card_zone.card_name: | ||
self.support += 1 | ||
|
||
def on_add_damage(self, game:'GeniusGame'): | ||
if game.current_damage.damage_from == self.from_character: | ||
if self.support >= 8: | ||
game.current_damage.damage += 3 | ||
elif self.support >= 4: | ||
game.current_damage.damage += 2 | ||
elif self.support >= 2: | ||
game.current_damage.damage += 1 | ||
|
||
def on_play_card(self, game:'GeniusGame'): | ||
if game.active_player_index == self.from_player.index: | ||
if game.current_card.name not in self.from_player.card_zone.card_name: | ||
self.support += 1 | ||
|
||
def update_listener_list(self): | ||
self.listeners = [ | ||
(EventType.DAMAGE_ADD, ZoneType.CHARACTER_ZONE, self.on_add_damage), | ||
(EventType.AFTER_PLAY_CARD, ZoneType.CHARACTER_ZONE, self.on_play_card), | ||
] | ||
|
||
|
||
class MagicSword(WeaponCard): | ||
id: int = 311308 | ||
name: str = "Ultimate Overlord's Mega Magic Sword" | ||
name_ch = "「究极霸王超级魔剑」" | ||
time = 4.8 | ||
weapon_type: WeaponType = WeaponType.CLAYMORE | ||
cost_num: int = 2 | ||
cost_type: CostType = CostType.WHITE | ||
|
||
def __init__(self) -> None: | ||
super().__init__() | ||
self.equipment_entity = MagicSwordWeapon | ||
|
||
def on_played(self, game: 'GeniusGame') -> None: | ||
super().on_played(game) |
73 changes: 73 additions & 0 deletions
73
genius_invocation/card/action/equipment/weapon/weapons/ProspectorsDrill.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
from genius_invocation.utils import * | ||
from genius_invocation.card.action.equipment.weapon.base import WeaponCard | ||
from typing import TYPE_CHECKING | ||
from genius_invocation.entity.status import Weapon | ||
|
||
if TYPE_CHECKING: | ||
from genius_invocation.game.game import GeniusGame | ||
|
||
|
||
class ProspectorsDrillWeapon(Weapon): | ||
id: int = 31140981 | ||
name: str = "Prospector's Drill" | ||
name_ch = "勘探钻机" | ||
def __init__(self, game: 'GeniusGame', from_player: 'GeniusPlayer', from_character = None, weapon_card = None): | ||
super().__init__(game, from_player, from_character, weapon_card) | ||
self.round_usage = 2 | ||
self.solidarity = 0 | ||
self.add_damage = False | ||
|
||
def on_damage_execute(self, game: 'GeniusGame'): | ||
if self.round_usage <=0 : | ||
return | ||
if game.current_damage.damage_to == self.from_character: | ||
if game.current_damage.main_damage_element == ElementType.PIERCING: | ||
return | ||
if game.current_damage.main_damage > 0: | ||
max_id = max_count_card() | ||
if max_id == None: | ||
return | ||
else: | ||
game.current_damage.main_damage -= 1 | ||
self.round_usage -= 1 | ||
|
||
def on_add_damage(self, game:'GeniusGame'): | ||
if self.add_damage: | ||
game.current_damage.main_damage += 1 | ||
self.add_damage = False | ||
|
||
def after_use_skill(self, game: 'GeniusGame'): | ||
if self.add_damage: | ||
self.add_damage = False | ||
|
||
def on_use_skill(self, game: 'GeniusGame'): | ||
if game.current_skill.from_character == self.from_character: | ||
if self.solidarity > 0: | ||
self.add_damage = True | ||
self.from_player.get_card(num=self.solidarity) | ||
self.solidarity = 0 | ||
|
||
def update_listener_list(self): | ||
self.listeners = [ | ||
(EventType.FINAL_EXECUTE, ZoneType.CHARACTER_ZONE, self.on_damage_execute), | ||
(EventType.DAMAGE_ADD, ZoneType.CHARACTER_ZONE, self.on_add_damage), | ||
(EventType.AFTER_USE_SKILL, ZoneType.CHARACTER_ZONE, self.after_use_skill), | ||
(EventType.ON_USE_SKILL, ZoneType.CHARACTER_ZONE, self.on_use_skill) | ||
] | ||
|
||
|
||
class ProspectorsDrill(WeaponCard): | ||
id: int = 311409 | ||
name: str = "Prospector's Drill" | ||
name_ch = "勘探钻机" | ||
time = 4.8 | ||
weapon_type: WeaponType = WeaponType.POLEARM | ||
cost_num: int = 2 | ||
cost_type: CostType = CostType.WHITE | ||
|
||
def __init__(self) -> None: | ||
super().__init__() | ||
self.equipment_entity = ProspectorsDrillWeapon | ||
|
||
def on_played(self, game: 'GeniusGame') -> None: | ||
super().on_played(game) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
from .events import * | ||
from .base import FoodCard | ||
from .foods import * | ||
from .elemental_resonance import * | ||
from .elemental_resonance_dice import * | ||
from .elemental_resonance_event import * | ||
from .country_resonance import * | ||
from .arcane_legend import* |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 13 additions & 0 deletions
13
genius_invocation/card/action/event/elemental_resonance_dice/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import os | ||
import importlib | ||
|
||
package_dir = os.path.dirname(__file__) | ||
module_files = [ | ||
f[:-3] for f in os.listdir(package_dir) if f.endswith(".py") and f != "__init__.py" | ||
] | ||
|
||
for module_name in module_files: | ||
import_cmd = f"from .{module_name} import *" | ||
exec(import_cmd) | ||
|
||
__all__ = module_files |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 13 additions & 0 deletions
13
genius_invocation/card/action/event/elemental_resonance_event/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import os | ||
import importlib | ||
|
||
package_dir = os.path.dirname(__file__) | ||
module_files = [ | ||
f[:-3] for f in os.listdir(package_dir) if f.endswith(".py") and f != "__init__.py" | ||
] | ||
|
||
for module_name in module_files: | ||
import_cmd = f"from .{module_name} import *" | ||
exec(import_cmd) | ||
|
||
__all__ = module_files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
from genius_invocation.card.action.base import ActionCard | ||
from genius_invocation.utils import * | ||
from genius_invocation.entity.status import Combat_Status | ||
if TYPE_CHECKING: | ||
from genius_invocation.game.game import GeniusGame | ||
|
||
class LoseMoneyEntity(Combat_Status): | ||
id = 33203631 | ||
name: str = "I'd Rather Lose Money Myself..." | ||
name_ch = '「看到那小子挣钱…」' | ||
def __init__(self, game: 'GeniusGame', from_player: 'GeniusPlayer', from_character=None): | ||
super().__init__(game, from_player, from_character) | ||
self.current_usage = 1 | ||
|
||
def on_get_dice(self, game:'GeniusGame'): | ||
if game.current_player.index == 1 - self.from_player.index: | ||
self.current_usage += 1 | ||
if self.current_usage == 2: | ||
self.from_player.dice_zone.add([DiceType.OMNI.value]) | ||
|
||
def on_end(self, game:'GeniusGame'): | ||
self.on_destroy(game) | ||
|
||
def update_listener_list(self): | ||
self.listeners = [ | ||
(EventType.ON_GET_DICE, ZoneType.ACTIVE_ZONE, self.on_get_dice), | ||
(EventType.FINAL_END, ZoneType.ACTIVE_ZONE, self.on_end) | ||
] | ||
|
||
class LoseMoney(ActionCard): | ||
id: int = 332036 | ||
name: str = "I'd Rather Lose Money Myself..." | ||
name_ch = '「看到那小子挣钱…」' | ||
time = 4.8 | ||
cost_num = 0 | ||
cost_type = None | ||
card_type = ActionCardType.EVENT | ||
|
||
def __init__(self) -> None: | ||
super().__init__() | ||
|
||
def on_played(self, game: 'GeniusGame'): | ||
zone = game.active_player.team_combat_status | ||
if not zone.has_status(LoseMoneyEntity): | ||
zone.add_entity(LoseMoneyEntity(game, game.active_player, None)) | ||
|
||
def find_target(self, game:'GeniusGame'): | ||
return [1] |
Oops, something went wrong.