コード例 #1
0
        public void Battle_AdventurerFighterData()
        {
            AdventurerFighterData adventurerData = adventurerAgent.GetComponent <AdventurerFighterData>();

            Assert.AreEqual(20, adventurerData.startHp);
            Assert.IsNotNull(adventurerData.sprite);
            Assert.IsNotNull(adventurerData.playerData);
            Assert.IsNotNull(adventurerData.adventurerInventory);
        }
コード例 #2
0
        public void Battle_ActionHeal()
        {
            BattleSubSystem battleSubSystem = StartBattle(BattleEnvironments.Forest);

            AdventurerFighterData adventurerData = adventurerAgent.GetComponent <AdventurerFighterData>();

            //adventurerSystem.OnHealButton(adventurerAgent);

            battleSubSystem.PlayerFighterUnit.CurrentHp = 1;
            battleSubSystem.PlayerFighterUnit.Heal(5);
            Assert.AreEqual(6, battleSubSystem.PlayerFighterUnit.CurrentHp);

            battleSubSystem.PlayerFighterUnit.CurrentHp = 1;
            battleSubSystem.PlayerFighterUnit.Heal(100);
            Assert.AreEqual(adventurerData.startHp, battleSubSystem.PlayerFighterUnit.CurrentHp, "Healing can't overcome the start hp  threshold");
        }