本文整理汇总了Python中thb.ui.ui_meta.common.gen_metafunc函数的典型用法代码示例。如果您正苦于以下问题:Python gen_metafunc函数的具体用法?Python gen_metafunc怎么用?Python gen_metafunc使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了gen_metafunc函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: gen_metafunc
# -*- coding: utf-8 -*-
# -- stdlib --
import random
# -- third party --
# -- own --
from thb import characters
from thb.ui.ui_meta.common import gen_metafunc, passive_is_action_valid, passive_clickable
# -- code --
__metaclass__ = gen_metafunc(characters.reisen)
class Reisen:
# Character
name = u'铃仙'
title = u'永琳的首席药品品尝官'
illustrator = u'镜[email protected]幻想梦斗符'
cv = u'小羽'
port_image = u'thb-portrait-reisen'
figure_image = u'thb-figure-reisen'
miss_sound_effect = u'thb-cv-reisen_miss'
class ReisenKOF:
# Character
name = u'铃仙'
title = u'永琳的首席药品品尝官'
开发者ID:feisuzhu,项目名称:thbattle,代码行数:31,代码来源:reisen.py
示例2: gen_metafunc
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
# -- stdlib --
import random
# -- third party --
# -- own --
from thb import characters
from thb.actions import ttags
from thb.ui.ui_meta.common import card_desc, gen_metafunc, my_turn, passive_clickable
from thb.ui.ui_meta.common import passive_is_action_valid
# -- code --
__metaclass__ = gen_metafunc(characters.keine)
class Devour:
# Skill
name = '噬史'
description = (
'一名角色的出牌阶段开始时,你可以弃置一张基本牌或装备牌,并根据其颜色发动相应效果:\n'
'|B|R>> |r若为红色,你记录该角色当前的体力值\n'
'|B|R>> |r若为黑色,你记录该角色当前的手牌数\n'
'该角色的出牌阶段结束时,将其恢复至本回合记录时的状态。'
)
clickable = passive_clickable
is_action_valid = passive_is_action_valid
开发者ID:feisuzhu,项目名称:thbattle,代码行数:29,代码来源:keine.py
示例3: gen_metafunc
# -*- coding: utf-8 -*-
# -- stdlib --
import random
# -- third party --
# -- own --
from thb import actions, cards, characters
from thb.actions import ttags
from thb.ui.ui_meta.common import build_handcard, gen_metafunc, my_turn
# -- code --
__metaclass__ = gen_metafunc(characters.nitori)
class Dismantle:
# Skill
name = u'拆解'
description = u'出牌阶段限一次,你可以|B重铸|r一名其他角色装备区里的一张装备牌,然后该角色摸一张牌。'
def clickable(g):
if ttags(g.me)['dismantle']:
return False
return my_turn()
def is_action_valid(g, cl, tl):
if cl[0].associated_cards:
return (False, u'请不要选择牌!')
开发者ID:feisuzhu,项目名称:thbattle,代码行数:30,代码来源:nitori.py
示例4: gen_metafunc
# -*- coding: utf-8 -*-
from __future__ import absolute_import
# -- stdlib --
# -- third party --
# -- own --
from thb import thb3v3
from thb.ui.ui_meta.common import gen_metafunc
# -- code --
__metaclass__ = gen_metafunc(thb3v3)
class THBattle:
name = u'3v3模式'
logo = 'thb-modelogo-3v3'
description = (
u'|R游戏人数|r:6人\n'
u'\n'
u'阵营分为|!B博丽|r和|!O守矢|r,每个阵营3名玩家,交错入座。\n'
u'由ROLL点最高的人开始,按照顺时针1-2-2-1的方式选将。\n'
u'选将完成由ROLL点最高的玩家开始行动。\n'
u'ROLL点最高的玩家开局摸3张牌,其余玩家开局摸4张牌。\n'
u'\n'
u'|R胜利条件|r:击坠所有对方阵营玩家。'
)
params_disp = {
'random_seat': {
'desc': u'随机座位阵营',
'options': [
开发者ID:feisuzhu,项目名称:thbattle,代码行数:31,代码来源:thb3v3.py
示例5: gen_metafunc
# -*- coding: utf-8 -*-
# -- stdlib --
# -- third party --
# -- own --
from thb import characters
from thb.ui.ui_meta.common import gen_metafunc, passive_clickable, passive_is_action_valid
# -- code --
__metaclass__ = gen_metafunc(characters.mima20150705)
class Mima20150705:
# Character
name = u'魅魔'
title = u'魔闪的修罗'
designer = u'蝶之羽风暂留此'
port_image = u'thb-portrait-mima20150705'
class Tianyi:
# Skill
name = u'天仪'
description = (
u'你的回合内限一次,一张符卡生效前,你可以使其无效,视为你对该符卡指定的所有目标依次使用一张弹幕。\n'
u'|B|R>> |r以此法使用的弹幕不受“一回合使用一次”的限制。'
)
clickable = passive_clickable
开发者ID:feisuzhu,项目名称:thbattle,代码行数:31,代码来源:mima20150705.py
示例6: gen_metafunc
# -- stdlib --
from functools import wraps
import logging
# -- third party --
# -- own --
from game.autoenv import Game
from thb import actions as thbactions, cards as thbcards, inputlets
from thb.ui.ui_meta.common import gen_metafunc
# -- code --
log = logging.getLogger('Inputlets UI Meta')
# -----BEGIN INPUTLETS UI META-----
__metaclass__ = gen_metafunc(inputlets)
class ActionDisplayResult(Exception):
__slots__ = (
'valid',
'prompt',
'pl_selecting',
'pl_disabled',
'pl_selected',
)
def __init__(self, valid, prompt, pl_selecting, pl_disabled, pl_selected):
Exception.__init__(self)
self.valid = valid
self.prompt = prompt
开发者ID:feisuzhu,项目名称:thbattle,代码行数:30,代码来源:inputlets.py
示例7: gen_metafunc
# -*- coding: utf-8 -*-
from __future__ import absolute_import
# -- stdlib --
import random
# -- third party --
# -- own --
from thb import characters
from thb.ui.ui_meta.common import gen_metafunc, my_turn, passive_clickable, passive_is_action_valid
# -- code --
__metaclass__ = gen_metafunc(characters.remilia)
class SpearTheGungnir:
# Skill
name = u'神枪'
description = (
u'满足下列条件之一时,你可以令你的|G弹幕|r不能被响应:\n'
u'|B|R>> |r目标角色的体力值 大于 你的体力值。\n'
u'|B|R>> |r目标角色的手牌数 小于 你的手牌数。'
)
clickable = passive_clickable
is_action_valid = passive_is_action_valid
class SpearTheGungnirAction:
def effect_string(act):
return u'|G【%s】|r举起右手,将|G弹幕|r汇聚成一把命运之矛,向|G【%s】|r掷去!' % (
开发者ID:feisuzhu,项目名称:thbattle,代码行数:31,代码来源:remilia.py
示例8: gen_metafunc
# -*- coding: utf-8 -*-
# -- stdlib --
# -- third party --
# -- own --
from thb import actions, characters
from thb.ui.ui_meta.common import gen_metafunc, limit1_skill_used, passive_clickable
from thb.ui.ui_meta.common import passive_is_action_valid
# -- code --
__metaclass__ = gen_metafunc(characters.rumia)
class Darkness:
# Skill
name = u'黑暗'
description = (
u'出牌阶段限一次,你可以弃置一张牌并指定一名其他角色,令其选择一项:\n'
u'|B|R>> |r对其攻击范围内另一名你指定的其他角色使用一张|G弹幕|r。\n'
u'|B|R>> |r受到你造成的1点伤害。'
)
custom_ray = True
def clickable(game):
try:
if limit1_skill_used('darkness_tag'):
return False
act = game.action_stack[-1]
if isinstance(act, actions.ActionStage):
return True
开发者ID:feisuzhu,项目名称:thbattle,代码行数:31,代码来源:rumia.py
示例9: gen_metafunc
# -*- coding: utf-8 -*-
# -- stdlib --
# -- third party --
# -- own --
from thb import cards as thbcards, characters
from thb.ui.ui_meta.common import card_desc, gen_metafunc, passive_clickable
from thb.ui.ui_meta.common import passive_is_action_valid
# -- code --
__metaclass__ = gen_metafunc(characters.kyouko)
class Kyouko:
# Character
name = u'幽谷响子'
title = u'诵经的山彦'
illustrator = u'月见'
designer = u'蝶之羽风暂留此'
cv = u'小羽'
port_image = u'thb-portrait-kyouko'
figure_image = u'thb-figure-kyouko'
miss_sound_effect = u'thb-cv-kyouko_miss'
class Echo:
# Skill
name = u'回响'
description = u'每当你受到一次伤害后,你可以获得对你造成伤害的牌,若此牌为|G弹幕|r,你可以改为令一名其他角色获得之。'
开发者ID:feisuzhu,项目名称:thbattle,代码行数:31,代码来源:kyouko.py
示例10: gen_metafunc
# -*- coding: utf-8 -*-
# -- stdlib --
# -- third party --
# -- own --
from thb import actions, cards, characters
from thb.ui.ui_meta.common import gen_metafunc
from utils import BatchList
# -- code --
__metaclass__ = gen_metafunc(characters.chen)
class FlyingSkanda:
# Skill
name = u'飞翔韦驮天'
description = (
u'出牌阶段限一次,你使用|G弹幕|r或单体符卡时,可以额外指定一个目标。\n'
u'|B|R>> |r在线版本中,不能以此法使用|G人形操控|r'
)
def clickable(game):
me = game.me
if me.tags['flying_skanda'] >= me.tags['turn_count']: return False
try:
act = game.action_stack[-1]
if isinstance(act, actions.ActionStage) and act.target is me:
return True
except IndexError:
pass
return False
开发者ID:feisuzhu,项目名称:thbattle,代码行数:31,代码来源:chen.py
示例11: gen_metafunc
# -*- coding: utf-8 -*-
# -- stdlib --
import random
# -- third party --
# -- own --
from thb import characters
from thb.ui.ui_meta.common import card_desc, gen_metafunc, passive_clickable
from thb.ui.ui_meta.common import passive_is_action_valid
# -- code --
__metaclass__ = gen_metafunc(characters.shikieiki)
class Trial:
# Skill
name = u'审判'
description = u'每当一名角色的判定牌生效前,你可以打出一张牌代替之。'
clickable = passive_clickable
is_action_valid = passive_is_action_valid
class TrialAction:
def effect_string(act):
return u'幻想乡各地巫女妖怪纷纷表示坚决拥护|G【%s】|r将|G【%s】|r的判定结果修改为%s的有关决定!' % (
act.source.ui_meta.name,
act.target.ui_meta.name,
card_desc(act.card)
)
开发者ID:feisuzhu,项目名称:thbattle,代码行数:30,代码来源:shikieiki.py
示例12: gen_metafunc
# -*- coding: utf-8 -*-
# -- stdlib --
# -- third party --
# -- own --
from thb import cards, characters
from thb.ui.ui_meta.common import gen_metafunc, my_turn
# -- code --
__metaclass__ = gen_metafunc(characters.parsee)
class Parsee:
# Character
name = u'水桥帕露西'
title = u'地壳下的嫉妒心'
illustrator = u'和茶'
cv = u'小羽'
port_image = u'thb-portrait-parsee'
figure_image = u'thb-figure-parsee'
miss_sound_effect = u'thb-cv-parsee_miss'
class Envy:
# Skill
name = u'嫉妒'
description = u'你可以将一张黑色牌当|G城管执法|r使用;每当距离1的其他角色的方块牌被你使用的|G城管执法|r弃置而置入弃牌堆后,你可以获得之。'
def clickable(game):
me = game.me
开发者ID:feisuzhu,项目名称:thbattle,代码行数:31,代码来源:parsee.py
示例13: gen_metafunc
# -*- coding: utf-8 -*-
# -- stdlib --
# -- third party --
# -- own --
from thb import characters
from thb.ui.ui_meta.common import card_desc, gen_metafunc, passive_clickable
from thb.ui.ui_meta.common import passive_is_action_valid
from utils import BatchList
# -- code --
__metaclass__ = gen_metafunc(characters.shizuha)
class AutumnWindEffect:
def effect_string(act):
return u'|G秋风|r带走了|G【%s】|r的%s。' % (
act.target.ui_meta.name,
card_desc(act.card),
)
class AutumnWindAction:
def effect_string_before(act):
tl = BatchList(act.target_list)
return u'当|G秋风|r吹起,|G【%s】|r连牌都拿不住的时候,才回想起,妈妈说的对,要穿秋裤。' % (
u'】|r、|G【'.join(tl.ui_meta.name),
)
开发者ID:feisuzhu,项目名称:thbattle,代码行数:30,代码来源:shizuha.py
示例14: gen_metafunc
# -*- coding: utf-8 -*-
# -- stdlib --
# -- third party --
# -- own --
from thb import actions, characters
from thb.ui.ui_meta.common import gen_metafunc, passive_clickable, passive_is_action_valid
# -- code --
__metaclass__ = gen_metafunc(characters.daiyousei)
class Daiyousei:
# Character
name = u'大妖精'
title = u'全身萌点的保姆'
illustrator = u'渚FUN'
cv = u'简翎'
port_image = u'thb-portrait-daiyousei'
figure_image = u'thb-figure-daiyousei'
miss_sound_effect = u'thb-cv-daiyousei_miss'
class DaiyouseiKOF:
# Character
name = u'大妖精'
title = u'全身萌点的保姆'
illustrator = u'渚FUN'
cv = u'简翎'
开发者ID:feisuzhu,项目名称:thbattle,代码行数:30,代码来源:daiyousei.py
示例15: gen_metafunc
# -*- coding: utf-8 -*-
# -- stdlib --
# -- third party --
# -- own --
from thb import characters
from thb.ui.ui_meta.common import gen_metafunc, passive_clickable, passive_is_action_valid
# -- code --
__metaclass__ = gen_metafunc(characters.mokou)
class Mokou:
# Character
name = u'藤原妹红'
title = u'FFF团资深团员'
illustrator = u'六仔OwO'
cv = u'小羽'
port_image = u'thb-portrait-mokou'
figure_image = u'thb-figure-mokou'
miss_sound_effect = u'thb-cv-mokou_miss'
class Ashes:
# Skill
name = u'浴火'
description = u'结束阶段开始时,你可以失去1点体力,然后摸两张牌。'
clickable = passive_clickable
is_action_valid = passive_is_action_valid
开发者ID:feisuzhu,项目名称:thbattle,代码行数:31,代码来源:mokou.py
示例16: gen_metafunc
# -*- coding: utf-8 -*-
# -- stdlib --
# -- third party --
# -- own --
from thb import characters
from thb.ui.ui_meta.common import gen_metafunc, limit1_skill_used, my_turn
# -- code --
__metaclass__ = gen_metafunc(characters.marisa)
class Marisa:
# Character
name = u'雾雨魔理沙'
title = u'绝非普通的强盗少女'
illustrator = u'霏茶'
cv = u'君寻'
port_image = u'thb-portrait-marisa'
figure_image = u'thb-figure-marisa'
miss_sound_effect = u'thb-cv-marisa_miss'
class Daze:
name = u'打贼'
def effect_string(act):
# for LaunchCard.ui_meta.effect_string
return u'|G【%s】|r喊道:“打贼啦!”向|G【%s】|r使用了|G弹幕|r。' % (
act.source.ui_meta.name,
开发者ID:feisuzhu,项目名称:thbattle,代码行数:31,代码来源:marisa.py
示例17: gen_metafunc
# -*- coding: utf-8 -*-
# -- stdlib --
# -- third party --
# -- own --
from thb import actions, cards, characters
from thb.ui.ui_meta.common import gen_metafunc, passive_clickable, passive_is_action_valid
# -- code --
__metaclass__ = gen_metafunc(characters.kogasa)
class Jolly:
# Skill
name = u'愉快'
description = u'|B锁定技|r,摸牌阶段摸牌后,你令一名角色摸一张牌。'
clickable = passive_clickable
is_action_valid = passive_is_action_valid
class JollyDrawCard:
def effect_string(act):
return u'|G【%s】|r高兴地让|G【%s】|r摸了%d张牌~' % (
act.source.ui_meta.name,
act.target.ui_meta.name,
act.amount,
)
def sound_effect(act):
return 'thb-cv-kogasa_jolly'
开发者ID:feisuzhu,项目名称:thbattle,代码行数:31,代码来源:kogasa.py
示例18: gen_metafunc
# -*- coding: utf-8 -*-
from __future__ import absolute_import
# -- stdlib --
from collections import OrderedDict
# -- third party --
# -- own --
from thb import thb2v2
from thb.ui.ui_meta.common import gen_metafunc
# -- code --
__metaclass__ = gen_metafunc(thb2v2)
class THBattle2v2:
name = u'2v2模式'
logo = 'thb-modelogo-2v2'
description = (
u'|R游戏人数|r:4人\n'
u'\n'
u'|G座次|r:\n'
u'创建房间时可选固定阵容或随机阵容。\n'
u'Roll点,由点数最高的玩家为1号位,然后对面点数最大的为2号位,按1-2-2-1的顺序逆时针行动。\n'
u'\n'
u'|G选将|r:\n'
u'从角色堆里选出20名角色,由1号位开始,每人选择Ban掉其中一个角色。\n'
u'每人随机从剩下的卡牌中获得4张角色卡作为备选(其中一张为阿卡林)\n'
u'玩家可以选择其中一名角色进行游戏\n'
u'\n'
开发者ID:feisuzhu,项目名称:thbattle,代码行数:31,代码来源:thb2v2.py
示例19: gen_metafunc
# -*- coding: utf-8 -*-
# -- stdlib --
# -- third party --
# -- own --
from thb import characters
from thb.ui.ui_meta.common import gen_metafunc, passive_clickable, passive_is_action_valid
# -- code --
__metaclass__ = gen_metafunc(characters.tewi)
class Luck:
# Skill
name = u'幸运'
description = u'|B锁定技|r,每当你失去最后的手牌时,你摸两张牌。'
clickable = passive_clickable
is_action_valid = passive_is_action_valid
class LuckDrawCards:
def effect_string(act):
return u'|G【%s】|r觉得手上没有牌就输了,于是又摸了2张牌。' % (
act.source.ui_meta.name,
)
def sound_effect(act):
return 'thb-cv-tewi_lucky'
开发者ID:feisuzhu,项目名称:thbattle,代码行数:29,代码来源:tewi.py
示例20: gen_metafunc
# -*- coding: utf-8 -*-
# -- stdlib --
# -- third party --
# -- own --
from thb import actions, cards, characters
from thb.ui.ui_meta.common import gen_metafunc, limit1_skill_used
# -- code --
__metaclass__ = gen_metafunc(characters.eirin)
class FirstAid:
# Skill
name = u"急救"
description = u"你可以将一张红色牌当|G麻薯|r对濒死角色使用。"
def clickable(game):
try:
act = game.action_stack[-1]
except IndexError:
return False
if isinstance(act, cards.AskForHeal):
return True
return False
def is_complete(g, cl):
skill = cl[0]
acards = skill.associated_cards
开发者ID:feisuzhu,项目名称:thbattle,代码行数:31,代码来源:eirin.py
注:本文中的thb.ui.ui_meta.common.gen_metafunc函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论