Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Feature Requests

Development::Feature Requests Post suggestions/feature requests here.

Reply
 
Thread Tools Display Modes
  #1  
Old 11-05-2008, 07:22 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Ya, I am sure we could use more effect types working properly or at all. But the idea of this would be to just use any existing effect types and have a check to proc when being hit. I will look into seeing how hard it would be to code and maybe write something up. I am pretty sure we could just copy the current proc code from There could always be a rule put in place to allow admins to enable or disable this extra check after chancetohit.

attack.cpp
Maybe add something like this to where incoming damage is calculated:
Code:
		TryNonWeaponProc(nonweapon, other);
And then the function would be a modified version of this:
Code:
void Mob::TryWeaponProc(const Item_Struct* weapon, Mob *on) {
	
	int ourlevel = GetLevel();
	float ProcChance, ProcBonus;
	if(weapon!=NULL)
		GetProcChances(ProcBonus, ProcChance, weapon->Delay);
	else
		GetProcChances(ProcBonus, ProcChance);
	
	//give weapon a chance to proc first.
	if(weapon != NULL) {
		if (IsValidSpell(weapon->Proc.Effect) && (weapon->Proc.Type == ET_CombatProc)) {
			float WPC = ProcChance*(100.0f+(float)weapon->ProcRate)/100.0f;
			if (MakeRandomFloat(0, 1) <= WPC) {	// 255 dex = 0.084 chance of proc. No idea what this number should be really.
				if(weapon->Proc.Level > ourlevel) {
					mlog(COMBAT__PROCS, "Tried to proc (%s), but our level (%d) is lower than required (%d)", weapon->Name, ourlevel, weapon->Proc.Level);
					Mob * own = GetOwner();
					if(own != NULL) {
						own->Message_StringID(13,PROC_PETTOOLOW);
					} else {
						Message_StringID(13,PROC_TOOLOW);
					}
				} else {
					mlog(COMBAT__PROCS, "Attacking weapon (%s) successfully procing spell %d (%.2f percent chance)", weapon->Name, weapon->Proc.Effect, ProcChance*100);
					ExecWeaponProc(weapon->Proc.Effect, on);
				}
			} else {
				mlog(COMBAT__PROCS, "Attacking weapon (%s) did no proc (%.2f percent chance).", weapon->Name, ProcChance*100);
			}
		}
	}
	
	if(ProcBonus == -1) {
		LogFile->write(EQEMuLog::Error, "ProcBonus was -1 value!");
		return;
	}

	//now try our proc arrays
	float procmod =  float(GetDEX()) / 100.0f + ProcBonus*100.0;	//did somebody think about this???
																	//AndMetal: aren't we doing this in GetProcChances?

	uint32 i;
	for(i = 0; i < MAX_PROCS; i++) {
		if (PermaProcs[i].spellID != SPELL_UNKNOWN) {
			if(MakeRandomInt(0, 100) < PermaProcs[i].chance) {
				mlog(COMBAT__PROCS, "Permanent proc %d procing spell %d (%d percent chance)", i, PermaProcs[i].spellID, PermaProcs[i].chance);
				ExecWeaponProc(PermaProcs[i].spellID, on);
			} else {
				mlog(COMBAT__PROCS, "Permanent proc %d failed to proc %d (%d percent chance)", i, PermaProcs[i].spellID, PermaProcs[i].chance);
			}
		}
		if (SpellProcs[i].spellID != SPELL_UNKNOWN) {
			int chance = ProcChance + SpellProcs[i].chance;
			if(MakeRandomInt(0, 100) < chance) {
				mlog(COMBAT__PROCS, "Spell proc %d procing spell %d (%d percent chance)", i, SpellProcs[i].spellID, chance);
				ExecWeaponProc(SpellProcs[i].spellID, on);
			} else {
				mlog(COMBAT__PROCS, "Spell proc %d failed to proc %d (%d percent chance)", i, SpellProcs[i].spellID, chance);
			}
		}
	}
}
I will see if I can figure out the best way to do it later if I get the time.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #2  
Old 11-05-2008, 11:03 AM
janusd
Sarnak
 
Join Date: Jan 2008
Posts: 47
Default

Trevious, I think what you're thinking of would work similar to the cleric line of reverse damage shields cast on a mob so that when IT hits things, IT takes damage. You may want to look at the way that spell works (I think it's a 62-65 spell) if you're thinking of pursuing this idea.

And while it's not Live-Like at all, it does propose some rather interesting ideas we could implement and some interesting strategies you could create on the custom servers.

And who knows... maybe Sony is spying on us and will steal the idea to include in live. After all, they stole our bot idea (calling 'em mercenaries). Now bots are live-like!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 09:44 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3