mirror of
https://github.com/SamueleLorefice/isleBot.git
synced 2026-01-15 06:03:42 +00:00
Implemented database basic functions, added ToFormattedString to Card class, improved commands sending to the guild manager on discord, added toString to user class
This commit is contained in:
15
Card.cs
15
Card.cs
@@ -13,8 +13,16 @@ public class Card {
|
||||
public int CurrentHealth { get; set; }
|
||||
public User Owner { get; set; }
|
||||
|
||||
public override string ToString() {
|
||||
return $"{Name} ATK: {Attack} DEF: {Defense} HP: {CurrentHealth}/{MaxHealth}";
|
||||
|
||||
public override string ToString() => $"{Name} - Atk {Attack} Def {Defense} HP {CurrentHealth}/{MaxHealth}";
|
||||
|
||||
public string ToFormattedString() {
|
||||
var cardStr = $"**{Name}**\n" +
|
||||
$"**Class:** *COMING SOON*\n"+
|
||||
$"**ATK:** {Attack}\n" +
|
||||
$"**DEF:** {Defense}\n" +
|
||||
$"**HP:** {CurrentHealth}/{MaxHealth}\n";
|
||||
return cardStr;
|
||||
}
|
||||
|
||||
public Card(string name, int attack, int defense, int maxHealth) {
|
||||
@@ -24,5 +32,4 @@ public class Card {
|
||||
MaxHealth = maxHealth;
|
||||
CurrentHealth = maxHealth;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user