public static Card CreateWeatherCard(BaseWeatherSpecialist weatherSpecialist, WeatherLevel weatherLevel, Rarity rarity, CardData CardData, Deck ActiveDeck) { Card card = CardData.AddCard(ActiveDeck); card.Rarity = rarity; card.Name = $"Change Weather - {weatherSpecialist.GetCardName(weatherLevel)}"; card.StylePath = "PreMade"; card.Description = $"{weatherSpecialist.GetDescription(weatherLevel)}"; card.AdditionalInstructions = "Lasts one minute if this card is played out of battle, or one round if played during battle."; card.AlertMessage = weatherSpecialist.GetAlertMessage(weatherLevel); card.CardPlayed = $"QueueEffect(\"Weather\", CardUserName, \"{weatherSpecialist.GetCardName(weatherLevel)}\", \"{weatherSpecialist.GetEffectKeyword(weatherLevel)}\", \"{weatherSpecialist.GetDamageModifier(weatherLevel)}\");\n" + $"TellAll($\"{weatherSpecialist.GetCardPlayedMessage(weatherLevel)}\");"; CardFactory.QuickAddAllLayerDetails(card); SetWeatherLayerVisibilities(card, weatherSpecialist.GetImageLayerName(), (int)weatherLevel); return(card); }
public static Card CreateStampedeCard(string cardName, string description, string alertMessage, string cardPlayedMessage, string imageLayerName, string totalDamage, string damageDiceStr, Rarity rarity, CardData CardData, Deck ActiveDeck) { Card card = CardData.AddCard(ActiveDeck); card.Rarity = rarity; card.Name = cardName; card.StylePath = "PreMade"; card.Description = description; card.AdditionalInstructions = "Everyone in the path must roll a dexterity saving throw.!"; card.AlertMessage = alertMessage; card.CardPlayed = $"QueueEffect(\"Stampede\", CardUserName, \"{cardName}\", \"{imageLayerName}\", \"{damageDiceStr}\");\n" + $"TellAll($\"{cardPlayedMessage}\");\n" + $"TellDm(\"caulfielder: Target NPCs, Monsters and Players, and press the Stampede button when ready to roll!\");"; CardFactory.QuickAddAllLayerDetails(card); SetStampedeLayerVisibilities(card, imageLayerName, totalDamage); card.Cooldown = 5; card.CooldownUnits = CooldownUnits.Minutes; return(card); }
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); }
public static Card AddGiftSpellCard(SpellDto spellDto, CardData CardData, Deck ActiveDeck) { double placeholderWidth; double placeholderHeight; Card scroll = CreateSpellCard("Gift", spellDto, CardData, ActiveDeck); scroll.Description = GetSpellDescription(spellDto, true); scroll.AdditionalInstructions = "Give this spell scroll to a player, NPC, or monster (enter their name below)."; scroll.AlertMessage = $"{userName} gave the {spellDto.name} spell scroll to {recipient}."; scroll.Expires = CardExpires.Never; CardFactory.AddPlayerNpcRecipientField(CardData, scroll, "scroll"); if (!CardStyles.Apply(scroll)) { int randomValue = CardFactory.random.Next(0, 100); if (randomValue < 40) { placeholderWidth = 155; placeholderHeight = 152; scroll.StylePath = "Scrolls\\Rods"; } else if (randomValue < 60) { placeholderWidth = 131; placeholderHeight = 130; scroll.StylePath = "Scrolls\\Smooth Light"; } else { placeholderWidth = 128; placeholderHeight = 127; scroll.StylePath = "Scrolls\\Tan"; } scroll.ScalePlaceholder(placeholderWidth, placeholderHeight); } return(scroll); }