add diviner,mesmer,hologram,elephant,uuuh probably more things

This commit is contained in:
stryan 2021-11-14 14:43:04 -05:00
parent 59cfb71a5e
commit 671f1a059d
4 changed files with 39 additions and 17 deletions

View File

@ -19,7 +19,6 @@ 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
Chupacabra //Destroy target creature
//Rank 2
@ -27,10 +26,25 @@ const (
Enemy //puts -1 token on enemy unit
//Rank 3
Duelist
Duelist //puts +0/+1 on allied unit
//Rank 4
Vanguard
Vanguard //puts +1/+0 on allied unit
//Rank 5
Elephant //Created a dud on enemy board
//Rank 6
Mesmerist //Shuffles enemy deck
Diviner //Peek top 3, bottom 2
//Rank 8
Hologram //Can't deal HP damage, disapears after 3 turns
//Tokens,etc
GoblinSpawn //1 power goblin token
Dud //0 power token
)
const (
EmptyValue CardType = -1

View File

@ -8,9 +8,9 @@ import (
"fmt"
)
const _CardTypeName = "EmptyValueValkSpeedsterCommanderPaladinScholarWarriorFighterSevenShieldWallHealthPotionTreeGoblinGoblinSpawnChupacabraAllyEnemyDuelistVanguard"
const _CardTypeName = "EmptyValueValkSpeedsterCommanderPaladinScholarWarriorFighterSevenShieldWallHealthPotionTreeGoblinChupacabraAllyEnemyDuelistVanguardElephantMesmeristDivinerHologramGoblinSpawnDud"
var _CardTypeIndex = [...]uint8{0, 10, 14, 23, 32, 39, 46, 53, 60, 65, 75, 87, 91, 97, 108, 118, 122, 127, 134, 142}
var _CardTypeIndex = [...]uint8{0, 10, 14, 23, 32, 39, 46, 53, 60, 65, 75, 87, 91, 97, 107, 111, 116, 123, 131, 139, 148, 155, 163, 174, 177}
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, 12, 13, 14, 15, 16, 17}
var _CardTypeValues = []CardType{-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22}
var _CardTypeNameToValueMap = map[string]CardType{
_CardTypeName[0:10]: -1,
@ -36,12 +36,17 @@ var _CardTypeNameToValueMap = map[string]CardType{
_CardTypeName[75:87]: 9,
_CardTypeName[87:91]: 10,
_CardTypeName[91:97]: 11,
_CardTypeName[97:108]: 12,
_CardTypeName[108:118]: 13,
_CardTypeName[118:122]: 14,
_CardTypeName[122:127]: 15,
_CardTypeName[127:134]: 16,
_CardTypeName[134:142]: 17,
_CardTypeName[97:107]: 12,
_CardTypeName[107:111]: 13,
_CardTypeName[111:116]: 14,
_CardTypeName[116:123]: 15,
_CardTypeName[123:131]: 16,
_CardTypeName[131:139]: 17,
_CardTypeName[139:148]: 18,
_CardTypeName[148:155]: 19,
_CardTypeName[155:163]: 20,
_CardTypeName[163:174]: 21,
_CardTypeName[174:177]: 22,
}
// CardTypeString retrieves an enum value from the enum constants string name.

View File

@ -11,6 +11,7 @@ type Effect struct {
Target uuid.UUID
ID int
Modifier int
NeedsCard bool
}
func RemoveEffect(source uuid.UUID, c *Card) {
@ -34,7 +35,7 @@ func RemovePlayerEffect(source uuid.UUID, p *Player) {
}
}
func AddEffect(c *Card, e *Effect) {
if c.Type == EmptyValue {
if c.Type == EmptyValue && e.NeedsCard {
//can't apply effect to empty card
return
}

View File

@ -16,7 +16,9 @@ const (
const (
TargetSelf = iota
TargetOwn
TargetOwnEmpty
TargetOpp
TargetOppEmpty
TargetAny
TargetNone
)