コード例 #1
0
ファイル: youmu.py プロジェクト: AojiaoZero/thbattle
# -*- coding: utf-8 -*-

from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc, my_turn
from gamepack.thb.ui.ui_meta.common import passive_clickable, passive_is_action_valid
from gamepack.thb.ui.resource import resource as gres

__metaclass__ = gen_metafunc(characters.youmu)


class Youmu:
    # Character
    char_name = u'魂魄妖梦'
    port_image = gres.youmu_port
    description = (
        u'|DB半分虚幻的厨师 魂魄妖梦 体力:4|r\n\n'
        u'|G迷津慈航斩|r:|B锁定技|r,你使用【弹幕】时,目标角色需连续使用两张【擦弹】才能抵消;与你进行【弹幕战】的角色每次需连续打出两张【弹幕】。\n\n'
        u'|G二刀流|r:你可以同时装备两把武器。同时装备时,攻击距离加成按其中较低者计算,武器技能同时有效。\n'
        u'|B|R>> |r成为【人形操控】目标并且不出【弹幕】的话,两把武器会被一起拿走\n'
        u'|B|R>> |r当你同时装备两把武器时,你可以主动的弃置其中一把\n\n'
        u'|R现世妄执|r:|B觉醒技|r,当你同时装备了楼观剑与白楼剑时,你需提高一点体力上限并回复一点体力,获得此技能(卸掉/更换装备不会失去)。一回合内你可以使用两张【弹幕】。'
    )


class Mijincihangzhan:
    # Skill
    name = u'迷津慈航斩'
    clickable = passive_clickable
    is_action_valid = passive_is_action_valid

コード例 #2
0
ファイル: akari.py プロジェクト: AojiaoZero/thbattle
# -*- coding: utf-8 -*-

from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc
from gamepack.thb.ui.resource import resource as gres

__metaclass__ = gen_metafunc(characters.akari)


class Akari:
    # Character
    char_name = u'随机角色'
    port_image = gres.akari_port
    description = (
        u'|DB会是谁呢 随机角色 体力:?|r\n\n'
        u'|G阿卡林|r:消失在画面里的能力。在开局之前,没有人知道这是谁。'
    )
コード例 #3
0
# -*- coding: utf-8 -*-

# -- stdlib --
# -- third party --
# -- own --
from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc, passive_clickable, passive_is_action_valid

# -- code --
__metaclass__ = gen_metafunc(characters.yugi)


class Yugi:
    # Character
    char_name = u'星熊勇仪'
    port_image = 'thb-portrait-yugi'
    figure_image = 'thb-figure-yugi'
    miss_sound_effect = 'thb-cv-yugi_miss'
    description = (
        u'|DB人所谈论的怪力乱神 星熊勇仪 体力:4|r\n\n'
        # u'|G强袭|r:你可以自损1点体力,或者使用一张武器牌/【酒】,对任意一名在你的攻击范围内的玩家造成一点伤害。\n\n'
        u'|G强袭|r:|B锁定技|r,你与其他角色计算距离时始终-1。\n\n'
        u'|G怪力|r:当你使用【弹幕】指定一名其他角色成为目标后,你可以进行一次判定:若结果为红色,则此【弹幕】不可闪避;若结果为黑色,则此【弹幕】造成伤害后你可以弃置其一张牌。\n\n'
        u'|DB(画师:渚FUN,CV:北斗夜)|r')


class YugiKOF:
    # Character
    char_name = u'星熊勇仪'
    port_image = 'thb-portrait-yugi'
    figure_image = 'thb-figure-yugi'
コード例 #4
0
# -*- coding: utf-8 -*-

# -- stdlib --
# -- third party --
# -- own --
from gamepack.thb import characters
from gamepack.thb.actions import ttags
from gamepack.thb.ui.ui_meta.common import gen_metafunc, my_turn

# -- code --

__metaclass__ = gen_metafunc(characters.koakuma)


class Koakuma:
    # Character
    char_name = u'小恶魔'
    port_image = 'thb-portrait-koakuma'
    figure_image = 'thb-figure-koakuma'
    miss_sound_effect = 'thb-cv-koakuma_miss'
    description = (u'|DB图书管理员 小恶魔 体力:4|r\n\n'
                   u'|G寻找|r:出牌阶段限一次,你可以弃置至多X张牌,然后摸等量的牌(X为场上存活角色数)。\n\n'
                   u'|DB(画师:渚FUN/Takibi,CV:VV)|r')


class Find:
    # Skill
    name = u'寻找'

    def clickable(game):
        me = game.me
コード例 #5
0
ファイル: yugi.py プロジェクト: AojiaoZero/thbattle
# -*- coding: utf-8 -*-

from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc
from gamepack.thb.ui.ui_meta.common import passive_clickable, passive_is_action_valid
from gamepack.thb.ui.resource import resource as gres

__metaclass__ = gen_metafunc(characters.yugi)


class Yugi:
    # Character
    char_name = u'星熊勇仪'
    port_image = gres.yugi_port
    description = (
        u'|DB人所谈论的怪力乱神 星熊勇仪 体力:4|r\n\n'
        #u'|G强袭|r:你可以自损1点体力,或者使用一张武器牌/【酒】,对任意一名在你的攻击范围内的玩家造成一点伤害。\n\n'
        u'|G强袭|r:你与其他玩家结算距离时始终-1\n\n'
        u'|G怪力|r:你对别的角色出【弹幕】时可以选择做一次判定:若判定牌为红色花色,则此【弹幕】不可回避,直接命中;若判定牌为黑色花色,则此【弹幕】可回避,但如果对方没有出【擦弹】,则命中后可以选择弃掉对方一张牌。'
    )


class AssaultSkill:
    # Skill
    name = u'强袭'
    no_display = False
    clickable = passive_clickable
    is_action_valid = passive_is_action_valid


class FreakingPowerSkill:
コード例 #6
0
ファイル: kaguya.py プロジェクト: feng2606/thbattle
# -*- coding: utf-8 -*-

from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc
from gamepack.thb.ui.ui_meta.common import passive_clickable, passive_is_action_valid
from gamepack.thb.ui.resource import resource as gres

__metaclass__ = gen_metafunc(characters.kaguya)


class Kaguya:
    # Character
    char_name = u'蓬莱山辉夜'
    port_image = gres.kaguya_port
    description = (
        u'|DB永远的公主殿下 蓬莱山辉夜 体力:3|r\n\n'
        u'|G难题|r:一名角色每次令你回复一点体力时,你可以令该角色摸一张牌;你每受到一次伤害后,可令伤害来源交给你一张方片牌,否则其失去一点体力。\n\n'
        u'|G永夜|r:在你的回合外,当一名角色的一张红色基本牌因使用进入弃牌堆时,你可以将一张红色基本牌/装备牌置于该角色的判定区视为【封魔阵】。'
    )


class Dilemma:
    # Skill
    name = u'难题'
    clickable = passive_clickable
    is_action_valid = passive_is_action_valid


