aboutsummaryrefslogtreecommitdiff
path: root/src/gamedata.rs
AgeCommit message (Collapse)Author
2020-10-04add Encounter::from_header_idDaniel Schadt
It makes sense to expose this logic as a function, as other programs like raidgrep might want to use the same logic when dealing with partial evtc files.
2020-09-28optionally implement serde::{Des,S}erializeDaniel Schadt
2020-09-28implement Display & FromStr for BossDaniel Schadt
2020-09-23more documentation for BossDaniel Schadt
2020-09-23add Encounter::bosses and Boss::encounterDaniel Schadt
Those functions can be used to simplify the special case handling that was done in lib.rs on encounters that have multiple bosses.
2020-09-23re-introduce BossDaniel Schadt
This is now the enum that contains the IDs of the single bosses, like Nikare and Kenut. This means we can do away with the NIKARE_ID and such. The enum is not publicly re-exported, as we re-export Encounter (which is more of a replacement of the old Boss). Special casing still remains (mostly in lib.rs), but we should be able to do away with this now with a more general Encounter::bosses and Boss::encounter methods.
2020-09-23rename Boss to EncounterDaniel Schadt
This is the first step in differentiating between Encounters and Bosses. It sounds a bit weird at first, but there are some events without any bosses (like the River of Souls), and some events which have multiple bosses (like Twin Largos or the kodan strike mission). If we want to support this better, without relying on extra IDs, special casing and constants (like NIKARE_ID), we should differentiate between Encounters and Bosses.
2020-09-23add Sunqua Peak/Ai ID and analyzer logicDaniel Schadt
2020-09-15fix logs with Claw of the Fallen IDDaniel Schadt
2020-07-23implement Analyzer::outcome for wing 6Daniel Schadt
2020-06-28start implementing analyzersDaniel Schadt
It turns out that the different encounters do require quite some encounter-specific logic, not only to determine whether the CM was activated, but also to determine whether the fight was successful, the duration of the fight, later the phases, ... Wrapping all of this in pre-defined "triggers" (like CmTrigger) feels like it will be a bit unfitting, so with this patch we have introduced the evtclib::Analyzer, which can be used to analyze the fights. Currently, the whole CM detection logic has been moved to this new interface, and soon we also want the success-detection logic in there. The tests pass and the interface of Log::is_cm is unchanged.
2020-05-11add Display implementation for gamedataDaniel Schadt
This is something that a lot of applications will probably have to implement anyway, so we might as well provide it and do it within Rusts standard traits. This does not provide localization, but it uses the English names, which should be good enough for most cases. Since we provide FromStr for those classes as well, it makes double-sense to add Display. However, not all cases are currently reversible ("Cairn the Indomitable" vs "Cairn"), although the status quo seems fine for now (most people type Cairn, but when outputting we can use the full name).
2020-05-10add Cairn CM detectionDaniel Schadt
The given buff is the Countdown effect that each player has: https://wiki.guildwars2.com/index.php?title=Countdown The logic is from GW2-Elite-Insights-Parser (Cairn.cs, IsCM), but we count this as a buff instead of a skill.
2020-05-08add first support for determining CMsDaniel Schadt
This still needs a bit of work, as some of them are untested (Conjured Amalgamate, Fractal CMs).
2020-05-04implement FromStr for Profession and EliteSpecDaniel Schadt
For the same reason that Boss implements FromStr, we might want users to be able to specify professions or elite specializations in textual form.
2020-04-29formatting fixesDaniel Schadt
2020-04-28add Profession and EliteSpec enumDaniel Schadt
In the high-level "Player" struct, dealing with the low-level numbers seems a bit off, especially because it means that applications have to keep a table of id-to-profession mappings anyway. We're already including a Boss enum for the same reasons, so we might as well include Profession and EliteSpec data - which is also not changing as frequently as Boss.
2020-04-27derive Error for ParseBossErrorDaniel Schadt
The implementation was short, but since we're using thiserror anyway, we might as well be consistent and derive the implementation.
2020-04-27tests and fixes for Boss::from_strDaniel Schadt
2020-04-27remove statistics submoduleDaniel Schadt
The way the trackers worked was rather... "adventurous", and while there were some good ideas and it mostly worked, the implementation and interface could do better. Additionally, it was incomplete, for example there were a lot of mechanics just missing. While I'm not against having this functionality provided by evtclib, I think it would be more worthwile with a better designed implementation & API, so this "proof of concept" implementation is gone until there is a better way of doing things. gamedata is being kept, as the boss identifiers are useful and applications shouldn't have to deal with keeping this low-level list themselves.