components

package
v1.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WarpModeNext   = warpMode("NEXT")
	WarpModeEscape = warpMode("ESCAPE")
)
View Source
const (
	TargetSingle = TargetNumType("SINGLE")
	TargetAll    = TargetNumType("ALL")
)
View Source
const (
	TargetFactionAlly  = TargetFactionType("ALLY")  // 味方
	TargetFactionEnemy = TargetFactionType("ENEMY") //  敵
	TargetFactionNone  = TargetFactionType("NONE")  // なし
)
View Source
const (
	UsableSceneBattle = UsableSceneType("BATTLE") // 戦闘
	UsableSceneField  = UsableSceneType("FIELD")  // フィールド
	UsableSceneAny    = UsableSceneType("ANY")    // いつでも
)
View Source
const (
	WeaponSword   = WeaponType("SWORD")   // 刀剣
	WeaponSpear   = WeaponType("SPEAR")   // 長物
	WeaponHandgun = WeaponType("HANDGUN") // 拳銃
	WeaponRifle   = WeaponType("RIFLE")   // 小銃
)
View Source
const (
	EquipmentHead    = EquipmentType("HEAD")    // 頭部
	EquipmentTorso   = EquipmentType("TORSO")   // 胴体
	EquipmentLegs    = EquipmentType("LEGS")    // 脚
	EquipmentJewelry = EquipmentType("JEWELRY") // アクセサリ
)

Variables

View Source
var ErrInvalidEnumType = errors.New("enumに無効な値が指定された")

Functions

This section is empty.

Types

type Attribute added in v1.19.0

type Attribute struct {
	Base     int // 固有の値
	Modifier int // 装備などで変動する値
	Total    int // 足し合わせた現在値。メモ
}

type Attributes added in v1.19.0

type Attributes struct {
	Vitality  Attribute // 体力。丈夫さ、持久力、しぶとさ。HPやSPに影響する
	Strength  Attribute // 筋力。主に近接攻撃のダメージに影響する
	Sensation Attribute // 感覚。主に射撃攻撃のダメージに影響する
	Dexterity Attribute // 器用。攻撃時の命中率に影響する
	Agility   Attribute // 敏捷。回避率、行動の速さに影響する
}

エンティティが持つステータス。各種計算式で使う

type Components

type Components struct {
	GridElement     *ecs.SliceComponent
	Player          *ecs.NullComponent
	Wall            *ecs.NullComponent
	Warp            *ecs.NullComponent
	Item            *ecs.NullComponent
	Consumable      *ecs.SliceComponent
	Name            *ecs.SliceComponent
	Description     *ecs.SliceComponent
	InBackpack      *ecs.NullComponent
	InParty         *ecs.NullComponent
	Equipped        *ecs.SliceComponent
	Member          *ecs.NullComponent
	Pools           *ecs.SliceComponent
	ProvidesHealing *ecs.SliceComponent
	InflictsDamage  *ecs.SliceComponent
	Weapon          *ecs.SliceComponent
	Material        *ecs.SliceComponent
	Recipe          *ecs.SliceComponent
	Wearable        *ecs.SliceComponent
	Attributes      *ecs.SliceComponent
}

type Consumable

type Consumable struct {
	UsableScene UsableSceneType
	TargetType  TargetType
}

消耗品。一度使うとなくなる

type DamageAttrType

type DamageAttrType string
const (
	DamageAttrNone    DamageAttrType = "NONE"
	DamageAttrFire    DamageAttrType = "FIRE"
	DamageAttrThunder DamageAttrType = "THUNDER"
	DamageAttrChill   DamageAttrType = "CHILL"
	DamageAttrPhoton  DamageAttrType = "PHOTON"
)

func (DamageAttrType) String

func (da DamageAttrType) String() string

func (DamageAttrType) Valid added in v1.16.0

func (enum DamageAttrType) Valid() error

type Description

type Description struct {
	Description string
}

説明

type EquipmentSlotNumber added in v1.14.0

type EquipmentSlotNumber int
const (
	EquipmentSlotZero EquipmentSlotNumber = iota
	EquipmentSlotOne
	EquipmentSlotTwo
	EquipmentSlotThree
)

type EquipmentType added in v1.14.0

type EquipmentType string

func (EquipmentType) String added in v1.14.0

func (es EquipmentType) String() string

func (EquipmentType) Valid added in v1.16.0

func (enum EquipmentType) Valid() error

type Equipped added in v1.14.0

type Equipped struct {
	Owner         ecs.Entity
	EquipmentSlot EquipmentSlotNumber
}

キャラクタが装備している

type GridElement

type GridElement struct {
	Line int
	Col  int
}

type InBackpack

type InBackpack struct{}

インベントリに所持している

type InParty

type InParty struct{}

パーティに参加している状態

type InflictsDamage

type InflictsDamage struct {
	Amount int
}

ダメージを与える性質

type Item

type Item struct{}

アイテム枠に入るもの 一切使用できない売却専用アイテムとかはItem単独に含まれる

type Material

type Material struct {
	Amount int
}

合成素材。 アイテムとの違い: - 個々のインスタンスで性能の違いはなく、単に数量だけを見る - 複数の単位で扱うのでAmountを持つ。x3を合成で使ったりする

type Member

type Member struct{}

冒険に参加できるメンバー

type Name

type Name struct {
	Name string
}

表示名

type Player

type Player struct{}

フィールドでの移動体

type Pool

type Pool struct {
	Max     int
	Current int
}

最大値と現在値を持つようなパラメータ

type Pools

type Pools struct {
	HP    Pool // 最大値は計算式で算出される。例: 30+(体力*8+力+器用さ)*{1+(Lv-1)*0.03}
	SP    Pool // 最大値は計算式で算出される。例: (体力*2+力+器用さ+素早さ+精神*3)*{1+(Lv-1)*0.02}
	Level int
}

type ProvidesHealing

type ProvidesHealing struct {
	Amount int
}

回復する性質

type Recipe

type Recipe struct {
	Inputs []RecipeInput
}

合成に必要な素材

type RecipeInput

type RecipeInput struct {
	Name   string
	Amount int
}

合成の元になる素材

type TargetFactionType

type TargetFactionType string

func (TargetFactionType) Valid added in v1.16.0

func (enum TargetFactionType) Valid() error

type TargetNumType added in v1.16.0

type TargetNumType string

func (TargetNumType) Valid added in v1.16.0

func (enum TargetNumType) Valid() error

type TargetType

type TargetType struct {
	TargetFaction TargetFactionType // 対象派閥
	TargetNum     TargetNumType
}

対象

type UsableSceneType

type UsableSceneType string

func (UsableSceneType) Valid added in v1.16.0

func (enum UsableSceneType) Valid() error

type Wall

type Wall struct{}

type Warp

type Warp struct {
	Mode warpMode
}

ワープパッド

type Weapon

type Weapon struct {
	Accuracy          int            // 命中率
	BaseDamage        int            // 攻撃力
	AttackCount       int            // 攻撃回数
	EnergyConsumption int            // 消費エネルギー
	DamageAttr        DamageAttrType // 攻撃属性
	WeaponCategory    WeaponType     // 武器種別
}

武器

type WeaponType

type WeaponType string

func (WeaponType) String

func (wc WeaponType) String() string

func (WeaponType) Valid added in v1.16.0

func (enum WeaponType) Valid() error

type Wearable

type Wearable struct {
	BaseDefense       int           // 防御力
	EquipmentCategory EquipmentType // 装備部位
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL