From: Jaka K. <lyn...@us...> - 2013-01-31 13:42:28
|
gemrb: Infinity Engine emulator The branch master has been updated via 2ec785f0341d693c0675ac1bef33d445329aa8a4 (commit) via f2e6821801a2e5ced42bfd15a71b43269c39a56a (commit) via 990f77d77950fd84cc6eca460d089d6b3ef4aaba (commit) via eb0ae1e4c1ac887c1de3eecddea067eeb54e31bd (commit) Summary of changes: gemrb/core/Interface.cpp | 1 + gemrb/core/Scriptable/Actor.cpp | 21 +++++++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) from f3dbca8a00b8854e50c25124a6b0de4319b2d241 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=2ec785f0341d693c0675ac1bef33d445329aa8a4 commit 2ec785f0341d693c0675ac1bef33d445329aa8a4 Author: Jaka Kranjc <lyn...@us...> Date: Thu Jan 31 14:41:28 2013 +0100 Actor::Damage: avoid a noop hp reset diff --git a/gemrb/core/Scriptable/Actor.cpp b/gemrb/core/Scriptable/Actor.cpp index 2f8269c..28512eb 100644 --- a/gemrb/core/Scriptable/Actor.cpp +++ b/gemrb/core/Scriptable/Actor.cpp @@ -3888,7 +3888,10 @@ int Actor::Damage(int damage, int damagetype, Scriptable *hitter, int modtype, i } } - NewBase(IE_HITPOINTS, (ieDword) -damage, MOD_ADDITIVE); + // can be negative if we're healing on 100%+ resistance + if (damage != 0) { + NewBase(IE_HITPOINTS, (ieDword) -damage, MOD_ADDITIVE); + } // also apply reputation damage if we hurt (but not killed) an innocent if (Modified[IE_CLASS] == CLASS_INNOCENT && !core->InCutSceneMode()) { http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=f2e6821801a2e5ced42bfd15a71b43269c39a56a commit f2e6821801a2e5ced42bfd15a71b43269c39a56a Author: Jaka Kranjc <lyn...@us...> Date: Thu Jan 31 14:17:41 2013 +0100 Actor::ModifyDamage: make sure not to heal if not requested diff --git a/gemrb/core/Scriptable/Actor.cpp b/gemrb/core/Scriptable/Actor.cpp index 67952b7..2f8269c 100644 --- a/gemrb/core/Scriptable/Actor.cpp +++ b/gemrb/core/Scriptable/Actor.cpp @@ -6564,7 +6564,10 @@ void Actor::ModifyDamage(Scriptable *hitter, int &damage, int &resisted, int dam print("Resisted %d of %d at %d%% resistance to %d", resisted, damage+resisted, GetSafeStat(it->second.resist_stat), damagetype); // PST and BG1 may actually heal on negative damage if (!core->HasFeature(GF_HEAL_ON_100PLUS)) { - if (damage <= 0) resisted = DR_IMMUNE; + if (damage <= 0) { + resisted = DR_IMMUNE; + damage = 0; + } } } } http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=990f77d77950fd84cc6eca460d089d6b3ef4aaba commit 990f77d77950fd84cc6eca460d089d6b3ef4aaba Author: Jaka Kranjc <lyn...@us...> Date: Thu Jan 31 14:14:11 2013 +0100 iwd2 damage resistance is a flat value diff --git a/gemrb/core/Scriptable/Actor.cpp b/gemrb/core/Scriptable/Actor.cpp index cd09571..67952b7 100644 --- a/gemrb/core/Scriptable/Actor.cpp +++ b/gemrb/core/Scriptable/Actor.cpp @@ -6552,8 +6552,15 @@ void Actor::ModifyDamage(Scriptable *hitter, int &damage, int &resisted, int dam } } // damage type with a resistance stat - resisted = (int) (damage * (signed)GetSafeStat(it->second.resist_stat)/100.0); - damage -= resisted; + if (third) { + // flat resistance, eg. 10/- or eg. 5/+2 for physical types + // TODO: implement the /+x creature enchantment check + resisted = (signed)GetSafeStat(it->second.resist_stat); + damage -= resisted; + } else { + resisted = (int) (damage * (signed)GetSafeStat(it->second.resist_stat)/100.0); + damage -= resisted; + } print("Resisted %d of %d at %d%% resistance to %d", resisted, damage+resisted, GetSafeStat(it->second.resist_stat), damagetype); // PST and BG1 may actually heal on negative damage if (!core->HasFeature(GF_HEAL_ON_100PLUS)) { http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=eb0ae1e4c1ac887c1de3eecddea067eeb54e31bd commit eb0ae1e4c1ac887c1de3eecddea067eeb54e31bd Author: Jaka Kranjc <lyn...@us...> Date: Thu Jan 31 13:03:25 2013 +0100 added Heal Party on Rest to the config whitelist diff --git a/gemrb/core/Interface.cpp b/gemrb/core/Interface.cpp index 722a423..38e05e3 100644 --- a/gemrb/core/Interface.cpp +++ b/gemrb/core/Interface.cpp @@ -158,6 +158,7 @@ INIWhiteListEntry ConfigWhitelist[] = { {"Game Options", "Footsteps", 1}, {"Game Options", "Gore", 0}, // unused {"Game Options", "GUI Feedback Level", 0}, + {"Game Options", "Heal Party on Rest", 0}, // TODO: see Game::RestParty {"Game Options", "Hotkeys On Tooltips", 1}, // not used. should be implemented. {"Game Options", "HP Over Head", 0}, {"Game Options", "Infravision", 1}, ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |