示例#1
0
 def attack(self, mult, min_hit=1, max_hit=1):
     if mult is None:
         return None
     output = '{}%ダメージ'. \
         format(minmax(int(min_hit) * int(mult), int(max_hit) * int(mult)))
     if min_hit and max_hit != 1:
         output += ' ({}連続攻撃、{}%ごと)'.format(minmax(min_hit, max_hit), mult)
     return output
示例#2
0
 def recover(self,
             min_amount,
             max_amount,
             target_type,
             player_threshold=None):
     target = targets_to_str([target_type])
     if player_threshold and player_threshold != 100:
         return '{}%HP以下で{}のHPが{}回復'.format(
             player_threshold, target, minmax(min_amount, max_amount, True))
     else:
         return '{}のHPが{}回復'.format(target,
                                    minmax(min_amount, max_amount, True))
示例#3
0
    def absorb(self, abs_type: Absorb, condition, min_turns, max_turns=None):
        if abs_type == Absorb.attr:
            source = self.attributes_to_str(condition)
            return '{}ターンの間、{}属性のダメージを吸収'.format(minmax(min_turns, max_turns),
                                                 source)
        elif abs_type == Absorb.combo:
            source = '{}コンボ以下の攻撃'.format(condition)
        elif abs_type == Absorb.damage:
            source = '{}以上のダメージ'.format(self.big_number(condition))
        else:
            raise ValueError("未知の吸収タイプ: {}".format(abs_type))

        return '{}ターンの間、{}を吸収'.format(minmax(min_turns, max_turns), source)
示例#4
0
 def skyfall(self,
             attributes,
             chance,
             min_turns,
             max_turns=None,
             locked=False):
     lock = 'ロックされた' if locked else ''
     return '{}ターンの間、{}{}ドロップを+{}%に落ちてくる' \
         .format(minmax(min_turns, max_turns), lock, self.attributes_to_str(attributes), chance)
示例#5
0
 def bind(self,
          min_turns,
          max_turns,
          target_count=None,
          target_types=TargetType.card,
          source: Source = None):
     if isinstance(target_types, TargetType):
         target_types = [target_types]
     elif source is not None:
         source_target = TargetType.attrs if source == Source.attrs \
             else TargetType.types if source == Source.types \
             else TargetType.unset
         target_types = SOURCE_FUNCS[source](
             [target_types]) + TARGET_NAMES[source_target]
     targets = targets_to_str(target_types).format(target_count)
     if targets == '覚醒スキル':
         return '{}ターンの間、覚醒スキル無効化'.format(minmax(min_turns, max_turns),
                                          targets)
     elif targets == 'スキル':
         return '{}ターンの間、スキル使用不可'.format(minmax(min_turns, max_turns),
                                         targets)
     return '{}ターンの間、{}がバインド'.format(minmax(min_turns, max_turns), targets)
示例#6
0
 def skill_delay(self, min_turns, max_turns):
     return 'スキルターンを{}ターン遅延'.format(minmax(min_turns, max_turns))
示例#7
0
 def blind_sticky_random(self, turns, nmin, nmax):
     if nmin == 42:
         return '{}ターンの間、全ドロップが超暗闇になる'.format(turns)
     else:
         return '{}ターンの間、ランダムで{}個のドロップを超暗闇にする'.format(
             turns, minmax(nmin, nmax))
示例#8
0
 def random_nuke_convert(self, act):
     return '{}に攻撃力x{}倍の{}属性攻撃'.format(
         self.fmt_mass_atk(act.mass_attack),
         minmax(fmt_mult(act.minimum_multiplier), fmt_mult(act.maximum_multiplier)),
         self.ATTRIBUTES[act.attribute])
示例#9
0
 def haste_convert(self, act):
     return '自分以外の味方スキルが{}ターンの溜まる'.format(minmax(act.turns, act.max_turns))