From: Jaka K. <lyn...@us...> - 2012-12-26 23:00:22
|
gemrb: Infinity Engine emulator The branch master has been updated via ce7632e6f159638913e95f760f6f0104efd4e1c0 (commit) via d830906919a92e9c43a7f4e0662e771ebaed3bcb (commit) Summary of changes: gemrb/GUIScripts/iwd2/GUIREC.py | 49 ++++++++++++++++++--------------- gemrb/plugins/GUIScript/GUIScript.cpp | 12 +++++--- 2 files changed, 35 insertions(+), 26 deletions(-) from 8841ace6a168a910e66fdee51503c6500206f53a (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=ce7632e6f159638913e95f760f6f0104efd4e1c0 commit ce7632e6f159638913e95f760f6f0104efd4e1c0 Author: Jaka Kranjc <lyn...@us...> Date: Wed Dec 26 23:55:10 2012 +0100 iwd2::guirec: display the saving throws also on the weapons page they're off, but as far as content is concerned, this was the last understood missing bit from that page diff --git a/gemrb/GUIScripts/iwd2/GUIREC.py b/gemrb/GUIScripts/iwd2/GUIREC.py index 9163497..4768491 100644 --- a/gemrb/GUIScripts/iwd2/GUIREC.py +++ b/gemrb/GUIScripts/iwd2/GUIREC.py @@ -215,6 +215,29 @@ def DisplayCommon (pc): Label.SetText (Race) return +def DisplaySavingThrows (pc): + RecordsTextArea.Append ("\n\n[color=ffff00]") + RecordsTextArea.Append (17379) + RecordsTextArea.Append ("[/color]") + tmp = GemRB.GetPlayerStat (pc, IE_SAVEFORTITUDE) + tmp -= GemRB.GetPlayerStat (pc, IE_SAVEFORTITUDE, 1) + if tmp<0: stmp = str(tmp) + else: stmp = "+"+str(tmp) + RecordsTextArea.Append (17380,-1) + RecordsTextArea.Append (": "+stmp ) + tmp = GemRB.GetPlayerStat (pc, IE_SAVEREFLEX) + tmp -= GemRB.GetPlayerStat (pc, IE_SAVEREFLEX, 1) + if tmp<0: stmp = str(tmp) + else: stmp = "+"+str(tmp) + RecordsTextArea.Append (17381,-1) + RecordsTextArea.Append (": "+stmp ) + tmp = GemRB.GetPlayerStat (pc, IE_SAVEWILL) + tmp -= GemRB.GetPlayerStat (pc, IE_SAVEWILL, 1) + if tmp<0: stmp = str(tmp) + else: stmp = "+"+str(tmp) + RecordsTextArea.Append (17382,-1) + RecordsTextArea.Append (": "+stmp ) + # screenshots at http:// lparchive.org/Icewind-Dale-2/Update%2013/ def DisplayGeneral (pc): Window = RecordsWindow @@ -310,27 +333,7 @@ def DisplayGeneral (pc): RecordsTextArea.Append (Align,-1) #saving throws - RecordsTextArea.Append ("\n\n[color=ffff00]") - RecordsTextArea.Append (17379) - RecordsTextArea.Append ("[/color]") - tmp = GemRB.GetPlayerStat (pc, IE_SAVEFORTITUDE) - tmp -= GemRB.GetPlayerStat (pc, IE_SAVEFORTITUDE, 1) - if tmp<0: stmp = str(tmp) - else: stmp = "+"+str(tmp) - RecordsTextArea.Append (17380,-1) - RecordsTextArea.Append (": "+stmp ) - tmp = GemRB.GetPlayerStat (pc, IE_SAVEREFLEX) - tmp -= GemRB.GetPlayerStat (pc, IE_SAVEREFLEX, 1) - if tmp<0: stmp = str(tmp) - else: stmp = "+"+str(tmp) - RecordsTextArea.Append (17381,-1) - RecordsTextArea.Append (": "+stmp ) - tmp = GemRB.GetPlayerStat (pc, IE_SAVEWILL) - tmp -= GemRB.GetPlayerStat (pc, IE_SAVEWILL, 1) - if tmp<0: stmp = str(tmp) - else: stmp = "+"+str(tmp) - RecordsTextArea.Append (17382,-1) - RecordsTextArea.Append (": "+stmp ) + DisplaySavingThrows (pc) #class features if HasClassFeatures(pc): @@ -522,7 +525,8 @@ def WeaponOfHand(pc, combatdet, dualwielding, left=0): crange = str(crange) + "-20 / x" + str(cmulti) AddIndent() RecordsTextArea.Append (delimited_txt (41122, ":", crange, 0)) - RecordsTextArea.Append ("\n") + if not left and dualwielding: + RecordsTextArea.Append ("\n") def DisplayWeapons (pc): Window = RecordsWindow @@ -671,6 +675,7 @@ def DisplayWeapons (pc): RecordsTextArea.Append ("\n") WeaponOfHand(pc, GemRB.GetCombatDetails(pc, 1), dualwielding, 1) + DisplaySavingThrows (pc) return http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=d830906919a92e9c43a7f4e0662e771ebaed3bcb commit d830906919a92e9c43a7f4e0662e771ebaed3bcb Author: Jaka Kranjc <lyn...@us...> Date: Wed Dec 26 23:54:13 2012 +0100 prevent a crash in GemRB_GetCombatDetails diff --git a/gemrb/plugins/GUIScript/GUIScript.cpp b/gemrb/plugins/GUIScript/GUIScript.cpp index 612d15b..6afd9e3 100644 --- a/gemrb/plugins/GUIScript/GUIScript.cpp +++ b/gemrb/plugins/GUIScript/GUIScript.cpp @@ -9873,11 +9873,15 @@ static PyObject* GemRB_GetCombatDetails(PyObject * /*self*/, PyObject* args) PyDict_SetItemString(dict, "ProfDmgBon", PyInt_FromLong (wi.profdmgbon)); PyDict_SetItemString(dict, "LauncherDmgBon", PyInt_FromLong (wi.launcherdmgbon)); PyDict_SetItemString(dict, "WeaponStrBonus", PyInt_FromLong (actor->WeaponDamageBonus(wi))); - PyDict_SetItemString(dict, "HitHeaderNumDice", PyInt_FromLong (hittingheader->DiceThrown)); - PyDict_SetItemString(dict, "HitHeaderDiceSides", PyInt_FromLong (hittingheader->DiceSides)); - PyDict_SetItemString(dict, "HitHeaderDiceBonus", PyInt_FromLong (hittingheader->DamageBonus)); + if (hittingheader) { + PyDict_SetItemString(dict, "HitHeaderNumDice", PyInt_FromLong (hittingheader->DiceThrown)); + PyDict_SetItemString(dict, "HitHeaderDiceSides", PyInt_FromLong (hittingheader->DiceSides)); + PyDict_SetItemString(dict, "HitHeaderDiceBonus", PyInt_FromLong (hittingheader->DamageBonus)); + } else { + return RuntimeError("Serious problem in GetCombatDetails: could not find the hitting header!"); + } - actor->AC.dump(); +// actor->AC.dump(); actor->ToHit.dump(); PyObject *ac = PyDict_New(); PyDict_SetItemString(ac, "Total", PyInt_FromLong (actor->AC.GetTotal())); ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |