public void ShouldApplyRacialBonus() { //arrange ICharacterAttribute strAttribute = new CharacterAttribute(CharacterAttributeName.Strength, new AttributeScore(12)); ICharacterAttribute dexAttribute = new CharacterAttribute(CharacterAttributeName.Dexterity, new AttributeScore(14)); ICharacterAttribute conAttribute = new CharacterAttribute(CharacterAttributeName.Constitution, new AttributeScore(2)); ICharacterAttribute intAttribute = new CharacterAttribute(CharacterAttributeName.Intelligence, new AttributeScore(5)); ICharacterAttribute wizAttribute = new CharacterAttribute(CharacterAttributeName.Wisdom, new AttributeScore(7)); ICharacterAttribute chrAttribute = new CharacterAttribute(CharacterAttributeName.Charisma, new AttributeScore(9)); //act IAttributeScore expectedStr = CharacterRace.MountainDwarf.RacialAttributeAdjustment(strAttribute); IAttributeScore expectedDex = CharacterRace.MountainDwarf.RacialAttributeAdjustment(dexAttribute); IAttributeScore expectedCon = CharacterRace.MountainDwarf.RacialAttributeAdjustment(conAttribute); IAttributeScore expectedInt = CharacterRace.MountainDwarf.RacialAttributeAdjustment(intAttribute); IAttributeScore expectedWiz = CharacterRace.MountainDwarf.RacialAttributeAdjustment(wizAttribute); IAttributeScore expectedChr = CharacterRace.MountainDwarf.RacialAttributeAdjustment(chrAttribute); //assert expectedStr.Should().Be(new AttributeScore(2)); expectedDex.Should().Be(new AttributeScore(0)); expectedCon.Should().Be(new AttributeScore(2)); expectedInt.Should().Be(new AttributeScore(0)); expectedWiz.Should().Be(new AttributeScore(0)); expectedChr.Should().Be(new AttributeScore(0)); }
public AttributeSet(IAttributeScore strScore, IAttributeScore dexScore, IAttributeScore consScore, IAttributeScore intScore, IAttributeScore wisScore, IAttributeScore chrScore) { _attributes.Add(new StrengthAttribute(strScore)); _attributes.Add(new DexterityAttribute(dexScore)); _attributes.Add(new ConstitutionAttribute(consScore)); _attributes.Add(new IntellegenceAttribute(intScore)); _attributes.Add(new WisdomAttribute(wisScore)); _attributes.Add(new CharismaAttribute(chrScore)); }
public void ShouldAdd() { //arrange AttributeScore score1 = new AttributeScore(4); AttributeScore score2 = new AttributeScore(8); IAttributeScore totalScore = new AttributeScore(12); IAttributeScore actualScore = score1.Add(score2); //assert totalScore.Should().Be(actualScore); }
public void ShouldSubtract() { //arrange AttributeScore score1 = new AttributeScore(6); AttributeScore score2 = new AttributeScore(8); IAttributeScore totalScore = new AttributeScore(2); IAttributeScore actualScore = score2.Subtract(score1); //assert totalScore.Should().Be(actualScore); }
public void ShouldReturnActiveSkillBonus() { //arrange ISkill expectedSkillBase = new Deception(new CharismaAttribute(new AttributeScore(14)), true); AttributeScore score = new AttributeScore(4); //act IAttributeScore actualScore = expectedSkillBase.SkillBonus(); //assert actualScore.Should().Be(score); }
public IAttributeScore SkillBonus() { IAttributeScore score = _baseAttribute.Bonus(); if (!_activateSkill) { return(score); } score = score.Add(new AttributeScore(2)); return(score); }
public void ShouldReturnBonusOfBaseAttribute() { //arrange IntellegenceAttribute intellegenceAttribute = new IntellegenceAttribute(new AttributeScore(14)); ISkill history = new History(intellegenceAttribute); IAttributeScore expectedScore = new AttributeScore(2); //act IAttributeScore actualScore = history.SkillBonus(); //assert actualScore.Should().Be(expectedScore); }
public void ShouldReturnBonusOfBaseAttribute() { //arrange IntellegenceAttribute intellegenceAttribute = new IntellegenceAttribute(new AttributeScore(14)); ISkill investigation = new Investigation(intellegenceAttribute); IAttributeScore expectedScore = new AttributeScore(2); //act IAttributeScore actualScore = investigation.SkillBonus(); //assert actualScore.Should().Be(expectedScore); }
public void ShouldReturnAttributeBonus() { //arrange ICharacterAttribute attribute = new DexterityAttribute(new AttributeScore(1)); IAttributeScore expectedAttributeBonus = new AttributeScore(-5); //act IAttributeScore actualAttributeBonus = attribute.Bonus(); //assert actualAttributeBonus.Should().Be(expectedAttributeBonus); }
public void ShouldReturnBonusOfBaseAttribute() { //arrange CharismaAttribute dexterityAttribute = new CharismaAttribute(new AttributeScore(14)); ISkill performance = new Performance(dexterityAttribute); IAttributeScore expectedScore = new AttributeScore(2); //act IAttributeScore actualScore = performance.SkillBonus(); //assert actualScore.Should().Be(expectedScore); }
public void ShouldReturnBonusOfBaseAttribute() { //arrange DexterityAttribute dexterityAttribute = new DexterityAttribute(new AttributeScore(14)); ISkill sleightOfHand = new SleightOfHand(dexterityAttribute); IAttributeScore expectedScore = new AttributeScore(2); //act IAttributeScore actualScore = sleightOfHand.SkillBonus(); //assert actualScore.Should().Be(expectedScore); }
public void ShouldReturnBonusOfBaseAttribute() { //arrange CharismaAttribute charismaAttribute = new CharismaAttribute(new AttributeScore(14)); ISkill deception = new Deception(charismaAttribute, false); IAttributeScore expectedScore = new AttributeScore(2); //act IAttributeScore actualScore = deception.SkillBonus(); //assert actualScore.Should().Be(expectedScore); }
public void ShouldReturnBonusOfBaseAttribute() { //arrange DexterityAttribute dexterityAttribute = new DexterityAttribute(new AttributeScore(14)); ISkill acrobatics = new Acrobatics(dexterityAttribute); IAttributeScore expectedScore = new AttributeScore(2); //act IAttributeScore actualScore = acrobatics.SkillBonus(); //assert actualScore.Should().Be(expectedScore); }
public void ShouldReturnBonusOfBaseAttribute() { //arrange WisdomAttribute wisdomAttribute = new WisdomAttribute(new AttributeScore(14)); ISkill animalHandling = new AnimalHandling(wisdomAttribute); IAttributeScore expectedScore = new AttributeScore(2); //act IAttributeScore actualScore = animalHandling.SkillBonus(); //assert actualScore.Should().Be(expectedScore); }
public void ShouldReturnBonusOfBaseAttribute() { //arrange CharismaAttribute dexterityAttribute = new CharismaAttribute(new AttributeScore(14)); ISkill intimidation = new Intimidation(dexterityAttribute); IAttributeScore expectedScore = new AttributeScore(2); //act IAttributeScore actualScore = intimidation.SkillBonus(); //assert actualScore.Should().Be(expectedScore); }
public void ShouldReturnBonusOfBaseAttribute() { //arrange WisdomAttribute wisdomAttribute = new WisdomAttribute(new AttributeScore(14)); ISkill insight = new Insight(wisdomAttribute); IAttributeScore expectedScore = new AttributeScore(2); //act IAttributeScore actualScore = insight.SkillBonus(); //assert actualScore.Should().Be(expectedScore); }
public void ShouldReturnBonusOfBaseAttribute() { //arrange StrengthAttribute strengthAttribute = new StrengthAttribute(new AttributeScore(14)); ISkill athletics = new Athletics(strengthAttribute); IAttributeScore expectedScore = new AttributeScore(2); //act IAttributeScore actualScore = athletics.SkillBonus(); //assert actualScore.Should().Be(expectedScore); }
public void ShouldReturnBonusOfBaseAttribute() { //arrange WisdomAttribute wisdomAttribute = new WisdomAttribute(new AttributeScore(14)); ISkill perception = new Perception(wisdomAttribute); IAttributeScore expectedScore = new AttributeScore(2); //act IAttributeScore actualScore = perception.SkillBonus(); //assert actualScore.Should().Be(expectedScore); }
public ConstitutionAttribute(IAttributeScore value) : base(CharacterAttributeName.Constitution, value) { }
public void SetAttribute(IAttributeName attName, IAttributeScore attributeScore) { throw new NotImplementedException(); }
public void SetAttribute(IAttributeName attName, IAttributeScore attributeScore) { _attributes.Remove(GetAttributeFromName(attName)); _attributes.Add(new CharacterAttribute(attName, attributeScore)); }
public StrengthAttribute(IAttributeScore value) : base(CharacterAttributeName.Strength, value) { }
public IntellegenceAttribute(IAttributeScore value) : base(CharacterAttributeName.Intelligence, value) { }
public CharismaAttribute(IAttributeScore value) : base(CharacterAttributeName.Charisma, value) { }
public void Set(IAttributeScore expectedScore) { }
public void Set(IAttributeScore expectedScore) => _value = expectedScore;
public void ApplyRacialBonus(ICharacterRace race) => _racialAttributeAdjustment = race.RacialAttributeAdjustment(this);
public WisdomAttribute(IAttributeScore value) : base(CharacterAttributeName.Wisdom, value) { }
public CharacterAttribute(IAttributeName name, IAttributeScore value) { _name = name; _value = value; }
public DexterityAttribute(IAttributeScore value) : base(CharacterAttributeName.Dexterity, value) { }