func NewProjectile(id int64, start, finish *geometry.Point, damage int, prange float64, owner gameObjectsBase.Activer) *Projectile { shift := math.Sqrt(2)/2 + 1e-2 alpha := math.Atan2(finish.Y-start.Y, finish.X-start.X) start.Move(shift*math.Cos(alpha), shift*math.Sin(alpha)) return &Projectile{ fightBase.NewBaseBlow(fightBase.BM_HIT, prange, "hit"), gameObjectsBase.NewGameObject(id, *start), *finish, damage, owner, } }
func InitMobBlows() { mobBlowsType["HIT"] = &MobBlowType{fightBase.NewBaseBlow(fightBase.BM_HIT, 1.0, "hit")} mobBlowsType["BEG"] = &MobBlowType{fightBase.NewBaseBlow(fightBase.BM_BEG, 0.8, "beg")} mobBlowsType["KICK"] = &MobBlowType{fightBase.NewBaseBlow(fightBase.BM_KICK, 0.8, "kick")} mobBlowsType["CLAW"] = &MobBlowType{fightBase.NewBaseBlow(fightBase.BM_CLAW, 0.8, "claw")} mobBlowsType["BITE"] = &MobBlowType{fightBase.NewBaseBlow(fightBase.BM_BITE, 1.0, "bite")} mobBlowsType["BUTT"] = &MobBlowType{fightBase.NewBaseBlow(fightBase.BM_BUTT, 0.8, "butt")} mobBlowsType["SPIT"] = &MobBlowType{fightBase.NewBaseBlow(fightBase.BM_SPIT, 5.5, "spit")} //range, плевок mobBlowsType["GAZE"] = &MobBlowType{fightBase.NewBaseBlow(fightBase.BM_GAZE, 0.8, "gaze")} mobBlowsType["WAIL"] = &MobBlowType{fightBase.NewBaseBlow(fightBase.BM_WAIL, 9, "wail")} //may be range, вопль - вой mobBlowsType["NONE"] = &MobBlowType{fightBase.NewBaseBlow(fightBase.BM_NONE, 0.0, "none")} mobBlowsType["MOAN"] = &MobBlowType{fightBase.NewBaseBlow(fightBase.BM_MOAN, 8, "moan")} //range, стон mobBlowsType["STING"] = &MobBlowType{fightBase.NewBaseBlow(fightBase.BM_STING, 0.7, "sting")} //жало, укус, укол mobBlowsType["CRUSH"] = &MobBlowType{fightBase.NewBaseBlow(fightBase.BM_CRUSH, 0.7, "crush")} mobBlowsType["TOUCH"] = &MobBlowType{fightBase.NewBaseBlow(fightBase.BM_TOUCH, 0.7, "touch")} mobBlowsType["PUNCH"] = &MobBlowType{fightBase.NewBaseBlow(fightBase.BM_PUNCH, 0.7, "punch")} mobBlowsType["CRAWL"] = &MobBlowType{fightBase.NewBaseBlow(fightBase.BM_CRAWL, 0.7, "crawl")} mobBlowsType["DROOL"] = &MobBlowType{fightBase.NewBaseBlow(fightBase.BM_DROOL, 0.7, "drool")} mobBlowsType["SPORE"] = &MobBlowType{fightBase.NewBaseBlow(fightBase.BM_SPORE, 1.0, "spore")} mobBlowsType["ENGULF"] = &MobBlowType{fightBase.NewBaseBlow(fightBase.BM_ENGULF, 0.5, "engulf")} mobBlowsType["INSULT"] = &MobBlowType{fightBase.NewBaseBlow(fightBase.BM_INSULT, 0.5, "insult")} }
func InitWeapons() { weapons[consts.FIST_WEAP] = &FistWeap{BaseWeap{fightBase.NewBaseBlow(fightBase.BM_HIT, 1.0, "hit"), fightBase.CreateDmgDescription("25d4")}} }