SimulationCraft
SimulationCraft is a tool to explore combat mechanics in the popular MMO RPG World of Warcraft (tm).
 All Classes Namespaces Functions Variables Typedefs Enumerations Friends Groups Pages
anonymous_namespace{sc_priest.cpp}::final::final Struct Reference

Public Member Functions

 insanity_state_t (priest_t &a)
void set_last_drained ()
 Start the insanity drain tracking.
void begin_tracking ()
 Start (or re-start) tracking of the insanity drain plus end event.
timespan_t time_to_end () const
void reset ()
double insanity_drain_per_second () const
 Compute insanity drain per second with current state of the actor.
void gain (double value, gain_t *gain_obj, action_t *source_action=nullptr)
 Gain some insanity.
void drain ()
void adjust_end_event ()

Public Attributes

event_tend
timespan_t last_drained
priest_t & actor
const double base_drain_per_sec
const double stack_drain_multiplier

Detailed Description

Insanity tracking

Handles the resource gaining from abilities, and insanity draining and manages an event that forcibly punts the actor out of Voidform the exact moment insanity hitszero (millisecond resolution).

Member Function Documentation

void anonymous_namespace{sc_priest.cpp}::final::final::adjust_end_event ( )
inline

Predict (with current state) when insanity is going to be fully depleted, and adjust (or create) an event for it. Called in conjunction with insanity_state_t::drain(), after the insanity drain occurs (and potentially after a relevant state change such as insanity drain stack buff increase occurs).

void anonymous_namespace{sc_priest.cpp}::final::final::drain ( )
inline

Triggers the insanity drain, and is called in places that changes the insanity state of the actor in a relevant way. These are:

  • Right before the actor decides to do something (scans APL for an ability to use)
  • Right before insanity drain stack increases (every second)