public void TestSet_Variable() { var room = InARoom(out IWorld world); var effect = new EffectBlueprint() { Set = "X+5" }.Create().Single(); effect.Apply(GetSystemArgs(null, room)); Assert.AreEqual(5, room.V["X"]); }
public void TestSet_Stat() { var room = InARoom(out IWorld world); var effect = new EffectBlueprint() { Set = "Fight+5" }.Create().Single(); effect.Apply(GetSystemArgs(null, room)); Assert.AreEqual(5, room.BaseStats["Fight"]); }
public void TestEffect_KillPlayer() { TwoInARoom(out You you, out IActor them, out IWorld world); var effect = new EffectBlueprint() { Kill = "Nukes" }.Create().Single(); Assert.IsFalse(you.Dead); Assert.IsFalse(them.Dead); effect.Apply(GetSystemArgs(you, them)); Assert.IsTrue(you.Dead); Assert.IsFalse(them.Dead); }