From: Jaka K. <lyn...@us...> - 2010-08-26 17:28:28
|
gemrb: Infinity Engine emulator The branch master has been updated via cef97bfdffe98aeca719483d54343184962bfefc (commit) Summary of changes: gemrb/includes/opcode_params.h | 6 ++++-- gemrb/plugins/FXOpcodes/FXOpcodes.cpp | 14 ++++++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) from 62296f77664e873b876b81fd0aff0be30672e1bf (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=cef97bfdffe98aeca719483d54343184962bfefc commit cef97bfdffe98aeca719483d54343184962bfefc Author: Jaka Kranjc <lyn...@us...> Date: Thu Aug 26 19:34:42 2010 +0200 handle more conditions for fx_cast_spell_on_condition diff --git a/gemrb/includes/opcode_params.h b/gemrb/includes/opcode_params.h index 4782f82..f20d72c 100644 --- a/gemrb/includes/opcode_params.h +++ b/gemrb/includes/opcode_params.h @@ -52,8 +52,10 @@ #define COND_HELPLESS 5 #define COND_POISONED 6 #define COND_ATTACKED 7 -#define COND_HIT 8 -#define COND_ALWAYS 9 +#define COND_NEAR4 8 +#define COND_NEAR10 9 +#define COND_EVERYROUND 10 +#define COND_TOOKDAMAGE 11 //resources for the seven eyes effect #define EYE_MIND 0 diff --git a/gemrb/plugins/FXOpcodes/FXOpcodes.cpp b/gemrb/plugins/FXOpcodes/FXOpcodes.cpp index 79ab43a..96d2c20 100644 --- a/gemrb/plugins/FXOpcodes/FXOpcodes.cpp +++ b/gemrb/plugins/FXOpcodes/FXOpcodes.cpp @@ -5083,15 +5083,21 @@ int fx_cast_spell_on_condition (Scriptable* Owner, Actor* target, Effect* fx) case COND_POISONED: condition = actor->GetStat(IE_STATE_ID) & STATE_POISONED; break; - case COND_ATTACKED: + case COND_ATTACKED: // once per round condition = actor->LastHitter; break; - case COND_HIT: - condition = actor->LastDamage; + case COND_NEAR4: // closer than 4' + condition = PersonalDistance(actor, target)<4; + break; + case COND_NEAR10: // closer than 10' + condition = PersonalDistance(actor, target)<10; break; - case COND_ALWAYS: + case COND_EVERYROUND: condition = 1; break; + case COND_TOOKDAMAGE: + condition = actor->LastDamage; + break; default: condition = 0; } ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |