From: Laszlo T. <ave...@us...> - 2012-02-18 15:30:45
|
gemrb: Infinity Engine emulator The branch master has been updated via f7b6f0b249d5a21cd325b22af5fef8da4930de88 (commit) Summary of changes: gemrb/override/iwd2/feat0d.spl | Bin 218 -> 218 bytes gemrb/plugins/FXOpcodes/FXOpcodes.cpp | 15 +++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) from fd6f955e06d88e830450f173165e117c4ebb3d4b (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=f7b6f0b249d5a21cd325b22af5fef8da4930de88 commit f7b6f0b249d5a21cd325b22af5fef8da4930de88 Author: Avenger <ave...@so...> Date: Sat Feb 18 16:28:41 2012 +0100 need a free left hand for deflect arrows diff --git a/gemrb/override/iwd2/feat0d.spl b/gemrb/override/iwd2/feat0d.spl index 866dfee..509ef39 100644 Binary files a/gemrb/override/iwd2/feat0d.spl and b/gemrb/override/iwd2/feat0d.spl differ diff --git a/gemrb/plugins/FXOpcodes/FXOpcodes.cpp b/gemrb/plugins/FXOpcodes/FXOpcodes.cpp index 9f643bf..502e125 100644 --- a/gemrb/plugins/FXOpcodes/FXOpcodes.cpp +++ b/gemrb/plugins/FXOpcodes/FXOpcodes.cpp @@ -955,8 +955,19 @@ inline void HandlePercentageDamage(Effect *fx, Actor *target) { int fx_ac_vs_damage_type_modifier (Scriptable* /*Owner*/, Actor* target, Effect* fx) { if (0) print( "fx_ac_vs_damage_type_modifier (%2d): AC Modif: %d ; Type: %d ; MinLevel: %d ; MaxLevel: %d\n", fx->Opcode, fx->Parameter1, fx->Parameter2, (int) fx->DiceSides, (int) fx->DiceThrown ); - //check level was pulled outside as a common functionality - //CHECK_LEVEL(); + + if (fx->IsVariable) { + //has a second weapon or shield, cannot deflect arrows + int slot = target->inventory.GetShieldSlot(); + if (slot>0 && target->inventory.GetItem(slot) ) return FX_APPLIED; + + //has a twohanded weapon equipped + slot = target->inventory.GetWeaponSlot(); + if (slot>0) { + CREItem *item = target->inventory.GetItem(slot); + if (item->Flags&IE_INV_ITEM_TWOHANDED) return FX_APPLIED; + } + } // it is a bitmask int type = fx->Parameter2; ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |