# Coverage for thb/meta/characters/shikieiki.py : 83%

## 38 statements 31 run 7 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 import random

6

7# -- third party --

8# -- own --

9 from thb import characters

10 from thb.meta.common import ui_meta

11

12

13# -- code --

14@ui_meta(characters.shikieiki.Trial)

15 class Trial:

16 # Skill

17 name = '审判'

18 description = '每当一名角色的判定牌生效前，你可以打出一张牌代替之。'

19

20

21@ui_meta(characters.shikieiki.TrialAction)

22 class TrialAction:

23 def effect_string(self, act):

24 return '幻想乡各地巫女妖怪纷纷表示坚决拥护|G【%s】|r将|G【%s】|r的判定结果修改为%s的有关决定！' % (

25 act.source.ui_meta.name,

26 act.target.ui_meta.name,

27 self.card_desc(act.card)

28 )

29

30 def sound_effect(self, act):

31 return random.choice([

32 'thb-cv-shikieiki_trial1',

33 'thb-cv-shikieiki_trial2',

34 ])

35

36

37@ui_meta(characters.shikieiki.Majesty)

38 class Majesty:

39 # Skill

40 name = '威严'

41 description = '每当你受到一次伤害后，你可以获得伤害来源的一张牌。'

42

43

44@ui_meta(characters.shikieiki.MajestyAction)

45 class MajestyAction:

46 def effect_string(self, act):

47 return '|G【%s】|r脸上挂满黑线，收走了|G【%s】|r的一张牌填补自己的|G威严|r。' % (

48 act.source.ui_meta.name,

49 act.target.ui_meta.name,

50 )

51

52 def sound_effect(self, act):

53 return 'thb-cv-shikieiki_majesty'

54

55

56@ui_meta(characters.shikieiki.TrialHandler)

57 class TrialHandler:

58 # choose_option

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

60 choose_option_prompt = '你要发动【审判】吗？'

61

62 # choose_card

63 def choose_card_text(self, act, cards):

64 if act.cond(cards):

65 return (True, '有罪！')

66 else:

67 return (False, '请选择一张牌代替当前的判定牌')

68

69

70@ui_meta(characters.shikieiki.MajestyHandler)

71 class MajestyHandler:

72 # choose_option

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

74 choose_option_prompt = '你要发动【威严】吗？'

75

76

77@ui_meta(characters.shikieiki.Shikieiki)

78 class Shikieiki:

79 # Character

80 name = '四季映姬'

81 title = '胸不平何以平天下'

82 illustrator = '和茶'

83 cv = 'shourei小N'

84

85 port_image = 'thb-portrait-shikieiki'

86 figure_image = 'thb-figure-shikieiki'

87 miss_sound_effect = 'thb-cv-shikieiki_miss'