Skip to content

Commit

Permalink
Merge pull request odota#1009 from coreymaher/issue-801
Browse files Browse the repository at this point in the history
odota#801 - Added SF shadowraze2 and shadowraze3 abilities
  • Loading branch information
albertcui committed May 2, 2016
2 parents 55763df + f12ed5b commit e6ae5fd
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,24 @@ countries.forEach(function(c){
constants.items = items;
//abilities, already keyed by name
var abilities = constants.abilities.abilitydata;

// Add missing Shadow Fiend raze abilities by copying the shortest raze
if (!abilities.nevermore_shadowraze2) {
abilities.nevermore_shadowraze2 = Object.assign({}, abilities.nevermore_shadowraze1);
// Find and replace short raze range with medium raze range
abilities.nevermore_shadowraze2.attrib = abilities.nevermore_shadowraze2.attrib.replace(/\d{3}/, 450);
}
if (!abilities.nevermore_shadowraze3) {
abilities.nevermore_shadowraze3 = Object.assign({}, abilities.nevermore_shadowraze1);
// Find and replace short raze range with long raze range
abilities.nevermore_shadowraze3.attrib = abilities.nevermore_shadowraze3.attrib.replace(/\d{3}/, 700);
}

for (var key2 in abilities)
{
abilities[key2].img = "/apps/dota2/images/abilities/" + key2 + "_md.png";
abilities[key2].cmb = abilities[key2].cmb.replace("http://cdn.dota2.com", "");
}
abilities.nevermore_shadowraze2 = abilities.nevermore_shadowraze1;
abilities.nevermore_shadowraze3 = abilities.nevermore_shadowraze1;
abilities.attribute_bonus = {
dname: "Attribute Bonus",
img: '/public/images/Stats.png',
Expand Down

0 comments on commit e6ae5fd

Please sign in to comment.