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); }