# Coverage for thb/meta/characters/momiji.py : 86%

## 52 statements 43 run 9 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

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

15

16@ui_meta(characters.momiji.Momiji)

17 class Momiji:

18 # Character

19 name = '犬走椛'

20 title = '山中的千里眼'

21 illustrator = '和茶'

22 cv = '简翎'

23

24 port_image = 'thb-portrait-momiji'

25 figure_image = 'thb-figure-momiji'

26 miss_sound_effect = 'thb-cv-momiji_miss'

27

28

29@ui_meta(characters.momiji.Sentry)

30 class Sentry:

31 # Skill

32 name = '哨戒'

33 description = '你攻击范围内的一名其它角色的出牌阶段开始时，你可以对其使用一张|G弹幕|r。'

34

35

36@ui_meta(characters.momiji.Telegnosis)

37 class Telegnosis:

38 # Skill

39 name = '千里眼'

40 description = '|B锁定技|r，若你在一名其他角色的攻击范围内，则该角色视为在你攻击范围内。'

41

42

43@ui_meta(characters.momiji.Disarm)

44 class Disarm:

45 # Skill

46 name = '缴械'

47 description = '每当你使用|G弹幕|r或|G弹幕战|r对其他角色造成伤害后，你可以观看其手牌，并将其中任意数量的|G弹幕|r或符卡牌暂时移出游戏。该角色被暂时移出的牌会在该角色下一个弃牌阶段后归还回其手牌中。'

48

49

50@ui_meta(characters.momiji.DisarmHideAction)

51 class DisarmHideAction:

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 def sound_effect(self, act):

59 return 'thb-cv-momiji_disarm'

60

61

62@ui_meta(characters.momiji.SentryAttack)

63 class SentryAttack:

64 # Skill

65 name = '哨戒'

66

67 def sound_effect(self, act):

68 return random.choice([

69 'thb-cv-momiji_sentry1',

70 'thb-cv-momiji_sentry2',

71 ])

72

73

74@ui_meta(characters.momiji.DisarmHandler)

75 class DisarmHandler:

76 # choose_option meta

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

78 choose_option_prompt = '你希望发动【缴械】吗？'

79

80

81@ui_meta(characters.momiji.SentryHandler)

82 class SentryHandler:

83 # choose_option meta

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

85

86 def choose_option_prompt(self, act):

87 return '你希望发动【哨戒】吗（对%s）？' % act.target.ui_meta.name

88

89

90@ui_meta(characters.momiji.SentryAction)

91 class SentryAction:

92 # choose_card meta

93 def choose_card_text(self, act, cards):

94 if act.cond(cards):

95 return (True, '吃我大弹幕啦！(对%s发动哨戒)' % act.target.ui_meta.name)

96 else:

97 return (False, '哨戒：请选择一张弹幕发动哨戒(对%s)' % act.target.ui_meta.name)

98

99

100@ui_meta(characters.momiji.SolidShieldHandler)

101 class SolidShieldHandler:

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

103 choose_option_prompt = '你希望发动【坚盾】吗？'

104

105

106@ui_meta(characters.momiji.SolidShieldAction)

107 class SolidShieldAction:

108 def effect_string_before(self, act):

109 # return u'“嗷~~~~！”|G【%s】|r突然冲了出来，吓的|G【%s】|r手里的%s都掉在地上了。' % (

110 return '“嗷~~~~！”|G【%s】|r突然冲了出来，挡在了|G【%s】|r面前。' % (

111 act.source.ui_meta.name,

112 act.action.target.ui_meta.name,

113 # card_desc(act.action.card),

114 )

115

116 def sound_effect(self, act):

117 return 'thb-cv-momiji_solidshield'

118

119

120@ui_meta(characters.momiji.SolidShield)

121 class SolidShield:

122 # Skill

123 name = '坚盾'

124 description = '你距离1以内的角色成为其它角色使用的|G弹幕|r或单体符卡的目标后，若此卡牌为其出牌阶段时使用的第一张卡牌，取消之并暂时移出游戏。该角色被暂时移出的牌会在该角色下一个弃牌阶段后归还回其手牌中。'