Ejemplo n.º 1
0
def check_speed():
    print("\n\n\nExample of Speed")
    flier = TWWUnit(select_unit(unitsDF, "wh2_main_hef_mon_great_eagle"))
    print(flier.unit_card)
    print(flier.speeds)
    flier.toggle_effect("Frostbite!")
    print(flier.unit_card)
    print(flier.speeds)
Ejemplo n.º 2
0
def check_imbuments():
    print("\n\n\nExample of Imbuments")
    imbument_example = TWWUnit(select_unit(unitsDF, "Sisters of Avelorn"))
    print(imbument_example.unit_card)
    imbument_example.toggle_effect("Flaming Sword of Rhuin")
    print(imbument_example.unit_card)
    imbument_example.toggle_effect("Flaming Sword of Rhuin")
    print(imbument_example.unit_card)
Ejemplo n.º 3
0
def check_BvL():
    print("\nTest Bonus Vs Large")
    my_unit = TWWUnit(select_unit(unitsDF, "Phoenix Guard"))
    print(my_unit.unit_card)
    my_unit.toggle_BvL()
    print(my_unit.unit_card)
    my_unit.toggle_BvL()
    print(my_unit.unit_card)
Ejemplo n.º 4
0
def check_fatigue():
    print("\n\n\nExample of Fatigue")
    fatigue_example = TWWUnit(select_unit(unitsDF, "Swordsmen"))
    print(fatigue_example.unit_card)
    fatigue_example.set_fatigue("Exhausted")
    print(fatigue_example.unit_card)
    fatigue_example.set_fatigue("fresh")
    print(fatigue_example.unit_card)
Ejemplo n.º 5
0
def check_rank():
    print("\n\n\nExample of Rank")
    rank_example = TWWUnit(select_unit(unitsDF, "wh2_main_hef_inf_archers_0"))
    print(rank_example.unit_card)
    rank_example.set_rank(9)
    print(rank_example.unit_card)
    rank_example.set_rank(0)
    print(rank_example.unit_card)
Ejemplo n.º 6
0
def check_technology():
    print("\n\n\nExample of Technology")
    tech_example = TWWUnit(select_unit(unitsDF,
                                       "wh2_main_hef_mon_great_eagle"))
    print(tech_example.unit_card)
    tech_example.toggle_technology("Swiftsense")
    tech_example.toggle_technology("Heavy Ithilmar Armour")
    print(tech_example.unit_card)

    tech_example = TWWUnit(select_unit(unitsDF, "Phoenix Guard"))
    print(tech_example.unit_card)
    tech_example.toggle_technology("Swiftsense")
    tech_example.toggle_technology("Heavy Ithilmar Armour")
    print(tech_example.unit_card)
Ejemplo n.º 7
0
def check_linebreaking():
    print("\n\n\nExample Unit With Lots of Attributes, Abilities, and Spells")
    lots_of_lists = TWWUnit(
        select_unit(unitsDF, "Settra the Imperishable on Chariot of the Gods"))
    print(lots_of_lists.unit_card)
Ejemplo n.º 8
0
def check_ranged():
    print("\n\n\nExample Ranged Unit")
    ranged = TWWUnit(select_unit(unitsDF, "Queen Bess"))
    print(ranged.unit_card)
Ejemplo n.º 9
0
def check_effects():
    print("\n\n\nTest Effects")
    my_unit = TWWUnit(select_unit(unitsDF, "Phoenix Guard"))
    my_unit.toggle_effect("Martial Mastery")
    print(my_unit.unit_card)
    my_unit.toggle_effect("Stand Your Ground!")
    print(my_unit.unit_card)
    my_unit.toggle_effect("Poison!")
    print(my_unit.unit_card)
    my_unit.set_fatigue("active")
    print(my_unit.unit_card)
    my_unit.toggle_effect("Martial Mastery")
    print(my_unit.unit_card)
    my_unit.toggle_effect("Poison!")
    print(my_unit.unit_card)
    my_unit.set_fatigue("exhausted")
    print(my_unit.unit_card)
    my_unit.toggle_effect("Stand Your Ground!")
    print(my_unit.unit_card)
    dmg_mul_res = max(dmg_mul_res, .1)

    print(f"\nDamage Multiplier From Resistances = {round(dmg_mul_res,2)}")

    avg_dmg = damage_with_armor * dmg_mul_res

    print(
        f"\nExpected Damage Per Attack = {round(max(1,expected_hit*avg_dmg),2)}"
        f"\n\nAssuming {units_attacking} "
        f"{'Unit Attacks' if units_attacking == 1 else 'Units Attack'}"
        "\nTotal Expected Damage = "
        f"{round(max(1,expected_hit*avg_dmg*units_attacking),2)}")

    return attacker, defender


if __name__ == '__main__':

    import pickle
    unitsDF = pickle.load(open("unitsDF.p", "rb"))
    effects_dict = pickle.load(open("effectsDict.p", "rb"))

    fireborn = TWWUnit(select_unit(unitsDF, "The Fireborn"))
    trolls = TWWUnit(select_unit(unitsDF, "Trolls"))

    trolls.toggle_effect("Regeneration")

    fireborn.toggle_effect("Martial Mastery")
    fireborn.toggle_charge()

    simulate_melee_attack(fireborn, trolls)
Ejemplo n.º 11
0
    print("## User Facing Stats ##")
    print(unit.unit_card)

    print("\n## Hidden Stats ##")
    print(f"Target Area: {calibration_area}m")
    print(f"Calibration Dist: {calibration_distance}m")

    print("\n## Derived Stats ##")
    print(f"Shooting at {target_armor} Armor")
    print(f"Damage Per Projectile: {int(damage_v_a)}")
    print(f"Damage Per Volley: {int(damage_per_volley_a)}")
    print(f"Damage Per 10s: {int(damage_per_ten_a)}")
    print(f"Damage Per Battle: {int(damage_per_battle_a)}")


if __name__ == '__main__':
    from pathlib import Path
    from TWWObjects import TWWUnit

    top_of_path = str(Path(__file__).parent.parent)

    unitsDF = pickle.load(open(top_of_path + "\\DataFiles\\unitsDF.p", "rb"))

    waywatchers = TWWUnit(
        select_unit(unitsDF, "wh_dlc05_wef_inf_waywatchers_0"))
    waywatchers.toggle_effect("Hawkish Precision")
    ranged_damage_stats(waywatchers)
    print("\n\n")
    ratling = TWWUnit(select_unit(unitsDF, "Ratling Guns"))
    ranged_damage_stats(ratling)