Ejemplo n.º 1
0
def create_armor_list_item(mech, i, var):
    """
    Compile info used by print_armor_list()
    """
    name_str = mech.name + " " + mech.model + i.get_name()
    batt_val = mech.get_bv(i)
    weight = mech.weight
    # Armor coverage relative to maximum
    armor = mech.armor.get_armor_percent()
    # Check for explosive stuff that can disable the mech
    exp = i.gear.get_ammo_exp_bv(mech.engine) + i.gear.get_weapon_exp_bv(mech.engine)
    if exp < 0:
        e_str = "EXP"
    else:
        e_str = ""
    # Check for a stealth system
    sth = mech.get_stealth()
    if sth:
        s_str = "STH"
    else:
        s_str = ""
    # Armor points
    arm_p = mech.armor.total.arm
    max_p = mech.armor.total.max
    # Armor weight
    wgt = mech.armor.get_weight()
    # BF armor
    batt_f = BattleForce(mech, i)
    bf_a = batt_f.get_armor()
    short = mech.armor.short

    return (name_str, weight, batt_val, arm_p, max_p, armor, wgt, short, bf_a, e_str, s_str)
Ejemplo n.º 2
0
    def is_brawler(self):
        """
        Check if a mech is a brawler

        Definition:
        - Speed at least walk 4 or jump 4
        - BF armor at least 4
        - Able to do 10 damage at range 15
        - Do more damage at range 15 than range 18
        """
        if self.mech.get_walk() < 4 and self.load.get_jump() < 4:
            return False

        batt_f = BattleForce(self.mech, self.load)
        if batt_f.get_armor() < 4:
            return False

        dam15 = self.load.gear.weaponlist.count_damage(15)
        if dam15 < 10:
            return False

        if self.load.gear.weaponlist.count_damage(18) >= dam15:
            return False

        return True
Ejemplo n.º 3
0
def parse_armor(mech):
    """
    Parse the armor of a mech.
    """
    # Standard armor report
    mech.armor.parse_armor()
    # Battle force armor
    batt_f = BattleForce(mech, mech.load)
    print "BF Armor: ", batt_f.get_armor()
Ejemplo n.º 4
0
def create_battle_force_list_item(mech, i, var):
    """
    Compile info used by print_battle_force_list()
    """
    name_str = mech.name + " " + mech.model + i.get_name()
    batt_f = BattleForce(mech, i)
    batt_val = batt_f.get_point_value()
    weight = batt_f.get_weight_class()
    mov = batt_f.get_move()
    armor = batt_f.get_armor()

    return (name_str, weight, batt_val, mov, armor)
Ejemplo n.º 5
0
    def is_skirmisher(self):
        """
        Check if a mech is a skirmisher

        Definition:
        - Speed at least walk 5 or jump 5
        - BF armor at least 3
        - Able to do 5 damage at range 15
        """
        if self.mech.get_walk() < 5 and self.load.get_jump() < 5:
            return False

        batt_f = BattleForce(self.mech, self.load)
        if batt_f.get_armor() < 3:
            return False

        if self.load.gear.weaponlist.count_damage(15) < 5:
            return False

        return True
Ejemplo n.º 6
0
    def is_juggernaut(self):
        """
        Check if a mech is a juggernaut

        Definition:
        - Walking and jump speed no more than 4
        - BF armor at least 5
        - Able to do 30 damage at range 6
        - Do less than 20 damage at range 18
        """
        if self.mech.get_walk() > 4 or self.load.get_jump() > 4:
            return False

        batt_f = BattleForce(self.mech, self.load)
        if batt_f.get_armor() < 5:
            return False

        if self.load.gear.weaponlist.count_damage(6) < 30:
            return False

        if self.load.gear.weaponlist.count_damage(18) >= 20:
            return False

        return True