예제 #1
0
        public void ProvidesDamageBasedOnEnergyType()
        {
            var sorcerer   = CharacterTestTemplates.Sorcerer();
            var dragonType = new DragonType();

            dragonType.EnergyType  = "cold";
            dragonType.BreathRange = 30;
            dragonType.BreathShape = "cone";
            var draconic = new Mock <IDraconicBloodline>();

            draconic.Setup(x => x.DragonType).Returns(dragonType);
            sorcerer.Add(draconic.Object);

            sorcerer.SetLevel(10);

            var breath = new BreathWeapon();

            sorcerer.Add(breath);

            Assert.Equal("10d6", breath.Damage.ToString());
            Assert.Equal(15, breath.SaveDC);
            sorcerer.AbilityScores.SetScore(AbilityScoreTypes.Charisma, 16);
            Assert.Equal(18, breath.SaveDC);

            Assert.Equal(1, breath.UsesPerDay);
            Assert.Equal("Breath Weapon (30' cone, 10d6 cold, DC 18, 1/day)", breath.DisplayString());
        }
예제 #2
0
파일: HumanAI.cs 프로젝트: Obberton13/LD33
 void OnTriggerExit2D(Collider2D other)
 {
     if (other.GetComponent <PlayerController>() != null)
     {
         _collidingWithPlayer = false;
         return;
     }
     if (other.GetComponent <BreathWeapon>() != null)
     {
         _collidingWithBreath = null;
     }
 }
예제 #3
0
파일: HumanAI.cs 프로젝트: Obberton13/LD33
 void OnTriggerExit2D(Collider2D other)
 {
     if(other.GetComponent<PlayerController>()!=null)
     {
         _collidingWithPlayer = false;
         return;
     }
     if(other.GetComponent<BreathWeapon>()!=null)
     {
         _collidingWithBreath = null;
     }
 }
예제 #4
0
파일: HumanAI.cs 프로젝트: Obberton13/LD33
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.GetComponent<PlayerController> ()!=null)
     {
         _collidingWithPlayer = true;
     }
     BreathWeapon collidingWith;
     if((collidingWith = other.GetComponent<BreathWeapon>())!=null)
     {
         _collidingWithBreath = collidingWith;
     }
 }
예제 #5
0
파일: HumanAI.cs 프로젝트: Obberton13/LD33
    void OnTriggerEnter2D(Collider2D other)
    {
        if (other.GetComponent <PlayerController> () != null)
        {
            _collidingWithPlayer = true;
        }
        BreathWeapon collidingWith;

        if ((collidingWith = other.GetComponent <BreathWeapon>()) != null)
        {
            _collidingWithBreath = collidingWith;
        }
    }