Пример #1
0
def Stomp(UnitList1, UnitList2, roundwnds1, roundwnds2, verbose):
    if len(UnitList2) > 1:
        for x in range(1, len(UnitList1)):
            if hasattr(UnitList1[x], 'Stomp'):
                roundwnds2 += ward(
                    armor(
                        wound(1, UnitList1[x].Strength,
                              UnitList2[-1].Toughness, verbose),
                        UnitList1[x].Strength, UnitList2[-1].ArmorPts,
                        verbose), UnitList2[-1].WardPts, verbose)
            elif hasattr(UnitList1[x], 'ThunderStomp'):
                roundwnds2 += ward(
                    armor(
                        wound(random.randint(1, 6), UnitList1[x].Strength,
                              UnitList2[-1].Toughness, verbose),
                        UnitList1[x].Strength, UnitList2[-1].ArmorPts,
                        verbose), UnitList2[-1].WardPts, verbose)
    if len(UnitList1) > 1:
        for x in range(1, len(UnitList2)):
            if hasattr(UnitList2[x], 'Stomp'):
                roundwnds1 += ward(
                    armor(
                        wound(1, UnitList2[x].Strength,
                              UnitList1[-1].Toughness, verbose),
                        UnitList2[x].Strength, UnitList1[-1].ArmorPts,
                        verbose), UnitList1[-1].WardPts, verbose)
            elif hasattr(UnitList2[x], 'ThunderStomp'):
                roundwnds1 += ward(
                    armor(
                        wound(random.randint(1, 6), UnitList2[x].Strength,
                              UnitList1[-1].Toughness, verbose),
                        UnitList2[x].Strength, UnitList1[-1].ArmorPts,
                        verbose), UnitList1[-1].WardPts, verbose)
    return roundwnds1, roundwnds2
Пример #2
0
def Stomp(UnitList1,UnitList2,roundwnds1,roundwnds2,verbose):
    if len(UnitList2) > 1:
        for x in range(1,len(UnitList1)):
            if hasattr(UnitList1[x],'Stomp'):
                roundwnds2 += ward(armor(wound(1,UnitList1[x].Strength,UnitList2[-1].Toughness,verbose),UnitList1[x].Strength,UnitList2[-1].ArmorPts,verbose),UnitList2[-1].WardPts,verbose)
            elif hasattr(UnitList1[x],'ThunderStomp'):
                roundwnds2 += ward(armor(wound(random.randint(1,6),UnitList1[x].Strength,UnitList2[-1].Toughness,verbose),UnitList1[x].Strength,UnitList2[-1].ArmorPts,verbose),UnitList2[-1].WardPts,verbose)
    if len(UnitList1) > 1:
        for x in range(1,len(UnitList2)):
            if hasattr(UnitList2[x],'Stomp'):
                roundwnds1 += ward(armor(wound(1,UnitList2[x].Strength,UnitList1[-1].Toughness,verbose),UnitList2[x].Strength,UnitList1[-1].ArmorPts,verbose),UnitList1[-1].WardPts,verbose)
            elif hasattr(UnitList2[x],'ThunderStomp'):
                roundwnds1 += ward(armor(wound(random.randint(1,6),UnitList2[x].Strength,UnitList1[-1].Toughness,verbose),UnitList2[x].Strength,UnitList1[-1].ArmorPts,verbose),UnitList1[-1].WardPts,verbose)
    return roundwnds1,roundwnds2;
