Numeric Modifier, and MP Regenerating Familiars

me259259

Member
I made a small script to pick the best familiar in certain categories. So far, it works great, except for when I want a stasis familiar.

Right now, all I'm looking for are familiars that replenish MP (through the star starfish method). Here's what I have so far:

PHP:
familiar stasisFam()
	{
	if ( to_boolean(vars["is_100_run"]) )
		return my_familiar() ;
	float [familiar] myFamiliars ;
	float highestBoost ;
	familiar best ;
	
	foreach familiar in $familiars[]
		{
		if (have_familiar(familiar) )
			{
			myFamiliars[familiar] = numeric_modifier(familiar , "mp regen min" , familiar_weight(familiar) , familiar_equipped_equipment(familiar) ;
			}
			
		}

	//initialize
	best = my_familiar() ;
	highestBoost = numeric_modifier( my_familiar() , "mp regen min" , familiar_weight(my_familiar()) , familiar_equipped_equipment( my_familiar() ) ) ;

	foreach familiar in myFamiliars
		{
		if (myFamiliars[familiar] > highestBoost)
			{
			best = familiar ;
			highestBoost = myFamiliars[familiar] ;
			}
		}
	//print (best) ;
	return best ;
	
	}

The problem I'm having is with numeric_modifier. "mp regen", "mp regen min", and "mp regen max" are not associated with star starfish like familiars. Is there a special keyword for those types of familiars? Or do I have to hard code something?
 

Bale

Minion
Mafia has no stats for what those familiars do. Fortunately for you, you do not have to create code for this from scratch. This is built into zarqon's BatBrain, so you can pick this information out of the batfactors data file. In batfactors, the keyword you are looking for is mp dmg. I'm not sure how much additional help you need in order to figure out how to use this, so ask questions as necessary.
 
Top