/// <summary> /// Sums up the stat boosts the character has active at the moment. /// </summary> private void GenerateBoosts() { currentBoost = new Boost(); Boost mergeBoost = new Boost(); mergeBoost.boostType = BoostType.DECREASE; for (int i = 0; i < boosts.Count; i++) { if (boosts[i].boostType == BoostType.DECREASE) { mergeBoost.MergeBoost(boosts[i]); boosts.RemoveAt(i); i--; mergeBoost.ActivateBoost(); } } if (mergeBoost.IsActive()) { boosts.Add(mergeBoost); } for (int i = 0; i < boosts.Count; i++) { currentBoost.AddBoost(boosts[i]); } }
public override void CopyValues(ScrObjLibraryEntry other) { base.CopyValues(other); CharacterSkill cs = (CharacterSkill)other; icon = cs.icon; description = cs.description; activationType = cs.activationType; chance = cs.chance; percent = cs.percent; value = cs.value; boost = new Boost(); boost.AddBoost(cs.boost); includeSelf = cs.includeSelf; range = cs.range; rangeMax = cs.rangeMax; enemyCanAttack = cs.enemyCanAttack; weaponReq = cs.weaponReq; terrainReq = new List <TerrainTile>(); for (int i = 0; i < cs.terrainReq.Count; i++) { terrainReq.Add(cs.terrainReq[i]); } }
public InventoryTuple(ItemEntry item, int index = -1, int charges = -1) { this.index = index; itemz = item; if (item == null) { return; } uuid = item.uuid; icon = item.icon; repColor = item.repColor; entryName = item.entryName; UpdateBonus(); currentCharges = (charges == -1) ? maxCharge : charges; range.min = item.range.min; range.max = item.range.max; skillReq = item.skillReq; boost = new Boost(); boost.AddBoost(item.boost); itemCategory = item.itemCategory; weaponType = item.weaponType; attackType = item.attackType; keyType = item.keyType; advantageType = new List <MovementType>(); for (int i = 0; i < item.advantageType.Count; i++) { advantageType.Add(item.advantageType[i]); } }