|
|
|
@ -87,6 +87,7 @@ Player::Player(Player*player) |
|
|
|
|
void Player::Initialize(){ |
|
|
|
|
Player::GROUND_SLAM_SPIN_TIME="Warrior.Ability 2.SpinTime"_F; |
|
|
|
|
SetBaseStat("Health",hp); |
|
|
|
|
SetBaseStat("Mana",mana); |
|
|
|
|
SetBaseStat("Defense",0); |
|
|
|
|
SetBaseStat("Attack","Warrior.BaseAtk"_I); |
|
|
|
|
SetBaseStat("Move Spd %",100); |
|
|
|
@ -191,7 +192,7 @@ const int Player::GetMana()const{ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const int Player::GetMaxMana()const{ |
|
|
|
|
return maxmana; |
|
|
|
|
return GetStat("Mana"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const int Player::GetAttack(){ |
|
|
|
@ -850,14 +851,14 @@ bool Player::Heal(int damage){ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void Player::RestoreMana(int amt,bool suppressDamageNumber){ |
|
|
|
|
mana=std::clamp(mana+amt,0,maxmana); |
|
|
|
|
mana=std::clamp(mana+amt,0,GetMaxMana()); |
|
|
|
|
if(amt>0&&!suppressDamageNumber){ |
|
|
|
|
DAMAGENUMBER_LIST.push_back(std::make_shared<DamageNumber>(GetPos(),amt,true,MANA_GAIN)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void Player::ConsumeMana(int amt){ |
|
|
|
|
mana=std::clamp(mana-amt,0,maxmana); |
|
|
|
|
mana=std::clamp(mana-amt,0,GetMaxMana()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void Player::SetSizeMult(float size){ |
|
|
|
@ -1147,4 +1148,8 @@ void Player::AddAccumulatedXP(const uint32_t xpGain){ |
|
|
|
|
|
|
|
|
|
const uint32_t Player::GetAccumulatedXP()const{ |
|
|
|
|
return accumulatedXP; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const float Player::GetAttackRecoveryRateReduction()const{ |
|
|
|
|
return GetStat("Attack Spd"); |
|
|
|
|
} |