Coverage for thb/meta/characters/yuuka.py : 91%
Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1# -*- coding: utf-8 -*-
2from __future__ import annotations
4# -- stdlib --
5# -- third party --
6# -- own --
7from thb import characters
8from thb.cards.classes import AttackCard
9from thb.meta.common import ui_meta
12# -- code --
13@ui_meta(characters.yuuka.ReversedScales)
14class ReversedScales:
15 # Skill
16 name = '逆鳞'
17 description = '每当你成为其他角色使用的单体符卡效果目标时,你可以将其视为|G弹幕战|r效果;你的回合外,你可以将一张手牌当做|G弹幕|r使用或打出。'
19 def clickable(self):
20 g = self.game
21 me = self.me
22 if self.my_turn():
23 return False
25 if not (me.cards or me.showncards):
26 return False
28 try:
29 act = g.action_stack[-1]
30 return act.cond([self.build_handcard(AttackCard)])
31 except Exception:
32 pass
34 return False
36 def is_complete(self, skill):
37 acards = skill.associated_cards
38 if len(acards) != 1:
39 return (False, '请选择1张牌!')
41 return (True, '反正这条也看不到,偷个懒~~~')
43 def is_action_valid(self, sk, tl):
44 rst, reason = self.is_complete(sk)
45 if not rst:
46 return (rst, reason)
47 else:
48 return AttackCard().ui_meta.is_action_valid([sk], tl)
50 def effect_string(self, act):
51 # for LaunchCard.ui_meta.effect_string
52 return '|G【%s】|r用和善的眼神看了|G【%s】|r一眼。' % (
53 act.source.ui_meta.name,
54 act.target.ui_meta.name,
55 )
57 def sound_effect(self, act):
58 return 'thb-cv-yuuka_flowerqueen'
61@ui_meta(characters.yuuka.Sadist)
62class Sadist:
63 # Skill
64 name = '施虐'
65 description = '当你击坠一名角色时,你可以对攻击范围内一名其他角色造成1点伤害;你对体力值为1的其他角色造成的伤害+1。'
68@ui_meta(characters.yuuka.SadistKOF)
69class SadistKOF:
70 # Skill
71 name = '施虐'
72 description = '|B锁定技|r,当你击坠对手后,你摸2张牌并对其下一名登场角色造成1点伤害。'
75@ui_meta(characters.yuuka.ReversedScalesAction)
76class ReversedScalesAction:
77 def effect_string_apply(self, act):
78 return (
79 '|G【%s】|r:“来正面上我啊!”'
80 ) % (
81 act.target.ui_meta.name,
82 )
84 def sound_effect(self, act):
85 return 'thb-cv-yuuka_rs'
88@ui_meta(characters.yuuka.SadistAction)
89class SadistAction:
90 def effect_string_apply(self, act):
91 return (
92 '|G【%s】|r又看了看|G【%s】|r:“你也要尝试一下么!”'
93 ) % (
94 act.source.ui_meta.name,
95 act.target.ui_meta.name,
96 )
98 def sound_effect(self, act):
99 return 'thb-cv-yuuka_sadist'
102@ui_meta(characters.yuuka.SadistKOFDamageAction)
103class SadistKOFDamageAction:
104 def effect_string_apply(self, act):
105 return (
106 '|G【%s】|r又看了看|G【%s】|r:“你也要尝试一下么!”'
107 ) % (
108 act.source.ui_meta.name,
109 act.target.ui_meta.name,
110 )
112 def sound_effect(self, act):
113 return 'thb-cv-yuuka_sadist'
116@ui_meta(characters.yuuka.SadistHandler)
117class SadistHandler:
118 # choose_card
119 def choose_card_text(self, act, cards):
120 if act.cond(cards):
121 return (True, '发动【施虐】')
122 else:
123 return (False, '【施虐】:请弃置一张牌')
125 def target(self, pl):
126 if not pl: 126 ↛ 127line 126 didn't jump to line 127, because the condition on line 126 was never true
127 return (False, '【施虐】:请选择1名玩家')
129 return (True, '发动【施虐】')
132@ui_meta(characters.yuuka.ReversedScalesHandler)
133class ReversedScalesHandler:
134 # choose_option
135 choose_option_buttons = (('发动', True), ('不发动', False))
136 choose_option_prompt = '你要发动【逆鳞】吗?'
139@ui_meta(characters.yuuka.Yuuka)
140class Yuuka:
141 # Character
142 name = '风见幽香'
143 title = '四季的鲜花之主'
144 illustrator = '霏茶'
145 cv = 'VV'
147 port_image = 'thb-portrait-yuuka'
148 figure_image = 'thb-figure-yuuka'
149 miss_sound_effect = 'thb-cv-yuuka_miss'
152@ui_meta(characters.yuuka.YuukaKOF)
153class YuukaKOF:
154 # Character
155 name = '风见幽香'
156 title = '四季的鲜花之主'
157 illustrator = '霏茶'
158 cv = 'VV'
160 port_image = 'thb-portrait-yuuka'
161 figure_image = 'thb-figure-yuuka'
162 miss_sound_effect = 'thb-cv-yuuka_miss'
164 notes = '|RKOF修正角色'