Anyone here familiar with AlchemyManager.ws?
What I'm trying to achieve is returning a value based on what type of recipe you are using for alchemy. This value is then converted into a chance, and determines whether you have been successful in creating a potion.
The whole chance thing works, but the function determining the output value seems to not recognize what recipe I'm using.
This is the (simplified version of the) function:
In this case, creating any oil always succeeds and when I change the 100 to 0, it never succeeds (so the 50 is never returned as a value).
I've been working on this all afternoon, but I fear I have reached a wall I cannot climb without help
What I'm trying to achieve is returning a value based on what type of recipe you are using for alchemy. This value is then converted into a chance, and determines whether you have been successful in creating a potion.
The whole chance thing works, but the function determining the output value seems to not recognize what recipe I'm using.
This is the (simplified version of the) function:
public function CalculateCookChance( recipe : SAlchemyRecipe ) : int
{
if( recipe.cookedItemType == EACIT_Oil )
return 50;
else
return 100;
}
In this case, creating any oil always succeeds and when I change the 100 to 0, it never succeeds (so the 50 is never returned as a value).
I've been working on this all afternoon, but I fear I have reached a wall I cannot climb without help