go_dreamfactory/modules/game/fight/logic/FightBase.go

46 lines
1.1 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 logic
import "go_dreamfactory/lego/sys/event"
type FightBase struct {
// 战斗类型
fFightType FightType
// 战斗是否进行中
fightIng bool
// 所有参战角色集合
Roles []*FightRole
// 当前回合满足行动值大于等于100的所有角色
CanAtkRoles []*FightRole
//最后一次攻击的角色
LastActionRole *FightRole
//是否自动战斗
AutoFight bool
//战斗AI
FightAI *FightAI
//随机数种子
RandSeed int64
//事件系统
event event.ISys
//战报
FightLog *FightLog
//客户端专用逻辑
//是否可进入下个循环
ToNextRound bool
}
func (this *FightBase) Start() {
}
/// <summary>
/// LastActionRole触发SkillId技能选择的目标是TargetRid
/// 手动时,表现层在玩家操作后,调用本方法
/// 自动战斗或服务端里通过FightAI逻辑来自动触发
/// </summary>
/// <param name="skillid">技能ID</param>
/// <param name="targetRid">选择的目标rid</param>
func (this *FightBase) EmitSkill(skillId int, targetRid string) {
this.LastActionRole.EmitSkill(skillId, targetRid)
}