Merge branch 'main' of github.com:72wo/blazing
This commit is contained in:
@@ -24,7 +24,7 @@ func (e *NewSel28) Damage_ADD(t *info.DamageZone) bool {
|
|||||||
if e.Ctx().SkillEntity.Type != int(e.Args()[0]) {
|
if e.Ctx().SkillEntity.Type != int(e.Args()[0]) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
t.Damage = t.Damage.Add(t.Damage.Mul(decimal.NewFromInt(int64(e.Args()[1]))))
|
t.Damage = t.Damage.Add(t.Damage.Mul(decimal.NewFromInt(int64(e.Args()[1])).Div(decimal.NewFromInt(100))))
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
func init() {
|
func init() {
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ package effect
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"blazing/logic/service/fight/input"
|
"blazing/logic/service/fight/input"
|
||||||
|
|
||||||
|
"github.com/shopspring/decimal"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 33. 精灵体力降低到 1/n 时有 m% 几率体力回满;(a1: n, a2: m 百分比)
|
// 33. 精灵体力降低到 1/n 时有 m% 几率体力回满;(a1: n, a2: m 百分比)
|
||||||
@@ -15,17 +17,16 @@ func (e *NewSel33) Action_end_ex() bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
// 3. 概率判定(Args()[1]为触发概率)
|
// 3. 概率判定(Args()[1]为触发概率)
|
||||||
success, _, _ := e.Input.Player.Roll(e.Args()[0], 100)
|
|
||||||
if !success {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
if e.Ctx().Our.CurrentPet.Info.Hp == 0 {
|
|
||||||
|
|
||||||
|
cmp := e.Ctx().Our.CurrentPet.GetMaxHP().Div(decimal.NewFromInt(int64(e.Args()[0])))
|
||||||
|
if e.Ctx().Our.CurrentPet.GetHP().Cmp(cmp) == -1 {
|
||||||
|
success, _, _ := e.Input.Player.Roll(e.Args()[1], 100)
|
||||||
|
if !success {
|
||||||
|
return true
|
||||||
|
}
|
||||||
e.Ctx().Our.Heal(e.Ctx().Our, nil, e.Ctx().Our.GetPetInfo().GetMaxHP())
|
e.Ctx().Our.Heal(e.Ctx().Our, nil, e.Ctx().Our.GetPetInfo().GetMaxHP())
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
func init() {
|
func init() {
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ func (e *Effect73) SetArgs(t *input.Input, a ...int) {
|
|||||||
e.EffectNode.Duration(e.EffectNode.SideEffectArgs[0] - 1)
|
e.EffectNode.Duration(e.EffectNode.SideEffectArgs[0] - 1)
|
||||||
|
|
||||||
}
|
}
|
||||||
func (e *Effect73) Skill_Use_ex() bool {
|
func (e *Effect73) Action_end_ex() bool {
|
||||||
|
|
||||||
if !e.Hit() {
|
if !e.Hit() {
|
||||||
return true
|
return true
|
||||||
@@ -40,11 +40,15 @@ func (e *Effect73) Skill_Use_ex() bool {
|
|||||||
if !e.Input.FightC.IsFirst(e.Ctx().Our.Player) {
|
if !e.Input.FightC.IsFirst(e.Ctx().Our.Player) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
tt := &info.DamageZone{
|
||||||
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
|
|
||||||
Type: info.DamageType.Fixed,
|
Type: info.DamageType.Fixed,
|
||||||
Damage: e.Ctx().Opp.SumDamage.Mul(decimal.NewFromInt(2)),
|
Damage: e.Ctx().Opp.SumDamage.Mul(decimal.NewFromInt(2)),
|
||||||
})
|
}
|
||||||
|
maxhp := e.Ctx().Our.CurrentPet.GetMaxHP().Mul(decimal.NewFromInt(30))
|
||||||
|
if tt.Damage.Cmp(maxhp) == 1 {
|
||||||
|
tt.Damage = maxhp
|
||||||
|
}
|
||||||
|
e.Ctx().Opp.Damage(e.Ctx().Our, tt)
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user