From: Jaka K. <lyn...@us...> - 2012-12-17 19:57:26
|
gemrb: Infinity Engine emulator The branch master has been updated via 5feaf4d16d542e53207c75694753f46ba32c80b9 (commit) via 6d9de8a05e02721e619e58b0b0b634f43f77b874 (commit) via 1161cb8cb94dbfee4c5d213ae16f0060ea341a61 (commit) via 0c5adc231aae761d9260e5a99c396ab95048c7ac (commit) Summary of changes: gemrb/GUIScripts/GUICommon.py | 2 +- gemrb/GUIScripts/GUIOPT.py | 2 ++ gemrb/core/GameScript/GSUtils.cpp | 2 +- gemrb/core/Scriptable/Actor.cpp | 34 ++++++++++++++++++---------------- gemrb/core/Scriptable/Actor.h | 2 ++ 5 files changed, 24 insertions(+), 18 deletions(-) from 0a1db7cde295708ae17398361eac3db9c9aca991 (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=5feaf4d16d542e53207c75694753f46ba32c80b9 commit 5feaf4d16d542e53207c75694753f46ba32c80b9 Author: Jens Granseuer <je...@gm...> Date: Sun Dec 16 19:54:36 2012 +0100 close container window when opening options If we don't do this and a container window is open when the options window is opened, we will get confused about the global window state. This will lead to visible corruption when closing the window again and can crash the game. diff --git a/gemrb/GUIScripts/GUIOPT.py b/gemrb/GUIScripts/GUIOPT.py index fbcc389..b3a82f4 100644 --- a/gemrb/GUIScripts/GUIOPT.py +++ b/gemrb/GUIScripts/GUIOPT.py @@ -29,6 +29,7 @@ # 9 - Autopause options window ################################################### +import CommonWindow import GemRB import GUICommon import GUICommonWindows @@ -99,6 +100,7 @@ def OpenOptionsWindow (): CloseOptionsWindow() return + CommonWindow.CloseContainerWindow () GUICommon.GameWindow.SetVisible(WINDOW_INVISIBLE) if GUICommon.GameIsBG1(): GUICommonWindows.SetSelectionChangeHandler (None) http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=6d9de8a05e02721e619e58b0b0b634f43f77b874 commit 6d9de8a05e02721e619e58b0b0b634f43f77b874 Author: Jens Granseuer <je...@gm...> Date: Mon Dec 17 20:35:55 2012 +0100 fix max encumbrance display in inventory diff --git a/gemrb/GUIScripts/GUICommon.py b/gemrb/GUIScripts/GUICommon.py index ac9eb21..e1135a6 100644 --- a/gemrb/GUIScripts/GUICommon.py +++ b/gemrb/GUIScripts/GUICommon.py @@ -362,7 +362,7 @@ def SetEncumbranceLabels (Window, ControlID, Control2ID, pc, invert_colors = Fal ext_str = GemRB.GetPlayerStat (pc, IE_STREXTRA) # encumbrance - max_encumb = CommonTables.StrMod.GetValue (sstr, 3) + CommonTables.StrModEx.GetValue (ext_str, 3) + max_encumb = GemRB.GetAbilityBonus (IE_STR, 3, sstr, ext_str) if GemRB.HasFeat (pc, FEAT_STRONG_BACK): max_encumb += max_encumb/2 encumbrance = GemRB.GetPlayerStat (pc, IE_ENCUMBRANCE) http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=1161cb8cb94dbfee4c5d213ae16f0060ea341a61 commit 1161cb8cb94dbfee4c5d213ae16f0060ea341a61 Author: Jaka Kranjc <lyn...@us...> Date: Sun Dec 16 16:51:58 2012 +0100 Actor: split out GetWisdomAC from GetDexterityAC diff --git a/gemrb/core/Scriptable/Actor.cpp b/gemrb/core/Scriptable/Actor.cpp index f6a2079..f058ad6 100644 --- a/gemrb/core/Scriptable/Actor.cpp +++ b/gemrb/core/Scriptable/Actor.cpp @@ -2443,23 +2443,25 @@ int Actor::GetDexterityAC() const dexbonus = 0; } } + return dexbonus; +} - //and the monk wisdom bonus - if (third) { - //if the monk has a shield equipped, no bonus - int itemtype = inventory.GetShieldItemType(); - //items with critical range are weapons, not shields, so they are ok - //empty hand is also ok - if (GetStat(IE_LEVELMONK) && (itemtype==0xffff || core->GetArmorFailure(itemtype))) { - //too many variables, recycling - itemtype = GetAbilityBonus(IE_WIS); - //add the bonus only if it is a bonus (the dexbonus is negative) - if (itemtype>0) { - dexbonus += itemtype; - } - } +//wisdom AC bonus for 3ed light monks +int Actor::GetWisdomAC() const +{ + if (!third) { + return 0; } - return dexbonus; + + int bonus = 0; + //if the monk has a shield equipped, no bonus + int itemtype = inventory.GetShieldItemType(); + //items with critical range are weapons, not shields, so they are ok + //empty hand is also ok + if (GetStat(IE_LEVELMONK) && (itemtype==0xffff || core->GetArmorFailure(itemtype))) { + bonus = GetAbilityBonus(IE_WIS); + } + return bonus; } //Returns the personal critical damage type in a binary compatible form (PST) @@ -5918,7 +5920,7 @@ int Actor::GetDefense(int DamageType, ieDword wflags, Actor *attacker) const } } //Dexterity bonus is stored negative in 2da files. - defense += GetDexterityAC(); + defense += GetDexterityAC()+GetWisdomAC(); if (attacker) { defense -= fxqueue.BonusAgainstCreature(fx_ac_vs_creature_type_ref,attacker); diff --git a/gemrb/core/Scriptable/Actor.h b/gemrb/core/Scriptable/Actor.h index 560dd5d..3fb3a85 100644 --- a/gemrb/core/Scriptable/Actor.h +++ b/gemrb/core/Scriptable/Actor.h @@ -693,6 +693,8 @@ public: ieDword GetSpellFailure(bool arcana) const; /* returns the dexterity AC adjusted by armor, iwd2 compatible */ int GetDexterityAC() const; + /* returns the monk wisdom AC adjusted by armor (iwd2) */ + int GetWisdomAC() const; /* PST specific criticals */ int GetCriticalType() const; /* restores a spell of maximum maxlevel level, type is a mask of disabled spells */ http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=0c5adc231aae761d9260e5a99c396ab95048c7ac commit 0c5adc231aae761d9260e5a99c396ab95048c7ac Author: Jaka Kranjc <lyn...@us...> Date: Sun Dec 16 14:08:40 2012 +0100 fixed braino from 0a1db7cde diff --git a/gemrb/core/GameScript/GSUtils.cpp b/gemrb/core/GameScript/GSUtils.cpp index 6f5078e..d5f54cd 100644 --- a/gemrb/core/GameScript/GSUtils.cpp +++ b/gemrb/core/GameScript/GSUtils.cpp @@ -1976,7 +1976,7 @@ Trigger *GenerateTriggerCore(const char *src, const char *str, int trIndex, int } //this works only if there are no spaces - if (*src++!='"' || *src++!=',' || *src++!='"' || *src++!='#') { + if (*src++!='"' || *src++!=',' || *src++!='"') { break; } //reading the context string ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |