# Coverage for thb/meta/characters/sp_flandre.py : 75%

## 39 statements 29 run 10 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 characters

8 from thb.meta.common import ui_meta

9

10

11# -- code --

12@ui_meta(characters.sp_flandre.SpFlandre)

13 class SpFlandre:

14 # Character

15 name = 'SP芙兰朵露'

16 title = '玩坏你哦'

17 illustrator = 'Vivicat@幻想梦斗符'

18 cv = 'shourei小N'

19

20 port_image = 'thb-portrait-sp_flandre'

21 figure_image = 'thb-figure-sp_flandre'

22 miss_sound_effect = 'thb-cv-spflandre_miss'

23

24

25@ui_meta(characters.sp_flandre.DestructionImpulse)

26 class DestructionImpulse:

27 # Skill

28 name = '破坏冲动'

29 description = '|B锁定技|r，结束阶段结束后，若你本回合没有造成过伤害，你对距离最近的一名其他角色造成1点伤害，并失去1点体力。'

30

31

32@ui_meta(characters.sp_flandre.DestructionImpulseAction)

33 class DestructionImpulseAction:

34 def effect_string_before(self, act):

35 return '|G【%s】|r：“|G【%s】|r来陪我玩好不好？”' % (

36 act.source.ui_meta.name,

37 act.target.ui_meta.name,

38 )

39

40 def sound_effect(self, act):

41 return 'thb-cv-spflandre_destructionimpulse'

42

43

44@ui_meta(characters.sp_flandre.DestructionImpulseHandler)

45 class DestructionImpulseHandler:

46 def choose_card_text(self, act, cards):

47 if cards:

48 return (False, '请不要选择牌！')

49

50 return (True, '玩坏你哦')

51

52 # choose_players

53 def target(self, pl):

54 if not pl:

55 return (False, '请选择1名距离最近的玩家，对其造成一点伤害')

56

57 return (True, '玩坏你哦')

58

59

60@ui_meta(characters.sp_flandre.FourOfAKind)

61 class FourOfAKind:

62 # Skill

63 name = '四重存在'

64 description = '每当你受到一次不大于你当前体力值的伤害时，你可以减少1点体力上限并防止此伤害；你体力值为1时，你为伤害来源的卡牌造成的伤害+1。'

65

66

67@ui_meta(characters.sp_flandre.FourOfAKindHandler)

68 class FourOfAKindHandler:

69 # choose_option

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

71 choose_option_prompt = '你要发动【四重存在】吗？'

72

73

74@ui_meta(characters.sp_flandre.FourOfAKindAction)

75 class FourOfAKindAction:

76 def effect_string(self, act):

77 return '|G【%s】|r发动了|G四重存在|r，防止了此次伤害。' % (

78 act.target.ui_meta.name,

79 )

80

81 def sound_effect(self, act):

82 return 'thb-cv-spflandre_fourofakind'