public void CharacterPerformsHalfPhaseAction_OnlyHalfPhaseIsleft() { //arrange CombatSequence sequence = Factory.SequenceWithCharacterWithMixOfFullAndHalfPhaseManuevers; sequence.StartCombat(); Phase phase = sequence.ActivePhase; HeroSystemCharacter character = phase.Character; IManuever halfPhaseManuever = character.Manuevers["Sample Half 1"]; //act halfPhaseManuever.Perform(); //arrange Assert.AreEqual(.5, phase.PhaseLeft); }
public void CharacterPerformsTwoHalfPhaseAction_CharacterPhaseIsOver() { //arrange CombatSequence sequence = Factory.SequenceWithCharacterWithMixOfFullAndHalfPhaseManuevers; //sequence.AddCharacter(Factory.Factory.BaseCharacter); sequence.StartCombat(); Phase phase = sequence.ActivePhase; Phase nextPhase = sequence.NextCombatPhase; HeroSystemCharacter character = phase.Character; IManuever halfManuever2 = character.Manuevers["Sample Half 2"]; IManuever halfManuever = character.Manuevers["Sample Half 1"]; //act halfManuever.Perform(); halfManuever2.Perform(); //assert Assert.AreEqual(phase.Active, false); }
public void CharacterPerformsHalfPhaseAction_OnlyHalfPhaseActionsAreAvailableToBePerformed() { //arrange CombatSequence sequence = Factory.SequenceWithCharacterWithMixOfFullAndHalfPhaseManuevers; sequence.StartCombat(); Phase phase = sequence.ActivePhase; HeroSystemCharacter character = phase.Character; IManuever halfPhaseManuever = character.Manuevers["Sample Half 1"]; //act halfPhaseManuever.Perform(); //assert IManuever fullManuever = character.Manuevers["Sample Full"]; Assert.AreEqual(fullManuever.CanPerform, false); halfPhaseManuever = character.Manuevers["Sample Half 1"]; Assert.AreEqual(halfPhaseManuever.CanPerform, true); }
public void CharacterPerformsFullPhaseAction_CharacterPhaseIsOver() { //arrange CombatSequence sequence = Factory.SequenceWithCharacterWithMixOfFullAndHalfPhaseManuevers; HeroSystemCharacter nextC = Factory.Factory.BaseCharacter; nextC.DEX.MaxValue = 5; sequence.AddCharacter(Factory.Factory.BaseCharacter); sequence.StartCombat(); Phase phase = sequence.ActivePhase; HeroSystemCharacter character = phase.Character; Phase nextPhase = sequence.NextCombatPhase; IManuever fullManuever = character.Manuevers["Sample Full"]; //act fullManuever.Perform(); //assert Assert.AreEqual(phase.Active, false); Assert.AreEqual(sequence.ActivePhase, nextPhase); }