From: Laszlo T. <ave...@us...> - 2010-08-20 13:59:19
|
gemrb: Infinity Engine emulator The branch master has been updated via 98e76d5adb5c65d29acb25350d75316fd183c88b (commit) via 849a13293c3b9def691681b7d240a0743fea95b8 (commit) Summary of changes: gemrb/GUIScripts/bg2/GUISTORE.py | 1 + gemrb/core/EffectQueue.cpp | 12 ++++++------ gemrb/core/Scriptable/Actor.cpp | 6 +++++- gemrb/plugins/FXOpcodes/FXOpcodes.cpp | 1 + 4 files changed, 13 insertions(+), 7 deletions(-) from f0077a60698c3bb6057b83b61519a376fdddb68b (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=98e76d5adb5c65d29acb25350d75316fd183c88b commit 98e76d5adb5c65d29acb25350d75316fd183c88b Author: Avenger <ave...@so...> Date: Fri Aug 20 15:58:35 2010 +0200 finished AC bonus vs creature type implementation diff --git a/gemrb/core/EffectQueue.cpp b/gemrb/core/EffectQueue.cpp index 1cd92dc..beb0a40 100644 --- a/gemrb/core/EffectQueue.cpp +++ b/gemrb/core/EffectQueue.cpp @@ -1142,7 +1142,7 @@ int EffectQueue::ApplyEffect(Actor* target, Effect* fx, ieDword first_apply) con //normal effect with duration break; case FX_NOT_APPLIED: - //instant effect, pending removal + //instant effect, pending removal //for example, a damage effect fx->TimingMode = FX_DURATION_JUST_EXPIRED; break; @@ -1543,12 +1543,12 @@ int EffectQueue::BonusAgainstCreature(ieDword opcode, Actor *actor) const for ( f = effects.begin(); f != effects.end(); f++ ) { MATCH_OPCODE(); MATCH_LIVE_FX(); - ieDword ids = (*f)->Parameter2; - if( ids<2 || ids>9) { - ids=2; - } - ieDword param1 = actor->GetStat(ids_stats[ids-2]); if( (*f)->Parameter1) { + ieDword ids = (*f)->Parameter2; + if( ids<2 || ids>8) { + ids=2; + } + ieDword param1 = actor->GetStat(ids_stats[ids-2]); MATCH_PARAM1(); } int val = (int) (*f)->Parameter3; diff --git a/gemrb/core/Scriptable/Actor.cpp b/gemrb/core/Scriptable/Actor.cpp index 121e673..d61f075 100644 --- a/gemrb/core/Scriptable/Actor.cpp +++ b/gemrb/core/Scriptable/Actor.cpp @@ -4235,6 +4235,9 @@ int Actor::GetDefense(int DamageType) return defense + core->GetDexterityBonus(STAT_DEX_AC, GetStat(IE_DEX) ); } + +static EffectRef fx_ac_vs_creature_type_ref={"ACVsCreatureType",NULL,-1}; + void Actor::PerformAttack(ieDword gameTime) { // start a new round if we really don't have one yet @@ -4396,10 +4399,11 @@ void Actor::PerformAttack(ieDword gameTime) //get target's defense against attack int defense = target->GetDefense(damagetype); + defense -= target->fxqueue.BonusAgainstCreature(fx_ac_vs_creature_type_ref,this); bool success; if(ReverseToHit) { - success = roll > tohit - defense; + success = roll + defense > tohit; } else { success = tohit + roll > defense; } diff --git a/gemrb/plugins/FXOpcodes/FXOpcodes.cpp b/gemrb/plugins/FXOpcodes/FXOpcodes.cpp index 478c879..ee802b0 100644 --- a/gemrb/plugins/FXOpcodes/FXOpcodes.cpp +++ b/gemrb/plugins/FXOpcodes/FXOpcodes.cpp @@ -6294,6 +6294,7 @@ int fx_avatar_removal_modifier (Scriptable* /*Owner*/, Actor* target, Effect* fx STAT_SET(IE_AVATARREMOVAL, fx->Parameter2); return FX_APPLIED; } + // 0x13c MagicalRest (also 0x124 iwd) int fx_magical_rest (Scriptable* /*Owner*/, Actor* target, Effect* fx) { http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=849a13293c3b9def691681b7d240a0743fea95b8 commit 849a13293c3b9def691681b7d240a0743fea95b8 Author: Avenger <ave...@so...> Date: Fri Aug 20 15:53:55 2010 +0200 fixed displaying of selection of items to sell diff --git a/gemrb/GUIScripts/bg2/GUISTORE.py b/gemrb/GUIScripts/bg2/GUISTORE.py index 46d03b8..570e7ce 100644 --- a/gemrb/GUIScripts/bg2/GUISTORE.py +++ b/gemrb/GUIScripts/bg2/GUISTORE.py @@ -221,6 +221,7 @@ def OpenStoreShoppingWindow (): Button = Window.GetControl (i+13) Button.SetBorder (0,0,0,0,0,0,0,128,160,0,1) + Button.SetSprites ("GUIBTBUT", 0, 0,1,2,5) if Store['StoreType'] != 3: # can't sell to temples Button.SetEvent (IE_GUI_BUTTON_ON_PRESS, SelectSell) Button.SetEvent (IE_GUI_BUTTON_ON_RIGHT_PRESS, InfoRightWindow) ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |