public int GetMaxFightingValue(FightingValue fightingValue, AbstractTalentFighting talent) { var taw = GetFightingValue(fightingValue, talent); var bonusTaw = GetModFightingValue(fightingValue, talent); return(taw + bonusTaw); }
public int GetFightingValue(FightingValue fightingValue, AbstractTalentFighting talent) { if (talent == null) { return(0); } Dictionary <AbstractTalentFighting, int> fightingDictionary; FightingValueDictionary.TryGetValue(fightingValue, out fightingDictionary); if (fightingDictionary.TryGetValue(talent, out int innerValue)) { return(innerValue); } return(0); }
public void SetFightingValue(FightingValue fightingValue, AbstractTalentFighting talent, int value) { if (talent == null) { return; } Dictionary <AbstractTalentFighting, int> fightingDictionary; FightingValueDictionary.TryGetValue(fightingValue, out fightingDictionary); if (fightingDictionary.TryGetValue(talent, out int innerValue)) { fightingDictionary.Remove(talent); } fightingDictionary.Add(talent, value); }
public int GetModFightingValue(FightingValue fightingValue, AbstractTalentFighting talent) { if (talent == null) { return(0); } if (fightingValue == FightingValue.Attacke) { return(charakter.Traits.GetATBonus(talent)); } else if (fightingValue == FightingValue.Blocken) { return(charakter.Traits.GetBLBonus(talent)); } else if (fightingValue == FightingValue.Parade) { return(charakter.Traits.GetPABonus(talent)); } else { throw new NotImplementedException(); } }