38 lines
595 B
Go
38 lines
595 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/info"
|
|
"blazing/logic/service/fight/input"
|
|
"blazing/logic/service/fight/node"
|
|
)
|
|
|
|
/**
|
|
* n%几率伤害为m倍
|
|
*/
|
|
|
|
func init() {
|
|
input.InitEffect(input.EffectType.Skill, 88, &Effect88{})
|
|
|
|
}
|
|
|
|
// Effect 88: {0}%概率伤害为{1}倍
|
|
type Effect88 struct {
|
|
node.EffectNode
|
|
}
|
|
|
|
func (e *Effect88) Damage_Mul(t *info.DamageZone) bool {
|
|
|
|
// 概率判定
|
|
ok, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)
|
|
if !ok {
|
|
return true
|
|
}
|
|
if t.Type == info.DamageType.Red {
|
|
|
|
t.Damage = t.Damage.Mul(e.Args()[1])
|
|
|
|
}
|
|
|
|
return true
|
|
}
|