diff --git a/src/formula/callable_objects.cpp b/src/formula/callable_objects.cpp index f0adf0ba1e86e..3256ee275e644 100644 --- a/src/formula/callable_objects.cpp +++ b/src/formula/callable_objects.cpp @@ -87,8 +87,10 @@ variant attack_type_callable::get_value(const std::string& key) const return variant(att_->id()); } else if(key == "description") { return variant(att_->name()); - } else if(key == "type") { + } else if(key == "original_type") { return variant(att_->type()); + } else if(key == "type") { + return variant(att_->effective_damage_type().first); } else if(key == "icon") { return variant(att_->icon()); } else if(key == "range") { @@ -133,6 +135,7 @@ void attack_type_callable::get_inputs(formula_input_vector& inputs) const { add_input(inputs, "name"); add_input(inputs, "type"); + add_input(inputs, "original_type"); add_input(inputs, "description"); add_input(inputs, "icon"); add_input(inputs, "range"); @@ -173,6 +176,10 @@ int attack_type_callable::do_compare(const formula_callable* callable) const return att_->type().compare(att_callable->att_->type()); } + if(att_->effective_damage_type().first != att_callable->att_->effective_damage_type().first) { + return att_->effective_damage_type().first.compare(att_callable->att_->effective_damage_type().first); + } + if(att_->range() != att_callable->att_->range()) { return att_->range().compare(att_callable->att_->range()); }