static CharmLibrary() { List <Charm> Charms = Utils.LoadCharms().Charms; foreach (Charm c in Charms) { switch (c.Ability) { case Ability.Archery: { Archery.Add(c); break; } case Ability.Athletics: { Athletics.Add(c); break; } case Ability.Awareness: { Awareness.Add(c); break; } default: { break; } } } }
public async Task <IActionResult> Edit(int id, [Bind("Athleticsid,Athleticsproficiency")] Athletics athletics) { if (id != athletics.Athleticsid) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(athletics); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AthleticsExists(athletics.Athleticsid)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(athletics)); }
public void ShouldReturnName() { //assign ISkill actualSkillBase = new Athletics(); //act ITextObj name = actualSkillBase.Name(); //assert name.Should().Be(new TextObj("Athletics")); }
public void Bonus_AthleticsSpecified_ShouldWork() { SetupCharacter(); Skills athletics = new Athletics(true, true); Assert.AreEqual(-5, athletics.Bonus); Assert.IsTrue(athletics.Proficiency); Assert.IsTrue(athletics.Expertise); }
public void ShouldReturnWisdomAsBaseAttribute() { //arrange ISkill skill = new Athletics(); ICharacterAttribute strengthAttribute = new StrengthAttribute(); //act ICharacterAttribute actualAttribute = skill.BaseAttribute(); //assert actualAttribute.Should().Be(strengthAttribute); }
public async Task <IActionResult> Create([Bind("Athleticsid,Athleticsproficiency")] Athletics athletics) { if (ModelState.IsValid) { _context.Add(athletics); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(athletics)); }
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 override string ToString() { return(Acrobatics.ToString() + ' ' + AnimalHandling.ToString() + ' ' + Arcana.ToString() + ' ' + Athletics.ToString() + ' ' + Deception.ToString() + ' ' + History.ToString() + ' ' + Insight.ToString() + ' ' + Intimidation.ToString() + ' ' + Investigation.ToString() + ' ' + Medicine.ToString() + ' ' + Nature.ToString() + ' ' + Perception.ToString() + ' ' + Performance.ToString() + ' ' + Persusion.ToString() + ' ' + Religion.ToString() + ' ' + SleightOfHand.ToString() + ' ' + Stealth.ToString() + ' ' + Survival.ToString()); }