clean up effects

This commit is contained in:
stryan 2021-10-07 12:46:59 -04:00
parent d47ec6e6de
commit dc117077af
1 changed files with 3 additions and 3 deletions

View File

@ -25,15 +25,15 @@ func RemoveEffect(source uuid.UUID, c *Card) {
func AddEffect(c *Card, e *Effect) {
if c.Type == EmptyValue {
log.Println("Can't add effect to empty card")
//can't apply effect to empty card
return
}
if c.Position < 0 {
if c.Position < 0 || c.Position > 3 {
log.Println("trying to apply effect to card not on the board")
}
for _, v := range c.Effects {
if v.Owner == e.Owner && v.ID == e.ID && v.Target == e.Target {
log.Println("can't stack effects")
//can't stack effects
return
}
}