Пример #3
0
def attack(AttackUnit,DefenseModel,AttackingModelsList,verbose):
    kills = 0
    for x in range(len(AttackingModelsList)):
        if hasattr(AttackUnit[AttackingModelsList[x]],'JunglePoisons') or hasattr(AttackUnit[AttackingModelsList[x]],'PoisonedAttacks'):
            kills += PoisonedAttacks(AttackUnit,DefenseModel,AttackingModelsList,x,verbose)
        elif hasattr(AttackUnit[AttackingModelsList[x]],'Blood-frenzy') and hasattr(AttackUnit[AttackingModelsList[x]],'UltimatePredator'):
            kills += CarnosaurAttacks(AttackUnit,DefenseModel,AttackingModelsList,x,verbose)
        else:
            if x <AttackUnit[0].Width:
                kills += ward(armor(wound(hit(AttackUnit[AttackingModelsList[x]].Attacks,AttackUnit[AttackingModelsList[x]].WeaponSkill,DefenseModel.WeaponSkill,verbose)[0],AttackUnit[AttackingModelsList[x]].Strength,DefenseModel.Toughness,verbose),AttackUnit[AttackingModelsList[x]].Strength,DefenseModel.ArmorPts,verbose),DefenseModel.WardPts,verbose)
            else:
                kills += ward(armor(wound(hit(1,AttackUnit[AttackingModelsList[x]].WeaponSkill,DefenseModel.WeaponSkill,verbose)[0],AttackUnit[AttackingModelsList[x]].Strength,DefenseModel.Toughness,verbose),AttackUnit[AttackingModelsList[x]].Strength,DefenseModel.ArmorPts,verbose),DefenseModel.WardPts,verbose)
    if verbose >= 3:
        print kills, "Wounds Total"
    return kills;
Пример #4
0
def PoisonedAttacks(AttackUnit,DefenseModel,AttackingModelsList,x,verbose):
    if x <AttackUnit[0].Width:
        Hits,ToHitRolls = hit(AttackUnit[AttackingModelsList[x]].Attacks,AttackUnit[AttackingModelsList[x]].WeaponSkill,DefenseModel.WeaponSkill,verbose)
        for y in range(Hits):
            if ToHitRolls[y] == 6:
                if verbose >=4:
                    print "Poisoned Attack Landed! Automatic Wound!"
                kills += ward(armor(1,AttackUnit[AttackingModelsList[x]].Strength,DefenseModel.ArmorPts,verbose),DefenseModel.WardPts,verbose)
            else:
                kills += ward(armor(wound(1,AttackUnit[AttackingModelsList[x]].Strength,DefenseModel.Toughness,verbose),AttackUnit[AttackingModelsList[x]].Strength,DefenseModel.ArmorPts,verbose),DefenseModel.WardPts,verbose)
    else:
        Hits,ToHitRolls = hit(1,AttackUnit[AttackingModelsList[x]].WeaponSkill,DefenseModel.WeaponSkill,verbose)
        for y in range(Hits):
            if ToHitRolls[y] == 6:
                kills += ward(armor(1,AttackUnit[AttackingModelsList[x]].Strength,DefenseModel.ArmorPts,verbose),DefenseModel.WardPts,verbose)
            else:
                kills += ward(armor(wound(1,AttackUnit[AttackingModelsList[x]].Strength,DefenseModel.Toughness,verbose),AttackUnit[AttackingModelsList[x]].Strength,DefenseModel.ArmorPts,verbose),DefenseModel.WardPts,verbose)
Пример #5
0
def attack(AttackUnit, DefenseModel, AttackingModelsList, verbose):
    kills = 0
    for x in range(len(AttackingModelsList)):
        if hasattr(AttackUnit[AttackingModelsList[x]],
                   'JunglePoisons') or hasattr(
                       AttackUnit[AttackingModelsList[x]], 'PoisonedAttacks'):
            kills += PoisonedAttacks(AttackUnit, DefenseModel,
                                     AttackingModelsList, x, verbose)
        elif hasattr(AttackUnit[AttackingModelsList[x]],
                     'Blood-frenzy') and hasattr(
                         AttackUnit[AttackingModelsList[x]],
                         'UltimatePredator'):
            kills += CarnosaurAttacks(AttackUnit, DefenseModel,
                                      AttackingModelsList, x, verbose)
        else:
            if x < AttackUnit[0].Width:
                kills += ward(
                    armor(
                        wound(
                            hit(AttackUnit[AttackingModelsList[x]].Attacks,
                                AttackUnit[AttackingModelsList[x]].WeaponSkill,
                                DefenseModel.WeaponSkill, verbose)[0],
                            AttackUnit[AttackingModelsList[x]].Strength,
                            DefenseModel.Toughness, verbose),
                        AttackUnit[AttackingModelsList[x]].Strength,
                        DefenseModel.ArmorPts, verbose), DefenseModel.WardPts,
                    verbose)
            else:
                kills += ward(
                    armor(
                        wound(
                            hit(1,
                                AttackUnit[AttackingModelsList[x]].WeaponSkill,
                                DefenseModel.WeaponSkill, verbose)[0],
                            AttackUnit[AttackingModelsList[x]].Strength,
                            DefenseModel.Toughness, verbose),
                        AttackUnit[AttackingModelsList[x]].Strength,
                        DefenseModel.ArmorPts, verbose), DefenseModel.WardPts,
                    verbose)
    if verbose >= 3:
        print kills, "Wounds Total"
    return kills
