I am new to Optimization Programming.
I want to write an Character Calculator for an RPG.
Simplified Overview: An character has statPoints which can be assigned to HP, dmg and def. Every Point in one of these three decreases the statPoints by one. It can wear Gloves and Shorts of different kinds. Those Clothes can have Set Effects.
I want now to maximise different things, such as HP or def.
While it is easy to write an model for only the statPoints I do not know how to include the Clothes.
HP = (baseHP + gearHP)(1 + %HP/100)(1 + statPoints*0.0058) + Bonuses;
Would be the formula for the HP Status.
I have no problem to calculate the HP only with the statPoints or Bonuses, but I do not get how to apply hp, %hp from Clothes.
Example: Gloves1: hp:100, def:50 ; Gloves2: hp:88,def:61;.... and so on for other Clothes. And there are Set-Effects like: Gloves1 + Shorts2: hp:30;
means gearHP= Gloves1.hp + Shorts2.hp + possibleSetEffect;
So my Question is: If I have an List of Objects with different Clothes, how do I add them properly to my model?
btw: At the moment I have an Class "Gear" which hold the information for Clothes such as HP, Def, Damage and for SetEffects I have an other class which only holds the information what Clothes belong to it and what Seteffect does it give. I thought that it´s in that direction: https://msdn.microsoft.com/en-us/library/ff847512%28v=vs.93%29.aspx, but it seems that it is an completely different approach then mine.