# Coverage for thb/meta/characters/tenshi.py : 94%

## 38 statements 36 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 from __future__ import annotations

3

4# -- stdlib --

5# -- third party --

6# -- own --

7 from thb import characters

8 from thb.meta.common import ui_meta

9

10

11# -- code --

12@ui_meta(characters.tenshi.Masochist)

13 class Masochist:

14 # Skill

15 name = '抖Ｍ'

16 description = '每当你受到1点伤害后，你可以观看牌堆顶的两张牌，并将这些牌交给至少一名角色。'

17

18

19@ui_meta(characters.tenshi.MasochistHandler)

20 class MasochistHandler:

21 # choose_option

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

23 choose_option_prompt = '你要发动【抖Ｍ】吗？'

24

25

26@ui_meta(characters.tenshi.MasochistAction)

27 class MasochistAction:

28 # choose_card

29 def choose_card_text(self, act, cards):

30 if act.cond(cards):

31 return (True, '给你牌~')

32 else:

33 return (False, '请选择你要给出的牌（否则给自己）')

34

35 def target(self, pl):

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

37 return (False, '请选择1名玩家')

38

39 return (True, '给你牌~')

40

41 def effect_string_before(self, act):

42 return '不过|G【%s】|r好像很享受的样子…' % (

43 act.target.ui_meta.name,

44 )

45

46 def sound_effect(self, act):

47 return 'thb-cv-tenshi_masochist'

48

49

50@ui_meta(characters.tenshi.ScarletPerception)

51 class ScarletPerception:

52 # Skill

53 name = '绯想'

54 description = '|B锁定技|r，距离1以内的角色的红色判定牌生效后，你获得之。'

55

56

57@ui_meta(characters.tenshi.ScarletPerceptionAction)

58 class ScarletPerceptionAction:

59 def effect_string(self, act):

60 return '|G【%s】|r获得了%s。' % (

61 act.source.ui_meta.name,

62 self.card_desc(act.card)

63 )

64

65 def sound_effect(self, act):

66 return 'thb-cv-tenshi_sp'

67

68

69@ui_meta(characters.tenshi.Tenshi)

70 class Tenshi:

71 # Character

72 name = '比那名居天子'

73 title = '有顶天的大M子'

74 illustrator = '月见'

75 cv = 'VV'

76

77 port_image = 'thb-portrait-tenshi'

78 figure_image = 'thb-figure-tenshi'

79 miss_sound_effect = 'thb-cv-tenshi_miss'