Пример #6
0
def HatredAttacks(Def,verbose):
    """
    Attacks made with Hatred of the opponent can reroll misses.
    Most opponents have normal hatred which can only be applied
    in the first round of combat. 
    This rule is intended to be used beside a normal attack,
    and only applied in the first round of combat. 
    """
    hits,rolls = hit(self.Ata,self.WepS,Def.WepS,verbose)
    hits += hit(self.Ata-hits,self.WepS,Def.WepS,verbose)[0]
    return ward(armor(wound(hits,self.Str,Def.Tuf,verbose),self.Str,Def.Armr,verbose),Def.Ward,verbose)
Пример #7
0
def CarnosaurAttacks(AttackUnit,DefenseModel,AttackingModelsList,x,verbose):
    wounds = ward(armor(wound(hit(AttackUnit[AttackingModelsList[x]].Attacks,AttackUnit[AttackingModelsList[x]].WeaponSkill,DefenseModel.WeaponSkill,verbose)[0],AttackUnit[AttackingModelsList[x]].Strength,DefenseModel.Toughness,verbose),AttackUnit[AttackingModelsList[x]].Strength,DefenseModel.ArmorPts,verbose),DefenseModel.WardPts,verbose)
    if wounds > 0 and not hasattr(AttackUnit[AttackingModelsList[x]],'Frenzy'):
        setattr(AttackUnit[AttackingModelsList[x]],'Frenzy',2)
        AttackUnit[AttackingModelsList[x]].Attacks += 1
    kills = 0
    for x in range(wounds):
        kills += random.randint(1,3)
    if verbose >= 3:
        print kills, "Carnosaur Wounds Total"
    return kills;    
Пример #8
0
def PoisonedAttack(Def, verbose):
    """
    Poisoned Attacks; any dice which hits on a 6 automatically wounds
    """
    wounds = 0
    hits, rolls = hit(self.Ata, self.WepS, Def.WepS, verbose)
    for dice in rolls:
        if dice == 6:
            wounds += 1
            hits -= 1
    wounds += wound(hits, self.Str, Def.Tuf, verbose)
    return ward(armor(wounds, self.Str, Def.Armr), Def.Ward)
Пример #9
0
def PoisonedAttack(Def,verbose):
    """
    Poisoned Attacks; any dice which hits on a 6 automatically wounds
    """
    wounds = 0
    hits,rolls = hit(self.Ata,self.WepS,Def.WepS,verbose)
    for dice in rolls:
        if dice == 6:
            wounds += 1
            hits -= 1
    wounds += wound(hits,self.Str,Def.Tuf,verbose)
    return ward(armor(wounds,self.Str,Def.Armr),Def.Ward)
Пример #10
0
def HatredAttacks(Def, verbose):
    """
    Attacks made with Hatred of the opponent can reroll misses.
    Most opponents have normal hatred which can only be applied
    in the first round of combat. 
    This rule is intended to be used beside a normal attack,
    and only applied in the first round of combat. 
    """
    hits, rolls = hit(self.Ata, self.WepS, Def.WepS, verbose)
    hits += hit(self.Ata - hits, self.WepS, Def.WepS, verbose)[0]
    return ward(
        armor(wound(hits, self.Str, Def.Tuf, verbose), self.Str, Def.Armr,
              verbose), Def.Ward, verbose)