class DilemmaDamageAction:
    # choose_card meta
    def choose_card_text(g, act, cards):
コード例 #7
0
ファイル: alice.py プロジェクト: 17night/thbattle
# -*- coding: utf-8 -*-

# -- stdlib --
import time

# -- third party --
# -- own --
from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc, passive_clickable, passive_is_action_valid

# -- code --
__metaclass__ = gen_metafunc(characters.alice)


class Alice:
    # Character
    char_name = u'爱丽丝'
    port_image = 'thb-portrait-alice'
    figure_image = 'thb-figure-alice'
    miss_sound_effect = 'thb-cv-alice_miss'
    description = (
        u'|DB七色的人偶使 爱丽丝 体力:3|r\n\n'
        u'|G小小军势|r:当你使用装备牌时,你可以摸一张牌。当你失去装备牌区的牌后,你可以弃置其它角色的一张牌。\n\n'
        u'|G少女文乐|r:|B锁定技|r,你的手牌上限+X(X为你装备区牌数量的一半,向上取整且至少为1)。\n\n'
        u'|DB(画师:ideolo@NEKO WORKi,CV:小舞)|r'
    )


class AliceKOF:
    # Character
    char_name = u'爱丽丝'
コード例 #8
0
ファイル: chen.py プロジェクト: AojiaoZero/thbattle
# -*- coding: utf-8 -*-

from gamepack.thb import actions
from gamepack.thb import cards
from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc
from gamepack.thb.ui.resource import resource as gres
from utils import BatchList

__metaclass__ = gen_metafunc(characters.chen)


class FlyingSkanda:
    # Skill
    name = u'飞翔韦驮天'

    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

    def is_action_valid(g, cl, target_list):
        skill = cl[0]
        acards = skill.associated_cards
        if len(acards) != 1:
コード例 #9
0
ファイル: suika.py プロジェクト: 17night/thbattle
# -*- coding: utf-8 -*-

# -- stdlib --
# -- third party --
# -- own --
from gamepack.thb import actions, characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc, passive_clickable, passive_is_action_valid

# -- code --
__metaclass__ = gen_metafunc(characters.suika)


class HeavyDrinkerWine:
    name = u'酒'


class HeavyDrinker:
    # Skill
    name = u'酒豪'

    def clickable(game):
        me = game.me

        if me.tags['suika_failed'] >= me.tags['turn_count']:
            return False

        try:
            act = game.action_stack[-1]
        except IndexError:
            return False
コード例 #10
0
# -*- coding: utf-8 -*-

# -- stdlib --
# -- third party --
# -- own --
from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import card_desc, gen_metafunc, passive_clickable
from gamepack.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.char_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.char_name), )

    def sound_effect(act):
        return 'thb-cv-shizuha_autumnwind'
コード例 #11
0
# -*- coding: utf-8 -*-

from gamepack.thb import cards
from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc, my_turn
from gamepack.thb.ui.ui_meta.common import passive_clickable, passive_is_action_valid
from gamepack.thb.ui.ui_meta.common import limit1_skill_used
from gamepack.thb.ui.resource import resource as gres


__metaclass__ = gen_metafunc(characters.komachi)


class Komachi:
    # Character
    char_name = u'小野塚小町'
    port_image = gres.komachi_port
    figure_image = gres.komachi_figure
    figure_image_alter = gres.komachi_figure_alter
    description = (
        u'|DB乳不巨何以聚人心 小野塚小町 体力:4|r\n\n'
        u'|G彼岸|r:出牌阶段,你可以弃置一张牌并指定一名角色,你与其距离视为1直到回合结束。若该角色为全场体力最少的角色(或之一),你可以弃置其一张牌或摸一张牌。每阶段限一次。\n\n'
        u'|G归航|r:|B觉醒技|r,回合开始阶段,若你的体力值低于手牌数且小于等于2时,你需失去一点体力上限并回复一点体力,永久性获得技能|R渡钱|r。\n\n'
        u'|R渡钱|r:你对距离为1的角色造成一次伤害后,你可以获得其一张牌。\n\n'
        u'|DB(画师:渚FUN)|r'
    )


class Riverside:
    # Skill
    name = u'彼岸'
コード例 #12
0
ファイル: remilia_ex.py プロジェクト: shuidong/thbattle
# -*- coding: utf-8 -*-

from gamepack.thb import cards
from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc, my_turn
from gamepack.thb.ui.ui_meta.common import passive_clickable, passive_is_action_valid
from gamepack.thb.ui.ui_meta.common import limit1_skill_used
from gamepack.thb.ui.resource import resource as gres
from utils import BatchList

__metaclass__ = gen_metafunc(characters.remilia_ex)


remilia_ex_description = (
    u'|DB永远威严的红月 蕾米莉亚 体力:6|r\n\n'
    u'|G神枪|r:出牌阶段,出现以下情况之一,你可以令你的【弹幕】不能被【擦弹】抵消:\n'
    u'|B|R>> |r目标角色的体力值 大于 你的体力值。\n'
    u'|B|R>> |r目标角色的手牌数 小于 你的手牌数。\n\n'
    u'|G红魔之吻|r:|B锁定技|r,对玩家使用红色【弹幕】命中时,回复1点体力值。\n\n'
    u'|G不夜城|r:|DB信仰消耗3|r,在出牌阶段主动发动。你依次弃置所有解决者的一张手牌或装备牌。如果解决者无牌可弃,则弃置所有信仰。一回合一次。\n\n'
    u'|B|R=== 以下是变身后获得的技能 ===|r\n\n'
    u'|G碎心|r:|DB信仰消耗4|r。你可以发动该技能,视为对任意一名玩家使用【弹幕】。用此方法使用的【弹幕】视为红色,距离无限不可闪避,对目标造成2点伤害。\n\n'
    u'|G红雾|r:出牌阶段,你可以弃置一张红色手牌,令所有解决者依次对另一名解决者使用一张【弹幕】,无法如此做者失去1点体力。一回合一次。\n\n'
    u'|G七重奏|r:|B锁定技|r,解决者向你的判定区放置卡牌时,需额外弃置一张颜色相同的符卡。\n\n'
    u'|G夜王|r:|B锁定技|r,你在自己的出牌阶段时额外摸4张牌。你的手牌上限+3。'
)


class RemiliaEx:
    # Character
    char_name = u'异·蕾米莉亚'
コード例 #13
0
ファイル: alice.py プロジェクト: yuzishui/thbattle
# -*- coding: utf-8 -*-

# -- stdlib --
import time

# -- third party --
# -- own --
from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc, passive_clickable, passive_is_action_valid

# -- code --
__metaclass__ = gen_metafunc(characters.alice)


