-
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.
- Loading branch information
Showing
37 changed files
with
1,320 additions
and
198 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
85 changes: 85 additions & 0 deletions
85
genius_invocation/card/action/equipment/artifact/artifacts/ConductorsTopHat.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,85 @@ | ||
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 ConductorsTopHatEntity(Artifact): | ||
name: str = "Conductor's Top Hat" | ||
name_ch = "指挥的礼帽" | ||
id = 31203091 | ||
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 | ||
self.is_excute = False | ||
|
||
def on_change_character(self, game: 'GeniusGame'): | ||
if game.current_switch.to_character == self.from_character: | ||
if self.round_usage > 0: | ||
self.is_excute = True | ||
player = self.from_character.from_player | ||
max_id = max_count_card(player.hand_zone.card) | ||
player.hand_zone.discard_card(max_id) | ||
num = self.from_player.dice_zone.num() | ||
self.from_player.dice_zone.remove([num-2, num-1]) | ||
self.from_player.dice_zone.add([DiceType.OMNI for _ in range(2)]) | ||
self.round_usage -= 1 | ||
|
||
def on_calculate_dice(self, game: 'GeniusGame'): | ||
if game.active_player_index == self.from_player.index: | ||
if self.is_excute: | ||
if game.current_dice.use_type in SkillType: | ||
if self.round_usage > 0: | ||
if game.current_dice.cost[0]['cost_num'] > 0: | ||
game.current_dice.cost[0]['cost_num'] -= 1 | ||
return True | ||
if len(game.current_dice.cost)>1: | ||
if game.current_dice.cost[1]['cost_num'] > 0: | ||
game.current_dice.cost[1]['cost_num'] -= 1 | ||
return True | ||
if game.current_dice.use_type == ActionCardType.EQUIPMENT_TALENT: | ||
if self.round_usage > 0: | ||
if game.current_dice.cost[0]['cost_num'] > 0: | ||
game.current_dice.cost[0]['cost_num'] -= 1 | ||
return True | ||
if game.current_dice.cost[1]['cost_num'] > 0: | ||
game.current_dice.cost[1]['cost_num'] -= 1 | ||
return True | ||
return False | ||
|
||
def on_use_skill(self, game: 'GeniusGame'): | ||
if self.on_calculate_dice(game): | ||
self.is_excute = False | ||
|
||
def on_play_card(self, game: 'GeniusGame'): | ||
if self.on_calculate_dice(game): | ||
self.is_excute = False | ||
|
||
def update_listener_list(self): | ||
self.listeners = [ | ||
(EventType.ON_PLAY_CARD, ZoneType.CHARACTER_ZONE, self.on_change_character), | ||
(EventType.ON_USE_SKILL, ZoneType.CHARACTER_ZONE, self.on_use_skill), | ||
(EventType.CALCULATE_DICE, ZoneType.CHARACTER_ZONE, self.on_calculate_dice), | ||
(EventType.AFTER_CHANGE_CHARACTER, ZoneType.CHARACTER_ZONE, self.on_change_character), | ||
] | ||
|
||
|
||
class ConductorsTopHat(ArtifactCard): | ||
id: int = 312030 | ||
name: str = "Marechaussee Hunter" | ||
name_ch = "指挥的礼帽" | ||
time = 5.1 | ||
cost_num: int = 1 | ||
cost_type: CostType = CostType.WHITE | ||
|
||
def __init__(self) -> None: | ||
super().__init__() | ||
self.artifact_entity = ConductorsTopHatEntity | ||
|
||
def on_played(self, game: 'GeniusGame') -> None: | ||
super().on_played(game) | ||
|
48 changes: 48 additions & 0 deletions
48
genius_invocation/card/action/equipment/specialskill/skills/Tepetlisaurus.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,48 @@ | ||
from genius_invocation.utils import * | ||
from genius_invocation.card.action.equipment.specialskill.base import SpecialSkillCard | ||
from genius_invocation.entity.status import SpecialSkill, Shield | ||
from typing import TYPE_CHECKING | ||
|
||
if TYPE_CHECKING: | ||
from genius_invocation.game.game import GeniusGame | ||
from genius_invocation.game.player import GeniusPlayer | ||
|
||
|
||
class TepetlisaurusEntity(SpecialSkill): | ||
name: str = "Tepetlisaurus" | ||
name_ch = "特佩利龙" | ||
id = "313004s1" | ||
cost = [{'cost_num': 2, 'cost_type': CostType.BLACK}] | ||
def __init__(self, game: 'GeniusGame', from_player: 'GeniusPlayer', from_character = None): | ||
super().__init__(game, from_player, from_character) | ||
self.usage = 2 | ||
|
||
def on_call(self, game: 'GeniusGame') -> None: | ||
super().on_call(game) | ||
self.from_player.get_card(num=2) | ||
num = 0 | ||
for card in self.from_player.hand_zone.card: | ||
card_name = card.name | ||
if card_name not in self.from_player.card_zone.card_name: | ||
num += 1 | ||
self.from_character.character_zone.add_entity(Shield( | ||
game, self.from_player, self.from_character, usage=num, | ||
)) | ||
game.manager.invoke(EventType.AFTER_USE_SPECIAL, game) | ||
|
||
|
||
|
||
class Tepetlisaurus(SpecialSkillCard): | ||
id: int = 313004 | ||
name: str = "Koholasaurus" | ||
name_ch = "嵴锋龙" | ||
time: float = 5.1 | ||
cost_num: int = 2 | ||
cost_type: CostType = CostType.WHITE | ||
|
||
def __init__(self) -> None: | ||
super().__init__() | ||
self.equipment_entity = TepetlisaurusEntity | ||
|
||
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
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/EngulfingStorm.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.AbyssLectorVioletLightning import * | ||
|
||
class EngulfingStorm(TalentCard): | ||
id: int = 224061 | ||
name: str = "Surging Undercurrent" | ||
name_ch = "侵雷重闪" | ||
time = 5.1 | ||
is_action = False | ||
cost = [{'cost_num': 1, 'cost_type': CostType.ELECTRO.value}] | ||
cost_power = 0 | ||
character = AbyssLectorVioletLightning | ||
def __init__(self) -> None: | ||
super().__init__() |
14 changes: 14 additions & 0 deletions
14
genius_invocation/card/action/equipment/talent/talents/InFiveColorsDyed.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.Chiori import * | ||
|
||
class InFiveColorsDyed(TalentCard): | ||
id: int = 216091 | ||
name: str = "In Five Colors Dyed" | ||
name_ch = "落染五色" | ||
time = 5.1 | ||
is_action = True | ||
cost = [{'cost_num': 3, 'cost_type': CostType.GEO.value}] | ||
cost_power = 0 | ||
character = Chiori | ||
def __init__(self) -> None: | ||
super().__init__() |
74 changes: 74 additions & 0 deletions
74
genius_invocation/card/action/equipment/weapon/weapons/PortablePowerSaw.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,74 @@ | ||
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 PortablePowerSawWeapon(Weapon): | ||
id: int = 31130981 | ||
name: str = "Portable Power Saw" | ||
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 = 1 | ||
self.stoicssymbol = 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.stoicssymbol += 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.stoicssymbol > 0: | ||
self.add_damage = True | ||
self.from_player.get_card(num=self.stoicssymbol) | ||
self.stoicssymbol = 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 PortablePowerSaw(WeaponCard): | ||
id: int = 311309 | ||
name: str = "Portable Power Saw" | ||
name_ch = "便携动力锯" | ||
time = 5.1 | ||
weapon_type: WeaponType = WeaponType.CLAYMORE | ||
cost_num: int = 2 | ||
cost_type: CostType = CostType.WHITE | ||
|
||
def __init__(self) -> None: | ||
super().__init__() | ||
self.equipment_entity = PortablePowerSawWeapon | ||
|
||
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
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
Oops, something went wrong.