# Coverage for thb/meta/characters/suika.py : 56%

## 44 statements 25 run 19 missing 0 excluded 0 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 from __future__ import annotations

3

4# -- stdlib --

5# -- third party --

6# -- own --

7 from thb import actions, characters

8 from thb.meta.common import ui_meta

9

10

11# -- code --

12@ui_meta(characters.suika.HeavyDrinkerWine)

13 class HeavyDrinkerWine:

14 name = '酒'

15

16

17@ui_meta(characters.suika.HeavyDrinker)

18 class HeavyDrinker:

19 # Skill

20 name = '酒豪'

21 description = '出牌阶段每名角色限一次，你可以和其他角色拼点，若你赢，视为你和其各使用了一张|G酒|r，若你没赢，你不能发动此技能，直到回合结束。'

22

23 def clickable(self):

24 g = self.game

25 me = self.me

26

27 if me.tags['suika_failed'] >= me.tags['turn_count']:

28 return False

29

30 try:

31 act = g.action_stack[-1]

32 except IndexError:

33 return False

34

35 if not isinstance(act, actions.ActionStage):

36 return False

37

38 return True

39

40 def is_action_valid(self, sk, tl):

41 if sk.associated_cards:

42 return False, '请不要选择牌！'

43

44 if not tl:

45 return False, '请选择一名角色！'

46

47 return True, '来一杯！'

48

49 def sound_effect(self, act):

50 return 'thb-cv-suika_heavydrinker'

51

52 def effect_string(self, act):

53 return '|G【%s】|r跟|G【%s】|r划起了拳：“哥俩好，三星照，只喝酒，不吃药！”' % (

54 act.source.ui_meta.name,

55 act.target.ui_meta.name,

56 )

57

58

59@ui_meta(characters.suika.DrunkenDream)

60 class DrunkenDream:

61 # Skill

62 name = '醉梦'

63 description = '|B锁定技|r，你处于“喝醉”状态时，攻击范围+2；准备阶段开始时，你摸一张牌。'

64

65

66@ui_meta(characters.suika.DrunkenDreamDrawCards)

67 class DrunkenDreamDrawCards:

68

69 def sound_effect(self, act):

70 return 'thb-cv-suika_drunkendream'

71

72

73@ui_meta(characters.suika.Suika)

74 class Suika:

75 # Character

76 name = '伊吹萃香'

77 title = '小小的酒鬼夜行'

78 illustrator = '和茶'

79 cv = 'shourei小N'

80

81 port_image = 'thb-portrait-suika'

82 figure_image = 'thb-figure-suika'

83 miss_sound_effect = 'thb-cv-suika_miss'