# Coverage for thb/meta/characters/remilia.py : 70%

## 60 statements 40 run 20 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.remilia.SpearTheGungnir)

15 class SpearTheGungnir:

16 # Skill

17 name = '神枪'

18 description = (

19 '满足下列条件之一时，你可以令你的|G弹幕|r不能被响应：\n'

20 '|B|R>> |r目标角色的体力值 大于 你的体力值。\n'

21 '|B|R>> |r目标角色的手牌数 小于 你的手牌数。'

22 )

23

24

25@ui_meta(characters.remilia.SpearTheGungnirAction)

26 class SpearTheGungnirAction:

27 def effect_string(self, act):

28 return '|G【%s】|r举起右手，将|G弹幕|r汇聚成一把命运之矛，向|G【%s】|r掷去！' % (

29 act.source.ui_meta.name,

30 act.target.ui_meta.name,

31 )

32

33 def sound_effect(self, act):

34 return 'thb-cv-remilia_stg'

35

36

37@ui_meta(characters.remilia.SpearTheGungnirHandler)

38 class SpearTheGungnirHandler:

39 # choose_option

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

41 choose_option_prompt = '你要发动【神枪】吗？'

42

43

44@ui_meta(characters.remilia.VampireKiss)

45 class VampireKiss:

46 # Skill

47 name = '红魔之吻'

48 description = '|B锁定技|r，你使用红色|G弹幕|r时无距离限制。当你使用红色|G弹幕|r对一名其他角色造成伤害后，你回复1点体力。'

49

50

51@ui_meta(characters.remilia.VampireKissAction)

52 class VampireKissAction:

53 def effect_string_before(self, act):

54 return '|G【%s】|r:“B型血，赞！”' % (

55 act.source.ui_meta.name

56 )

57

58 def sound_effect(self, act):

59 return 'thb-cv-remilia_vampirekiss'

60

61

62@ui_meta(characters.remilia.ScarletMistAttackLimit)

63 class ScarletMistAttackLimit:

64 target_independent = False

65 shootdown_message = '红雾：你只能对距离1的角色使用弹幕'

66

67

68@ui_meta(characters.remilia.ScarletMistAction)

69 class ScarletMistAction:

70 def effect_string(self, act):

71 src = act.source

72 tl = list(act.target_list)

73 try:

74 tl.remove(src)

75 except Exception:

76 pass

77

78 return '|G【%s】|r释放出了|G红雾|r，威严爆表！%s流了鼻血！' % (

79 src.ui_meta.name,

80 '、'.join(['|G【%s】|r' % p.ui_meta.name for p in tl]),

81 )

82

83 def sound_effect(self, act):

84 return random.choice([

85 'thb-cv-remilia_scarletmist1',

86 'thb-cv-remilia_scarletmist2',

87 ])

88

89

90@ui_meta(characters.remilia.ScarletMistEndAction)

91 class ScarletMistEndAction:

92 def effect_string(self, act):

93 return '|G红雾|r结束了。'

94

95

96@ui_meta(characters.remilia.ScarletMist)

97 class ScarletMist:

98 name = '红雾'

99 description = (

100 '|BBOSS技|r，|B限定技|r，出牌阶段，你可以选择至多X名其他角色（X为存活道中数量），直到你的下个回合开始阶段，所有角色受到以下影响：\n'

101 '|B|R>> |r你与被选择的角色使用|G弹幕|r时无视距离，且使用|G弹幕|r造成伤害后回复等量的体力。\n'

102 '|B|R>> |r其他角色使用|G弹幕|r时只能指定距离为1的目标。'

103 )

104

105 def clickable(self):

106 me = self.me

107 return self.my_turn() and not me.tags['scarlet_mist_used']

108

109 def is_action_valid(self, sk, tl):

110 if sk.associated_cards:

111 return (False, '红雾：请不要选择牌！')

112

113 if not tl:

114 return (False, '红雾：选择目标')

115

116 return (True, '红雾：选择这些角色获得增益效果')

117

118

119@ui_meta(characters.remilia.Remilia)

120 class Remilia:

121 # Character

122 name = '蕾米莉亚'

123 title = '永远幼小的红月'

124 illustrator = '小D@星の妄想乡'

125 cv = 'VV'

126

127 port_image = 'thb-portrait-remilia'

128 figure_image = 'thb-figure-remilia'

129 miss_sound_effect = 'thb-cv-remilia_miss'