public static Card CreateSayAnythingCard(int actualPowerLevel, int basePowerLevel, CardData CardData, Deck ActiveDeck) { Card card = CardData.AddCard(ActiveDeck); CardFactory.SetRarity(card, basePowerLevel, actualPowerLevel); string dieName; int multiplier; GetSayAnythingDieNameAndMultiplier(actualPowerLevel, out multiplier, out dieName); int offset = Math.Max(actualPowerLevel / 4 + 1, 1); card.Name = $"Say Anything - {multiplier}{dieName} + {offset}"; card.StylePath = "Say Anything"; card.Description = $"Make any player, NPC, or monster think or say anything, up to {multiplier}{dieName} times (dice are rolled when you play this card). To make a player *say* something, enter “!{{name}}: \"Your custom message” into the chat room. To make a player *think* something, enter “!{{name}}: (Your custom thoughts” into the chat room. For example: “!Fred: (Yummy...”."; card.AdditionalInstructions = "No ads or hate speech - you could get banned!"; card.AlertMessage = $"{{{{username}}}} played Say Anything - {multiplier}{dieName}+{offset}//!RollDie({multiplier}{dieName}+{offset}, \"Say Anything\")"; card.CardPlayed = "AddViewerCharge(CardUserName, \"Say Anything\", ViewerDieRollTotal);\n" + "TellAll($\"{CardUserName} has Say Anything {ViewerDieRollTotal} times!\");"; CardFactory.QuickAddAllLayerDetails(card); SetSayAnythingLayerVisibilities(card, dieName, multiplier, offset); return(card); }
public static Card CreateBonusPenaltyCard(string rollKind, int modifier, int powerLevel, bool isSecret, CardData cardData, Deck parentDeck) { Card card = cardData.AddCard(parentDeck); CardFactory.SetRarity(card, powerLevel, modifier); card.Name = GetDieModTitle(isSecret, rollKind, modifier); card.StylePath = "Die Mods"; string cardName; string modType = GetModType(rollKind); int lastIndexOfSpace = card.Name.LastIndexOf(' '); string value = "0"; if (lastIndexOfSpace > 0) { value = card.Name.Substring(lastIndexOfSpace).Trim(); value = value.TrimStart('+'); } if (isSecret) { cardName = "a secret card"; card.CardReceived = $"GiveMagic(CardRecipient, \"SecretCardMod\", CardUserName, CardGuid, \"{modType}\", {value});"; } else { cardName = card.Name; card.CardPlayed = $"GiveMagic(CardRecipient, \"ActiveCardMod\", CardUserName, CardGuid, \"{modType}\", {value});"; } card.AlertMessage = $"{{{{username}}}} gave {cardName} to {{{{recipient}}}}."; card.Description = GetDieModDescription(rollKind, modifier, isSecret); CardFactory.QuickAddAllLayerDetails(card); SetDieModLayerVisibilities(card, rollKind, modifier, isSecret); string bonusPenalty = GetBonusPenaltyNoun(modifier); CardFactory.AddPlayerNpcRecipientField(cardData, card, bonusPenalty); return(card); }