-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display correct Swift Learner exp bonus in messages #275
Conversation
Cool, thanks! |
This missed a few places throughout the code where exp is gained without using this macro. They can be found easily by searching "You gain" string in game texts. Also I guess the modified swift learner bonus is not taken into account? You can change it with |
Took a quick glance, the missing ones should be: |
@@ -488,6 +488,6 @@ | |||
points he received. | |||
***************************************/ | |||
#define give_xp(x) give_exp_points(x); \ | |||
display_msg(message_str(SCRIPT_GENERIC,100)+x+message_str(SCRIPT_GENERIC,101)) | |||
display_msg(g_mstr(100) + (x + ((x * 5 / 100) * dude_perk(PERK_swift_learner))) + g_mstr(101)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest splitting visible exp calculation to separate macro for use with non-standard messages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like this?
#define calc_display_xp(x) (x + ((x * 5 / 100) * dude_perk(PERK_swift_learner)))
#define give_xp(x) give_exp_points(x); \
display_msg(g_mstr(100) + calc_display_xp(x) + g_mstr(101))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, or maybe calc_xp_gain_after_perks
or get_actual_xp_gain
. Or maybe we should really add some new opcode for this ))
(ref. BGforgeNet#275) (note: there are still missed cases in Abbey scripts.)
Fixed incorrect xp reward for causing Jack the healer to melt.
Since the display from non-scripted (engine) cases is already fixed in sfall, I think the scripted message should follow the same suit.