changing the armor values to force suicide even at 100/100 when it explodes in hand or in foot... so the max armor absorption cannot be greater than 36%, otherwise we would need to change the nade damage, and it would affect the game/weapon balance (lets think about this only after the next release)

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5722 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Rafael Barreto
2010-10-07 00:48:44 +00:00
parent 0fa5957c13
commit cfa3d90992
+5 -17
View File
@@ -339,23 +339,11 @@ public:
return damage;
}
/* 4-level armor - continous approach: 16%, 33%, 37%, 41% */
int armoursection = 0;
int ad = damage;
if(armour > 25) armoursection = 1;
if(armour > 50) armoursection = 2;
if(armour > 75) armoursection = 3;
switch(armoursection)
{
case 0: ad = (int) (16.0f/25.0f * armour); break; // 16
case 1: ad = (int) (17.0f/25.0f * armour) - 1; break; // 33
case 2: ad = (int) (4.0f/25.0f * armour) + 25; break; // 37
case 3: ad = (int) (4.0f/25.0f * armour) + 25; break; // 41
default: break;
}
int rd = ad * damage/100.0f;
armour -= rd;
damage -= rd;
/* 4-level armor - semi-continous approach: 16%, 33%, 34.5%, 36% */
int ad = armour > 25 ? damage * ( 3000 + 6 * armour ) / 10000 : ( damage * 16 ) / 100;
if(ad>armour) ad = armour;
armour -= ad;
damage -= ad;
health -= damage;
return damage;
}