Extracted base health, base attack,and growth rates from being tied to the player directly. Values update on class changes.
This commit is contained in:
@@ -1486,6 +1486,10 @@ void Crawler::ChangePlayerClass(Class cl){
|
||||
player.reset(new Witch(player.get()));
|
||||
}break;
|
||||
}
|
||||
player->hp=player->maxhp=DATA.GetProperty(player->GetClassName()+".BaseHealth").GetInt();
|
||||
player->atk=DATA.GetProperty(player->GetClassName()+".BaseAtk").GetInt();
|
||||
player->hpGrowthRate=DATA.GetProperty(player->GetClassName()+".HealthGrowthRate").GetReal();
|
||||
player->atkGrowthRate=DATA.GetProperty(player->GetClassName()+".AtkGrowthRate").GetReal();
|
||||
sig::Animation::SetupPlayerAnimations();
|
||||
GetPlayer()->UpdateIdleAnimation(DOWN);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user