class Alice:
    # Character
    char_name = u'爱丽丝'
    port_image = 'thb-portrait-alice'
    figure_image = 'thb-figure-alice'
    miss_sound_effect = 'thb-cv-alice_miss'
    description = (u'|DB七色的人偶使 爱丽丝 体力:3|r\n\n'
                   u'|G小小军势|r:当你使用装备牌时,你可以摸一张牌。当你失去装备牌区的牌后,你可以弃置其它角色的一张牌。\n\n'
                   u'|G少女文乐|r:|B锁定技|r,你的手牌上限+X(X为你装备区牌数量的一半,向上取整且至少为1)。\n\n'
                   u'|DB(画师:ideolo@NEKO WORKi,CV:小舞)|r')


class AliceKOF:
    # Character
    char_name = u'爱丽丝'
    port_image = 'thb-portrait-alice'
    figure_image = 'thb-figure-alice'
コード例 #14
0
ファイル: mamizou.py プロジェクト: yuzishui/thbattle
# -*- coding: utf-8 -*-

# -- stdlib --
# -- third party --
# -- own --
from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc, limit1_skill_used, my_turn
from utils import BatchList

# -- code --
__metaclass__ = gen_metafunc(characters.mamizou)


class Morphing:
    # Skill
    name = u'变化'
    params_ui = 'UIMorphingCardSelection'

    def clickable(game):
        me = game.me

        if limit1_skill_used('mamizou_morphing_tag'):
            return False

        if not (my_turn() and (me.cards or me.showncards)):
            return False

        return True

    def is_action_valid(g, cl, target_list):
        skill = cl[0]
コード例 #15
0
ファイル: sp_aya.py プロジェクト: yuzishui/thbattle
# -*- coding: utf-8 -*-

# -- stdlib --
# -- third party --
# -- own --
from gamepack.thb import cards, characters
from gamepack.thb.ui.ui_meta.common import card_desc, gen_metafunc, my_turn, passive_clickable
from gamepack.thb.ui.ui_meta.common import passive_is_action_valid

# -- code --
__metaclass__ = gen_metafunc(characters.sp_aya)


class WindWalk:
    # Skill
    name = u'疾走'

    def clickable(g):
        if not my_turn():
            return False

        me = g.me
        return bool(me.cards or me.showncards or me.equips)

    def is_action_valid(g, cl, tl):
        acards = cl[0].associated_cards
        if (not acards) or len(acards) != 1:
            return (False, u'请选择一张牌')

        card = acards[0]
コード例 #16
0
ファイル: daiyousei.py プロジェクト: hycxa/thbattle
# -*- coding: utf-8 -*-

from gamepack.thb import actions
from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc
from gamepack.thb.ui.ui_meta.common import passive_clickable, passive_is_action_valid
from gamepack.thb.ui.resource import resource as gres

__metaclass__ = gen_metafunc(characters.daiyousei)


class Daiyousei:
    # Character
    char_name = u"大妖精"
    port_image = gres.daiyousei_port
    figure_image = gres.daiyousei_figure
    description = (
        u"|DB全身萌点的保姆 大妖精 体力:3|r\n\n"
        u"|G支援|r:出牌阶段,你可以将任意数量的除了判定区外的牌以任意分配方式交给其他角色,若你于此阶段中给出的牌张数达到或超过3张时,你回复1点体力。\n\n"
        u"|G卖萌|r:摸牌阶段,你可以摸 2+当前损失的体力数 的牌。\n\n"
        u"|DB(画师:渚FUN)|r"
    )


class SupportSkill:
    # Skill
    name = u"支援"

    def clickable(game):
        me = game.me
コード例 #17
0
ファイル: flandre.py プロジェクト: AojiaoZero/thbattle
# -*- coding: utf-8 -*-

from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc
from gamepack.thb.ui.ui_meta.common import passive_clickable, passive_is_action_valid
from gamepack.thb.ui.resource import resource as gres

__metaclass__ = gen_metafunc(characters.flandre)


class Flandre:
    # Character
    char_name = u'芙兰朵露'
    port_image = gres.flandre_port
    description = (
        u'|DB玩坏你哦 芙兰朵露 体力:4|r\n\n'
        u'|G狂咲|r:在你的摸牌阶段,如果你选择只摸一张牌,那么在你的出牌阶段你可以出任意张【弹幕】,并且【弹幕】和【弹幕战】的伤害为2点,但是对同一目标只能使用一张【弹幕】。'
    )


class CriticalStrike:
    # Skill
    name = u'狂咲'
    clickable = passive_clickable
    is_action_valid = passive_is_action_valid


class CriticalStrikeHandler:
    # choose_option
    choose_option_buttons = ((u'发动', True), (u'不发动', False))
    choose_option_prompt = u'你要发动【狂咲】吗?'
コード例 #18
0
ファイル: nitori.py プロジェクト: yuzishui/thbattle
# -*- coding: utf-8 -*-

# -- stdlib --
import random

# -- third party --
# -- own --
from gamepack.thb import actions, cards, characters
from gamepack.thb.actions import ttags
from gamepack.thb.ui.ui_meta.common import build_handcard, gen_metafunc, my_turn

# -- code --
__metaclass__ = gen_metafunc(characters.nitori)


class Dismantle:
    # Skill
    name = u'拆解'

    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'请不要选择牌!')

        if not len(tl):
            return (False, u'请选择一名玩家')
コード例 #19
0
ファイル: tenshi.py プロジェクト: winterfellding/thbattle
# -*- coding: utf-8 -*-

from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc
from gamepack.thb.ui.ui_meta.common import passive_clickable, passive_is_action_valid
from gamepack.thb.ui.resource import resource as gres

__metaclass__ = gen_metafunc(characters.tenshi)


class M*******t:
    # Skill
    name = u'抖M'
    clickable = passive_clickable
    is_action_valid = passive_is_action_valid


class MasochistHandler:
    # choose_option
    choose_option_buttons = ((u'发动', True), (u'不发动', False))
    choose_option_prompt = u'你要发动【抖M】吗?'


class MasochistAction:
    # choose_card
    def choose_card_text(g, act, cards):
        if act.cond(cards):
            return (True, u'给你牌~')
        else:
            return (False, u'请选择你要给出的牌(否则给自己)')
コード例 #20
0
# -*- coding: utf-8 -*-

# -- stdlib --
import random

# -- third party --
# -- own --
from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import card_desc, gen_metafunc, passive_clickable
from gamepack.thb.ui.ui_meta.common import passive_is_action_valid

# -- code --
__metaclass__ = gen_metafunc(characters.shinmyoumaru)


class MiracleMallet:
    # Skill
    name = u'万宝槌'
    clickable = passive_clickable
    is_action_valid = passive_is_action_valid


