HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Armor Damage Reduction Multiplier

09-18-2007, 12:25 AM#1
Castlemaster
I'm trying to modify the armor system a bit. Is there a spreadsheet somewhere on how modifying the 'Armor Damage Reduction Multiplier' under gameplay constants will affect the damage reduction?

Second question doing so will alter Daelin's Armor detection system. It would mess up this part of it
Collapse JASS:
//DETECT UNIT'S ARMOR
function GetUnitArmor takes unit whichUnit returns real
    local real life = GetWidgetLife(whichUnit)
    local real reduction
    local integer ID
    local boolean b
    if (whichUnit!=null and life>=0.405) then
    set ID = Armor_ID()
    set b = IsUnitInvulnerable(whichUnit)
    call UnitAddAbility(whichUnit, 'allz')
    call UnitAddAbility(whichUnit, ID)
    if b==true then
      call SetUnitInvulnerable(whichUnit, false)
    endif
    call ADS_UnitDamageTarget (whichUnit, whichUnit, 16.00, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_NORMAL)
    if b==true then
       call SetUnitInvulnerable(whichUnit, true)
    endif
    set reduction = (16.00-(life-GetWidgetLife(whichUnit)))/16.00
    call UnitRemoveAbility(whichUnit, 'allz')
    call UnitRemoveAbility(whichUnit, ID)
    call SetWidgetLife(whichUnit, life)
// This is the line that would get messed up
    return (50*reduction/(3.00-(3.00*reduction)))-30.00
    else
    return 0.00
    endif
endfunction
I'm trying to think how altering that constant would affect the equation and what I would have to do to correct it.

For example, it is 0.06 by default. What happens if I put 0.03?

Thanks ahead of time.
09-18-2007, 01:45 AM#2
TaintedReality
Quote:
Originally Posted by www.battle.net
Damage Reduction or Increases for Armor
For positive Armor, damage reduction =((armor)*0.06)/(1+0.06*(armor))
For negative Armor, it is damage increase = 2-0.94^(-armor) since you take more damage for negative armor scores.

Reducing it to 0.03 would cause armor to have less effect. Raising it would cause it to have a greater effect. As you can see in the positive Armor formula 0.06 is used 2 times, and in the negative armor formula 0.94 is used once (1-0.06). Those are the two values you'd be changing. Oh and btw: SEARCH FIRST =P.
09-18-2007, 01:56 AM#3
Castlemaster
I always search first, but sometimes getting the specific thing you want to know is hard to get.
I'm trying to figure out the math, so if I reduced the constant to 0.03, would the new equation be:
Collapse JASS:
    return (100*reduction/(6.00-(6.00*reduction)))-60.00
Thanks ahead of time
09-18-2007, 01:58 AM#4
TaintedReality
That one was kind of a hard one to find, so it's not really a big deal =p. The war3 "strategy guide" on www.battle.net does sometimes have useful information though, especially stuff like that.