public void AddTalent(Talent newone) { _nextId++; newone.Id = _nextId; _talents.Add(_nextId, newone); ActualizeJson(); }
public TalentBox(Talent talent, Character character) { if (character == null) return; this.talent = talent; this.character = character; character.ExperienceChanged += CharacterOnExperienceChanged; character.PAChanged += CharacterOnExperienceChanged; }
public void ContructorSimpleTest() { var talent = new Talent(); Assert.Equal(Aspect.None, talent.PrimaryAspect); Assert.Equal(Aspect.None, talent.SecondaryAspect); Assert.Equal(0, talent.XPCost); Assert.Equal(false, talent.HaveBonus); }
public void LevelHighBoundTest() { Talent talent = new Talent( "Test", TalentType.General, Aspect.Acier); talent.Increment(5); talent.Increment(); Assert.Equal(5, talent.Level); }
public void ConstructorParametersTest(TalentType type, Aspect primary, Aspect secondary) { Talent talent; if (secondary == Aspect.None) talent = new Talent("Test", type, primary); else { talent = new Talent("Test", type, primary, secondary); } Assert.Equal("Test", talent.Name); Assert.Equal(type, talent.Type); Assert.Equal(primary, talent.PrimaryAspect); Assert.Equal(secondary, talent.SecondaryAspect); }
private void OnCharacterChanged(Character caller) { if (caller != null) { armorSet = caller.Inventory.Armor; talent = caller.GetTalent("Resistance"); talent.LevelChanged += OnTalentChanged; } else { armorSet = new ArmorSet(); talent = null; } OnPropertyChanged(null); }
public void LevelLowBoundTest() { Talent talent = new Talent( "Test", TalentType.General, Aspect.Acier); talent.Decrement(); Assert.Equal(0, talent.Level); }
public void SimpleLevelTest(int level, int xp) { Talent talent = new Talent( "Test", TalentType.General, Aspect.Acier); talent.Increment(level); Assert.Equal(level, talent.Level); Assert.Equal(xp, talent.XPCost); }