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

5import time 

6 

7# -- third party -- 

8# -- own -- 

9from thb import actions, characters 

10from thb.meta.common import ui_meta 

11 

12 

13# -- code -- 

14@ui_meta(characters.rinnosuke.Netoru) 

15class Netoru: 

16 # Skill 

17 name = '寝取' 

18 description = '出牌阶段限一次,你可以弃置两张手牌并指定一名已受伤的其他角色,你与其各回复1点体力。' 

19 

20 def clickable(self): 

21 g = self.game 

22 me = self.me 

23 try: 

24 if me.tags['netoru_tag'] >= me.tags['turn_count']: 

25 return False 

26 act = g.action_stack[-1] 

27 if isinstance(act, actions.ActionStage): 

28 return True 

29 except IndexError: 

30 pass 

31 return False 

32 

33 def is_action_valid(self, sk, tl): 

34 cl = sk.associated_cards 

35 me = self.me 

36 if not cl or len(cl) != 2: 

37 return (False, '请选择两张手牌') 

38 elif any(c.resides_in not in (me.cards, me.showncards) for c in cl): 

39 return (False, '只能使用手牌发动!') 

40 

41 if len(tl) != 1: 

42 return (False, '请选择一名受伤的玩家') 

43 

44 t = tl[0] 

45 if t.life >= t.maxlife: 

46 return (False, '这位少女节操满满,不会答应你的…') 

47 else: 

48 return (True, '少女,做个好梦~') 

49 

50 def effect_string(self, act): 

51 # for LaunchCard.ui_meta.effect_string 

52 return '|G【%s】|r一改平日的猥琐形象,竟然用花言巧语将|G【%s】|r骗去啪啪啪了!' % ( 

53 act.source.ui_meta.name, 

54 act.target.ui_meta.name, 

55 ) 

56 

57 def sound_effect(self, act): 

58 return 'thb-cv-rinnosuke_nitoru' 

59 

60 

61@ui_meta(characters.rinnosuke.Psychopath) 

62class Psychopath: 

63 # Skill 

64 name = '变态' 

65 description = '|B锁定技|r,当你失去一张装备区里的装备牌时,你摸两张牌。' 

66 

67 

68@ui_meta(characters.rinnosuke.PsychopathDrawCards) 

69class PsychopathDrawCards: 

70 def effect_string(self, act): 

71 return ( 

72 '|G【%s】|r满脸猥琐地将装备脱掉,结果众人抄起了%d张牌糊在了他身上。' 

73 ) % ( 

74 act.target.ui_meta.name, 

75 act.amount, 

76 ) 

77 

78 def sound_effect(self, act): 

79 tgt = act.target 

80 t = tgt.tags 

81 if time.time() - t['__psycopath_lastplay'] > 10: 

82 t['__psycopath_lastplay'] = time.time() 

83 return 'thb-cv-rinnosuke_psycopath' 

84 

85 

86@ui_meta(characters.rinnosuke.Rinnosuke) 

87class Rinnosuke: 

88 # Character 

89 name = '森近霖之助' 

90 title = '变态出没注意' 

91 illustrator = '霏茶' 

92 cv = '大白' 

93 

94 port_image = 'thb-portrait-rinnosuke' 

95 figure_image = 'thb-figure-rinnosuke' 

96 miss_sound_effect = 'thb-cv-rinnosuke_miss'