Skip to content

Commit

Permalink
Use modified atrributes to calculate final skills
Browse files Browse the repository at this point in the history
Calculating the final "Object knowledge" and "Projectile" skill values
used raw attribute values while all other skills used the modified
attributes.

This commit changes it so that all skills use the modified attribute
values.

Fixes bug #302
  • Loading branch information
dscharrer committed Jun 27, 2012
1 parent f90f35b commit 93c67fa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/game/Player.cpp
Expand Up @@ -664,10 +664,11 @@ float ARX_PLAYER_Get_Skill_Object_Knowledge(long type)
{
if (type == 0)
return (float)player.Skill_Object_Knowledge
+ ((player.Attribute_Mind * 3.f + player.Attribute_Dexterity + player.Attribute_Strength) * ( 1.0f / 2 ));
+ ((player.Attribute_Mind * 3.f + player.Attribute_Dexterity + player.Attribute_Strength) * 0.5f);

return (float)player.Skill_Object_Knowledge + player.Mod_Skill_Object_Knowledge
+ ((player.Attribute_Mind * 3.f + player.Attribute_Dexterity + player.Attribute_Strength) * ( 1.0f / 2 ));
+ ((player.Full_Attribute_Mind * 3.f + player.Full_Attribute_Dexterity
+ player.Full_Attribute_Strength) * 0.5f);
}

if (type == 0)
Expand Down Expand Up @@ -717,7 +718,7 @@ float ARX_PLAYER_Get_Skill_Projectile(long type)
+ player.Attribute_Dexterity * 2.f + player.Attribute_Strength;

return (float)player.Skill_Projectile + player.Mod_Skill_Projectile
+ player.Attribute_Dexterity * 2.f + player.Attribute_Strength;
+ player.Full_Attribute_Dexterity * 2.f + player.Full_Attribute_Strength;
}

if (type == 0)
Expand Down

0 comments on commit 93c67fa

Please sign in to comment.