evtc/lib.rs
1//! Bindings for the ArcDPS EVTC API.
2//!
3//! Includes both types for Arc's realtime API used by plugins as well as Arc's log API consumed by parsers.
4//!
5//! ```no_run
6//! use evtc::Event;
7//!
8//! fn total_damage_dealt(source: u64, target: u64, events: &[Event]) -> i32 {
9//! events
10//! .iter()
11//! .filter_map(|event| event.try_to_strike())
12//! .filter(|strike_event| {
13//! strike_event.strike.dealt_damage()
14//! && strike_event.source.id == source
15//! && strike_event.target.id == target
16//! })
17//! .map(|strike_event| strike_event.total_damage - strike_event.shield_damage as i32)
18//! .sum()
19//! }
20//! ```
21
22pub mod agent;
23pub mod buff;
24pub mod content;
25pub mod effect;
26pub mod event;
27pub mod extract;
28mod game;
29mod log;
30pub mod marker;
31pub mod missile;
32pub mod player;
33pub mod position;
34mod ruleset;
35pub mod skill;
36mod state_change;
37pub mod strike;
38pub mod weapon;
39
40pub use crate::{
41 agent::{Affinity, AgentId, AgentKind},
42 buff::{Attribute, BuffCategory, BuffCycle, BuffRemove},
43 event::{Event, EventCategory, EventKind},
44 extract::TryExtract,
45 game::*,
46 player::{Profession, Specialization},
47 position::Position,
48 ruleset::*,
49 skill::{Activation, CustomSkill},
50 state_change::*,
51 strike::Strike,
52};