From 8f9ee5cfbb8c6718085b1c1c69feea5634818eab Mon Sep 17 00:00:00 2001 From: Steve Date: Mon, 8 Nov 2021 15:46:03 -0500 Subject: [PATCH] more new cards --- card.go | 2 ++ cardtype.go | 1 + cardtype_enumer.go | 33 +++++++++++++++++---------------- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/card.go b/card.go index f1e5d83..d519461 100644 --- a/card.go +++ b/card.go @@ -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{}, } } diff --git a/cardtype.go b/cardtype.go index bbb6fab..e0f0db3 100644 --- a/cardtype.go +++ b/cardtype.go @@ -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 diff --git a/cardtype_enumer.go b/cardtype_enumer.go index 70f15ab..c6ebb77 100644 --- a/cardtype_enumer.go +++ b/cardtype_enumer.go @@ -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,22 +20,23 @@ 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, - _CardTypeName[10:14]: 0, - _CardTypeName[14:23]: 1, - _CardTypeName[23:32]: 2, - _CardTypeName[32:39]: 3, - _CardTypeName[39:46]: 4, - _CardTypeName[46:53]: 5, - _CardTypeName[53:60]: 6, - _CardTypeName[60:65]: 7, - _CardTypeName[65:75]: 8, - _CardTypeName[75:87]: 9, - _CardTypeName[87:91]: 10, - _CardTypeName[91:97]: 11, + _CardTypeName[0:10]: -1, + _CardTypeName[10:14]: 0, + _CardTypeName[14:23]: 1, + _CardTypeName[23:32]: 2, + _CardTypeName[32:39]: 3, + _CardTypeName[39:46]: 4, + _CardTypeName[46:53]: 5, + _CardTypeName[53:60]: 6, + _CardTypeName[60:65]: 7, + _CardTypeName[65:75]: 8, + _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.