Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fixed a bug where new skill notifications were not being printed to the ... #73

Merged
merged 3 commits into from

2 participants

@rootslinux

...battle finish menu

This is a change I had made previously which we missed when fixing my balancing and growth logic pull request from earlier.

I also added some small stat changes to enemies. I consider things fairly well balanced for levels 1-3 now. We may want to do further balancing tweaks to the first wolf boss though.

rootslinux added some commits
@rootslinux rootslinux Fixed a bug where new skill notifications were not being printed to t…
…he battle finish menu
52f990f
@rootslinux rootslinux Reduced strength of slime and spider enemies because it was too easy …
…for them to kill a lvl 1 character; Reduced the strength and defense of the first wolf boss because he was incredibly difficult
5170059
@Bertram25

You remove the sound played at level up but seemed not to readd it elsewhere. Can you fix that point?

Oops, didn't see that. I'll fix it in just a minute.

@Bertram25
Owner

Please readd the sound played at level up and I'll merge.

@rootslinux

Done.

@Bertram25 Bertram25 merged commit 5f8ef82 into Bertram25:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 8, 2012
  1. @rootslinux
  2. @rootslinux

    Reduced strength of slime and spider enemies because it was too easy …

    rootslinux authored
    …for them to kill a lvl 1 character; Reduced the strength and defense of the first wolf boss because he was incredibly difficult
Commits on Dec 10, 2012
  1. @rootslinux

    Adding back the level up sound being played that was accidentally rem…

    rootslinux authored
    …oved in the previous commit
This page is out of date. Refresh to see the latest.
View
12 dat/actors/enemies.lua
@@ -54,10 +54,10 @@ enemies[1] = {
base_stats = {
hit_points = 55,
skill_points = 0,
- strength = 15,
+ strength = 11,
vigor = 0,
- fortitude = 4, -- base defense
- protection = 1, -- armor defense
+ fortitude = 4,
+ protection = 1,
agility = 20,
evade = 2.0,
experience_points = 8,
@@ -101,7 +101,7 @@ enemies[2] = {
base_stats = {
hit_points = 65,
skill_points = 0,
- strength = 18,
+ strength = 14,
vigor = 0,
fortitude = 5,
protection = 4,
@@ -152,9 +152,9 @@ enemies[3] = {
hit_points = 160,
skill_points = 10,
experience_points = 120,
- strength = 27,
+ strength = 20,
vigor = 14,
- fortitude = 10,
+ fortitude = 6,
protection = 6,
agility = 40,
evade = 4.0,
View
6 src/common/global/global_actors.cpp
@@ -1019,10 +1019,10 @@ void GlobalCharacter::AddNewSkillLearned(uint32 skill_id)
std::map<uint32, GlobalSkill *>::iterator skill = _skills.find(skill_id);
if(skill == _skills.end()) {
IF_PRINT_WARNING(GLOBAL_DEBUG) << "failed because the new skill was not added successfully: " << skill_id << std::endl;
+ return;
}
- else {
- _new_skills_learned.push_back(skill->second);
- }
+
+ _new_skills_learned.push_back(skill->second);
}
View
37 src/modes/battle/battle_finish.cpp
@@ -88,9 +88,29 @@ CharacterGrowth::CharacterGrowth(GlobalCharacter* ch) :
void CharacterGrowth::UpdateGrowthData() {
- do {
- if (_character->ReachedNewExperienceLevel() == true) {
- ++_experience_levels_gained;
+ bool remaining_growth = true;
+ bool level_gained = false;
+
+ // The logic required to update this data can be a bit tricky. We have to retrieve all of the stat growth
+ // prior to calling AcknowledgeGrowth() because that call will reset the stat data. However, the list of
+ // new skills learned is not available until after calling AcknowledgeGrowth to process the new level gained
+ // (if any). And of course multiple AcknowledgeGrowth() calls may have to be made. The structure of the loop
+ // below addresses all of these cases.
+ while (remaining_growth == true) {
+ hit_points += _character->GetHitPointsGrowth();
+ skill_points += _character->GetSkillPointsGrowth();
+ strength += _character->GetStrengthGrowth();
+ vigor += _character->GetVigorGrowth();
+ fortitude += _character->GetFortitudeGrowth();
+ protection += _character->GetProtectionGrowth();
+ agility += _character->GetAgilityGrowth();
+ evade += _character->GetEvadeGrowth();
+
+ level_gained = _character->ReachedNewExperienceLevel();
+ remaining_growth = _character->AcknowledgeGrowth();
+
+ if (level_gained == true) {
+ _experience_levels_gained++;
AudioManager->PlaySound("snd/levelup.wav");
// New skills are only found in growth data when the character has reached a new level
@@ -101,16 +121,7 @@ void CharacterGrowth::UpdateGrowthData() {
skills_learned.push_back(skills->at(i));
}
}
-
- hit_points += _character->GetHitPointsGrowth();
- skill_points += _character->GetSkillPointsGrowth();
- strength += _character->GetStrengthGrowth();
- vigor += _character->GetVigorGrowth();
- fortitude += _character->GetFortitudeGrowth();
- protection += _character->GetProtectionGrowth();
- agility += _character->GetAgilityGrowth();
- evade += _character->GetEvadeGrowth();
- } while (_character->AcknowledgeGrowth() == true);
+ }
}
////////////////////////////////////////////////////////////////////////////////
Something went wrong with that request. Please try again.