components

package
v1.37.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 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") // 敵
	TargetFactionCard  = TargetFactionType("CARD")  // カード
	TargetFactionNone  = TargetFactionType("NONE")  // なし
)
View Source
const (
	UsableSceneBattle = UsableSceneType("BATTLE") // 戦闘
	UsableSceneField  = UsableSceneType("FIELD")  // フィールド
	UsableSceneAny    = UsableSceneType("ANY")    // いつでも
)
View Source
const (
	AttackSword   = AttackType("SWORD")   // 刀剣
	AttackSpear   = AttackType("SPEAR")   // 長物
	AttackHandgun = AttackType("HANDGUN") // 拳銃
	AttackRifle   = AttackType("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 Amounter added in v1.20.1

type Amounter interface {
	Amount()
}

================

type Attack added in v1.21.0

type Attack struct {
	Accuracy       int         // 命中率
	Damage         int         // 攻撃力
	AttackCount    int         // 攻撃回数
	Element        ElementType // 攻撃属性
	AttackCategory AttackType  // 攻撃種別
}

攻撃の性質。攻撃毎にこの数値と作用対象のステータスを加味して、最終的なダメージ量を決定する

type AttackType added in v1.21.0

type AttackType string

武器種別 種別によって適用する計算式が異なる

func (AttackType) String added in v1.21.0

func (at AttackType) String() string

func (AttackType) Valid added in v1.21.0

func (enum AttackType) Valid() error

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 // 敏捷。回避率、行動の速さに影響する
	Defense   Attribute // 防御。被弾ダメージを軽減させる
}

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

type BlockPass added in v1.28.0

type BlockPass struct{}

フィールド上で通過できない

type BlockView added in v1.28.0

type BlockView struct{}

フィールド上で視界を遮る

type Camera added in v1.33.0

type Camera struct {
	Scale   float64
	ScaleTo float64
}

カメラ

type Card added in v1.21.0

type Card struct {
	TargetType TargetType
	Cost       int
}

カードは戦闘中に選択するコマンド 攻撃、防御、回復など、人に影響を及ぼすものをアクションカードという アクションカードをターゲットとして効果を変容させるものをブーストカードという

type Col added in v1.36.0

type Col int

タイルの縦位置。ピクセル数ではない

type Components

type Components struct {
	Player           *ecs.NullComponent
	Camera           *ecs.SliceComponent
	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
	Attack           *ecs.SliceComponent
	Material         *ecs.SliceComponent
	Recipe           *ecs.SliceComponent
	Wearable         *ecs.SliceComponent
	Attributes       *ecs.SliceComponent
	EquipmentChanged *ecs.NullComponent
	Card             *ecs.SliceComponent

	Position     *ecs.SliceComponent
	GridElement  *ecs.SliceComponent
	SpriteRender *ecs.SliceComponent
	BlockView    *ecs.NullComponent
	BlockPass    *ecs.NullComponent
}

type Consumable

type Consumable struct {
	UsableScene UsableSceneType
	TargetType  TargetType
}

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

type Description

type Description struct {
	Description string
}

説明

type ElementType added in v1.21.0

type ElementType string

攻撃属性

const (
	ElementTypeNone    ElementType = "NONE"
	ElementTypeFire    ElementType = "FIRE"
	ElementTypeThunder ElementType = "THUNDER"
	ElementTypeChill   ElementType = "CHILL"
	ElementTypePhoton  ElementType = "PHOTON"
)

func (ElementType) String added in v1.21.0

func (et ElementType) String() string

func (ElementType) Valid added in v1.21.0

func (enum ElementType) Valid() error

type EquipBonus added in v1.20.0

type EquipBonus struct {
	Vitality  int
	Strength  int
	Sensation int
	Dexterity int
	Agility   int
}

装備品のオプショナルな性能。武器・防具で共通する

type EquipmentChanged added in v1.20.0

type EquipmentChanged struct{}

装備変更が行われたことを示すダーティーフラグ

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
}

キャラクタが装備している状態。InBackpackとは排反

type GridElement

type GridElement struct {
	Row Row
	Col Col
}

フィールド上にグリッドに沿って存在する。静的なステージオブジェクトに使う スプライトはグリッドに沿って配置する ----- | | | | | | -----

type InBackpack

type InBackpack struct{}

インベントリに入っている状態

type InParty

type InParty struct{}

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

type InflictsDamage

type InflictsDamage struct {
	Amount int
}

ダメージを与える性質 直接的な数値が作用し、ステータスなどは考慮されない

type Item

type Item struct{}

キャラクターが保持できるもの 装備品、カード、回復アイテム、売却アイテム

type Material

type Material struct {
	Amount int
}

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

type Member

type Member struct{}

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

type Name

type Name struct {
	Name string
}

表示名

type NumeralAmount added in v1.20.1

type NumeralAmount struct {
	Numeral int
}

絶対量指定

func (NumeralAmount) Amount added in v1.20.1

func (na NumeralAmount) Amount()

func (NumeralAmount) Calc added in v1.20.1

func (na NumeralAmount) Calc() int

type Player

type Player struct{}

フィールドで操作対象となる対象 operatorとかのほうがよさそうか?

type Pool

type Pool struct {
	Max     int // 計算式で算出される
	Current int
}

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

type Pools

type Pools struct {
	HP    Pool
	SP    Pool
	Level int
}

type Position added in v1.28.0

type Position struct {
	X     int
	Y     int
	Angle float64 // 角度(ラジアン)。この角度分スプライトを回転させる
}

フィールド上に座標をもって存在する。移動体に対して使う スプライトはこの位置に中心を合わせて配置する ----- | | | + | | | -----

type ProvidesHealing

type ProvidesHealing struct {
	Amount Amounter
}

回復する性質 直接的な数値が作用し、ステータスなどは考慮されない

type RatioAmount added in v1.20.1

type RatioAmount struct {
	Ratio float64
}

倍率指定

func (RatioAmount) Amount added in v1.20.1

func (ra RatioAmount) Amount()

func (RatioAmount) Calc added in v1.20.1

func (ra RatioAmount) Calc(base int) int

type Recipe

type Recipe struct {
	Inputs []RecipeInput
}

合成に必要な素材

type RecipeInput

type RecipeInput struct {
	Name   string
	Amount int
}

合成の元になる素材

type Renderable added in v1.28.0

type Renderable struct{}

フィールド上で描画できる

type Row added in v1.36.0

type Row 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{}

壁 TODO: 削除予定

type Warp

type Warp struct {
	Mode warpMode
}

ワープパッド

type Wearable

type Wearable struct {
	Defense           int           // 防御力
	EquipmentCategory EquipmentType // 装備部位
	EquipBonus        EquipBonus    // ステータスへのボーナス
}

装備品。キャラクタが装備することでパラメータを変更できる

Jump to

Keyboard shortcuts

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