public MinistryOfStrategicScienceLadyOfTheWoodCharacterCardController(Card card, TurnTakerController turnTakerController) : base(card, turnTakerController) { AllowFastCoroutinesDuringPretend = false; SpecialString specialString = base.SpecialStringMaker.ShowTokenPool(base.CharacterCard.FindTokenPool(LadyOfTheWoodElementPoolIdentifier)); specialString.ShowWhileIncapacitated = true; }
public AcceleratedEvolutionAnathemaCharacterCardController(Card card, TurnTakerController turnTakerController) : base(card, turnTakerController) { base.AddThisCardControllerToList(CardControllerListType.MakesIndestructible); SpecialString ss = base.SpecialStringMaker.ShowNumberOfCardsUnderCard(base.Card); ss.Condition = () => !base.CharacterCard.IsFlipped; }
public AnathemaCharacterCardController(Card card, TurnTakerController turnTakerController) : base(card, turnTakerController) { //show the number of villain targets in play base.SpecialStringMaker.ShowNumberOfCardsInPlay(new LinqCardCriteria((Card c) => base.IsVillainTarget(c) && c != base.CharacterCard, useCardsSuffix: false, singular: "other villain target", plural: "other villain targets")).Condition = (() => true); SpecialString ss = base.SpecialStringMaker.ShowIfElseSpecialString(() => NumberOfVillainTargetsInPlay >= 4 || (Game.IsAdvanced && NumberOfVillainTargetsInPlay >= 3), () => base.Card.Title + " is immune to damage.", () => "", () => true); ss.Condition = () => !base.CharacterCard.IsFlipped && (NumberOfVillainTargetsInPlay >= 4 || (Game.IsAdvanced && NumberOfVillainTargetsInPlay >= 3)); }
public void TestNullOperations() { SpecialString s1 = null, s2 = null; Assert.That(() => s1 == s2, Throws.InvalidOperationException); Assert.That(() => s1 != s2, Throws.InvalidOperationException); Assert.That(() => s1 << 0, Throws.InvalidOperationException); Assert.That(() => s1 >> 0, Throws.InvalidOperationException); }
public void TestReAssignment() { SpecialString s = "Microsoft"; Assert.That(s.ToString(), Is.EqualTo("Microsoft")); s = "RandomString"; Assert.That(s.ToString(), Is.EqualTo("RandomString")); s = "1"; Assert.That(s.ToString(), Is.EqualTo("1")); }
public void InputIsEmpty() { SpecialString s1 = "", s2 = ""; Assert.That(s1 == s2, Is.True, "Empty strings should be equal."); Assert.That(s1 != s2, Is.False, "Empty strings should be equal."); Assert.That(() => s1 << 2, Throws.InvalidOperationException, "Should not be possible to perform shift on strings with higher steps than characters."); Assert.That(() => s1 >> 2, Throws.InvalidOperationException, "Should not be possible to perform shift on strings with higher steps than characters."); Assert.That(s1 << 0, Is.EqualTo(s1), "Should be possible to perform shift on strings with equal steps and characters."); Assert.That(s1 >> 0, Is.EqualTo(s1), "Should be possible to perform shift on strings with equal steps and characters."); Assert.That(s1.ToString(), Is.Empty, "Should return an empty string."); }
public void TestEqualityOperation() { SpecialString s = "Microsoft", sameS = "Microsoft", longerS = "RandomString", shorterS = "2", lowerCaseS = "microsoft", upperCaseS = "MICROSOFT", sameLengthS = "Softmicro"; Assert.That(s == sameS, Is.True); Assert.That(s == longerS, Is.False); Assert.That(s == shorterS, Is.False); Assert.That(s == lowerCaseS, Is.False); Assert.That(s == upperCaseS, Is.False); Assert.That(s == sameLengthS, Is.False); Assert.That(s != sameS, Is.False); Assert.That(s != longerS, Is.True); Assert.That(s != shorterS, Is.True); Assert.That(s != lowerCaseS, Is.True); Assert.That(s != upperCaseS, Is.True); Assert.That(s != sameLengthS, Is.True); }
public void TestShiftOperations() { SpecialString s = "Microsoft"; Assert.That((s << 1).ToString(), Is.EqualTo("tMicrosof")); Assert.That((s << 0).ToString(), Is.EqualTo("tMicrosof")); Assert.That((s << -2).ToString(), Is.EqualTo("tMicrosof")); Assert.That((s << 9).ToString(), Is.EqualTo("tMicrosof")); Assert.That((s << 8).ToString(), Is.EqualTo("Microsoft")); Assert.That((s >> 1).ToString(), Is.EqualTo("icrosoftM")); Assert.That((s >> 0).ToString(), Is.EqualTo("icrosoftM")); Assert.That((s >> -2).ToString(), Is.EqualTo("icrosoftM")); Assert.That((s >> 9).ToString(), Is.EqualTo("icrosoftM")); Assert.That((s >> 8).ToString(), Is.EqualTo("Microsoft")); Assert.That(() => s << 10, Throws.InvalidOperationException); Assert.That(() => s >> 10, Throws.InvalidOperationException); }
public void NullInstantiation() { SpecialString s; Assert.That(() => s = new SpecialString(null), Throws.ArgumentNullException, "Not possible to assign null."); }
public PastNecroCharacterCardController(Card card, TurnTakerController turnTakerController) : base(card, turnTakerController) { SpecialString ss = base.SpecialStringMaker.ShowIfElseSpecialString(() => true, () => "Replacing the word “Hero” on " + base.Card.Title + "'s cards with “Villain”, and vice versa", () => "", showInEffectsList: () => true); ss.Condition = () => GameController.GetCardPropertyJournalEntryBoolean(base.CharacterCard, PastNecroPowerKey) == true; }