From: <ave...@us...> - 2009-08-17 10:11:41
|
Revision: 6894 http://gemrb.svn.sourceforge.net/gemrb/?rev=6894&view=rev Author: avenger_teambg Date: 2009-08-17 10:11:31 +0000 (Mon, 17 Aug 2009) Log Message: ----------- fixed the set animation id opcode Modified Paths: -------------- gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp Modified: gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp 2009-08-17 10:10:07 UTC (rev 6893) +++ gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp 2009-08-17 10:11:31 UTC (rev 6894) @@ -1974,7 +1974,7 @@ switch (fx->Parameter2) { case 0: //non permanent animation change default: - STAT_MOD( IE_ANIMATION_ID ); + STAT_SET( IE_ANIMATION_ID, fx->Parameter1 ); return FX_APPLIED; case 1: //remove any non permanent change target->fxqueue.RemoveAllEffects(fx_animation_id_modifier_ref); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lyn...@us...> - 2009-08-17 19:49:04
|
Revision: 6909 http://gemrb.svn.sourceforge.net/gemrb/?rev=6909&view=rev Author: lynxlupodian Date: 2009-08-17 19:48:40 +0000 (Mon, 17 Aug 2009) Log Message: ----------- tried to make polymorph change the animation Modified Paths: -------------- gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp Modified: gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp 2009-08-17 19:12:09 UTC (rev 6908) +++ gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp 2009-08-17 19:48:40 UTC (rev 6909) @@ -3481,8 +3481,9 @@ return FX_NOT_APPLIED; } - //TODO: - //copy the animation ID + //copy the animation ID; never resets back! shapeshift to natural doesn't work either + //target->SetAnimationID( newCreature->GetStat(IE_ANIMATION_ID) ); + //TODO: also change the inventory paper doll //copy all polymorphed stats if(fx->Parameter2) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ave...@us...> - 2009-08-17 21:17:50
|
Revision: 6914 http://gemrb.svn.sourceforge.net/gemrb/?rev=6914&view=rev Author: avenger_teambg Date: 2009-08-17 21:17:43 +0000 (Mon, 17 Aug 2009) Log Message: ----------- another settext Modified Paths: -------------- gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp Modified: gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp 2009-08-17 20:54:42 UTC (rev 6913) +++ gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp 2009-08-17 21:17:43 UTC (rev 6914) @@ -2785,7 +2785,7 @@ int fx_change_name (Scriptable* /*Owner*/, Actor* target, Effect* fx) { if (0) printf( "fx_change_name_modifier (%2d): StrRef: %d\n", fx->Opcode, fx->Parameter1 ); - target->SetText(fx->Parameter1, 0); + target->SetName(fx->Parameter1, 0); return FX_NOT_APPLIED; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ave...@us...> - 2009-08-20 16:51:57
|
Revision: 6973 http://gemrb.svn.sourceforge.net/gemrb/?rev=6973&view=rev Author: avenger_teambg Date: 2009-08-20 16:51:49 +0000 (Thu, 20 Aug 2009) Log Message: ----------- fixed? the golems in chateau irenicus Modified Paths: -------------- gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp Modified: gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp 2009-08-20 16:33:35 UTC (rev 6972) +++ gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp 2009-08-20 16:51:49 UTC (rev 6973) @@ -5765,6 +5765,7 @@ { if (0) printf( "fx_offscreenai_modifier (%2d): Mod: %d, Type: %d\n", fx->Opcode, fx->Parameter1, fx->Parameter2 ); STAT_SET( IE_ENABLEOFFSCREENAI, fx->Parameter1 ); + target->Activate(); return FX_APPLIED; } //0x126 ExistanceDelayModifier This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ave...@us...> - 2009-08-21 21:41:16
|
Revision: 7005 http://gemrb.svn.sourceforge.net/gemrb/?rev=7005&view=rev Author: avenger_teambg Date: 2009-08-21 21:41:08 +0000 (Fri, 21 Aug 2009) Log Message: ----------- improved 0xec copyself opcode (project image/mislead/simulacrum) Modified Paths: -------------- gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp Modified: gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp 2009-08-21 19:49:48 UTC (rev 7004) +++ gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp 2009-08-21 21:41:08 UTC (rev 7005) @@ -5053,35 +5053,56 @@ // 0xec ProjectImage +static EffectRef fx_puppetmarker_ref={"PuppetMarker",NULL,-1}; + int fx_puppet_master (Scriptable* /*Owner*/, Actor* target, Effect* fx) { const char * resref = NULL; if (0) printf( "fx_puppet_master (%2d): Value: %d, Stat: %d\n", fx->Opcode, fx->Parameter1, fx->Parameter2 ); STAT_SET (IE_PUPPETMASTERTYPE, fx->Parameter1); + + //copyself doesn't copy scripts, so the script clearing code is not needed Actor *copy = target->CopySelf(); + + Effect *newfx = EffectQueue::CreateUnsummonEffect(fx); + if (newfx) { + core->ApplyEffect(newfx, copy, copy); + delete newfx; + } + + ieResRef script; + + //intentionally 7, to leave room for the last letter + strnlwrcpy(script,target->GetScript(SCR_CLASS),7); + //no need of buffer defense as long as you don't mess with the 7 above + strcat(script,"m"); + //if the caster is inparty, the script is turned off by the AI disable flag + copy->SetScript(script, SCR_CLASS, target->InParty!=0); + switch(fx->Parameter2) { case 1: - resref = "MISLEAD"; + resref = "mislead"; break; case 2: - resref = "PROJIMG"; + resref = "projimg"; break; case 3: - resref = "SIMULACR"; + resref = "simulacr"; break; default: resref = fx->Resource; break; } - //resref is always something, but we play safe - if (resref && resref[0]) { - core->ApplySpell(resref,copy,target,0); + if (resref[0]) { + core->ApplySpell(resref,copy,copy,0); } - Effect *newfx = EffectQueue::CreateUnsummonEffect(fx); + + //FIXME: parameter1 is unsure, but something similar to what the original engine has there + newfx = EffectQueue::CreateEffectCopy(fx, fx_puppetmarker_ref, target->InParty-1, fx->Parameter2); if (newfx) { - core->ApplyEffect(newfx, copy, target); + core->ApplyEffect(newfx, copy, copy); delete newfx; } return FX_NOT_APPLIED; @@ -5091,7 +5112,10 @@ int fx_puppet_marker (Scriptable* /*Owner*/, Actor* target, Effect* fx) { if (0) printf( "fx_puppet_marker (%2d): Value: %d, Stat: %d\n", fx->Opcode, fx->Parameter1, fx->Parameter2 ); - STAT_SET (IE_PUPPETTYPE, fx->Parameter1); + //actually the Type is in parameter2 and the ID is in parameter1 + //but for some reason the defines are in the opposite order + STAT_SET (IE_PUPPETTYPE, fx->Parameter1); //cb4 - the ID of the controller + STAT_SET (IE_PUPPETID, fx->Parameter2); //cb8 - the control type return FX_APPLIED; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lyn...@us...> - 2009-08-26 14:25:40
|
Revision: 7054 http://gemrb.svn.sourceforge.net/gemrb/?rev=7054&view=rev Author: lynxlupodian Date: 2009-08-26 14:25:13 +0000 (Wed, 26 Aug 2009) Log Message: ----------- fixed a timing check in fx_create_magic_item, thanks Avenger Modified Paths: -------------- gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp Modified: gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp 2009-08-26 08:51:17 UTC (rev 7053) +++ gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp 2009-08-26 14:25:13 UTC (rev 7054) @@ -2903,9 +2903,9 @@ target->inventory.SetSlotItemRes(fx->Resource, target->inventory.GetMagicSlot(),fx->Parameter1,fx->Parameter3,fx->Parameter4); //equip the weapon target->inventory.SetEquippedSlot(target->inventory.GetMagicSlot()-target->inventory.GetWeaponSlot(), 0); - if (fx->TimingMode==FX_DURATION_INSTANT_LIMITED) { -//if this effect has expiration, then it will remain as a remove_item -//on the effect queue, inheriting all the parameters + if ((fx->TimingMode&0xff) == FX_DURATION_INSTANT_LIMITED) { + //if this effect has expiration, then it will remain as a remove_item + //on the effect queue, inheriting all the parameters fx->Opcode=EffectQueue::ResolveEffect(fx_remove_item_ref); fx->TimingMode=FX_DURATION_DELAY_PERMANENT; return FX_APPLIED; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lyn...@us...> - 2009-08-26 14:47:00
|
Revision: 7055 http://gemrb.svn.sourceforge.net/gemrb/?rev=7055&view=rev Author: lynxlupodian Date: 2009-08-26 14:46:33 +0000 (Wed, 26 Aug 2009) Log Message: ----------- fixed some other effect timings Modified Paths: -------------- gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp Modified: gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp 2009-08-26 14:25:13 UTC (rev 7054) +++ gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp 2009-08-26 14:46:33 UTC (rev 7055) @@ -3151,9 +3151,9 @@ { if (0) printf( "fx_create_inventory_item (%2d)\n", fx->Opcode ); target->inventory.AddSlotItemRes( fx->Resource, SLOT_ONLYINVENTORY, fx->Parameter1, fx->Parameter3, fx->Parameter4 ); - if (fx->TimingMode==FX_DURATION_INSTANT_LIMITED) { -//if this effect has expiration, then it will remain as a remove_item -//on the effect queue, inheriting all the parameters + if ((fx->TimingMode&0xff) == FX_DURATION_INSTANT_LIMITED) { + //if this effect has expiration, then it will remain as a remove_item + //on the effect queue, inheriting all the parameters fx->Opcode=EffectQueue::ResolveEffect(fx_remove_inventory_item_ref); fx->TimingMode=FX_DURATION_DELAY_PERMANENT; return FX_APPLIED; @@ -3641,7 +3641,7 @@ if (0) printf( "fx_create_item_in_slot (%2d): Button: %d\n", fx->Opcode, fx->Parameter2 ); //create item and set it in target's slot target->inventory.SetSlotItemRes( fx->Resource, core->QuerySlot(fx->Parameter2), fx->Parameter1, fx->Parameter3, fx->Parameter4 ); - if (fx->TimingMode!=FX_DURATION_INSTANT_LIMITED) { + if ((fx->TimingMode&0xff) == FX_DURATION_INSTANT_LIMITED) { //convert it to a destroy item fx->Opcode=EffectQueue::ResolveEffect(fx_remove_item_ref); fx->TimingMode=FX_DURATION_DELAY_PERMANENT; @@ -5284,9 +5284,9 @@ { if (0) printf( "fx_create_item_days (%2d)\n", fx->Opcode ); target->inventory.AddSlotItemRes( fx->Resource, SLOT_ONLYINVENTORY, fx->Parameter1, fx->Parameter3, fx->Parameter4 ); - if (fx->TimingMode==FX_DURATION_INSTANT_LIMITED) { -//if this effect has expiration, then it will remain as a remove_item -//on the effect queue, inheriting all the parameters + if ((fx->TimingMode&0xff) == FX_DURATION_INSTANT_LIMITED) { + //if this effect has expiration, then it will remain as a remove_item + //on the effect queue, inheriting all the parameters //duration needs a hack (recalculate it for days) //no idea if this multiplier is ok fx->Duration+=(fx->Duration-core->GetGame()->GameTime)*2400; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ave...@us...> - 2009-09-16 20:39:56
|
Revision: 7181 http://gemrb.svn.sourceforge.net/gemrb/?rev=7181&view=rev Author: avenger_teambg Date: 2009-09-16 20:39:48 +0000 (Wed, 16 Sep 2009) Log Message: ----------- add familiars to .gam (MakeGlobal) as the original engine does it Modified Paths: -------------- gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp Modified: gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp 2009-09-16 14:21:58 UTC (rev 7180) +++ gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp 2009-09-16 20:39:48 UTC (rev 7181) @@ -4327,12 +4327,18 @@ memcpy(fx->Resource, core->GetGame()->Familiars[alignment],sizeof(ieResRef) ); fx->Parameter2=FAMILIAR_RESOURCE; } + //summon familiar with fx->Resource Point p(fx->PosX, fx->PosY); Effect *newfx = EffectQueue::CreateUnsummonEffect(fx); Actor *fam = core->SummonCreature(fx->Resource, fx->Resource2, Owner, target, p, EAM_DEFAULT, 0, newfx); delete newfx; + if (fam) { + //Make the familiar an NPC (MoveGlobal needs this) + core->GetGame()->AddNPC(fam); + + //Add some essential effects newfx = EffectQueue::CreateEffect(fx_familiar_constitution_loss_ref, (ieDword) -10, 0, FX_DURATION_INSTANT_PERMANENT); core->ApplyEffect(newfx, fam, fam); delete newfx; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lyn...@us...> - 2009-09-19 15:42:15
|
Revision: 7225 http://gemrb.svn.sourceforge.net/gemrb/?rev=7225&view=rev Author: lynxlupodian Date: 2009-09-19 15:42:07 +0000 (Sat, 19 Sep 2009) Log Message: ----------- invisibility grants a +4 to hit bonus and improved invisibility grants -4 ac bonus Modified Paths: -------------- gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp Modified: gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp 2009-09-19 13:55:48 UTC (rev 7224) +++ gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp 2009-09-19 15:42:07 UTC (rev 7225) @@ -1408,9 +1408,11 @@ switch (fx->Parameter2) { case 0: STATE_SET( STATE_INVISIBLE ); + STAT_ADD(IE_TOHIT, 4); break; case 1: STATE_SET( STATE_INVIS2 ); + HandleBonus(target, IE_ARMORCLASS, 4, fx->TimingMode); break; default: break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lyn...@us...> - 2009-09-21 11:25:55
|
Revision: 7230 http://gemrb.svn.sourceforge.net/gemrb/?rev=7230&view=rev Author: lynxlupodian Date: 2009-09-21 11:25:41 +0000 (Mon, 21 Sep 2009) Log Message: ----------- made the luck affecting effects also affect damageluck aka "minimum damage modifier" Modified Paths: -------------- gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp Modified: gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp 2009-09-20 14:08:16 UTC (rev 7229) +++ gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp 2009-09-21 11:25:41 UTC (rev 7230) @@ -1451,6 +1451,7 @@ if (0) printf( "fx_luck_modifier (%2d): Mod: %d, Type: %d\n", fx->Opcode, fx->Parameter1, fx->Parameter2 ); STAT_MOD( IE_LUCK ); + STAT_MOD( IE_DAMAGELUCK ); return FX_APPLIED; } @@ -3418,6 +3419,7 @@ STATE_SET( STATE_LUCK ); target->SetSpellState(SS_LUCK); STAT_ADD( IE_LUCK, fx->Parameter1 ); + STAT_ADD( IE_DAMAGELUCK, fx->Parameter1 ); return FX_APPLIED; } @@ -3428,6 +3430,7 @@ target->SetSpellState(SS_LUCK); STAT_ADD( IE_LUCK, fx->Parameter1 ); + STAT_ADD( IE_DAMAGELUCK, fx->Parameter1 ); return FX_APPLIED; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lyn...@us...> - 2009-09-21 18:36:30
|
Revision: 7241 http://gemrb.svn.sourceforge.net/gemrb/?rev=7241&view=rev Author: lynxlupodian Date: 2009-09-21 18:36:21 +0000 (Mon, 21 Sep 2009) Log Message: ----------- fixed the effect init in fx_apply_effect_curse Modified Paths: -------------- gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp Modified: gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp 2009-09-21 18:33:37 UTC (rev 7240) +++ gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp 2009-09-21 18:36:21 UTC (rev 7241) @@ -5742,10 +5742,11 @@ Effect *newfx = core->GetEffect(fx->Resource, fx->Power, p); if (newfx) { Effect *myfx = new Effect; + memcpy(myfx, newfx, sizeof(Effect)); myfx->random_value = core->Roll(1,100,0); myfx->TimingMode=fx->TimingMode; myfx->Duration=fx->Duration; - memcpy(myfx, newfx, sizeof(Effect)); + myfx->Target = FX_TARGET_PRESET; ret = target->fxqueue.ApplyEffect(target, myfx, fx->FirstApply); delete myfx; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ave...@us...> - 2009-10-03 16:56:07
|
Revision: 7342 http://gemrb.svn.sourceforge.net/gemrb/?rev=7342&view=rev Author: avenger_teambg Date: 2009-10-03 16:55:55 +0000 (Sat, 03 Oct 2009) Log Message: ----------- backstab modifier: an odd line which is in the original engine Modified Paths: -------------- gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp Modified: gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp 2009-10-03 16:54:55 UTC (rev 7341) +++ gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp 2009-10-03 16:55:55 UTC (rev 7342) @@ -5439,6 +5439,11 @@ int fx_backstab_modifier (Scriptable* /*Owner*/, Actor* target, Effect* fx) { if (0) printf( "fx_visual_range_modifier (%2d): Mod: %d, Type: %d\n", fx->Opcode, fx->Parameter1, fx->Parameter2 ); + //this is how it is done in the original engine, i don't know why they would do this + //ctrl-r would probably remove it otherwise + //Why they didn't fix it in the spell/item is beyond me + if (fx->TimingMode==FX_DURATION_INSTANT_PERMANENT) + fx->TimingMode=FX_DURATION_INSTANT_PERMANENT_AFTER_BONUSES; STAT_MOD( IE_BACKSTABDAMAGEMULTIPLIER ); return FX_APPLIED; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fu...@us...> - 2009-10-03 18:40:58
|
Revision: 7346 http://gemrb.svn.sourceforge.net/gemrb/?rev=7346&view=rev Author: fuzzie Date: 2009-10-03 18:40:33 +0000 (Sat, 03 Oct 2009) Log Message: ----------- don't unsummon replacement creatures Modified Paths: -------------- gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp Modified: gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp 2009-10-03 18:32:10 UTC (rev 7345) +++ gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp 2009-10-03 18:40:33 UTC (rev 7346) @@ -3850,9 +3850,10 @@ default:; } //create replacement; should we be passing the target instead of NULL? - Effect *newfx = EffectQueue::CreateUnsummonEffect(fx); - core->SummonCreature(fx->Resource, fx->Resource2, Owner, NULL,p, EAM_DEFAULT,-1, newfx); - delete newfx; + //noooo, don't unsummon replacement creatures! - fuzzie + //Effect *newfx = EffectQueue::CreateUnsummonEffect(fx); + core->SummonCreature(fx->Resource, fx->Resource2, Owner, NULL,p, EAM_DEFAULT,-1, NULL); + //delete newfx; return FX_NOT_APPLIED; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ave...@us...> - 2009-10-10 22:12:35
|
Revision: 7402 http://gemrb.svn.sourceforge.net/gemrb/?rev=7402&view=rev Author: avenger_teambg Date: 2009-10-10 22:12:28 +0000 (Sat, 10 Oct 2009) Log Message: ----------- added some state checks where the original engine did so Modified Paths: -------------- gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp Modified: gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp 2009-10-10 21:42:49 UTC (rev 7401) +++ gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp 2009-10-10 22:12:28 UTC (rev 7402) @@ -3537,7 +3537,11 @@ int fx_animation_stance (Scriptable* /*Owner*/, Actor* target, Effect* fx) { if (0) printf( "fx_animation_stance (%2d): Stance: %d\n", fx->Opcode, fx->Parameter2 ); - target->SetStance(fx->Parameter2); + + //this effect works only on living actors + if ( !STATE_GET(STATE_DEAD) ) { + target->SetStance(fx->Parameter2); + } return FX_NOT_APPLIED; } @@ -4141,6 +4145,8 @@ int fx_hold_creature_no_icon (Scriptable* /*Owner*/, Actor* target, Effect* fx) { if (0) printf( "fx_hold_creature_no_icon (%2d): Value: %d, IDS: %d\n", fx->Opcode, fx->Parameter1, fx->Parameter2 ); + + //actually the original engine just skips this effect if the target is dead if ( STATE_GET(STATE_DEAD) ) { return FX_NOT_APPLIED; } @@ -4160,6 +4166,8 @@ int fx_hold_creature (Scriptable* /*Owner*/, Actor* target, Effect* fx) { if (0) printf( "fx_hold_creature (%2d): Value: %d, IDS: %d\n", fx->Opcode, fx->Parameter1, fx->Parameter2 ); + + //actually the original engine just skips this effect if the target is dead if ( STATE_GET(STATE_DEAD) ) { return FX_NOT_APPLIED; } @@ -4738,6 +4746,12 @@ if (!fx->Parameter1) { return FX_NOT_APPLIED; } + + //dead actors lose this effect + if (STATE_GET( STATE_DEAD) ) { + return FX_NOT_APPLIED; + } + //this is the bg2 style stoneskin, not normally using spell states //but this way we can support hybrid games if (fx->Parameter2) { @@ -6093,6 +6107,11 @@ if (!fx->Parameter1) { return FX_NOT_APPLIED; } + //dead actors lose this effect + if (STATE_GET( STATE_DEAD) ) { + return FX_NOT_APPLIED; + } + STAT_SET(IE_STONESKINSGOLEM, fx->Parameter1); SetGradient(target, 14); return FX_APPLIED; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ave...@us...> - 2009-10-12 21:44:40
|
Revision: 7414 http://gemrb.svn.sourceforge.net/gemrb/?rev=7414&view=rev Author: avenger_teambg Date: 2009-10-12 21:44:30 +0000 (Mon, 12 Oct 2009) Log Message: ----------- fixed opcode 0xa8 (DestroySelf) Modified Paths: -------------- gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp Modified: gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp 2009-10-12 21:40:07 UTC (rev 7413) +++ gemrb/trunk/gemrb/plugins/FXOpcodes/FXOpc.cpp 2009-10-12 21:44:30 UTC (rev 7414) @@ -4060,18 +4060,25 @@ } // 0xa8 RemoveCreature -// removes creature specified by resource key +// removes targeted creature +// removes creature specified by resource key (gemrb extension) int fx_remove_creature (Scriptable* /*Owner*/, Actor* target, Effect* fx) { if (0) printf( "fx_remove_creature (%2d)\n", fx->Opcode); Map *map = target->GetCurrentArea(); - Actor *actor = map->GetActorByResource(fx->Resource); + Actor *actor = target; + + if (fx->Resource[0]) { + actor = map->GetActorByResource(fx->Resource); + } + if (actor) { //play vvc effect over actor? actor->DestroySelf(); } return FX_NOT_APPLIED; } + // 0xa9 Icon:Disable int fx_disable_portrait_icon (Scriptable* /*Owner*/, Actor* target, Effect* fx) { @@ -4079,6 +4086,7 @@ target->DisablePortraitIcon(fx->Parameter2); return FX_APPLIED; } + // 0xaa DamageAnimation int fx_damage_animation (Scriptable* /*Owner*/, Actor* target, Effect* fx) { @@ -4088,6 +4096,7 @@ target->PlayDamageAnimation(fx->Parameter2, !fx->Parameter1); return FX_NOT_APPLIED; } + // 0xab Spell:Add int fx_add_innate (Scriptable* /*Owner*/, Actor* target, Effect* fx) { @@ -4096,6 +4105,7 @@ //this is an instant, so it shouldn't stick return FX_NOT_APPLIED; } + // 0xac Spell:Remove //gemrb extension: deplete spell by resref int fx_remove_spell (Scriptable* /*Owner*/, Actor* target, Effect* fx) @@ -4117,6 +4127,7 @@ //this is an instant, so it shouldn't stick return FX_NOT_APPLIED; } + // 0xad PoisonResistanceModifier int fx_poison_resistance_modifier (Scriptable* /*Owner*/, Actor* target, Effect* fx) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |