Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/engine/class_modules/sc_mage.cpp b/engine/class_modules/sc_mage.cpp
- index 25ce93d64..eccfab486 100755
- --- a/engine/class_modules/sc_mage.cpp
- +++ b/engine/class_modules/sc_mage.cpp
- @@ -902,6 +902,27 @@ struct mage_spell_base_t : public spell_t
- {
- sim -> errorf( "Player %s firestarer expression: unknown operation '%s'", player -> name(), splits[ 1 ].c_str() );
- }
- + } else if ( splits.size() == 4 && util::str_compare_ci( splits[ 0 ], "action" ) && util::str_compare_ci( splits[ 1 ], "arcane_blast" ) ) {
- + enum arcane_blast_expr_type_e { BASE_COST, CHARGED_COST };
- +
- + struct arcane_blast_charged_cost_expr_t : public expr_t {
- + mage_t& mage;
- + action_t* a;
- + int arcane_charges;
- +
- + arcane_blast_charged_cost_expr_t( mage_t& m, const std::string& name, action_t* a, int arcane_charges = 0 ) :
- + expr_t( name ), mage( m ), a( a ), arcane_charges( arcane_charges ) { }
- +
- + double evaluate() override {
- + // unknown type name 'arcane_blast_t'
- + return debug_cast<const arcane_blast_t*>( a ) -> cost();
- + }
- + };
- +
- + if ( util::str_compare_ci( splits[ 2 ], "charged_cost" ) )
- + {
- + return new arcane_blast_charged_cost_expr_t( *mage, expr_str, this, atof( splits[ 3 ].c_str() ) );
- + }
- }
- return spell_t::create_expression( expr_str );
- @@ -2347,13 +2368,21 @@ struct arcane_blast_t : public arcane_mage_spell_t
- }
- }
- - virtual double cost() const override
- - {
- + double charged_cost( int arcane_charges ) const {
- double c = arcane_mage_spell_t::cost();
- - c *= 1.0 + p() -> buffs.arcane_charge -> check() *
- - p() -> spec.arcane_charge -> effectN( 5 ).percent();
- + c *= 1.0 + arcane_charges * p() -> spec.arcane_charge -> effectN( 5 ).percent();
- +
- + return c;
- + }
- + double charged_cost() const {
- + return charged_cost( p() -> buffs.arcane_charge -> check() );
- + }
- +
- + virtual double cost() const override
- + {
- + double c = charged_cost();
- c *= 1.0 + p() -> buffs.rule_of_threes -> check_value();
Add Comment
Please, Sign In to add comment