protected virtual GiftReaction GetGiftReaction(Item gift)
{
var score = this.NPC.GiftWeights.CalculateScore(gift);
if (gift.Info.Id == 51046) // Likeability pot
{
score = 10;
this.Favor += 10; // Determined through a LOT of pots... RIP my bank :(
this.Memory += 4; // Gotta remember who gave you roofies!!
}
else
{
var delta = score;
if (gift.Data.StackType == StackType.Stackable)
{
delta *= gift.Amount * gift.Data.StackMax * 3;
delta /= (1 + 2 * (Random(4) + 7));
}
else
{
delta *= 3;
delta /= (Random(7) + 6);
}
this.Favor += delta;
}
// Reduce stress by 0 ~ score (or at least 4) - 1 for good gifts
if (score >= 0)
this.Stress -= this.Random(Math.Max(4, score));
if (score > 6)
return GiftReaction.Love;
if (score > 3)
return GiftReaction.Like;
if (score > -4)
return GiftReaction.Neutral;
else
return GiftReaction.Dislike;
}