PHP код:
// Consecration ============================================================
struct consecration_tick_t : public paladin_spell_t
{
consecration_tick_t( paladin_t* p ) :
paladin_spell_t( "consecration", p )
{
static rank_t ranks[] =
{
{ 80, 8, 113, 113, 0, 0 },
{ 75, 7, 87, 87, 0, 0 },
{ 70, 6, 72, 72, 0, 0 },
{ 60, 5, 56, 56, 0, 0 },
{ 0, 0, 0, 0, 0, 0 }
};
init_rank( ranks, 48819 );
aoe = true;
dual = true;
background = true;
may_crit = false;
may_miss = true;
direct_power_mod = 1.0;
base_spell_power_multiplier = 0.04;
base_attack_power_multiplier = 0.04;
if ( p -> librams.resurgence ) base_spell_power += 141;
}
virtual void execute()
{
paladin_spell_t::execute();
if ( result_is_hit() )
{
tick_dmg = direct_dmg;
}
update_stats( DMG_OVER_TIME );
}
};
struct consecration_t : public paladin_spell_t
{
action_t* consecration_tick;
consecration_t( paladin_t* p, const std::string& options_str ) :
paladin_spell_t( "consecration", p )
{
option_t options[] =
{
{ NULL, OPT_UNKNOWN, NULL }
};
parse_options( options, options_str );
may_miss = false;
base_cost = p -> resource_base[ RESOURCE_MANA ] * 0.22;
base_cost *= 1.0 - ( p -> talents.benediction * 0.02 +
p -> talents.purifying_power * 0.05 );
num_ticks = 8;
base_tick_time = 1;
cooldown -> duration = 8;
if ( p -> glyphs.consecration )
{
num_ticks += 2;
cooldown -> duration += 2;
}
consecration_tick = new consecration_tick_t( p );
id = 48819;
}
// Consecration ticks are modeled as "direct" damage, requiring a dual-spell setup.
virtual void tick()
{
if ( sim -> debug ) log_t::output( sim, "%s ticks (%d of %d)", name(), current_tick, num_ticks );
consecration_tick -> execute();
update_time( DMG_OVER_TIME );
}
};
(8+2) * (113 + 0.04 * 0 + 0.04 * 3524) = 2539,6