PHP код:
// Eviscerate ================================================================
struct eviscerate_t : public rogue_attack_t
{
struct double_pair { double min, max; };
double_pair* combo_point_dmg;
eviscerate_t( player_t* player, const std::string& options_str ) :
rogue_attack_t( "eviscerate", player, SCHOOL_PHYSICAL, TREE_ASSASSINATION )
{
rogue_t* p = player -> cast_rogue();
option_t options[] =
{
{ NULL, OPT_UNKNOWN, NULL }
};
parse_options( options, options_str );
weapon = &( p -> main_hand_weapon );
weapon_multiplier = 0;
may_crit = true;
requires_combo_points = true;
base_cost = 35;
base_multiplier *= 1.0 + ( p -> talents.aggression * 0.03 +
p -> talents.find_weakness * 0.02 +
p -> talents.slaughter_from_the_shadows * 0.01 +
util_t::talent_rank( p -> talents.improved_eviscerate, 3, 0.07, 0.14, 0.20 ) );
if ( p -> glyphs.eviscerate ) base_crit += 0.10;
if ( p -> talents.surprise_attacks ) may_dodge = false;
static double_pair dmg_79[] = { { 497, 751 }, { 867, 1121 }, { 1237, 1491 }, { 1607, 1861 }, { 1977, 2231 } };
static double_pair dmg_73[] = { { 405, 613 }, { 706, 914 }, { 1007, 1215 }, { 1308, 1516 }, { 1609, 1817 } };
static double_pair dmg_64[] = { { 245, 365 }, { 430, 550 }, { 615, 735 }, { 800, 920 }, { 985, 1105 } };
static double_pair dmg_60[] = { { 224, 332 }, { 394, 502 }, { 564, 762 }, { 734, 842 }, { 904, 1012 } };
combo_point_dmg = ( p -> level >= 79 ? dmg_79 :
p -> level >= 73 ? dmg_73 :
p -> level >= 64 ? dmg_64 :
dmg_60 );
id = 48668;
}
virtual void execute()
{
rogue_t* p = player -> cast_rogue();
base_dd_min = combo_point_dmg[ p -> buffs_combo_points -> current_stack - 1 ].min;
base_dd_max = combo_point_dmg[ p -> buffs_combo_points -> current_stack - 1 ].max;
direct_power_mod = 0.07 * p -> buffs_combo_points -> current_stack;
rogue_attack_t::execute();
if ( result_is_hit() )
{
trigger_cut_to_the_chase( this );
}
}
virtual void player_buff()
{
rogue_attack_t::player_buff();
trigger_dirty_deeds( this );
}};