more new cards

This commit is contained in:
stryan 2021-11-08 15:46:03 -05:00
parent fa38a05c9d
commit 8f9ee5cfbb
3 changed files with 20 additions and 16 deletions

View File

@ -16,6 +16,7 @@ type Card struct {
Owner int `json:"owner"`
Position int `json:"position"`
Spell bool `json:"spell"`
Token bool `json:"token"`
Effects []*Effect `json:"effects"`
}
@ -30,6 +31,7 @@ func NewEmpty(p int) *Card {
Owner: -1,
Position: p,
Spell: false,
Token: false,
Effects: []*Effect{},
}
}

View File

@ -18,6 +18,7 @@ const (
HealthPotion //both players get +1 health
Tree //grows to 8 after five turns
Goblin //adds two other 1 strength units
GoblinSpawn //1 power goblin token
)
const (
EmptyValue CardType = -1

View File

@ -8,9 +8,9 @@ import (
"fmt"
)
const _CardTypeName = "EmptyValueValkSpeedsterCommanderPaladinScholarWarriorFighterSevenShieldWallHealthPotionTreeGoblin"
const _CardTypeName = "EmptyValueValkSpeedsterCommanderPaladinScholarWarriorFighterSevenShieldWallHealthPotionTreeGoblinGoblinSpawn"
var _CardTypeIndex = [...]uint8{0, 10, 14, 23, 32, 39, 46, 53, 60, 65, 75, 87, 91, 97}
var _CardTypeIndex = [...]uint8{0, 10, 14, 23, 32, 39, 46, 53, 60, 65, 75, 87, 91, 97, 108}
func (i CardType) String() string {
i -= -1
@ -20,7 +20,7 @@ func (i CardType) String() string {
return _CardTypeName[_CardTypeIndex[i]:_CardTypeIndex[i+1]]
}
var _CardTypeValues = []CardType{-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}
var _CardTypeValues = []CardType{-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}
var _CardTypeNameToValueMap = map[string]CardType{
_CardTypeName[0:10]: -1,
@ -36,6 +36,7 @@ var _CardTypeNameToValueMap = map[string]CardType{
_CardTypeName[75:87]: 9,
_CardTypeName[87:91]: 10,
_CardTypeName[91:97]: 11,
_CardTypeName[97:108]: 12,
}
// CardTypeString retrieves an enum value from the enum constants string name.