Ejemplo n.º 1
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.º 2
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)
    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.º 4
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)
Ejemplo n.º 5
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)