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

View File

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

View File

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