mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-29 07:37:45 +00:00
style fix, not sure how that happened
This commit is contained in:
parent
9803a59673
commit
ce3473ae6d
2 changed files with 27 additions and 7 deletions
|
@ -191,7 +191,7 @@ uint16_t CalcStats::calculateMpCost( const Sapphire::Entity::Chara& chara, uint1
|
||||||
// each level range is 1-10, 11-20, 21-30, ... therefore:
|
// each level range is 1-10, 11-20, 21-30, ... therefore:
|
||||||
// level 50 should be in the 4th group, not the 5t
|
// level 50 should be in the 4th group, not the 5t
|
||||||
// dividing by 10 on the border will break this unless we subtract 1
|
// dividing by 10 on the border will break this unless we subtract 1
|
||||||
auto levelGroup = std::max< decltype( level ) >( level - 1, 1 ) / 10;
|
auto levelGroup = std::max< uint8_t >( level - 1, 1 ) / 10;
|
||||||
|
|
||||||
float cost = baseCost;
|
float cost = baseCost;
|
||||||
|
|
||||||
|
@ -207,7 +207,7 @@ uint16_t CalcStats::calculateMpCost( const Sapphire::Entity::Chara& chara, uint1
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// level 11-20
|
// level 11-20
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
// r^2 = 1
|
// r^2 = 1
|
||||||
|
@ -215,7 +215,7 @@ uint16_t CalcStats::calculateMpCost( const Sapphire::Entity::Chara& chara, uint1
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// level 21-30
|
// level 21-30
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
// r^2 = 1
|
// r^2 = 1
|
||||||
|
@ -223,7 +223,7 @@ uint16_t CalcStats::calculateMpCost( const Sapphire::Entity::Chara& chara, uint1
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// level 31-40
|
// level 31-40
|
||||||
case 3:
|
case 3:
|
||||||
{
|
{
|
||||||
// r^2 = 1
|
// r^2 = 1
|
||||||
|
@ -231,7 +231,7 @@ uint16_t CalcStats::calculateMpCost( const Sapphire::Entity::Chara& chara, uint1
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// level 41-50
|
// level 41-50
|
||||||
case 4:
|
case 4:
|
||||||
{
|
{
|
||||||
// r^2 = 1
|
// r^2 = 1
|
||||||
|
@ -239,7 +239,7 @@ uint16_t CalcStats::calculateMpCost( const Sapphire::Entity::Chara& chara, uint1
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// level 51-60
|
// level 51-60
|
||||||
case 5:
|
case 5:
|
||||||
{
|
{
|
||||||
// r^2 = 1
|
// r^2 = 1
|
||||||
|
@ -247,7 +247,7 @@ uint16_t CalcStats::calculateMpCost( const Sapphire::Entity::Chara& chara, uint1
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// level 61-70
|
// level 61-70
|
||||||
case 6:
|
case 6:
|
||||||
{
|
{
|
||||||
// r^2 = 0.9998
|
// r^2 = 0.9998
|
||||||
|
|
|
@ -16,10 +16,30 @@ namespace Sapphire::Math
|
||||||
|
|
||||||
static uint32_t calculateMaxHp( Sapphire::Entity::PlayerPtr pPlayer, FrameworkPtr pFw );
|
static uint32_t calculateMaxHp( Sapphire::Entity::PlayerPtr pPlayer, FrameworkPtr pFw );
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief Calculates the MP cost of a spell given its base cost
|
||||||
|
* @param chara The Chara that is casting the action
|
||||||
|
* @param baseCost The action cost
|
||||||
|
* @return The total MP to be consumed by a successful cast
|
||||||
|
*/
|
||||||
static uint16_t calculateMpCost( const Sapphire::Entity::Chara& chara, uint16_t baseCost );
|
static uint16_t calculateMpCost( const Sapphire::Entity::Chara& chara, uint16_t baseCost );
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief Calculates the probability of a block happening
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
static float pBlk( const Sapphire::Entity::Chara& );
|
static float pBlk( const Sapphire::Entity::Chara& );
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief Calculates the probability of a direct hit happening
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
static float pDhr( const Sapphire::Entity::Chara& );
|
static float pDhr( const Sapphire::Entity::Chara& );
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief Calculates the probability of a critical hit happening
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
static float pChr( const Sapphire::Entity::Chara& );
|
static float pChr( const Sapphire::Entity::Chara& );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Add table
Reference in a new issue