Coverage for thb/meta/characters/marisa.py : 77%
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.meta.common import ui_meta
11# -- code --
12@ui_meta(characters.marisa.Marisa)
13class Marisa:
14 # Character
15 name = '雾雨魔理沙'
16 title = '绝非普通的强盗少女'
17 illustrator = '霏茶'
18 cv = '君寻'
20 port_image = 'thb-portrait-marisa'
21 figure_image = 'thb-figure-marisa'
22 miss_sound_effect = 'thb-cv-marisa_miss'
25@ui_meta(characters.marisa.Daze)
26class Daze:
27 name = '打贼'
29 def effect_string(self, act):
30 # for LaunchCard.ui_meta.effect_string
31 return '|G【%s】|r喊道:“打贼啦!”向|G【%s】|r使用了|G弹幕|r。' % (
32 act.source.ui_meta.name,
33 act.target.ui_meta.name,
34 )
37@ui_meta(characters.marisa.BorrowAction)
38class BorrowAction:
39 # choose_option
40 choose_option_buttons = (('发动', True), ('不发动', False))
41 choose_option_prompt = '你要视为对魔理沙使用弹幕吗?'
44@ui_meta(characters.marisa.Borrow)
45class Borrow:
46 # Skill
47 name = '借走'
48 description = '出牌阶段限一次,你可以获得其他角色的一张牌,然后该角色可以视为对你使用了一张|G弹幕|r。'
50 def clickable(self):
51 if self.limit1_skill_used('borrow_tag'):
52 return False
54 if not self.my_turn(): return False
56 return True
58 def is_action_valid(self, sk, tl):
59 if sk.associated_cards:
60 return (False, '请不要选择牌!')
62 if len(tl) != 1:
63 return (False, '请选择1名玩家')
65 tgt = tl[0]
66 if not (tgt.cards or tgt.showncards or tgt.equips): 66 ↛ 67line 66 didn't jump to line 67, because the condition on line 66 was never true
67 return (False, '目标没有牌可以“借给”你')
69 return (True, '我死了以后你们再拿回去好了!')
71 def effect_string(self, act):
72 # for LaunchCard.ui_meta.effect_string
73 return '大盗|G【%s】|r又出来“|G借走|r”了|G【%s】|r的牌。' % (
74 act.source.ui_meta.name,
75 act.target.ui_meta.name,
76 )
78 def sound_effect(self, act):
79 return 'thb-cv-marisa_borrow'