コード例 #1
0
        public void TestTargetSignature_NoModifiers()
        {
            Mech attacker = TestHelper.BuildTestMech();
            Mech target   = TestHelper.BuildTestMech();

            EWState attackerState = new EWState(attacker);
            EWState targetState   = new EWState(target);

            Assert.AreEqual(1.0f, SensorLockHelper.GetTargetSignature(target, attackerState));
        }
コード例 #2
0
        public void TestTargetSignature_Stealth_Minus_20pct()
        {
            Mech attacker = TestHelper.BuildTestMech();
            Mech target   = TestHelper.BuildTestMech();

            // Stealth - <signature_modifier>_<details_modifier>_<mediumAttackMod>_<longAttackmod>_<extremeAttackMod>
            target.StatCollection.Set(ModStats.StealthEffect, "0.20_2_1_2_3");

            EWState attackerState = new EWState(attacker);

            Assert.AreEqual(0.8f, SensorLockHelper.GetTargetSignature(target, attackerState));
        }
コード例 #3
0
        public void TestTargetSignature_Stealth_20pct()
        {
            Mech attacker = TestHelper.BuildTestMech();
            Mech target   = TestHelper.BuildTestMech();

            Traverse isShutdownT = Traverse.Create(target).Field("_isShutDown");

            isShutdownT.SetValue(true);

            EWState attackerState = new EWState(attacker);
            EWState targetState   = new EWState(target);

            Assert.AreEqual(0.5f, SensorLockHelper.GetTargetSignature(target, attackerState));
        }