# Coverage for thb/meta/characters/shizuha.py : 95%

## 45 statements 43 run 2 missing 0 excluded 1 partial

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 -*-

2

3# -- stdlib --

4# -- third party --

5# -- own --

6 from thb import characters

7 from thb.meta.common import ui_meta

8 from utils.misc import BatchList

9

10

11# -- code --

12

13

14@ui_meta(characters.shizuha.AutumnWindEffect)

15 class AutumnWindEffect:

16 def effect_string(self, act):

17 return '|G秋风|r带走了|G【%s】|r的%s。' % (

18 act.target.ui_meta.name,

19 self.card_desc(act.card),

20 )

21

22

23@ui_meta(characters.shizuha.AutumnWindAction)

24 class AutumnWindAction:

25

26 def effect_string_before(self, act: characters.shizuha.AutumnWindAction):

27 tl = BatchList(act.target_list)

28 return '当|G秋风|r吹起，|G【%s】|r连牌都拿不住的时候，才回想起，妈妈说的对，要穿秋裤。' % (

29 '】|r、|G【'.join(tl.ui_meta.name),

30 )

31

32 def sound_effect(self, act):

33 return 'thb-cv-shizuha_autumnwind'

34

35

36@ui_meta(characters.shizuha.Decay)

37 class Decay:

38 # Skill

39 name = '凋零'

40 description = '|B锁定技|r。你的回合内，每当其他角色失去最后的手牌时，你摸一张牌；你的回合外，每当你受到一次伤害后，当前回合角色于本回合弃牌阶段需额外弃置一张手牌（该效果不可叠加）。'

41

42

43@ui_meta(characters.shizuha.DecayAction)

44 class DecayAction:

45

46 def effect_string(self, act):

47 return '|G【%s】|r觉得屁股凉了一下……' % act.target.ui_meta.name

48

49

50@ui_meta(characters.shizuha.DecayEffect)

51 class DecayEffect:

52

53 def effect_string(self, act):

54 return '|G【%s】|r的|G凋零|r效果生效了。' % act.target.ui_meta.name

55

56 def sound_effect(self, act):

57 return 'thb-cv-shizuha_decay'

58

59

60@ui_meta(characters.shizuha.DecayDrawCards)

61 class DecayDrawCards:

62

63 def sound_effect(self, act):

64 return 'thb-cv-shizuha_decay'

65

66

67@ui_meta(characters.shizuha.AutumnWind)

68 class AutumnWind:

69 # Skill

70 name = '秋风'

71 description = '弃牌阶段结束时，你可以弃置至多X名角色各一张牌。（X为你本阶段弃置的手牌数）'

72

73

74@ui_meta(characters.shizuha.AutumnWindHandler)

75 class AutumnWindHandler:

76 # choose_option

77 choose_option_buttons = (('发动', True), ('不发动', False))

78 choose_option_prompt = '你要发动【秋风】吗？'

79

80 def target(self, pl):

81 if not pl: 81 ↛ 82 line 81 didn't jump to line 82, because the condition on line 81 was never true

82 return (False, '秋风：请选择目标玩家')

83

84 return (True, '秋风弃牌')

85

86

87@ui_meta(characters.shizuha.Shizuha)

88 class Shizuha:

89 # Character

90 name = '秋静叶'

91 title = '寂寞与终焉的象征'

92 illustrator = '和茶'

93 cv = 'VV'

94 designer = 'SmiteOfKing'

95

96 port_image = 'thb-portrait-shizuha'

97 figure_image = 'thb-figure-shizuha'

98 miss_sound_effect = 'thb-cv-shizuha_miss'