public override async Task MoveEffect(CombatInstance inst) { foreach (UserAccount user in inst.GetTeam(UserHandler.GetUser(inst.GetCardTurn().Owner)).Members) { foreach (BasicCard card in user.ActiveCards) { if (card.Owner != inst.GetCardTurn().Owner) { BuffDebuff buff = new BuffDebuff() { Name = "Hair Raise", Buff = true, Origin = $"({inst.GetCardTurn().Signature})", Description = "Untargetable and take 25% less damage.", DefensePercentBuff = 0.25, Untargetable = true, Rounds = 2 }; card.Effects.Add(buff); } } } await MessageHandler.SendMessage(inst.Location, $"{inst.GetCardTurn().Signature} alerts the party to danger! All other party members are untargetable for 2 rounds and take 25% less damage."); OnCooldown = true; CurrentCooldown = Cooldown; inst.GetCardTurn().Actions--; }
public override async Task MoveEffect(CombatInstance inst) { foreach (UserAccount user in inst.GetTeam(UserHandler.GetUser(inst.GetCardTurn().Owner)).Members) { foreach (BasicCard card in user.ActiveCards) { BuffDebuff buff = new BuffDebuff() { Name = $"Stalwart Soul", Buff = true, Origin = $"({inst.GetCardTurn().Signature})", Description = "All damage nullified.", DefenseSetBuff = 0, Rounds = 2 }; card.Effects.Add(buff); } } await MessageHandler.SendMessage(inst.Location, $"{inst.GetCardTurn().Signature} fortifies the party against all damage!"); inst.GetCardTurn().Actions--; OnCooldown = true; CurrentCooldown = Cooldown; }
public override async Task MoveEffect(CombatInstance inst, List <BasicCard> targets) { foreach (BasicCard card in targets) { card.AddBuff(new BuffDebuff() { Name = "Hyped", Buff = true, Origin = $"({inst.GetCardTurn().Signature})", Description = "1 bonus action.", BonusActions = 1, Turns = 1 }); var str = ""; List <BuffDebuff> debuffs = new List <BuffDebuff>(); foreach (BuffDebuff buff in card.Effects) { if (!buff.Buff) { debuffs.Add(buff); } } if (debuffs.Count > 0) { BuffDebuff debuffToRemove = debuffs[RandomGen.RandomNum(0, debuffs.Count - 1)]; str += $" and had their {debuffToRemove.Name} debuff removed."; card.Effects.Remove(debuffToRemove); } else { str += $". They had no debuffs to remove."; } await MessageHandler.SendMessage(inst.Location, $"{inst.GetCardTurn().Signature} plays a tune for {card.Signature}. They gain 1 bonus action on their next turn{str}"); } OnCooldown = true; CurrentCooldown = Cooldown; inst.GetCardTurn().Actions--; }
public BasicPassive(bool def) { eff = new BuffDebuff(); }
public void AddBuff(BuffDebuff buff) { CurrentHP += buff.Growth; TotalHP += buff.TotalGrowth; Effects.Add(buff); }