Пример #11
0
def PoisonedAttacks(AttackUnit, DefenseModel, AttackingModelsList, x, verbose):
    if x < AttackUnit[0].Width:
        Hits, ToHitRolls = hit(AttackUnit[AttackingModelsList[x]].Attacks,
                               AttackUnit[AttackingModelsList[x]].WeaponSkill,
                               DefenseModel.WeaponSkill, verbose)
        for y in range(Hits):
            if ToHitRolls[y] == 6:
                if verbose >= 4:
                    print "Poisoned Attack Landed! Automatic Wound!"
                kills += ward(
                    armor(1, AttackUnit[AttackingModelsList[x]].Strength,
                          DefenseModel.ArmorPts, verbose),
                    DefenseModel.WardPts, verbose)
            else:
                kills += ward(
                    armor(
                        wound(1, AttackUnit[AttackingModelsList[x]].Strength,
                              DefenseModel.Toughness, verbose),
                        AttackUnit[AttackingModelsList[x]].Strength,
                        DefenseModel.ArmorPts, verbose), DefenseModel.WardPts,
                    verbose)
    else:
        Hits, ToHitRolls = hit(1,
                               AttackUnit[AttackingModelsList[x]].WeaponSkill,
                               DefenseModel.WeaponSkill, verbose)
        for y in range(Hits):
            if ToHitRolls[y] == 6:
                kills += ward(
                    armor(1, AttackUnit[AttackingModelsList[x]].Strength,
                          DefenseModel.ArmorPts, verbose),
                    DefenseModel.WardPts, verbose)
            else:
                kills += ward(
                    armor(
                        wound(1, AttackUnit[AttackingModelsList[x]].Strength,
                              DefenseModel.Toughness, verbose),
                        AttackUnit[AttackingModelsList[x]].Strength,
                        DefenseModel.ArmorPts, verbose), DefenseModel.WardPts,
                    verbose)
Пример #12
0
def Attack(
    Def,
    verbose,
):
    """
    The generic Attack model, which has no special rules applied to it.
    """
    return ward(
        armor(
            wound(
                hit(self.Ata, self.WepS, Def.WepS, verbose)[0], self.Str,
                Def.Tuf, verbose), self.Str, Def.Tuf, verbose), Def.Ward,
        verbose)
Пример #13
0
def CarnosaurAttacks(AttackUnit, DefenseModel, AttackingModelsList, x,
                     verbose):
    wounds = ward(
        armor(
            wound(
                hit(AttackUnit[AttackingModelsList[x]].Attacks,
                    AttackUnit[AttackingModelsList[x]].WeaponSkill,
                    DefenseModel.WeaponSkill, verbose)[0],
                AttackUnit[AttackingModelsList[x]].Strength,
                DefenseModel.Toughness, verbose),
            AttackUnit[AttackingModelsList[x]].Strength, DefenseModel.ArmorPts,
            verbose), DefenseModel.WardPts, verbose)
    if wounds > 0 and not hasattr(AttackUnit[AttackingModelsList[x]],
                                  'Frenzy'):
        setattr(AttackUnit[AttackingModelsList[x]], 'Frenzy', 2)
        AttackUnit[AttackingModelsList[x]].Attacks += 1
    kills = 0
    for x in range(wounds):
        kills += random.randint(1, 3)
    if verbose >= 3:
        print kills, "Carnosaur Wounds Total"
    return kills
Пример #14
0
def Attack(Def,verbose,):
    """
    The generic Attack model, which has no special rules applied to it.
    """
    return ward(armor(wound(hit(self.Ata,self.WepS,Def.WepS,verbose)[0],self.Str,Def.Tuf,verbose),self.Str,Def.Tuf,verbose),Def.Ward,verbose)