Hide keyboard shortcuts

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 -*- 

2from __future__ import annotations 

3 

4# -- stdlib -- 

5# -- third party -- 

6# -- own -- 

7from thb import characters 

8from thb.cards.base import Card 

9from thb.cards.classes import BaseUseGraze 

10from thb.meta.common import ui_meta 

11 

12 

13# -- code -- 

14@ui_meta(characters.nazrin.Nazrin) 

15class Nazrin: 

16 # Character 

17 name = '纳兹琳' 

18 title = '探宝的小小大将' 

19 illustrator = '月见' 

20 cv = '小羽' 

21 

22 port_image = 'thb-portrait-nazrin' 

23 figure_image = 'thb-figure-nazrin' 

24 miss_sound_effect = 'thb-cv-nazrin_miss' 

25 

26 

27@ui_meta(characters.nazrin.NazrinKOF) 

28class NazrinKOF: 

29 # Character 

30 name = '纳兹琳' 

31 title = '探宝的小小大将' 

32 illustrator = '月见' 

33 cv = '小羽' 

34 

35 port_image = 'thb-portrait-nazrin' 

36 figure_image = 'thb-figure-nazrin' 

37 miss_sound_effect = 'thb-cv-nazrin_miss' 

38 

39 notes = '|RKOF修正角色|r' 

40 

41 

42@ui_meta(characters.nazrin.TreasureHunt) 

43class TreasureHunt: 

44 # Skill 

45 name = '探宝' 

46 description = '准备阶段开始时,你可以进行一次判定,若结果为黑,你获得此牌且你可以重复此流程。' 

47 

48 

49@ui_meta(characters.nazrin.TreasureHuntHandler) 

50class TreasureHuntHandler: 

51 # choose_option 

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

53 choose_option_prompt = '你要发动【探宝】吗?' 

54 

55 

56@ui_meta(characters.nazrin.Agile) 

57class Agile: 

58 # Skill 

59 name = '轻敏' 

60 description = '你可以将一张黑色手牌当|G擦弹|r使用或打出。' 

61 

62 def clickable(self, game): 

63 me = game.me 

64 

65 try: 

66 act = game.action_stack[-1] 

67 except IndexError: 

68 return False 

69 

70 if isinstance(act, BaseUseGraze) and (me.cards or me.showncards): 

71 return True 

72 

73 return False 

74 

75 def is_complete(self, skill): 

76 cl = skill.associated_cards 

77 me = self.me 

78 if len(cl) != 1: 

79 return (False, '请选择一张牌!') 

80 else: 

81 c = cl[0] 

82 if c.resides_in not in (me.cards, me.showncards): 

83 return (False, '请选择手牌!') 

84 if c.suit not in (Card.SPADE, Card.CLUB): 

85 return (False, '请选择一张黑色的牌!') 

86 return (True, '这种三脚猫的弹幕,想要打中我是不可能的啦~') 

87 

88 def sound_effect(self, act): 

89 return 'thb-cv-nazrin_agile' 

90 

91 

92@ui_meta(characters.nazrin.AgileKOF) 

93class AgileKOF: 

94 # Skill 

95 name = '轻敏' 

96 description = '你可以将一张|B黑桃|r手牌当|G擦弹|r使用或打出。' 

97 

98 clickable = Agile.clickable 

99 

100 def is_complete(self, skill): 

101 cl = skill.associated_cards 

102 me = self.me 

103 if len(cl) != 1: 

104 return (False, '请选择一张牌!') 

105 else: 

106 c = cl[0] 

107 if c.resides_in not in (me.cards, me.showncards): 

108 return (False, '请选择手牌!') 

109 if c.suit != Card.SPADE: 

110 return (False, '请选择一张黑桃色手牌牌!') 

111 return (True, '这种三脚猫的弹幕,想要打中我是不可能的啦~') 

112 

113 sound_effect = Agile.sound_effect 

114 

115 

116@ui_meta(characters.nazrin.TreasureHuntAction) 

117class TreasureHuntAction: 

118 fatetell_display_name = '探宝' 

119 

120 def effect_string(self, act): 

121 if act.succeeded: 

122 return '|G【%s】|r找到了|G%s|r' % ( 

123 act.target.ui_meta.name, 

124 act.card.ui_meta.name, 

125 ) 

126 else: 

127 return '|G【%s】|r什么也没有找到…' % ( 

128 act.target.ui_meta.name, 

129 ) 

130 

131 def sound_effect(self, act): 

132 tgt = act.target 

133 t = tgt.tags 

134 if not t['__treasure_hunt_se'] >= t['turn_count']: 

135 t['__treasure_hunt_se'] = t['turn_count'] 

136 return 'thb-cv-nazrin_treasurehunt'