Coverage for thb/meta/characters/daiyousei.py : 97%
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
4# -- stdlib --
5# -- third party --
6# -- own --
7from thb import actions, characters
8from thb.meta.common import ui_meta
11# -- code --
12@ui_meta(characters.daiyousei.Daiyousei)
13class Daiyousei:
14 # Character
15 name = '大妖精'
16 title = '全身萌点的保姆'
17 illustrator = '渚FUN'
18 cv = '简翎'
20 port_image = 'thb-portrait-daiyousei'
21 figure_image = 'thb-figure-daiyousei'
22 miss_sound_effect = 'thb-cv-daiyousei_miss'
25@ui_meta(characters.daiyousei.DaiyouseiKOF)
26class DaiyouseiKOF:
27 # Character
28 name = '大妖精'
29 title = '全身萌点的保姆'
30 illustrator = '渚FUN'
31 cv = '简翎'
33 port_image = 'thb-portrait-daiyousei'
34 figure_image = 'thb-figure-daiyousei'
35 miss_sound_effect = 'thb-cv-daiyousei_miss'
37 notes = '|RKOF修正角色|r'
40@ui_meta(characters.daiyousei.Support)
41class Support:
42 # Skill
43 name = '支援'
44 description = '出牌阶段,你可将任意张牌交给其他角色,此阶段你给出的牌首次达到三张时,你回复1点体力。'
46 def clickable(self):
47 g = self.game
48 me = self.me
50 try:
51 act = g.action_stack[-1]
52 except IndexError:
53 return False
55 if isinstance(act, actions.ActionStage) and (me.cards or me.showncards or me.equips):
56 return True
58 return False
60 def is_action_valid(self, sk, tl):
61 cl = sk.associated_cards
62 if not cl: return (False, '请选择要给出的牌')
63 me = self.me
64 allcards = list(me.cards) + list(me.showncards) + list(me.equips)
65 if any( 65 ↛ exitline 65 didn't jump to the function exit
66 c not in allcards
67 for c in cl
68 ): return (False, '你只能选择手牌与装备牌!')
69 if len(tl) != 1: return (False, '请选择1名玩家')
70 return (True, '加油!')
72 def effect_string(self, act):
73 # for LaunchCard.ui_meta.effect_string
74 return '|G【%s】|r发动了|G支援|r技能,将%d张牌交给了|G【%s】|r。' % (
75 act.source.ui_meta.name,
76 len(act.card.associated_cards),
77 act.target.ui_meta.name,
78 )
80 def sound_effect(self, act):
81 return 'thb-cv-daiyousei_support'
84@ui_meta(characters.daiyousei.SupportKOF)
85class SupportKOF:
86 # Skill
87 name = '支援'
88 description = '你被击坠时,你可以将你的所有牌移出游戏,并令下一名登场的角色获得这些牌。'
91@ui_meta(characters.daiyousei.SupportKOFAction)
92class SupportKOFAction:
94 def effect_string_before(self, act):
95 return '|G【%s】|r发动了|G支援|r技能,将所有的牌转移给下一个出场角色。' % (
96 act.target.ui_meta.name
97 )
100@ui_meta(characters.daiyousei.SupportKOFHandler)
101class SupportKOFHandler:
102 choose_option_prompt = '你要发动【支援】,将所有牌转移给下一名出场角色吗?'
103 choose_option_buttons = (('发动', True), ('不发动', False))
106@ui_meta(characters.daiyousei.Moe)
107class Moe:
108 # Skill
109 name = '卖萌'
110 description = '|B锁定技|r,摸牌阶段你额外摸X张牌(X为你已损失的体力值)。'
113@ui_meta(characters.daiyousei.MoeDrawCard)
114class MoeDrawCard:
115 def effect_string(self, act):
116 return '|G【%s】|r用手扯开脸颊,向大家做了一个夸张的笑脸,摸了%d张牌跑开了~' % (
117 act.target.ui_meta.name,
118 act.amount,
119 )
121 def sound_effect(self, act):
122 return 'thb-cv-daiyousei_moe'
124# ----------