Exemplo n.º 1
0
):
    heal_lines, periodics, absorbs = read_heals(player, source, **kwargs)

    # Group lines
    heal_lines = group_processed_lines(heal_lines, ignore_crit, spell_id=spell_id)
    for spell_id, lines in heal_lines.items():
        spell_overheal_probability(player, spell_id, lines, spell_power)


if __name__ == "__main__":
    from backend.parser import OverhealParser

    # Make plot dirs
    import os
    os.makedirs("figs/probability/likelihood", exist_ok=True)

    parser = OverhealParser(
        description="""Plots probability of overheals for different spells.""",
        need_player=True,
        accept_spell_id=True,
        accept_spell_power=True,
    )

    parser.add_argument(
        "--ignore_crit", action="store_true", help="Remove critical heals from analysis"
    )

    args = parser.parse_args()

    main(**vars(args))
Exemplo n.º 2
0
            print(f"Could not find casts of spell [{spell_id}]")
            exit(1)

        data.append(process_spell(spell_id, lines))
    else:
        for spell_id, lines in heal_lines.items():
            data.append(process_spell(spell_id, lines))

    print_results(data)


if __name__ == "__main__":
    import os
    from backend.parser import OverhealParser

    # make sure directories exist
    os.makedirs("figs/crit", exist_ok=True)

    parser = OverhealParser(
        description=
        "Analyses log and estimates healing of crits. Counts up the healing and overhealing done by each "
        "found crit. Prints out extra healing done by each crit on average and the equivalent +heal worth "
        "for each spell, and for the average spell profile over the whole combat log.",
        need_player=True,
        accept_spell_id=True,
    )

    args = parser.parse_args()

    main(**vars(args))
Exemplo n.º 3
0
                      sp_shift=sp_shift,
                      sp_extrap=sp_extrap)


if __name__ == "__main__":
    import argparse
    from backend.parser import OverhealParser

    parser = OverhealParser(
        formatter_class=argparse.RawDescriptionHelpFormatter,
        description="""\
Analyses logs and count up number of overheals. Returns a list of spells and the number of recorded heals, as well as overheal frequencies.

Header explaination:
    #H: Number of heals recorded.
    No OH: Percentage of heals that had no overheal (underheals).
    Any OH: Percantage of heals that had 1 or more overheal.
    Half OH: Percentage of heals that overhealed for at least 50% of the heal value.
    Full OH: Percentage of heals that overhealed for at least 90% of the heal value.
    % OHd: Percentage of heal values that were overheal, same overheal percentage shown in WarcraftLogs. """,
        need_player=True,
        accept_spell_id=True,
        accept_spell_power=True)

    parser.add_argument("--ignore_crit",
                        action="store_true",
                        help="Remove critical heals from analysis")

    args = parser.parse_args()

    main(**vars(args))
Exemplo n.º 4
0
            nn_crits += n_crits
            estimates.append(est_plus_heal)

        print(f"  Spell crit: {nn_crits / nn_heals:.1%}")

        renew_inc = spell_inc + 0.05 * improved_renew
        for spell_id, lines in periodic_lines.items():
            process_spell(spell_id, lines, heal_increase=renew_inc)


if __name__ == "__main__":
    from backend.parser import OverhealParser

    parser = OverhealParser(
        description="Analyses logs and and estimates spell power and crit chance.",
        need_player=True,
        accept_spell_id=True,
    )

    parser.add_argument(
        "--sh", type=int, help="Levels of Spirital Healing to guess", default=0
    )
    parser.add_argument(
        "--ir", type=int, help="Levels of Improved Renew to guess", default=0
    )

    args = parser.parse_args()

    estimate_spell_power(
        **vars(args)
    )
Exemplo n.º 5
0
            casts_dict[s] = []

        casts_dict[s].append(c)

    plot_casts(casts_dict,
               encounter,
               start=encounter_start,
               end=encounter_end,
               **kwargs)
    analyse_activity(casts_dict, encounter, encounter_start, encounter_end)


if __name__ == "__main__":
    parser = OverhealParser(
        description=
        "Analyses a boss encounter, or whole combat log, and characterise the amount of heal sniping going "
        "on. Only accepts WoWCombatLog.txt currently.",
        need_player=False,
    )

    parser.add_argument(
        "-e",
        "--encounter",
        type=int,
        help=
        "Encounter to look at, or 0 for whole encounter. Skips selector dialogue.",
    )
    parser.add_argument(
        "--mark",
        help=
        "Time-stamp to mark with a line, good for tracking important events, such as the death of a tank.",
    )
Exemplo n.º 6
0
        elif spell_id in periodic_lines:
            lines = periodic_lines[spell_id]
        else:
            print(f"Could not find casts of spell [{spell_id}]")
            exit(1)

        process_spell(player, spell_id, lines, **kwargs)
    else:
        for spell_id, lines in heal_lines.items():
            process_spell(player, spell_id, lines, show=False, **kwargs)
        for spell_id, lines in periodic_lines.items():
            process_spell(player, spell_id, lines, show=False, **kwargs)


if __name__ == "__main__":
    import os

    # make sure directories exist
    os.makedirs("figs/cdf", exist_ok=True)

    parser = OverhealParser(
        description="Analyses logs and gives overheal cdf.",
        need_player=True,
        accept_spell_id=True,
        accept_spell_power=True
    )

    args = parser.parse_args()

    overheal_cdf(**vars(args))