class MiracleMalletAction:
    def effect_string(act):
        return u'|G【%s】|r将|G【%s】|r的判定结果改为%s。' % (act.source.ui_meta.char_name,
                                                 act.target.ui_meta.char_name,
                                                 card_desc(act.card))

    def sound_effect(act):
        return random.choice((
            'thb-cv-shinmyoumaru_mallet1',
コード例 #21
0
ファイル: meirin.py プロジェクト: 17night/thbattle
# -*- coding: utf-8 -*-

# -- stdlib --
# -- third party --
# -- own --
from gamepack.thb import actions, cards, characters
from gamepack.thb.ui.ui_meta.common import build_handcard, gen_metafunc, passive_clickable
from gamepack.thb.ui.ui_meta.common import passive_is_action_valid

# -- code --
__metaclass__ = gen_metafunc(characters.meirin)


class RiverBehind:
    # Skill
    name = u'背水'
    clickable = passive_clickable
    is_action_valid = passive_is_action_valid


class Taichi:
    # Skill
    name = u'太极'

    def clickable(game):
        try:
            act = game.action_stack[-1]
            if isinstance(act, actions.ActionStage):
                return True

            if act.cond([build_handcard(cards.AttackCard)]):
コード例 #22
0
ファイル: nazrin.py プロジェクト: winterfellding/thbattle
# -*- coding: utf-8 -*-

from gamepack.thb import cards
from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc
from gamepack.thb.ui.ui_meta.common import passive_clickable, passive_is_action_valid
from gamepack.thb.ui.resource import resource as gres

__metaclass__ = gen_metafunc(characters.nazrin)


class Nazrin:
    # Character
    char_name = u'纳兹琳'
    port_image = gres.nazrin_port
    description = (u'|DB探宝的小小大将 纳兹琳 体力:3|r\n\n'
                   u'|G轻敏|r:你可以将你的黑色手牌当作【擦弹】使用或打出。\n\n'
                   u'|G探宝|r:回合开始阶段,你可以进行判定。判定结束后,若为黑色,你获得此判定牌,并且可以继续发动探宝。')


class TreasureHuntSkill:
    # Skill
    name = u'探宝'
    clickable = passive_clickable
    is_action_valid = passive_is_action_valid


class TreasureHuntHandler:
    # choose_option
    choose_option_buttons = ((u'发动', True), (u'不发动', False))
    choose_option_prompt = u'你要发动【探宝】吗?'
コード例 #23
0
ファイル: koakuma.py プロジェクト: feng2606/thbattle
# -*- coding: utf-8 -*-

from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc, my_turn
from gamepack.thb.ui.ui_meta.common import limit1_skill_used
from gamepack.thb.ui.resource import resource as gres

__metaclass__ = gen_metafunc(characters.koakuma)


class Koakuma:
    # Character
    char_name = u'小恶魔'
    port_image = gres.koakuma_port
    description = (
        u'|DB图书管理员 小恶魔 体力:4|r\n\n'
        u'|G寻找|r:出牌阶段,你可以弃掉任意数量的牌,然后摸取等量的牌。每回合里,你最多可以使用一次寻找。'
    )


class Find:
    # Skill
    name = u'寻找'

    def clickable(game):
        me = game.me
        if limit1_skill_used('find_tag'):
            return False

        if my_turn() and (me.cards or me.showncards or me.equips):
            return True
コード例 #24
0
ファイル: nazrin.py プロジェクト: 17night/thbattle
# -*- coding: utf-8 -*-

# -- stdlib --
# -- third party --
# -- own --
from gamepack.thb import cards, characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc, passive_clickable, passive_is_action_valid

# -- code --
__metaclass__ = gen_metafunc(characters.nazrin)


class Nazrin:
    # Character
    char_name = u'纳兹琳'
    port_image = 'thb-portrait-nazrin'
    miss_sound_effect = 'thb-cv-nazrin_miss'
    description = (
        u'|DB探宝的小小大将 纳兹琳 体力:3|r\n\n'
        u'|G轻敏|r:你可以将一张黑色手牌当【擦弹】使用或打出。\n\n'
        u'|G探宝|r:准备阶段开始时,你可以进行一次判定,若结果为黑色,你获得此牌,你可以重复此流程,直到出现红色的判定结果为止。\n\n'
        u'|DB(画师:Pixiv ID 3378132,CV:小羽)|r'
    )


class NazrinKOF:
    # Character
    char_name = u'纳兹琳'
    port_image = 'thb-portrait-nazrin'
    miss_sound_effect = 'thb-cv-nazrin_miss'
    description = (
コード例 #25
0
# -*- coding: utf-8 -*-

from gamepack.thb import cards
from gamepack.thb.ui.ui_meta.common import gen_metafunc, card_desc
from gamepack.thb.ui.resource import resource as gres

__metaclass__ = gen_metafunc(cards)


class DemolitionCard:
    # action_stage meta
    image = gres.card_demolition
    name = u'城管执法'
    description = (
        u'|R城管执法|r\n\n'
        u'出牌阶段对(除自己外)任意一名玩家使用,随机抽取并弃掉对方一张手牌,或选择并弃掉一张对方面前的牌(包括装备、明牌区和判定区内延时类符卡)。'
    )

    def is_action_valid(g, cl, target_list):
        if not target_list:
            return (False, u'请选择拆除目标')

        target = target_list[0]
        if not len(target.cards) + len(target.showncards) + len(
                target.equips) + len(target.fatetell):
            return (False, u'这货已经没有牌了')
        else:
            return (True, u'嗯,你的牌太多了')


class Demolition:
コード例 #26
0
ファイル: sakuya.py プロジェクト: yuzishui/thbattle
# -*- coding: utf-8 -*-

# -- stdlib --
import random

# -- third party --
# -- own --
from gamepack.thb import cards, characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc, passive_clickable, passive_is_action_valid

# -- code --
__metaclass__ = gen_metafunc(characters.sakuya)


class Sakuya:
    # Character
    char_name = u'十六夜咲夜'
    port_image = 'thb-portrait-sakuya'
    figure_image = 'thb-figure-sakuya'
    miss_sound_effect = 'thb-cv-sakuya_miss'
    description = (u'|DB完全潇洒的PAD长 十六夜咲夜 体力:4|r\n\n'
                   u'|G月时计|r:|B锁定技|r,准备阶段开始时,你执行一个额外的出牌阶段。\n\n'
                   u'|G飞刀|r:你可以将一张装备牌当【弹幕】使用或打出。按此法使用的【弹幕】无距离限制。\n\n'
                   u'|DB(画师:小D@星の妄想乡,CV:VV)|r')


class Dagger:
    # Skill
    name = u'飞刀'

    def clickable(g):
コード例 #27
0
ファイル: ran.py プロジェクト: AojiaoZero/thbattle
# -*- coding: utf-8 -*-

from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc
from gamepack.thb.ui.ui_meta.common import passive_clickable, passive_is_action_valid
from gamepack.thb.ui.resource import resource as gres

__metaclass__ = gen_metafunc(characters.ran)


class Prophet:
    # Skill
    name = u'神算'
    clickable = passive_clickable
    is_action_valid = passive_is_action_valid


class ExtremeIntelligence:
    # Skill
    name = u'极智'
    clickable = passive_clickable
    is_action_valid = passive_is_action_valid


class ProphetHandler:
    # choose_option
    choose_option_buttons = ((u'发动', True), (u'不发动', False))
    choose_option_prompt = u'你要发动【神算】吗?'


class ProphetAction:
コード例 #28
0
ファイル: patchouli.py プロジェクト: 17night/thbattle
# -*- coding: utf-8 -*-

# -- stdlib --
import random

# -- third party --
# -- own --
from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc, passive_clickable, passive_is_action_valid

# -- code --
__metaclass__ = gen_metafunc(characters.patchouli)


class Library:
    # Skill
    name = u'图书'
    clickable = passive_clickable
    is_action_valid = passive_is_action_valid


class LibraryDrawCards:
    def effect_string(act):
        return u'|G【%s】|r发动了|G图书|r技能,摸1张牌。' % (
            act.source.ui_meta.char_name,
        )

    def sound_effect(act):
        return random.choice([
            'thb-cv-patchouli_library1',
            'thb-cv-patchouli_library2',
コード例 #29
0
ファイル: inputlets.py プロジェクト: yuzishui/thbattle
# -- stdlib --
from functools import wraps
import logging

# -- third party --
# -- own --
from game.autoenv import Game
from gamepack.thb import actions as thbactions, cards as thbcards, inputlets
from gamepack.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
コード例 #30
0
# -*- coding: utf-8 -*-

# -- stdlib --
# -- third party --
# -- own --
from gamepack.thb import actions, characters
from gamepack.thb.ui.ui_meta.common import card_desc, gen_metafunc, passive_clickable
from gamepack.thb.ui.ui_meta.common import passive_is_action_valid

# -- code --
__metaclass__ = gen_metafunc(characters.kanako)


class Kanako:
    # Character
    char_name = u'八坂神奈子'
    port_image = 'thb-portrait-kanako'
    figure_image = 'thb-figure-kanako'
    miss_sound_effect = 'thb-cv-kanako_miss'
    description = (
        u'|DB山丘与湖泊的化身 八坂神奈子 体力:4|r\n'
        u'\n'
        u'|G神德|r:摸牌阶段开始时,你可以放弃摸牌并选择一名其他角色,改为令其摸两张牌,然后该角色需展示并交给你一张牌,若其交给你的牌为红桃,你摸一张牌。\n'
        u'\n'
        u'|G信仰|r:|B限定技|r,出牌阶段,你可以令你攻击范围内的所有其他角色选择一项:\n'
        u'|B|R>> |r令你摸一张牌\n'
        u'|B|R>> |r弃置你一张牌,然后你可以视为对其使用一张|G弹幕|r或|G弹幕战|r。\n'
        u'\n'
        u'|RKOF模式不可用|r\n'
        u'\n'
        u'|DB(画师:和茶,CV:北斗夜/VV)|r')
コード例 #31
0
ファイル: minoriko.py プロジェクト: winterfellding/thbattle
# -*- coding: utf-8 -*-

from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc, my_turn
from gamepack.thb.ui.ui_meta.common import passive_clickable, passive_is_action_valid
from gamepack.thb.ui.ui_meta.common import limit1_skill_used
from gamepack.thb.ui.resource import resource as gres

__metaclass__ = gen_metafunc(characters.minoriko)


class Foison:
    # Skill
    name = u'丰收'
    clickable = passive_clickable
    is_action_valid = passive_is_action_valid


class FoisonDrawCardStage:
    def effect_string(act):
        return u'大丰收!|G【%s】|r一下子收获了%d张牌!' % (
            act.source.ui_meta.char_name,
            act.amount,
        )


class AutumnFeast:
    # Skill
    name = u'秋祭'

    def clickable(game):
コード例 #32
0
ファイル: kyouko.py プロジェクト: 17night/thbattle
# -*- coding: utf-8 -*-

# -- stdlib --
# -- third party --
# -- own --
from gamepack.thb import cards as thbcards, characters
from gamepack.thb.ui.ui_meta.common import card_desc, gen_metafunc, passive_clickable
from gamepack.thb.ui.ui_meta.common import passive_is_action_valid


# -- code --
__metaclass__ = gen_metafunc(characters.kyouko)


class Kyouko:
    # Character
    char_name = u'幽谷响子'
    port_image = 'thb-portrait-kyouko'
    miss_sound_effect = 'thb-cv-kyouko_miss'
    description = (
        u'|DB诵经的山彦 幽谷响子 体力:4|r\n\n'
        u'|G回响|r:你受到伤害后,可以获得对你造成的牌。若此牌为弹幕,你可以改为令一名其他角色获得之。\n\n'
        u'|G共振|r:你对一名其他角色使用的弹幕结算完毕后,你可以令另一名其他角色对其使用一张弹幕(无距离限制)。\n\n'
        u'|DB(人物设计:蝶之羽风暂留此,CV:小羽)|r'
    )


class Echo:
    # Skill
    name = u'回响'
    clickable = passive_clickable
コード例 #33
0
# -*- coding: utf-8 -*-

from gamepack.thb import actions
from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc
from gamepack.thb.ui.ui_meta.common import passive_clickable, passive_is_action_valid
from gamepack.thb.ui.resource import resource as gres

__metaclass__ = gen_metafunc(characters.suika)


class Drunkard:
    # Skill
    name = u'酒鬼'

    def clickable(game):
        me = game.me

        try:
            act = game.action_stack[-1]
        except IndexError:
            return False

        if isinstance(act, actions.ActionStage) and act.target is me and (
                me.cards or me.showncards or me.equips):
            return True

        return False

    def is_action_valid(g, cl, target_list):
        skill = cl[0]
コード例 #34
0
ファイル: rinnosuke.py プロジェクト: AojiaoZero/thbattle
# -*- coding: utf-8 -*-

from gamepack.thb import actions
from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc
from gamepack.thb.ui.ui_meta.common import passive_clickable, passive_is_action_valid
from gamepack.thb.ui.resource import resource as gres

__metaclass__ = gen_metafunc(characters.rinnosuke)


class Netoru:
    # Skill
    name = u'寝取'

    def clickable(game):
        me = game.me
        try:
            if me.tags['netoru_tag'] >= me.tags['turn_count']:
                return False
            act = game.action_stack[-1]
            if isinstance(act, actions.ActionStage):
                return True
        except IndexError:
            pass
        return False

    def is_action_valid(g, cl, tl):
        skill = cl[0]
        cl = skill.associated_cards
        me = g.me
コード例 #35
0
ファイル: kogasa.py プロジェクト: TimLang/thbattle
# -*- coding: utf-8 -*-

# -- stdlib --
# -- third party --
# -- own --
from gamepack.thb import actions, cards, characters
from gamepack.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'愉快'
    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.char_name,
            act.target.ui_meta.char_name,
            act.amount,
        )

    def sound_effect(act):
        return 'thb-cv-kogasa_jolly'

コード例 #36
0
ファイル: marisa.py プロジェクト: AojiaoZero/thbattle
# -*- coding: utf-8 -*-

from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc, my_turn
from gamepack.thb.ui.ui_meta.common import limit1_skill_used
from gamepack.thb.ui.resource import resource as gres

__metaclass__ = gen_metafunc(characters.marisa)


class Marisa:
    # Character
    char_name = u'雾雨魔理沙'
    port_image = gres.marisa_port
    description = (
        u'|DB绝非普通的强盗少女 雾雨魔理沙 体力:4|r\n\n'
        u'|G借走|r:出牌阶段,你可以获得一名角色的一张牌,视为该角色对你使用了一张【弹幕】,每阶段限一次。'
    )


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.char_name,
            act.target.ui_meta.char_name,
        )

コード例 #37
0
ファイル: dummy.py プロジェクト: AojiaoZero/thbattle
# -*- coding: utf-8 -*-

from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc
from gamepack.thb.ui.resource import resource as gres

__metaclass__ = gen_metafunc(characters.dummy)


class Dummy:
    # Character
    char_name = u'机器人'
    port_image = gres.dummy_port
    description = (
        u'|DB河童工厂的残次品 机器人 体力:5|r\n\n'
        u'|G我很强壮|r:嗯,很强壮……'
    )
コード例 #38
0
ファイル: parsee.py プロジェクト: 17night/thbattle
# -*- coding: utf-8 -*-

# -- stdlib --
# -- third party --
# -- own --
from gamepack.thb import cards, characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc, my_turn

# -- code --
__metaclass__ = gen_metafunc(characters.parsee)


class Parsee:
    # Character
    char_name = u'水桥帕露西'
    port_image = 'thb-portrait-parsee'
    figure_image = 'thb-figure-parsee'
    miss_sound_effect = 'thb-cv-parsee_miss'
    description = (
        u'|DB地壳下的嫉妒心 水桥帕露西 体力:4|r\n\n'
        u'|G嫉妒|r:出牌阶段,你可以将一张黑色牌当|G城管执法|r使用。你使用|G城管执法|r使一名距离1以内角色的一张方片牌进入弃牌堆时,你可以获得之。\n\n'
        u'|DB(画师:和茶,CV:小羽)|r'
    )


class Envy:
    # Skill
    name = u'嫉妒'

    def clickable(game):
        me = game.me
コード例 #39
0
ファイル: kyouko.py プロジェクト: yuzishui/thbattle
# -*- coding: utf-8 -*-

# -- stdlib --
# -- third party --
# -- own --
from gamepack.thb import cards as thbcards, characters
from gamepack.thb.ui.ui_meta.common import card_desc, gen_metafunc, passive_clickable
from gamepack.thb.ui.ui_meta.common import passive_is_action_valid

# -- code --
__metaclass__ = gen_metafunc(characters.kyouko)


class Kyouko:
    # Character
    char_name = u'幽谷响子'
    port_image = 'thb-portrait-kyouko'
    miss_sound_effect = 'thb-cv-kyouko_miss'
    description = (u'|DB诵经的山彦 幽谷响子 体力:4|r\n\n'
                   u'|G回响|r:你受到伤害后,可以获得对你造成的牌。若此牌为弹幕,你可以改为令一名其他角色获得之。\n\n'
                   u'|G共振|r:你对一名其他角色使用的弹幕结算完毕后,你可以令另一名其他角色对其使用一张弹幕(无距离限制)。\n\n'
                   u'|DB(人物设计:蝶之羽风暂留此,CV:小羽)|r')


class Echo:
    # Skill
    name = u'回响'
    clickable = passive_clickable
    is_action_valid = passive_is_action_valid

コード例 #40
0
# -*- coding: utf-8 -*-

# -- stdlib --
# -- third party --
# -- own --
from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc, passive_clickable, passive_is_action_valid

# -- code --
__metaclass__ = gen_metafunc(characters.sp_flandre)


class SpFlandre:
    # Character
    char_name = u'SP芙兰朵露'
    port_image = 'thb-portrait-sp_flandre'
    figure_image = 'thb-figure-sp_flandre'
    miss_sound_effect = 'thb-cv-spflandre_miss'
    description = (
        u'|DB玩坏你哦 SP芙兰朵露 体力:4|r\n\n'
        u'|G破坏冲动|r:|B锁定技|r,结束阶段开始时,若你本回合内没有造成过伤害,你失去1点体力并对最近的一名其他角色造成1点伤害。\n\n'
        u'|G四重存在|r:你可以减少1点体力上限来防止你受到的一次不大于你当前体力值的伤害。|B锁定技|r,当你的体力值为1时,你使用卡牌所造成的伤害+1。\n\n'
        u'|DB(画师:Vivicat@幻想梦斗符,CV:shourei小N)|r')


class DestructionImpulse:
    # Skill
    name = u'破坏冲动'
    clickable = passive_clickable
    is_action_valid = passive_is_action_valid
コード例 #41
0
ファイル: meirin20150714.py プロジェクト: yuzishui/thbattle
# -*- coding: utf-8 -*-

# -- stdlib --
# -- third party --
# -- own --
from gamepack.thb import characters
from gamepack.thb.actions import ttags
from gamepack.thb.ui.ui_meta.common import gen_metafunc, my_turn


# -- code --
__metaclass__ = gen_metafunc(characters.meirin20150714)


class Qiliao:
    # Skill
    name = u'气疗'

    def clickable(g):
        if not my_turn():
            return False

        if ttags(g.me)['qiliao']:
            return False

        return True

    def is_action_valid(g, cl, target_list):
        skill = cl[0]
        n = len([p for p in g.players if not p.dead]) / 2
        if not 0 < len(skill.associated_cards) <= n:
コード例 #42
0
ファイル: nitori.py プロジェクト: 17night/thbattle
# -*- coding: utf-8 -*-

# -- stdlib --
import random

# -- third party --
# -- own --
from gamepack.thb import actions, cards, characters
from gamepack.thb.actions import ttags
from gamepack.thb.ui.ui_meta.common import build_handcard, gen_metafunc, my_turn


# -- code --
__metaclass__ = gen_metafunc(characters.nitori)


class Dismantle:
    # Skill
    name = u'拆解'

    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'请不要选择牌!')

        if not len(tl):
コード例 #43
0
ファイル: eirin.py プロジェクト: yuzishui/thbattle
# -*- coding: utf-8 -*-

# -- stdlib --
# -- third party --
# -- own --
from gamepack.thb import actions, cards, characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc, limit1_skill_used

# -- code --
__metaclass__ = gen_metafunc(characters.eirin)


class FirstAid:
    # Skill
    name = u'急救'

    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
        C = cards.Card
コード例 #44
0
# -*- coding: utf-8 -*-

from gamepack.thb import actions
from gamepack.thb import cards
from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc
from gamepack.thb.ui.ui_meta.common import passive_clickable, passive_is_action_valid
from gamepack.thb.ui.ui_meta.common import limit1_skill_used
from gamepack.thb.ui.resource import resource as gres


__metaclass__ = gen_metafunc(characters.reimu)


class Flight:
    # Skill
    name = u'飞行'
    clickable = passive_clickable
    is_action_valid = passive_is_action_valid


class SpiritualAttack:
    name = u'灵击'

    def clickable(g):
        me = g.me

        if not (me.cards or me.showncards): return False

        try:
            act = g.hybrid_stack[-1]
コード例 #45
0
# -*- coding: utf-8 -*-

# -- stdlib --
# -- third party --
# -- own --
from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc, limit1_skill_used, my_turn

# -- code --
__metaclass__ = gen_metafunc(characters.marisa)


class Marisa:
    # Character
    char_name = u'雾雨魔理沙'
    port_image = 'thb-portrait-marisa'
    figure_image = 'thb-figure-marisa'
    miss_sound_effect = 'thb-cv-marisa_miss'
    description = (u'|DB绝非普通的强盗少女 雾雨魔理沙 体力:4|r\n\n'
                   u'|G借走|r:出牌阶段限一次,你可以获得一名其他角色的一张牌,然后该角色可以视为对你使用了一张【弹幕】。\n\n'
                   u'|DB(画师:霏茶,CV:君寻)|r')


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.char_name,
            act.target.ui_meta.char_name,
コード例 #46
0
ファイル: daiyousei.py プロジェクト: winterfellding/thbattle
# -*- coding: utf-8 -*-

from gamepack.thb import actions
from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc
from gamepack.thb.ui.ui_meta.common import passive_clickable, passive_is_action_valid
from gamepack.thb.ui.resource import resource as gres

__metaclass__ = gen_metafunc(characters.daiyousei)


class Daiyousei:
    # Character
    char_name = u'大妖精'
    port_image = gres.daiyousei_port
    figure_image = gres.daiyousei_figure
    description = (
        u'|DB全身萌点的保姆 大妖精 体力:3|r\n\n'
        u'|G支援|r:出牌阶段,你可以将任意数量的除了判定区外的牌以任意分配方式交给其他角色,若你于此阶段中给出的牌张数达到或超过3张时,你回复1点体力。\n\n'
        u'|G卖萌|r:摸牌阶段,你可以摸 2+当前损失的体力数 的牌。\n\n'
        u'|DB(画师:渚FUN)|r')


class SupportSkill:
    # Skill
    name = u'支援'

    def clickable(game):
        me = game.me

        try:
コード例 #47
0
ファイル: shinmyoumaru.py プロジェクト: 17night/thbattle
# -*- coding: utf-8 -*-

# -- stdlib --
import random

# -- third party --
# -- own --
from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import card_desc, gen_metafunc, passive_clickable
from gamepack.thb.ui.ui_meta.common import passive_is_action_valid

# -- code --
__metaclass__ = gen_metafunc(characters.shinmyoumaru)


class MiracleMallet:
    # Skill
    name = u"万宝槌"
    clickable = passive_clickable
    is_action_valid = passive_is_action_valid


class MiracleMalletAction:
    def effect_string(act):
        return u"|G【%s】|r将|G【%s】|r的判定结果改为%s。" % (
            act.source.ui_meta.char_name,
            act.target.ui_meta.char_name,
            card_desc(act.card),
        )

    def sound_effect(act):
コード例 #48
0
ファイル: mokou.py プロジェクト: 17night/thbattle
# -*- coding: utf-8 -*-

# -- stdlib --
# -- third party --
# -- own --
from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc, passive_clickable, passive_is_action_valid

# -- code --
__metaclass__ = gen_metafunc(characters.mokou)


class Mokou:
    # Character
    char_name = u'藤原妹红'
    port_image = 'thb-portrait-mokou'
    miss_sound_effect = 'thb-cv-mokou_miss'
    description = (
        u'|DBFFF团资深团员 藤原妹红 体力:4|r\n\n'
        u'|G浴火|r:结束阶段开始时,你可以失去1点体力,然后摸两张牌。\n\n'
        u'|G重生|r:准备阶段开始时,你可以弃置X张红色牌,然后回复1点体力。(X为你的当前体力值)\n\n'
        u'|DB(画师:Pixiv UID 150460,CV:小羽)|r'
    )


class Ashes:
    # Skill
    name = u'浴火'
    clickable = passive_clickable
    is_action_valid = passive_is_action_valid
コード例 #49
0
ファイル: basic.py プロジェクト: AojiaoZero/thbattle
# -*- coding: utf-8 -*-

from gamepack.thb import cards
from gamepack.thb.ui.ui_meta.common import gen_metafunc
from gamepack.thb.ui.resource import resource as gres

__metaclass__ = gen_metafunc(cards)


class AttackCard:
    # action_stage meta
    image = gres.card_attack
    name = u'弹幕'
    description = (
        u'|R弹幕|r\n\n'
        u'你的出牌阶段,对除你外,你攻击范围内的一名角色使用,效果是对该角色造成1点伤害。\n'
        u'|B|R>> |r游戏开始时你的攻击范围是1。\n'
        u'|B|R>> |r每个出牌阶段你只能使用一张【弹幕】。'
    )

    def is_action_valid(g, cl, target_list):
        if not target_list:
            return (False, u'请选择弹幕的目标')

        return (True, u'来一发!')


class GrazeCard:
    # action_stage meta
    name = u'擦弹'
    image = gres.card_graze
コード例 #50
0
ファイル: mamizou.py プロジェクト: 17night/thbattle
# -*- coding: utf-8 -*-

# -- stdlib --
# -- third party --
# -- own --
from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc, limit1_skill_used, my_turn
from utils import BatchList

# -- code --
__metaclass__ = gen_metafunc(characters.mamizou)


class Morphing:
    # Skill
    name = u'变化'
    params_ui = 'UIMorphingCardSelection'

    def clickable(game):
        me = game.me

        if limit1_skill_used('mamizou_morphing_tag'):
            return False

        if not (my_turn() and (me.cards or me.showncards)):
            return False

        return True

    def is_action_valid(g, cl, target_list):
        skill = cl[0]
コード例 #51
0
# -*- coding: utf-8 -*-

# -- stdlib --
# -- third party --
# -- own --
from gamepack.thb import actions, cards, characters
from gamepack.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'愉快'
    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.char_name,
            act.target.ui_meta.char_name,
            act.amount,
        )

    def sound_effect(act):
        return 'thb-cv-kogasa_jolly'

コード例 #52
0
ファイル: parsee.py プロジェクト: winterfellding/thbattle
# -*- coding: utf-8 -*-

from gamepack.thb import cards
from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc, my_turn
from gamepack.thb.ui.resource import resource as gres

__metaclass__ = gen_metafunc(characters.parsee)


class Parsee:
    # Character
    char_name = u'水桥帕露西'
    port_image = gres.parsee_port
    description = (
        u'|DB地壳下的嫉妒心 水桥帕露西 体力:4|r\n\n'
        u'|G嫉妒|r:出牌阶段,你可以将一张黑色牌当做【城管执法】使用,若以此法使一名距离1以内角色的一张方片牌进入弃牌堆,你可以获得之。')


class Envy:
    # Skill
    name = u'嫉妒'

    def clickable(game):
        me = game.me

        if my_turn() and (me.cards or me.showncards or me.equips):
            return True

        return False
コード例 #53
0
# -*- coding: utf-8 -*-

# -- stdlib --
# -- third party --
# -- own --
from gamepack.thb import cards, characters
from gamepack.thb.ui.ui_meta.common import G, gen_metafunc, my_turn, passive_clickable
from gamepack.thb.ui.ui_meta.common import passive_is_action_valid

# -- code --
__metaclass__ = gen_metafunc(characters.seiga)


class Seiga:
    # Character
    char_name = u'霍青娥'
    port_image = 'thb-portrait-seiga'
    figure_image = 'thb-figure-seiga'
    miss_sound_effect = 'thb-cv-seiga_miss'
    description = (u'|DB僵尸别跑 霍青娥 体力:4|r\n'
                   u'\n'
                   u'|G邪仙|r:出牌阶段,你可以将一张可以主动发动的手牌,在合法的情况下,以一名其他玩家的身份使用。\n'
                   u'|B|R>> |r以此法使用|G弹幕|r时,弹幕的“一回合一次”的限制由你来承担\n'
                   u'|B|R>> |r当你成为以此法使用的群体符卡的目标时,你可以选择跳过此次结算。\n'
                   u'\n'
                   u'|G通灵|r:|B限定技|r,你可以获得于你回合内死亡角色的一个技能(不包括限定技,觉醒技和主公技)。\n'
                   u'\n'
                   u'|DB(画师:和茶,CV:小羽)|r')


class SeigaKOF:
コード例 #54
0
ファイル: sakuya.py プロジェクト: 17night/thbattle
# -*- coding: utf-8 -*-

# -- stdlib --
import random

# -- third party --
# -- own --
from gamepack.thb import cards, characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc, passive_clickable, passive_is_action_valid

# -- code --
__metaclass__ = gen_metafunc(characters.sakuya)


class Sakuya:
    # Character
    char_name = u"十六夜咲夜"
    port_image = "thb-portrait-sakuya"
    figure_image = "thb-figure-sakuya"
    miss_sound_effect = "thb-cv-sakuya_miss"
    description = (
        u"|DB完全潇洒的PAD长 十六夜咲夜 体力:4|r\n\n"
        u"|G月时计|r:|B锁定技|r,准备阶段开始时,你执行一个额外的出牌阶段。\n\n"
        u"|G飞刀|r:你可以将一张装备牌当【弹幕】使用或打出。按此法使用的【弹幕】无距离限制。\n\n"
        u"|DB(画师:小D@星の妄想乡,CV:VV)|r"
    )


class Dagger:
    # Skill
    name = u"飞刀"
コード例 #55
0
# -*- coding: utf-8 -*-

# -- stdlib --
# -- third party --
# -- own --
from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import gen_metafunc

# -- code --
__metaclass__ = gen_metafunc(characters.akari)


class Akari:
    # Character
    char_name = u'随机角色'
    port_image = 'thb-portrait-akari'
    description = (
        u'|DB会是谁呢 随机角色 体力:?|r\n\n'
        u'|G阿卡林|r:消失在画面里的能力。在开局之前,没有人知道这是谁。'
    )
コード例 #56
0
ファイル: sanae.py プロジェクト: 17night/thbattle
# -*- coding: utf-8 -*-

# -- stdlib --
# -- third party --
# -- own --
from gamepack.thb import characters
from gamepack.thb.actions import ttags
from gamepack.thb.ui.ui_meta.common import gen_metafunc, my_turn, passive_clickable
from gamepack.thb.ui.ui_meta.common import passive_is_action_valid

# -- code --
__metaclass__ = gen_metafunc(characters.sanae)


class Sanae:
    # Character
    char_name = u'东风谷早苗'
    port_image = 'thb-portrait-sanae'
    figure_image = 'thb-figure-sanae'
    miss_sound_effect = 'thb-cv-sanae_miss'
    description = (
        u'|DB常识满满的现人神 东风谷早苗 体力:3|r\n\n'
        u'|G奇迹|r:出牌阶段,你可以弃置X张牌并摸一张牌。若X为3,你可以令一名角色回复一点体力。\n'
        u'|B|R>> |rX为你本回合发动|G奇迹|r的次数,当你回合内第一次使用|G奇迹|r时,X为1,第二次为2,以此类推。\n\n'
        u'|G信仰|r:出牌阶段限一次,你可以令至多两名其他角色各交给你一张手牌,然后你交给其各一张牌。\n\n'
        u'|G神裔|r:当你成为群体符卡的目标后,你可以摸一张牌或跳过此次结算。\n\n'
        u'|DB(画师:小D@星の妄想乡,CV:VV)|r'
    )


class SanaeKOF:
コード例 #57
0
ファイル: tenshi.py プロジェクト: 17night/thbattle
# -*- coding: utf-8 -*-

# -- stdlib --
# -- third party --
# -- own --
from gamepack.thb import characters
from gamepack.thb.ui.ui_meta.common import card_desc, gen_metafunc, passive_clickable
from gamepack.thb.ui.ui_meta.common import passive_is_action_valid

# -- code --
__metaclass__ = gen_metafunc(characters.tenshi)


class M*******t:
    # Skill
    name = u'抖M'
    clickable = passive_clickable
    is_action_valid = passive_is_action_valid


class MasochistHandler:
    # choose_option
    choose_option_buttons = ((u'发动', True), (u'不发动', False))
    choose_option_prompt = u'你要发动【抖M】吗?'


class MasochistAction:
    # choose_card
    def choose_card_text(g, act, cards):
        if act.cond(cards):
            return (True, u'给你牌~')
コード例 #58
0
ファイル: kokoro.py プロジェクト: yuzishui/thbattle
# -*- coding: utf-8 -*-

# -- stdlib --
# -- third party --
# -- own --
from gamepack.thb import cards, characters
from gamepack.thb.ui.ui_meta.common import card_desc, gen_metafunc, limit1_skill_used, my_turn
from gamepack.thb.ui.ui_meta.common import passive_clickable, passive_is_action_valid

# -- code --
__metaclass__ = gen_metafunc(characters.kokoro)


class Kokoro:
    # Character
    char_name = u'秦心'
    port_image = 'thb-portrait-kokoro'
    figure_image = 'thb-figure-kokoro'
    miss_sound_effect = 'thb-cv-kokoro_miss'
    description = (
        u'|DB表情丰富的扑克脸 秦心 体力:3|r\n\n'
        u'|G希望之面|r:出牌阶段开始时,你可以观看牌堆顶1+X张牌,然后展示并获得其中任意数量的同一种花色的牌,其余以任意顺序置于牌堆顶。(X为你已损失的体力值)\n\n'
        u'|G暗黑能乐|r:出牌阶段,你可以将一张黑色牌置于体力不低于你的其他角色的明牌区,该角色需弃置除获得的牌以外的手牌直至手牌数等于其当前体力值。每阶段限一次。\n\n'
        u'|DB(画师:Takibi,CV:小羽/VV)|r'
    )


class KokoroKOF:
    # Character
    char_name = u'秦心'
    port_image = 'thb-portrait-kokoro'