From: Jaka K. <lyn...@us...> - 2010-11-01 13:40:27
|
gemrb: Infinity Engine emulator The branch master has been updated via ab87cd332ee2e591bfe2199b0091496a1080d5ea (commit) via 46d9105046802b0fd06e68bc2c0a643e782b7553 (commit) Summary of changes: gemrb/plugins/FXOpcodes/FXOpcodes.cpp | 25 ++++++++++++++++++------- 1 files changed, 18 insertions(+), 7 deletions(-) from c0384b17797a5810e03b55f51c90107eec5d7225 (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=ab87cd332ee2e591bfe2199b0091496a1080d5ea commit ab87cd332ee2e591bfe2199b0091496a1080d5ea Author: Jaka Kranjc <lyn...@us...> Date: Mon Nov 1 14:44:04 2010 +0100 implemented the current hp altering variant of percentage fx_maximum_hp_modifier diff --git a/gemrb/plugins/FXOpcodes/FXOpcodes.cpp b/gemrb/plugins/FXOpcodes/FXOpcodes.cpp index 78274a1..1e34bba 100644 --- a/gemrb/plugins/FXOpcodes/FXOpcodes.cpp +++ b/gemrb/plugins/FXOpcodes/FXOpcodes.cpp @@ -1410,8 +1410,7 @@ int fx_current_hp_modifier (Scriptable* Owner, Actor* target, Effect* fx) // 0x12 MaximumHPModifier // 0 and 3 differ in that 3 doesn't modify current hitpoints -// 1,4 are the same -// 2,5 are the same +// 1,4 and 2,5 are analogous to them, but with different modifiers int fx_maximum_hp_modifier (Scriptable* /*Owner*/, Actor* target, Effect* fx) { if (0) printf( "fx_maximum_hp_modifier (%2d): Mod: %d, Type: %d\n", fx->Opcode, fx->Parameter1, fx->Parameter2 ); @@ -1435,7 +1434,7 @@ int fx_maximum_hp_modifier (Scriptable* /*Owner*/, Actor* target, Effect* fx) } } break; - case 3: + case 3: // no current hp bonus // random value Parameter1 is set by level_check in EffectQueue if (base) { BASE_ADD( IE_MAXHITPOINTS, fx->Parameter1 ); @@ -1443,14 +1442,26 @@ int fx_maximum_hp_modifier (Scriptable* /*Owner*/, Actor* target, Effect* fx) STAT_ADD( IE_MAXHITPOINTS, fx->Parameter1 ); } break; - case 1:case 4: + case 1: // with current hp bonus, but unimplemented in the original + case 4: if (base) { BASE_SET( IE_MAXHITPOINTS, fx->Parameter1 ); } else { STAT_SET( IE_MAXHITPOINTS, fx->Parameter1 ); } break; - case 2:case 5: + case 2: + if (base) { + BASE_MUL(IE_MAXHITPOINTS, fx->Parameter1 ); + BASE_MUL(IE_HITPOINTS, fx->Parameter1 ); + } else { + target->NewStat( IE_MAXHITPOINTS, target->GetStat(IE_MAXHITPOINTS)*fx->Parameter1/100, MOD_ABSOLUTE); + if (fx->FirstApply) { + target->NewBase( IE_HITPOINTS, target->GetSafeStat(IE_HITPOINTS)*fx->Parameter1/100, MOD_ABSOLUTE); + } + } + break; + case 5: // no current hp bonus if (base) { BASE_MUL( IE_MAXHITPOINTS, fx->Parameter1 ); } else { http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=46d9105046802b0fd06e68bc2c0a643e782b7553 commit 46d9105046802b0fd06e68bc2c0a643e782b7553 Author: Jaka Kranjc <lyn...@us...> Date: Mon Nov 1 11:45:39 2010 +0100 display the fx_disable_spellcasting/fx_disable_button warning / update the actionbar for any selectable diff --git a/gemrb/plugins/FXOpcodes/FXOpcodes.cpp b/gemrb/plugins/FXOpcodes/FXOpcodes.cpp index 8b56d1c..78274a1 100644 --- a/gemrb/plugins/FXOpcodes/FXOpcodes.cpp +++ b/gemrb/plugins/FXOpcodes/FXOpcodes.cpp @@ -3774,7 +3774,7 @@ int fx_disable_button (Scriptable* /*Owner*/, Actor* target, Effect* fx) STAT_BIT_OR( IE_DISABLEDBUTTON, 1<<fx->Parameter2 ); } - if (target->IsSelected() && fx->FirstApply) { + if (fx->FirstApply && target->GetStat(IE_EA) < EA_CONTROLLABLE) { core->SetEventFlag(EF_ACTION); } return FX_APPLIED; @@ -3807,7 +3807,7 @@ int fx_disable_spellcasting (Scriptable* /*Owner*/, Actor* target, Effect* fx) if (fx->Parameter2 == 0) if (target->spellbook.GetKnownSpellsCount(IE_SPELL_TYPE_WIZARD, 0)) display_warning = true; } - if (target->IsSelected() && display_warning) { + if (display_warning && target->GetStat(IE_EA) < EA_CONTROLLABLE) { displaymsg->DisplayConstantStringName(STR_DISABLEDMAGE, 0xff0000, target); core->SetEventFlag(EF_ACTION); } ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |