This commit is contained in:
@@ -52,7 +52,7 @@ func (h Controller) Login(data *user.MAIN_LOGIN_IN, c gnet.Conn) (result *user.L
|
|||||||
currentPlayer.Hash = hashcode
|
currentPlayer.Hash = hashcode
|
||||||
currentPlayer.Service = service.NewUserService(data.Head.UserID)
|
currentPlayer.Service = service.NewUserService(data.Head.UserID)
|
||||||
|
|
||||||
currentPlayer.Info = currentPlayer.Service.Info.SetLogin()
|
currentPlayer.Info = currentPlayer.Service.Info.GetLogin()
|
||||||
if currentPlayer.Info == nil {
|
if currentPlayer.Info == nil {
|
||||||
defer c.Close()
|
defer c.Close()
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -1,14 +1,10 @@
|
|||||||
package effect
|
package effect
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"blazing/common/data/xmlres"
|
element "blazing/common/data/Element"
|
||||||
"blazing/logic/service/fight/action"
|
"blazing/logic/service/fight/action"
|
||||||
"blazing/logic/service/fight/info"
|
"blazing/logic/service/fight/info"
|
||||||
"blazing/logic/service/fight/input"
|
"blazing/logic/service/fight/input"
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/gogf/gf/v2/util/gconv"
|
|
||||||
"github.com/samber/lo"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// 14. 若遇到天敌, 则战斗开始时连续害怕 n 回合;(a1: n)
|
// 14. 若遇到天敌, 则战斗开始时连续害怕 n 回合;(a1: n)
|
||||||
@@ -23,11 +19,12 @@ func (e *NewSel14) TurnStart(fattack *action.SelectSkillAction, sattack *action.
|
|||||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
evs := gconv.Uint32s(strings.Split(xmlres.PetMAP[int(e.Ctx().Our.CurrentPet.ID)].NaturalEnemy, " "))
|
t, _ := element.Calculator.GetOffensiveMultiplier(e.Ctx().Opp.CurrentPet.Type, e.Ctx().Our.CurrentPet.Type)
|
||||||
_, ok := lo.Find(evs, func(t uint32) bool {
|
// evs := gconv.Uint32s(strings.Split(xmlres.PetMAP[int(e.Ctx().Our.CurrentPet.ID)].NaturalEnemy, " "))
|
||||||
return t == uint32(e.Ctx().Opp.CurrentPet.ID)
|
// _, ok := lo.Find(evs, func(t uint32) bool {
|
||||||
})
|
// return t == uint32(e.Ctx().Opp.CurrentPet.ID)
|
||||||
if !ok {
|
// })
|
||||||
|
if t <= 1 {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 5. 获取状态效果实例并设置参数
|
// 5. 获取状态效果实例并设置参数
|
||||||
|
|||||||
34
logic/service/fight/effect/169.go
Normal file
34
logic/service/fight/effect/169.go
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
package effect
|
||||||
|
|
||||||
|
import (
|
||||||
|
"blazing/logic/service/fight/input"
|
||||||
|
"blazing/logic/service/fight/node"
|
||||||
|
)
|
||||||
|
|
||||||
|
// 169 - n回合内,每回合额外附加m%几率令对手XX
|
||||||
|
type Effect169 struct {
|
||||||
|
node.EffectNode
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e *Effect169) OnSkill() bool {
|
||||||
|
|
||||||
|
chance := e.Args()[1].IntPart()
|
||||||
|
success, _, _ := e.Input.Player.Roll(int(chance), 100)
|
||||||
|
if success {
|
||||||
|
// 添加异常状态
|
||||||
|
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(e.Args()[2].IntPart())) // 以麻痹为例
|
||||||
|
if statusEffect != nil {
|
||||||
|
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e *Effect169) SetArgs(t *input.Input, a ...int) {
|
||||||
|
e.EffectNode.SetArgs(t, a...)
|
||||||
|
e.EffectNode.Duration(a[0]) // 持续n回合
|
||||||
|
}
|
||||||
|
func init() {
|
||||||
|
input.InitEffect(input.EffectType.Skill, 169, &Effect169{})
|
||||||
|
|
||||||
|
}
|
||||||
47
logic/service/fight/effect/171.go
Normal file
47
logic/service/fight/effect/171.go
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
package effect
|
||||||
|
|
||||||
|
import (
|
||||||
|
"blazing/logic/service/fight/action"
|
||||||
|
"blazing/logic/service/fight/input"
|
||||||
|
"blazing/logic/service/fight/node"
|
||||||
|
)
|
||||||
|
|
||||||
|
// 171 - n回合内,自身使用属性技能时能较快出手
|
||||||
|
type Effect171 struct {
|
||||||
|
node.EffectNode
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e *Effect171) ComparePre(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) bool {
|
||||||
|
|
||||||
|
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
if fattack == nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
//先手是自己
|
||||||
|
if fattack.PlayerID == e.Ctx().Our.UserID {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
if sattack == nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
if sattack == nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
if sattack.SkillEntity == nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
//对调
|
||||||
|
sattack.SkillEntity.Priority += 1
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
func (e *Effect171) SetArgs(t *input.Input, a ...int) {
|
||||||
|
e.EffectNode.SetArgs(t, a...)
|
||||||
|
e.EffectNode.Duration(a[0]) // 持续n回合
|
||||||
|
}
|
||||||
|
func init() {
|
||||||
|
input.InitEffect(input.EffectType.Skill, 171, &Effect171{})
|
||||||
|
|
||||||
|
}
|
||||||
31
logic/service/fight/effect/173.go
Normal file
31
logic/service/fight/effect/173.go
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
package effect
|
||||||
|
|
||||||
|
import (
|
||||||
|
"blazing/logic/service/fight/input"
|
||||||
|
"blazing/logic/service/fight/node"
|
||||||
|
)
|
||||||
|
|
||||||
|
// 173 - 先出手时,n%概率令对方xx
|
||||||
|
type Effect173 struct {
|
||||||
|
node.EffectNode
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e *Effect173) OnSkill() bool {
|
||||||
|
|
||||||
|
if e.Input.FightC.IsFirst(e.Input.Player) { // 先出手
|
||||||
|
chance := e.Args()[0].IntPart()
|
||||||
|
success, _, _ := e.Input.Player.Roll(int(chance), 100)
|
||||||
|
if success {
|
||||||
|
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(e.Args()[1].IntPart())) // 以麻痹为例
|
||||||
|
if statusEffect != nil {
|
||||||
|
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
func init() {
|
||||||
|
input.InitEffect(input.EffectType.Skill, 173, &Effect173{})
|
||||||
|
|
||||||
|
}
|
||||||
29
logic/service/fight/effect/193.go
Normal file
29
logic/service/fight/effect/193.go
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
package effect
|
||||||
|
|
||||||
|
import (
|
||||||
|
"blazing/logic/service/fight/info"
|
||||||
|
"blazing/logic/service/fight/input"
|
||||||
|
"blazing/logic/service/fight/node"
|
||||||
|
)
|
||||||
|
|
||||||
|
// 193 - 若对手XX,则必定致命一击
|
||||||
|
type Effect193 struct {
|
||||||
|
node.EffectNode
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e *Effect193) SkillHit() bool {
|
||||||
|
if e.Ctx().SkillEntity == nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
if e.Ctx().Opp.StatEffect_Exist(info.EnumPetStatus(e.Args()[0].IntPart())) { // 对手处于异常状态
|
||||||
|
// 设定必定暴击
|
||||||
|
e.Ctx().SkillEntity.CritRate = 16
|
||||||
|
}
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
func init() {
|
||||||
|
input.InitEffect(input.EffectType.Skill, 193, &Effect193{})
|
||||||
|
|
||||||
|
}
|
||||||
26
logic/service/fight/effect/424.go
Normal file
26
logic/service/fight/effect/424.go
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
package effect
|
||||||
|
|
||||||
|
import (
|
||||||
|
"blazing/logic/service/fight/info"
|
||||||
|
"blazing/logic/service/fight/input"
|
||||||
|
"blazing/logic/service/fight/node"
|
||||||
|
)
|
||||||
|
|
||||||
|
// 424 - n回合内,对手每回合速度等级m
|
||||||
|
type Effect424 struct {
|
||||||
|
node.EffectNode
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e *Effect424) Action_end() bool {
|
||||||
|
e.Ctx().Opp.SetProp(e.Ctx().Our, 4, int8(e.Args()[1].IntPart()), info.AbilityOpType.SUB)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e *Effect424) SetArgs(t *input.Input, a ...int) {
|
||||||
|
e.EffectNode.SetArgs(t, a...)
|
||||||
|
e.EffectNode.Duration(a[0]) // 持续n回合
|
||||||
|
}
|
||||||
|
func init() {
|
||||||
|
input.InitEffect(input.EffectType.Skill, 424, &Effect424{})
|
||||||
|
|
||||||
|
}
|
||||||
14
logic/service/fight/effect/445.go
Normal file
14
logic/service/fight/effect/445.go
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
package effect
|
||||||
|
|
||||||
|
import "blazing/logic/service/fight/node"
|
||||||
|
|
||||||
|
// 445 - 使用后在战斗结束时可以获得500赛尔豆,每日上限5000
|
||||||
|
type Effect445 struct {
|
||||||
|
node.EffectNode
|
||||||
|
}
|
||||||
|
|
||||||
|
// func (e *Effect445) OnSkill() bool {
|
||||||
|
// // 这个效果需要在战斗结束后执行,暂时记录奖励
|
||||||
|
// e.Ctx().Our.EndReward = 500
|
||||||
|
// return true
|
||||||
|
// }
|
||||||
36
logic/service/fight/effect/464.go
Normal file
36
logic/service/fight/effect/464.go
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
package effect
|
||||||
|
|
||||||
|
import (
|
||||||
|
element "blazing/common/data/Element"
|
||||||
|
"blazing/logic/service/fight/info"
|
||||||
|
"blazing/logic/service/fight/input"
|
||||||
|
"blazing/logic/service/fight/node"
|
||||||
|
)
|
||||||
|
|
||||||
|
// 464 - 遇到天敌时m%令对手烧伤
|
||||||
|
type Effect464 struct {
|
||||||
|
node.EffectNode
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e *Effect464) OnSkill() bool {
|
||||||
|
t, _ := element.Calculator.GetOffensiveMultiplier(e.Ctx().Opp.CurrentPet.Type, e.Ctx().Our.CurrentPet.Type)
|
||||||
|
|
||||||
|
if t <= 1 {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
chance := e.Args()[0].IntPart()
|
||||||
|
success, _, _ := e.Input.Player.Roll(int(chance), 100)
|
||||||
|
if success {
|
||||||
|
burnEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(info.PetStatus.Burned))
|
||||||
|
if burnEffect != nil {
|
||||||
|
e.Ctx().Opp.AddEffect(e.Ctx().Our, burnEffect)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
input.InitEffect(input.EffectType.Skill, 464, &Effect464{})
|
||||||
|
|
||||||
|
}
|
||||||
30
logic/service/fight/effect/489.go
Normal file
30
logic/service/fight/effect/489.go
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
package effect
|
||||||
|
|
||||||
|
import (
|
||||||
|
"blazing/logic/service/fight/action"
|
||||||
|
"blazing/logic/service/fight/input"
|
||||||
|
"blazing/logic/service/fight/node"
|
||||||
|
)
|
||||||
|
|
||||||
|
// 489 - 若自身处于能力提升状态,则每次攻击恢复自身体力的1/m
|
||||||
|
type Effect489 struct {
|
||||||
|
node.EffectNode
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e *Effect489) SkillHit_ex() bool {
|
||||||
|
for _, v := range e.Ctx().Our.Prop[:] {
|
||||||
|
if v > 0 {
|
||||||
|
maxHp := e.Ctx().Our.CurrentPet.GetMaxHP()
|
||||||
|
healAmount := maxHp.Div(e.Args()[0]) // 1/m
|
||||||
|
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, healAmount)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
func init() {
|
||||||
|
input.InitEffect(input.EffectType.Skill, 489, &Effect489{})
|
||||||
|
|
||||||
|
}
|
||||||
@@ -78,64 +78,6 @@ func (e *Effect441) SetArgs(t *input.Input, a ...int) {
|
|||||||
e.maxCritIncrease = a[1]
|
e.maxCritIncrease = a[1]
|
||||||
}
|
}
|
||||||
|
|
||||||
// 169 - n回合内,每回合额外附加m%几率令对手XX
|
|
||||||
type Effect169 struct {
|
|
||||||
node.EffectNode
|
|
||||||
}
|
|
||||||
|
|
||||||
func (e *Effect169) OnSkill() bool {
|
|
||||||
if !e.Hit() {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
chance := e.Args()[1].IntPart()
|
|
||||||
success, _, _ := e.Input.Player.Roll(int(chance), 100)
|
|
||||||
if success {
|
|
||||||
// 添加异常状态
|
|
||||||
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(info.PetStatus.Paralysis)) // 以麻痹为例
|
|
||||||
if statusEffect != nil {
|
|
||||||
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
func (e *Effect169) SetArgs(t *input.Input, a ...int) {
|
|
||||||
e.EffectNode.SetArgs(t, a...)
|
|
||||||
e.EffectNode.Duration(a[0]) // 持续n回合
|
|
||||||
}
|
|
||||||
|
|
||||||
// 464 - 遇到天敌时m%令对手烧伤
|
|
||||||
type Effect464 struct {
|
|
||||||
node.EffectNode
|
|
||||||
}
|
|
||||||
|
|
||||||
func (e *Effect464) OnSkill() bool {
|
|
||||||
if !e.Hit() {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// 检查是否遇到天敌
|
|
||||||
if e.isDisadvantageousMatch() {
|
|
||||||
chance := e.Args()[0].IntPart()
|
|
||||||
success, _, _ := e.Input.Player.Roll(int(chance), 100)
|
|
||||||
if success {
|
|
||||||
burnEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(info.PetStatus.Burned))
|
|
||||||
if burnEffect != nil {
|
|
||||||
e.Ctx().Opp.AddEffect(e.Ctx().Our, burnEffect)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
func (e *Effect464) isDisadvantageousMatch() bool {
|
|
||||||
// 这里需要根据具体的克制关系判断
|
|
||||||
// 暂时用伪代码实现
|
|
||||||
return e.Ctx().Our.CurrentPet.Type == element.ElementTypeFire &&
|
|
||||||
e.Ctx().Opp.CurrentPet.Type == element.ElementTypeWater
|
|
||||||
}
|
|
||||||
|
|
||||||
// 507 - 下回合若受到的伤害大于m,则恢复自身所有体力
|
// 507 - 下回合若受到的伤害大于m,则恢复自身所有体力
|
||||||
type Effect507 struct {
|
type Effect507 struct {
|
||||||
node.EffectNode
|
node.EffectNode
|
||||||
@@ -158,20 +100,6 @@ func (e *Effect507) Skill_Use_ex() bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
// 489 - 若自身处于能力提升状态,则每次攻击恢复自身体力的1/m
|
|
||||||
type Effect489 struct {
|
|
||||||
node.EffectNode
|
|
||||||
}
|
|
||||||
|
|
||||||
func (e *Effect489) SkillHit_ex() bool {
|
|
||||||
if e.Ctx().Our.CurrentPet.HasPositiveBuff() { // 假设有检查能力提升的方法
|
|
||||||
maxHp := e.Ctx().Our.CurrentPet.GetMaxHP()
|
|
||||||
healAmount := maxHp.Div(e.Args()[0]) // 1/m
|
|
||||||
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, healAmount)
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// 477 - n回合内若受到攻击,则对手攻击,防御,特攻,特防,速度,命中等级降低
|
// 477 - n回合内若受到攻击,则对手攻击,防御,特攻,特防,速度,命中等级降低
|
||||||
type Effect477 struct {
|
type Effect477 struct {
|
||||||
node.EffectNode
|
node.EffectNode
|
||||||
@@ -208,30 +136,6 @@ func (e *Effect477) SetArgs(t *input.Input, a ...int) {
|
|||||||
e.EffectNode.Duration(a[0]) // 持续n回合
|
e.EffectNode.Duration(a[0]) // 持续n回合
|
||||||
}
|
}
|
||||||
|
|
||||||
// 173 - 先出手时,n%概率令对方xx
|
|
||||||
type Effect173 struct {
|
|
||||||
node.EffectNode
|
|
||||||
}
|
|
||||||
|
|
||||||
func (e *Effect173) OnSkill() bool {
|
|
||||||
if !e.Hit() {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
if e.Ctx().Our.Speed > e.Ctx().Opp.Speed { // 先出手
|
|
||||||
chance := e.Args()[0].IntPart()
|
|
||||||
success, _, _ := e.Input.Player.Roll(int(chance), 100)
|
|
||||||
if success {
|
|
||||||
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(info.PetStatus.Paralysis)) // 以麻痹为例
|
|
||||||
if statusEffect != nil {
|
|
||||||
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// 165 - n回合内,每回合防御和特防等级+m
|
// 165 - n回合内,每回合防御和特防等级+m
|
||||||
type Effect165 struct {
|
type Effect165 struct {
|
||||||
node.EffectNode
|
node.EffectNode
|
||||||
@@ -273,25 +177,6 @@ func (e *Effect483) OnSkill() bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
// 424 - n回合内,对手每回合速度等级m
|
|
||||||
type Effect424 struct {
|
|
||||||
node.EffectNode
|
|
||||||
}
|
|
||||||
|
|
||||||
func (e *Effect424) OnSkill() bool {
|
|
||||||
speedEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(info.PetStatus.SpeedDown))
|
|
||||||
if speedEffect != nil {
|
|
||||||
speedEffect.SetArgs(e.Ctx().Our, int(e.Args()[1].IntPart()))
|
|
||||||
e.Ctx().Opp.AddEffect(e.Ctx().Our, speedEffect)
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
func (e *Effect424) SetArgs(t *input.Input, a ...int) {
|
|
||||||
e.EffectNode.SetArgs(t, a...)
|
|
||||||
e.EffectNode.Duration(a[0]) // 持续n回合
|
|
||||||
}
|
|
||||||
|
|
||||||
// 485 - 消除对手能力强化状态,若消除成功,则自身恢复所有体力
|
// 485 - 消除对手能力强化状态,若消除成功,则自身恢复所有体力
|
||||||
type Effect485 struct {
|
type Effect485 struct {
|
||||||
node.EffectNode
|
node.EffectNode
|
||||||
@@ -336,17 +221,6 @@ func (e *Effect188) SkillHit() bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
// 445 - 使用后在战斗结束时可以获得500赛尔豆,每日上限5000
|
|
||||||
type Effect445 struct {
|
|
||||||
node.EffectNode
|
|
||||||
}
|
|
||||||
|
|
||||||
func (e *Effect445) OnSkill() bool {
|
|
||||||
// 这个效果需要在战斗结束后执行,暂时记录奖励
|
|
||||||
e.Ctx().Our.EndReward = 500
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// 420 - 使用了该技能后,若受到消除强化类技能攻击,则对方则对方攻击和特攻等级+/-n
|
// 420 - 使用了该技能后,若受到消除强化类技能攻击,则对方则对方攻击和特攻等级+/-n
|
||||||
type Effect420 struct {
|
type Effect420 struct {
|
||||||
node.EffectNode
|
node.EffectNode
|
||||||
@@ -420,24 +294,6 @@ func (e *Effect403) OnSkill() bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
// 193 - 若对手XX,则必定致命一击
|
|
||||||
type Effect193 struct {
|
|
||||||
node.EffectNode
|
|
||||||
}
|
|
||||||
|
|
||||||
func (e *Effect193) SkillHit() bool {
|
|
||||||
if e.Ctx().SkillEntity == nil {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
if e.Ctx().Opp.CurrentPet.HasAnyStatus() { // 对手处于异常状态
|
|
||||||
// 设定必定暴击
|
|
||||||
e.Ctx().SkillEntity.MustCrit = true
|
|
||||||
}
|
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// 491 - 3回合内对手造成的伤害降低m%
|
// 491 - 3回合内对手造成的伤害降低m%
|
||||||
type Effect491 struct {
|
type Effect491 struct {
|
||||||
node.EffectNode
|
node.EffectNode
|
||||||
@@ -543,23 +399,6 @@ func (e *Effect504) OnSkill() bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
// 171 - n回合内,自身使用属性技能时能较快出手
|
|
||||||
type Effect171 struct {
|
|
||||||
node.EffectNode
|
|
||||||
}
|
|
||||||
|
|
||||||
func (e *Effect171) Skill_Pre() bool {
|
|
||||||
if e.Ctx().SkillEntity != nil && e.Ctx().SkillEntity.Category() == info.Category.STATUS {
|
|
||||||
// 提高速度,确保较快出手
|
|
||||||
e.Ctx().Our.TempSpeedBoost = true
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
func (e *Effect171) SetArgs(t *input.Input, a ...int) {
|
|
||||||
e.EffectNode.SetArgs(t, a...)
|
|
||||||
e.EffectNode.Duration(a[0]) // 持续n回合
|
|
||||||
}
|
|
||||||
|
|
||||||
// 1044 - 吸取对手能力提升状态,吸取成功则下n回合造成的伤害翻倍
|
// 1044 - 吸取对手能力提升状态,吸取成功则下n回合造成的伤害翻倍
|
||||||
type Effect1044 struct {
|
type Effect1044 struct {
|
||||||
@@ -329,9 +329,9 @@ func (f *FightC) enterturn(firstAttack, secondAttack *action.SelectSkillAction)
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
f.Switch = make(map[uint32]*action.ActiveSwitchAction)
|
f.Switch = make(map[uint32]*action.ActiveSwitchAction)
|
||||||
if f.closefight && f.Info.Mode == info.BattleMode.PET_MELEE {
|
// if f.closefight && f.Info.Mode == info.BattleMode.PET_MELEE {
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
f.Broadcast(func(fighter *input.Input) {
|
f.Broadcast(func(fighter *input.Input) {
|
||||||
fighter.Player.SendPackCmd(2505, &attackValueResult)
|
fighter.Player.SendPackCmd(2505, &attackValueResult)
|
||||||
fighter.CanChange = 0
|
fighter.CanChange = 0
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ func (s *InfoService) Person(userid uint32) (out *model.Player) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *InfoService) SetLogin() *model.PlayerInfo {
|
func (s *InfoService) GetLogin() *model.PlayerInfo {
|
||||||
|
|
||||||
var tt *model.Player
|
var tt *model.Player
|
||||||
s.dbm_fix(s.Model).Scan(&tt)
|
s.dbm_fix(s.Model).Scan(&tt)
|
||||||
@@ -93,7 +93,7 @@ func (s *InfoService) SetLogin() *model.PlayerInfo {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if !IsToday(tt.LastResetTime) { //判断是否是今天
|
if !IsToday(tt.LastResetTime) && cool.Config.ServerInfo.IsVip == 0 { //判断是否是今天
|
||||||
|
|
||||||
//每天login时候检查重置时间,然后把电池,任务,挖矿重置
|
//每天login时候检查重置时间,然后把电池,任务,挖矿重置
|
||||||
//挖矿需要单独存,因为防止多开挖矿
|
//挖矿需要单独存,因为防止多开挖矿
|
||||||
@@ -122,7 +122,7 @@ func (s *InfoService) SetLogin() *model.PlayerInfo {
|
|||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if !IsWEEK(tt.WeekLastResetTime) {
|
if !IsWEEK(tt.WeekLastResetTime) && cool.Config.ServerInfo.IsVip == 0 {
|
||||||
|
|
||||||
for _, v := range service.NewTaskService().GetWeek() {
|
for _, v := range service.NewTaskService().GetWeek() {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user