up3
Build and deploy / Build (push) Has been cancelled
Build and deploy / Update Contributors (push) Has been cancelled
Build and deploy / Deploy (push) Has been cancelled
Build and deploy / Build (push) Has been cancelled
Build and deploy / Update Contributors (push) Has been cancelled
Build and deploy / Deploy (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package effect
|
||||
|
||||
import (
|
||||
"image/color"
|
||||
)
|
||||
|
||||
// Weakness is a lasting effect that reduces the damage dealt to other entities
|
||||
// with melee attacks.
|
||||
var Weakness weakness
|
||||
|
||||
type weakness struct {
|
||||
nopLasting
|
||||
}
|
||||
|
||||
// Multiplier returns the damage multiplier of the effect.
|
||||
func (weakness) Multiplier(lvl int) float64 {
|
||||
v := 0.2 * float64(lvl)
|
||||
if v > 1 {
|
||||
v = 1
|
||||
}
|
||||
return v
|
||||
}
|
||||
|
||||
// RGBA ...
|
||||
func (weakness) RGBA() color.RGBA {
|
||||
return color.RGBA{R: 0x48, G: 0x4d, B: 0x48, A: 0xff}
|
||||
}
|
||||
Reference in New Issue
Block a user