Documentation
¶
Overview ¶
Package microdungeon is a generated protocol buffer package.
It is generated from these files:
ability_scores.proto alignment.proto armour.proto character.proto class.proto damage.proto race.proto skill.proto types.proto weapon.proto
It has these top-level messages:
Ability Score Modifier Alignment Armour Character Class Race Skill Calculator Ammunition Weapon
Index ¶
- Constants
- Variables
- type Ability
- type AbilityType
- type Alignment
- func ChaoticEvilAlignment() *Alignment
- func ChaoticGoodAlignment() *Alignment
- func ChaoticNeutralAlignment() *Alignment
- func LawfulEvilAlignment() *Alignment
- func LawfulGoodAlignment() *Alignment
- func LawfulNeutralAlignment() *Alignment
- func NeutralAlignment() *Alignment
- func NeutralEvilAlignment() *Alignment
- func NeutralGoodAlignment() *Alignment
- type Ammunition
- func (*Ammunition) Descriptor() ([]byte, []int)
- func (m *Ammunition) GetAliases() []string
- func (m *Ammunition) GetDamageType() DamageType
- func (m *Ammunition) GetDescription() string
- func (m *Ammunition) GetModifiers() []*Modifier
- func (m *Ammunition) GetName() string
- func (m *Ammunition) GetRangeModifier() uint32
- func (m *Ammunition) GetType() Ammunition_Type
- func (m *Ammunition) GetWc() *Calculator
- func (m *Ammunition) GetWeight() uint32
- func (*Ammunition) ProtoMessage()
- func (m *Ammunition) Reset()
- func (m *Ammunition) String() string
- type Ammunition_Type
- type Armour
- func (*Armour) Descriptor() ([]byte, []int)
- func (m *Armour) GetAc() *Calculator
- func (m *Armour) GetAliases() []string
- func (m *Armour) GetDescription() string
- func (m *Armour) GetModifiers() []*Modifier
- func (m *Armour) GetName() string
- func (m *Armour) GetStealthAdvantage() bool
- func (m *Armour) GetType() Armour_Type
- func (m *Armour) GetWeight() uint32
- func (m *Armour) GetWeightClass() WeightClass
- func (m *Armour) GetWorn() bool
- func (*Armour) ProtoMessage()
- func (m *Armour) Reset()
- func (m *Armour) String() string
- func (a *Armour) Wear(c *Character) error
- type Armour_Type
- type Calculator
- type Character
- func (*Character) Descriptor() ([]byte, []int)
- func (m *Character) GetAlignment() *Alignment
- func (m *Character) GetArmour() []*Armour
- func (m *Character) GetExperience() uint32
- func (m *Character) GetGender() Character_Gender
- func (m *Character) GetLevel() uint32
- func (m *Character) GetName() string
- func (m *Character) GetPlayerName() string
- func (m *Character) GetRace() *Race
- func (m *Character) GetScore() *Score
- func (m *Character) GetWielding() *Weapon
- func (*Character) ProtoMessage()
- func (m *Character) Reset()
- func (m *Character) String() string
- type Character_Gender
- type Class
- type DamageType
- type Modifier
- type Race
- func (*Race) Descriptor() ([]byte, []int)
- func (m *Race) GetDescription() string
- func (m *Race) GetGenus() string
- func (m *Race) GetKnownLanguages() []string
- func (m *Race) GetName() string
- func (m *Race) GetNightVision() bool
- func (m *Race) GetScore() *Score
- func (m *Race) GetUndead() bool
- func (*Race) ProtoMessage()
- func (m *Race) Reset()
- func (m *Race) String() string
- type Score
- func (sc *Score) Charisma() int32
- func (sc *Score) Constitution() int32
- func (*Score) Descriptor() ([]byte, []int)
- func (sc *Score) Dexterity() int32
- func (m *Score) GetSet() []*Ability
- func (sc *Score) Intelligence() int32
- func (*Score) ProtoMessage()
- func (m *Score) Reset()
- func (sc *Score) Strength() int32
- func (m *Score) String() string
- func (sc *Score) Wisdom() int32
- type Skill
- func (*Skill) Descriptor() ([]byte, []int)
- func (sk *Skill) Do(roll int32, char *Character) (int32, bool, error)
- func (m *Skill) GetDescription() string
- func (m *Skill) GetDifficultyClass() uint32
- func (m *Skill) GetModifiers() []*Modifier
- func (m *Skill) GetName() string
- func (m *Skill) GetTrained() bool
- func (*Skill) ProtoMessage()
- func (m *Skill) Reset()
- func (m *Skill) String() string
- type Weapon
- func (*Weapon) Descriptor() ([]byte, []int)
- func (m *Weapon) GetAliases() []string
- func (m *Weapon) GetAttributes() isWeapon_Attributes
- func (m *Weapon) GetDamageType() DamageType
- func (m *Weapon) GetDescription() string
- func (m *Weapon) GetModifiers() []*Modifier
- func (m *Weapon) GetName() string
- func (m *Weapon) GetProjectileAttributes() *Weapon_ProjectileAttributes
- func (m *Weapon) GetReach() bool
- func (m *Weapon) GetStealthAdvantage() bool
- func (m *Weapon) GetThrown() bool
- func (m *Weapon) GetTwoHanded() bool
- func (m *Weapon) GetType() Weapon_Type
- func (m *Weapon) GetVersatile() bool
- func (m *Weapon) GetWc() *Calculator
- func (m *Weapon) GetWeight() uint32
- func (m *Weapon) GetWeightClass() WeightClass
- func (m *Weapon) GetWielded() bool
- func (*Weapon) ProtoMessage()
- func (m *Weapon) Reset()
- func (m *Weapon) String() string
- func (w *Weapon) Unwield(c *Character) error
- func (w *Weapon) Wield(c *Character) error
- func (*Weapon) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type Weapon_DamageType
- type Weapon_ProjectileAttributes
- func (*Weapon_ProjectileAttributes) Descriptor() ([]byte, []int)
- func (m *Weapon_ProjectileAttributes) GetMagazineSize() uint32
- func (m *Weapon_ProjectileAttributes) GetPerShot() uint32
- func (m *Weapon_ProjectileAttributes) GetRangeMax() uint32
- func (m *Weapon_ProjectileAttributes) GetRangeMin() uint32
- func (m *Weapon_ProjectileAttributes) GetReloadTime() uint32
- func (m *Weapon_ProjectileAttributes) GetType() Ammunition_Type
- func (*Weapon_ProjectileAttributes) ProtoMessage()
- func (m *Weapon_ProjectileAttributes) Reset()
- func (m *Weapon_ProjectileAttributes) String() string
- type Weapon_ProjectileAttributes_
- type Weapon_Type
- type WeightClass
Constants ¶
const ( // LawfulGood alignment. LawfulGood = "Lawful Good" // NeutralGood alignment. NeutralGood = "Neutral Good" // ChaoticGood alignment. ChaoticGood = "Chaotic Good" // LawfulNeutral alignment LawfulNeutral = "Lawful Neutral" // Neutral alignment Neutral = "Neutral" // ChaoticNeutral alignment ChaoticNeutral = "Chaotic Neutral" // LawfulEvil alignment LawfulEvil = "Lawful Evil" // NeutralEvil alignment NeutralEvil = "Neutral Evil" // ChaoticEvil alignment ChaoticEvil = "Chaotic Evil" )
Variables ¶
var ( // MaxRings is the max number of rings a character can wear. // TODO: make this dependent on race (we may want to support a race with // 3 hands for example). MaxRings = 2 // MaxUnknown is the max number of unknown items a character can wear. MaxUnknown = 3 )
var AbilityType_name = map[int32]string{
0: "UNKNOWN",
1: "STRENGTH",
2: "DEXTERITY",
3: "CONSTITION",
4: "INTELLIGENCE",
5: "WISDOM",
6: "CHARISMA",
}
var AbilityType_value = map[string]int32{
"UNKNOWN": 0,
"STRENGTH": 1,
"DEXTERITY": 2,
"CONSTITION": 3,
"INTELLIGENCE": 4,
"WISDOM": 5,
"CHARISMA": 6,
}
var Ammunition_Type_name = map[int32]string{
0: "UNKNOWN_TYPE",
1: "ARROW",
2: "BOLT",
3: "PEBBLE",
}
var Ammunition_Type_value = map[string]int32{
"UNKNOWN_TYPE": 0,
"ARROW": 1,
"BOLT": 2,
"PEBBLE": 3,
}
var Armour_Type_name = map[int32]string{
0: "UNKNOWN",
1: "HEADGEAR",
2: "MAIN",
3: "GLOVES",
4: "BOOTS",
5: "RING",
6: "BELT",
7: "CLOAK",
8: "SHIELD",
9: "GLASSES",
}
var Armour_Type_value = map[string]int32{
"UNKNOWN": 0,
"HEADGEAR": 1,
"MAIN": 2,
"GLOVES": 3,
"BOOTS": 4,
"RING": 5,
"BELT": 6,
"CLOAK": 7,
"SHIELD": 8,
"GLASSES": 9,
}
var Character_Gender_name = map[int32]string{
0: "NEUTER",
1: "MALE",
2: "FEMALE",
}
var Character_Gender_value = map[string]int32{
"NEUTER": 0,
"MALE": 1,
"FEMALE": 2,
}
var DamageType_name = map[int32]string{
0: "UNKNOWN_DAMAGE_TYPE",
1: "BLUDGEONING",
2: "PIERCING",
3: "SLASHING",
}
var DamageType_value = map[string]int32{
"UNKNOWN_DAMAGE_TYPE": 0,
"BLUDGEONING": 1,
"PIERCING": 2,
"SLASHING": 3,
}
var Weapon_Type_name = map[int32]string{
0: "UNKNOWN_TYPE",
1: "DAGGER",
2: "SHORT_BLADE",
3: "LONG_BLADE",
4: "HAMMER",
5: "AXE",
6: "POLE_ARM",
50: "BOW",
51: "CROSSBOW",
100: "BLACK_POWDER_PISTOL",
101: "BLACK_POWDER_RIFLE",
102: "PISTOL",
103: "RIFLE",
150: "CANNON",
}
var Weapon_Type_value = map[string]int32{
"UNKNOWN_TYPE": 0,
"DAGGER": 1,
"SHORT_BLADE": 2,
"LONG_BLADE": 3,
"HAMMER": 4,
"AXE": 5,
"POLE_ARM": 6,
"BOW": 50,
"CROSSBOW": 51,
"BLACK_POWDER_PISTOL": 100,
"BLACK_POWDER_RIFLE": 101,
"PISTOL": 102,
"RIFLE": 103,
"CANNON": 150,
}
var WeightClass_name = map[int32]string{
0: "UNKNOWN_WEIGHT_CLASS",
1: "LIGHT",
2: "MEDIUM",
3: "HEAVY",
}
var WeightClass_value = map[string]int32{
"UNKNOWN_WEIGHT_CLASS": 0,
"LIGHT": 1,
"MEDIUM": 2,
"HEAVY": 3,
}
Functions ¶
This section is empty.
Types ¶
type Ability ¶
type Ability struct { Type AbilityType `protobuf:"varint,1,opt,name=type,proto3,enum=microdungeon.AbilityType" json:"type,omitempty"` Value int32 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` }
Ability is a standard D&D ability.
func (*Ability) Descriptor ¶
func (*Ability) GetType ¶
func (m *Ability) GetType() AbilityType
func (*Ability) ProtoMessage ¶
func (*Ability) ProtoMessage()
type AbilityType ¶
type AbilityType int32
const ( AbilityType_UNKNOWN AbilityType = 0 AbilityType_STRENGTH AbilityType = 1 AbilityType_DEXTERITY AbilityType = 2 AbilityType_CONSTITION AbilityType = 3 AbilityType_INTELLIGENCE AbilityType = 4 AbilityType_WISDOM AbilityType = 5 AbilityType_CHARISMA AbilityType = 6 )
func (AbilityType) EnumDescriptor ¶
func (AbilityType) EnumDescriptor() ([]byte, []int)
func (AbilityType) String ¶
func (x AbilityType) String() string
type Alignment ¶
type Alignment struct { Ethical int32 `protobuf:"varint,1,opt,name=ethical,proto3" json:"ethical,omitempty"` Moral int32 `protobuf:"varint,2,opt,name=moral,proto3" json:"moral,omitempty"` }
Alignment is a standard alignment state.
func ChaoticEvilAlignment ¶
func ChaoticEvilAlignment() *Alignment
ChaoticEvilAlignment returns a starting ChaoticEvil Alignment.
func ChaoticGoodAlignment ¶
func ChaoticGoodAlignment() *Alignment
ChaoticGoodAlignment returns a starting ChaoticGood Alignment.
func ChaoticNeutralAlignment ¶
func ChaoticNeutralAlignment() *Alignment
ChaoticNeutralAlignment returns a starting ChaoticNeutral Alignment.
func LawfulEvilAlignment ¶
func LawfulEvilAlignment() *Alignment
LawfulEvilAlignment returns a starting LawfulEvil Alignment.
func LawfulGoodAlignment ¶
func LawfulGoodAlignment() *Alignment
LawfulGoodAlignment returns a starting LawfulGood Alignment.
func LawfulNeutralAlignment ¶
func LawfulNeutralAlignment() *Alignment
LawfulNeutralAlignment returns a starting LawfulNeutral Alignment.
func NeutralAlignment ¶
func NeutralAlignment() *Alignment
NeutralAlignment returns a true Neutral Alignment.
func NeutralEvilAlignment ¶
func NeutralEvilAlignment() *Alignment
NeutralEvilAlignment returns a starting NeutralEvilAlignment.
func NeutralGoodAlignment ¶
func NeutralGoodAlignment() *Alignment
NeutralGoodAlignment returns a starting NeutralGood Alignment.
func (*Alignment) Descriptor ¶
func (*Alignment) GetEthical ¶
func (*Alignment) ProtoMessage ¶
func (*Alignment) ProtoMessage()
type Ammunition ¶
type Ammunition struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Aliases []string `protobuf:"bytes,2,rep,name=aliases" json:"aliases,omitempty"` Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` DamageType DamageType `protobuf:"varint,4,opt,name=damage_type,json=damageType,proto3,enum=microdungeon.DamageType" json:"damage_type,omitempty"` Type Ammunition_Type `protobuf:"varint,5,opt,name=type,proto3,enum=microdungeon.Ammunition_Type" json:"type,omitempty"` Wc *Calculator `protobuf:"bytes,6,opt,name=wc" json:"wc,omitempty"` Modifiers []*Modifier `protobuf:"bytes,7,rep,name=modifiers" json:"modifiers,omitempty"` Weight uint32 `protobuf:"varint,8,opt,name=weight,proto3" json:"weight,omitempty"` RangeModifier uint32 `protobuf:"varint,9,opt,name=range_modifier,json=rangeModifier,proto3" json:"range_modifier,omitempty"` }
Ammunition implements ammunition for projectile weapons.
func (*Ammunition) Descriptor ¶
func (*Ammunition) Descriptor() ([]byte, []int)
func (*Ammunition) GetAliases ¶
func (m *Ammunition) GetAliases() []string
func (*Ammunition) GetDamageType ¶
func (m *Ammunition) GetDamageType() DamageType
func (*Ammunition) GetDescription ¶
func (m *Ammunition) GetDescription() string
func (*Ammunition) GetModifiers ¶
func (m *Ammunition) GetModifiers() []*Modifier
func (*Ammunition) GetName ¶
func (m *Ammunition) GetName() string
func (*Ammunition) GetRangeModifier ¶
func (m *Ammunition) GetRangeModifier() uint32
func (*Ammunition) GetType ¶
func (m *Ammunition) GetType() Ammunition_Type
func (*Ammunition) GetWc ¶
func (m *Ammunition) GetWc() *Calculator
func (*Ammunition) GetWeight ¶
func (m *Ammunition) GetWeight() uint32
func (*Ammunition) ProtoMessage ¶
func (*Ammunition) ProtoMessage()
func (*Ammunition) Reset ¶
func (m *Ammunition) Reset()
func (*Ammunition) String ¶
func (m *Ammunition) String() string
type Ammunition_Type ¶
type Ammunition_Type int32
const ( Ammunition_UNKNOWN_TYPE Ammunition_Type = 0 Ammunition_ARROW Ammunition_Type = 1 Ammunition_BOLT Ammunition_Type = 2 Ammunition_PEBBLE Ammunition_Type = 3 )
func (Ammunition_Type) EnumDescriptor ¶
func (Ammunition_Type) EnumDescriptor() ([]byte, []int)
func (Ammunition_Type) String ¶
func (x Ammunition_Type) String() string
type Armour ¶
type Armour struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Aliases []string `protobuf:"bytes,2,rep,name=aliases" json:"aliases,omitempty"` Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` WeightClass WeightClass `protobuf:"varint,4,opt,name=weight_class,json=weightClass,proto3,enum=microdungeon.WeightClass" json:"weight_class,omitempty"` Type Armour_Type `protobuf:"varint,5,opt,name=type,proto3,enum=microdungeon.Armour_Type" json:"type,omitempty"` Ac *Calculator `protobuf:"bytes,6,opt,name=ac" json:"ac,omitempty"` Modifiers []*Modifier `protobuf:"bytes,7,rep,name=modifiers" json:"modifiers,omitempty"` StealthAdvantage bool `protobuf:"varint,8,opt,name=stealth_advantage,json=stealthAdvantage,proto3" json:"stealth_advantage,omitempty"` Weight uint32 `protobuf:"varint,9,opt,name=weight,proto3" json:"weight,omitempty"` Worn bool `protobuf:"varint,100,opt,name=worn,proto3" json:"worn,omitempty"` }
Armour is the basis for all armour.
func (*Armour) Descriptor ¶
func (*Armour) GetAc ¶
func (m *Armour) GetAc() *Calculator
func (*Armour) GetAliases ¶
func (*Armour) GetDescription ¶
func (*Armour) GetModifiers ¶
func (*Armour) GetStealthAdvantage ¶
func (*Armour) GetType ¶
func (m *Armour) GetType() Armour_Type
func (*Armour) GetWeightClass ¶
func (m *Armour) GetWeightClass() WeightClass
func (*Armour) ProtoMessage ¶
func (*Armour) ProtoMessage()
type Armour_Type ¶
type Armour_Type int32
const ( Armour_UNKNOWN Armour_Type = 0 Armour_HEADGEAR Armour_Type = 1 Armour_MAIN Armour_Type = 2 Armour_GLOVES Armour_Type = 3 Armour_BOOTS Armour_Type = 4 Armour_RING Armour_Type = 5 Armour_BELT Armour_Type = 6 Armour_CLOAK Armour_Type = 7 Armour_SHIELD Armour_Type = 8 Armour_GLASSES Armour_Type = 9 )
func (Armour_Type) EnumDescriptor ¶
func (Armour_Type) EnumDescriptor() ([]byte, []int)
func (Armour_Type) String ¶
func (x Armour_Type) String() string
type Calculator ¶
type Calculator struct { Base uint32 `protobuf:"varint,1,opt,name=base,proto3" json:"base,omitempty"` Modifiers []*Modifier `protobuf:"bytes,2,rep,name=modifiers" json:"modifiers,omitempty"` }
Calculator implements a simple method of using ability modifiers to calculate things such as WC and AC.
func (*Calculator) Descriptor ¶
func (*Calculator) Descriptor() ([]byte, []int)
func (*Calculator) GetBase ¶
func (m *Calculator) GetBase() uint32
func (*Calculator) GetModifiers ¶
func (m *Calculator) GetModifiers() []*Modifier
func (*Calculator) ProtoMessage ¶
func (*Calculator) ProtoMessage()
func (*Calculator) Reset ¶
func (m *Calculator) Reset()
func (*Calculator) String ¶
func (m *Calculator) String() string
type Character ¶
type Character struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` PlayerName string `protobuf:"bytes,2,opt,name=player_name,json=playerName,proto3" json:"player_name,omitempty"` Gender Character_Gender `protobuf:"varint,3,opt,name=gender,proto3,enum=microdungeon.Character_Gender" json:"gender,omitempty"` Race *Race `protobuf:"bytes,4,opt,name=race" json:"race,omitempty"` // Class class = 5; Level uint32 `protobuf:"varint,6,opt,name=level,proto3" json:"level,omitempty"` Alignment *Alignment `protobuf:"bytes,7,opt,name=alignment" json:"alignment,omitempty"` Experience uint32 `protobuf:"varint,8,opt,name=experience,proto3" json:"experience,omitempty"` Score *Score `protobuf:"bytes,9,opt,name=score" json:"score,omitempty"` Wielding *Weapon `protobuf:"bytes,100,opt,name=wielding" json:"wielding,omitempty"` Armour []*Armour `protobuf:"bytes,101,rep,name=armour" json:"armour,omitempty"` }
Character is a playable D&D character.
func (*Character) Descriptor ¶
func (*Character) GetAlignment ¶
func (*Character) GetExperience ¶
func (*Character) GetGender ¶
func (m *Character) GetGender() Character_Gender
func (*Character) GetPlayerName ¶
func (*Character) GetWielding ¶
func (*Character) ProtoMessage ¶
func (*Character) ProtoMessage()
type Character_Gender ¶
type Character_Gender int32
const ( Character_NEUTER Character_Gender = 0 Character_MALE Character_Gender = 1 Character_FEMALE Character_Gender = 2 )
func (Character_Gender) EnumDescriptor ¶
func (Character_Gender) EnumDescriptor() ([]byte, []int)
func (Character_Gender) String ¶
func (x Character_Gender) String() string
type Class ¶
type Class struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` HitDie uint32 `protobuf:"varint,2,opt,name=hit_die,json=hitDie,proto3" json:"hit_die,omitempty"` PrimaryAbilities []AbilityType `` /* 140-byte string literal not displayed */ }
Class is a playable D&D class.
func (*Class) Descriptor ¶
func (*Class) GetPrimaryAbilities ¶
func (m *Class) GetPrimaryAbilities() []AbilityType
func (*Class) ProtoMessage ¶
func (*Class) ProtoMessage()
type DamageType ¶
type DamageType int32
DamageType helps define types of damage.
const ( DamageType_UNKNOWN_DAMAGE_TYPE DamageType = 0 DamageType_BLUDGEONING DamageType = 1 DamageType_PIERCING DamageType = 2 DamageType_SLASHING DamageType = 3 )
func (DamageType) EnumDescriptor ¶
func (DamageType) EnumDescriptor() ([]byte, []int)
func (DamageType) String ¶
func (x DamageType) String() string
type Modifier ¶
type Modifier struct { Type AbilityType `protobuf:"varint,1,opt,name=type,proto3,enum=microdungeon.AbilityType" json:"type,omitempty"` Max int32 `protobuf:"varint,2,opt,name=max,proto3" json:"max,omitempty"` Die int32 `protobuf:"varint,3,opt,name=die,proto3" json:"die,omitempty"` }
Modifier is a standard D&D ability modifier.
func (*Modifier) Descriptor ¶
func (*Modifier) GetType ¶
func (m *Modifier) GetType() AbilityType
func (*Modifier) ProtoMessage ¶
func (*Modifier) ProtoMessage()
type Race ¶
type Race struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Genus string `protobuf:"bytes,2,opt,name=genus,proto3" json:"genus,omitempty"` Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` Score *Score `protobuf:"bytes,4,opt,name=score" json:"score,omitempty"` NightVision bool `protobuf:"varint,5,opt,name=night_vision,json=nightVision,proto3" json:"night_vision,omitempty"` KnownLanguages []string `protobuf:"bytes,6,rep,name=known_languages,json=knownLanguages" json:"known_languages,omitempty"` Undead bool `protobuf:"varint,7,opt,name=undead,proto3" json:"undead,omitempty"` }
Race is a playable D&D race.
func (*Race) Descriptor ¶
func (*Race) GetDescription ¶
func (*Race) GetKnownLanguages ¶
func (*Race) GetNightVision ¶
func (*Race) ProtoMessage ¶
func (*Race) ProtoMessage()
type Score ¶
type Score struct {
Set []*Ability `protobuf:"bytes,1,rep,name=set" json:"set,omitempty"`
}
Score houses all the ability scores of a given object.
func (*Score) Constitution ¶
Constitution returns the total Constitution of the given score set.
func (*Score) Descriptor ¶
func (*Score) Intelligence ¶
Intelligence returns the total Intelligence of the given score set.
func (*Score) ProtoMessage ¶
func (*Score) ProtoMessage()
type Skill ¶
type Skill struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` DifficultyClass uint32 `protobuf:"varint,3,opt,name=DifficultyClass,proto3" json:"DifficultyClass,omitempty"` // armour_check_penalty = 4; // Determine type... Modifiers []*Modifier `protobuf:"bytes,5,rep,name=modifiers" json:"modifiers,omitempty"` Trained bool `protobuf:"varint,6,opt,name=trained,proto3" json:"trained,omitempty"` }
Skill is a usable D&D skill.
func (*Skill) Descriptor ¶
func (*Skill) GetDescription ¶
func (*Skill) GetDifficultyClass ¶
func (*Skill) GetModifiers ¶
func (*Skill) GetTrained ¶
func (*Skill) ProtoMessage ¶
func (*Skill) ProtoMessage()
type Weapon ¶
type Weapon struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Aliases []string `protobuf:"bytes,2,rep,name=aliases" json:"aliases,omitempty"` Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` WeightClass WeightClass `protobuf:"varint,4,opt,name=weight_class,json=weightClass,proto3,enum=microdungeon.WeightClass" json:"weight_class,omitempty"` Type Weapon_Type `protobuf:"varint,5,opt,name=type,proto3,enum=microdungeon.Weapon_Type" json:"type,omitempty"` Wc *Calculator `protobuf:"bytes,6,opt,name=wc" json:"wc,omitempty"` Modifiers []*Modifier `protobuf:"bytes,7,rep,name=modifiers" json:"modifiers,omitempty"` StealthAdvantage bool `protobuf:"varint,8,opt,name=stealth_advantage,json=stealthAdvantage,proto3" json:"stealth_advantage,omitempty"` Weight uint32 `protobuf:"varint,9,opt,name=weight,proto3" json:"weight,omitempty"` Thrown bool `protobuf:"varint,10,opt,name=thrown,proto3" json:"thrown,omitempty"` Reach bool `protobuf:"varint,12,opt,name=reach,proto3" json:"reach,omitempty"` TwoHanded bool `protobuf:"varint,13,opt,name=two_handed,json=twoHanded,proto3" json:"two_handed,omitempty"` Versatile bool `protobuf:"varint,14,opt,name=versatile,proto3" json:"versatile,omitempty"` // Types that are valid to be assigned to Attributes: // *Weapon_DamageType // *Weapon_ProjectileAttributes_ Attributes isWeapon_Attributes `protobuf_oneof:"attributes"` // TODO: reduce this number once we have a better idea of used fields. Wielded bool `protobuf:"varint,100,opt,name=wielded,proto3" json:"wielded,omitempty"` }
Weapon is the basis for all weapons.
func (*Weapon) Descriptor ¶
func (*Weapon) GetAliases ¶
func (*Weapon) GetAttributes ¶
func (m *Weapon) GetAttributes() isWeapon_Attributes
func (*Weapon) GetDamageType ¶
func (m *Weapon) GetDamageType() DamageType
func (*Weapon) GetDescription ¶
func (*Weapon) GetModifiers ¶
func (*Weapon) GetProjectileAttributes ¶
func (m *Weapon) GetProjectileAttributes() *Weapon_ProjectileAttributes
func (*Weapon) GetStealthAdvantage ¶
func (*Weapon) GetTwoHanded ¶
func (*Weapon) GetType ¶
func (m *Weapon) GetType() Weapon_Type
func (*Weapon) GetVersatile ¶
func (*Weapon) GetWc ¶
func (m *Weapon) GetWc() *Calculator
func (*Weapon) GetWeightClass ¶
func (m *Weapon) GetWeightClass() WeightClass
func (*Weapon) GetWielded ¶
func (*Weapon) ProtoMessage ¶
func (*Weapon) ProtoMessage()
type Weapon_DamageType ¶
type Weapon_DamageType struct {
DamageType DamageType `protobuf:"varint,15,opt,name=damage_type,json=damageType,proto3,enum=microdungeon.DamageType,oneof"`
}
type Weapon_ProjectileAttributes ¶
type Weapon_ProjectileAttributes struct { Type Ammunition_Type `protobuf:"varint,1,opt,name=type,proto3,enum=microdungeon.Ammunition_Type" json:"type,omitempty"` PerShot uint32 `protobuf:"varint,2,opt,name=per_shot,json=perShot,proto3" json:"per_shot,omitempty"` RangeMin uint32 `protobuf:"varint,3,opt,name=range_min,json=rangeMin,proto3" json:"range_min,omitempty"` RangeMax uint32 `protobuf:"varint,4,opt,name=range_max,json=rangeMax,proto3" json:"range_max,omitempty"` MagazineSize uint32 `protobuf:"varint,5,opt,name=magazine_size,json=magazineSize,proto3" json:"magazine_size,omitempty"` ReloadTime uint32 `protobuf:"varint,6,opt,name=reload_time,json=reloadTime,proto3" json:"reload_time,omitempty"` }
func (*Weapon_ProjectileAttributes) Descriptor ¶
func (*Weapon_ProjectileAttributes) Descriptor() ([]byte, []int)
func (*Weapon_ProjectileAttributes) GetMagazineSize ¶
func (m *Weapon_ProjectileAttributes) GetMagazineSize() uint32
func (*Weapon_ProjectileAttributes) GetPerShot ¶
func (m *Weapon_ProjectileAttributes) GetPerShot() uint32
func (*Weapon_ProjectileAttributes) GetRangeMax ¶
func (m *Weapon_ProjectileAttributes) GetRangeMax() uint32
func (*Weapon_ProjectileAttributes) GetRangeMin ¶
func (m *Weapon_ProjectileAttributes) GetRangeMin() uint32
func (*Weapon_ProjectileAttributes) GetReloadTime ¶
func (m *Weapon_ProjectileAttributes) GetReloadTime() uint32
func (*Weapon_ProjectileAttributes) GetType ¶
func (m *Weapon_ProjectileAttributes) GetType() Ammunition_Type
func (*Weapon_ProjectileAttributes) ProtoMessage ¶
func (*Weapon_ProjectileAttributes) ProtoMessage()
func (*Weapon_ProjectileAttributes) Reset ¶
func (m *Weapon_ProjectileAttributes) Reset()
func (*Weapon_ProjectileAttributes) String ¶
func (m *Weapon_ProjectileAttributes) String() string
type Weapon_ProjectileAttributes_ ¶
type Weapon_ProjectileAttributes_ struct {
ProjectileAttributes *Weapon_ProjectileAttributes `protobuf:"bytes,16,opt,name=projectile_attributes,json=projectileAttributes,oneof"`
}
type Weapon_Type ¶
type Weapon_Type int32
const ( Weapon_UNKNOWN_TYPE Weapon_Type = 0 Weapon_DAGGER Weapon_Type = 1 Weapon_SHORT_BLADE Weapon_Type = 2 Weapon_LONG_BLADE Weapon_Type = 3 Weapon_HAMMER Weapon_Type = 4 Weapon_AXE Weapon_Type = 5 Weapon_POLE_ARM Weapon_Type = 6 Weapon_BOW Weapon_Type = 50 Weapon_CROSSBOW Weapon_Type = 51 Weapon_BLACK_POWDER_PISTOL Weapon_Type = 100 Weapon_BLACK_POWDER_RIFLE Weapon_Type = 101 Weapon_PISTOL Weapon_Type = 102 Weapon_RIFLE Weapon_Type = 103 Weapon_CANNON Weapon_Type = 150 )
func (Weapon_Type) EnumDescriptor ¶
func (Weapon_Type) EnumDescriptor() ([]byte, []int)
func (Weapon_Type) String ¶
func (x Weapon_Type) String() string
type WeightClass ¶
type WeightClass int32
WeightClass defines a common set of weight classes for weapons and armour.
const ( WeightClass_UNKNOWN_WEIGHT_CLASS WeightClass = 0 WeightClass_LIGHT WeightClass = 1 WeightClass_MEDIUM WeightClass = 2 WeightClass_HEAVY WeightClass = 3 )
func (WeightClass) EnumDescriptor ¶
func (WeightClass) EnumDescriptor() ([]byte, []int)
func (WeightClass) String ¶
func (x WeightClass) String() string