go_dreamfactory/modules/battle/fight/fightenum.go
2022-09-07 18:17:10 +08:00

320 lines
6.2 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package fight
import "fmt"
/// <summary>
/// 战斗类型枚举
/// </summary>
type FightType int8
const (
FightType_PVE FightType = 1
FightType_PVP FightType = 2
FightType_PVBOSS FightType = 3
)
/// <summary>
/// 类型枚举
/// </summary>
type FightGroupType int8
const (
FightGroupType_Friend FightGroupType = 1
FightGroupType_Enemy FightGroupType = 2
)
/// <summary>
/// 技能类型枚举
/// </summary>
/// <remarks>
///主动技 = 玩家可以点击、会出现在UI里
///被动技 = 玩家不可以点击会出现在UI里
///队长技 = 玩家不可以点击不会出现在UI里
///其他系统提供的被动技 = 玩家不可以点击不会出现在UI里
/// </remarks>
type SkillType int8
const (
/// 正常的主动技能
SkillType_Normal SkillType = 1
/// 被动技能
SkillType_Passive SkillType = 2
/// 队长技
SkillType_Captain SkillType = 3
)
/// <summary>
/// 主技能选敌逻辑枚举
/// </summary>
type SkillTargetType int8
const (
/// 敌方存活单体
SkillTargetType_SingleLiveEnemy SkillTargetType = 1
/// 敌方存活群体
SkillTargetType_AllLiveEnemy SkillTargetType = 2
/// 己方存活单体
SkillTargetType_SingleLiveFriend SkillTargetType = 3
/// 乙方所有存活目标
SkillTargetType_AllLiveFriend SkillTargetType = 4
/// 己方任意状态单体(含已死亡)
SkillTargetType_SingleAnyFriend SkillTargetType = 5
/// 己方已死亡了的单体
SkillTargetType_SingleDeadFriend SkillTargetType = 6
)
type AferSkillFromType int8
const (
/// <summary>
/// 所有角色
/// </summary>
AferSkillFromType_All AferSkillFromType = 0
/// <summary>
/// 友方所有
/// </summary>
AferSkillFromType_Friend AferSkillFromType = 1
/// <summary>
/// 敌方所有
/// </summary>
AferSkillFromType_Enemy AferSkillFromType = 2
/// <summary>
/// 技能发起者自己
/// </summary>
AferSkillFromType_Self AferSkillFromType = 3
/// <summary>
/// 玩家选择的目标
/// </summary>
AferSkillFromType_PlayerChoose AferSkillFromType = 4
/// <summary>
/// 除自己外的友方
/// </summary>
AferSkillFromType_FriendExceptSelf AferSkillFromType = 5
/// <summary>
/// 除选定目标外的其他敌方
/// </summary>
AferSkillFromType_EnemyExceptChoose AferSkillFromType = 6
/// <summary>
/// 除选定目标外的其他友方
/// </summary>
AferSkillFromType_FriendExceptChoose AferSkillFromType = 7
)
type EventType int8
const (
/// <summary>
/// 空
/// </summary>
EventType_None EventType = -1
/// <summary>
/// 开始战斗时
/// </summary>
EventType_OnFightStart EventType = iota
/// <summary>
/// 回合行动前
/// </summary>
EventType_OnRoundStart
/// <summary>
/// 回合结束后
/// </summary>
EventType_OnRoundEnd
/// <summary>
/// 行动结束前
/// </summary>
EventType_OnPreActionEnd
/// <summary>
/// 行动结束后
/// </summary>
EventType_OnPostActionEnd
/// <summary>
/// 效果执行前
/// </summary>
EventType_OnPreEffect
/// <summary>
/// 受到效果前
/// </summary>
EventType_OnPreReceiveEffect
/// <summary>
/// 受到伤害计算后
/// </summary>
EventType_OnCalcDmgEffect
/// <summary>
/// 受到效果时
/// </summary>
EventType_OnPostReceiveEffect
/// <summary>
/// 施加效果时
/// </summary>
EventType_OnPostGiveEffect
/// <summary>
/// 暴击时
/// </summary>
EventType_OnPostGiveCriCal
/// <summary>
/// 被暴击
/// </summary>
EventType_OnPostReceiveCriCal
/// <summary>
/// 回合行动后
/// </summary>
EventType_OnStopAction
)
type EOrderType int8
const (
Asc EOrderType = iota
Desc
)
type ComModifyOperate struct {
From byte
Nv float32
}
func (this *ComModifyOperate) Recycle() {
this.From = 0
this.Nv = 0
}
func (this *ComModifyOperate) ToString() string {
str := fmt.Sprintf("修改行动值 rid={%d},nv={%f}", this.From, this.Nv)
return str
}
type ComSetSkillCD struct {
From byte
Skillid int
Nv byte
}
func (this *ComSetSkillCD) Recycle() {
this.From = 0
this.Nv = 0
this.Skillid = 0
}
func (this *ComSetSkillCD) ToString() string {
str := fmt.Sprintf("修改行动值 rid={%d},skillid={%d},nv={%d}", this.From, this.Skillid, this.Nv)
return str
}
type ComStartFight struct{}
func (this *ComStartFight) Recycle() {}
func (this *ComStartFight) ToString() string {
str := "战斗开始"
return str
}
type ComEndFight struct{}
func (this *ComEndFight) Recycle() {}
func (this *ComEndFight) ToString() string {
var str = "战斗结束"
return str
}
type ComStartAction struct {
From byte
}
func (this *ComStartAction) Recycle() {
this.From = 0
}
func (this *ComStartAction) ToString() string {
var str = "回合开始 rid={from}"
return str
}
type ComStopAction struct {
From byte
}
func (this *ComStopAction) Recycle() {
this.From = 0
}
func (this *ComStopAction) ToString() string {
var str = fmt.Sprintf("回合结束 rid={%d}", this.From)
return str
}
/// <summary>
/// 主技能命令集合
/// </summary>
type ComSkillAtk struct {
AniName string
Skillid int
From byte
comList []*ComSkillAfterAtk
}
/// <summary>
/// 回收到对象池时重设数据
/// </summary>
func (this *ComSkillAtk) Recycle() {
this.AniName = ""
this.Skillid = 0
this.From = 0
}
/// <summary>
/// 子技能命令集合
/// </summary>
type ComSkillAfterAtk struct {
//public int skillid;
ComList []*ComEffectSkill
}
type ComEffectSkill struct {
To byte
}
type ComMondifyBuff struct {
ComEffectSkill
BuffId int
Append bool
}
/// <summary>
/// 回收到对象池时重设数据
/// </summary>
func (this *ComMondifyBuff) Recycle() {
this.BuffId = 0
this.Append = false
this.To = 0
}
func (this *ComMondifyBuff) ToString() string {
var str = fmt.Sprintf("Buff变化 to={%d} buffId={%d} append={%t}", this.To, this.BuffId, this.Append)
return str
}
/// <summary>
/// 生命值修改命令
/// </summary>
type ComModifyHealth struct {
ComEffectSkill
Baoji bool
Miss bool
Num float32
Nhp int
Mhp int
}
/// <summary>
/// 回收到对象池时重设数据
/// </summary>
func (this *ComModifyHealth) Recycle() {
this.Baoji = false
this.Miss = false
this.Num = 0
this.Nhp = 0
this.Mhp = 0
this.To = 0
}
func (this *ComModifyHealth) ToString() string {
var str = fmt.Sprintf("血量修改 to={%d} num={%f} nhp={%d} mhp={%d}", this.To, this.Num, this.Nhp, this.Mhp)
return str
}