/* * This call should come from the controller handling user input for * Level up mod selection. Will add the selected mod to the player inventory. */ public bool EquipBuff(int index) { if (availableBuffsForUserSelection == null) { return(false); } Debug.Log("Equiping Buff #" + index); BuffMod mod = availableBuffsForUserSelection[index]; equippedBuffs.Add(mod); availableBuffsForUserSelection = null; return(true); }
/* * For use when player levels up and all core systems are unlocked. * Generates 3 random buff mods to be returned to the UI for user selection. */ public List <BuffMod> GenerateBuffOptions(int currentTier)//pass buff Loot table? //Randomness? { Debug.Log("Generating some buffs"); ModFactory factory = new ModFactory(); List <BuffMod> choices = new List <BuffMod>(); BuffMod mod1 = lootTable.RollBuff(); Debug.Log(mod1); choices.Add(mod1); BuffMod mod2 = lootTable.RollBuff(); Debug.Log(mod2); choices.Add(mod2); BuffMod mod3 = lootTable.RollBuff(); Debug.Log(mod3); choices.Add(mod3); return(choices); }