Пример #1
0
sanguis::server::entities::with_id_unique_ptr
sanguis::server::entities::enemies::factory::reaper(
	sanguis::server::entities::enemies::factory::parameters const &_parameters
)
{
	sanguis::server::entities::enemies::parameters enemy_parameters(
		_parameters.enemy_type(),
		_parameters.load_context(),
		sanguis::server::damage::no_armor(),
		sanguis::server::mass{
			10.f
			*
			boost::units::si::kilogram
		},
		sanguis::server::health(
			100.f
			*
			std::sqrt(
				_parameters.difficulty().get()
			)
		),
		sanguis::server::entities::movement_speed(
			150.f
		),
		sanguis::server::ai::create_simple(
			_parameters.random_generator(),
			sanguis::server::ai::sight_range(
				1000.f
			)
		),
		fcppt::unique_ptr_to_base<
			sanguis::server::weapons::weapon
		>(
			fcppt::make_unique_ptr<
				sanguis::server::weapons::melee
			>(
				_parameters.weapon_parameters(),
				sanguis::server::weapons::melee_parameters{
					sanguis::server::weapons::range(
						75.f
					),
					sanguis::server::weapons::backswing_time(
						sanguis::duration_second(
							2.f
						)
					),
					sanguis::server::weapons::damage(
						5.f
						*
						std::sqrt(
							_parameters.difficulty().get()
						)
					),
					sanguis::server::damage::make_array({
						sanguis::server::damage::normal =
							sanguis::server::damage::full
					})
				}
			)
		),
		sanguis::server::pickup_probability(
			0.f
		),
		sanguis::server::exp(
			0.f
		),
		_parameters.difficulty(),
		_parameters.spawn_owner(),
		sanguis::server::auras::container(
			// TODO
		)
	);

	sanguis::server::entities::enemies::modifiers::parameters const modifiers_parameters(
		_parameters.random_generator()
	);

	return
		fcppt::unique_ptr_to_base<
			sanguis::server::entities::with_id
		>(
			fcppt::make_unique_ptr<
				sanguis::server::entities::enemies::special
			>(
				_parameters.random_generator(),
				std::move(
					enemy_parameters
				),
				sanguis::server::entities::enemies::attribute_container{
					sanguis::server::entities::enemies::modifiers::regenerating(
						enemy_parameters,
						modifiers_parameters
					)
				},
				sanguis::server::entities::enemies::skills::factory::container{
					sanguis::server::entities::enemies::skills::factory::scatter
				},
				sanguis::server::entities::enemies::is_unique{
					true
				}
			)
		);
}
Пример #2
0
sanguis::server::entities::with_id_unique_ptr
sanguis::server::entities::enemies::factory::ghost(
	sanguis::server::entities::enemies::factory::parameters const &_parameters
)
{
	SANGUIS_SERVER_BUFFS_DEFINE_SPECIAL(
		ghost_slow,
		slow
	);

	return
		sanguis::server::entities::enemies::factory::make(
			_parameters,
			sanguis::server::damage::no_armor(),
			sanguis::server::mass{
				0.01f
				*
				boost::units::si::kilogram
			},
			sanguis::server::health(
				6.f
				*
				std::sqrt(
					_parameters.difficulty().get()
				)
			),
			sanguis::server::entities::movement_speed(
				60.f
			),
			sanguis::server::ai::create_simple(
				_parameters.random_generator(),
				sanguis::server::ai::sight_range(
					1000.f
				)
			),
			fcppt::unique_ptr_to_base<
				sanguis::server::weapons::weapon
			>(
				fcppt::make_unique_ptr<
					sanguis::server::weapons::melee
				>(
					_parameters.weapon_parameters(),
					sanguis::server::weapons::melee_parameters{
						sanguis::server::weapons::range(
							75.f
						),
						sanguis::server::weapons::backswing_time(
							sanguis::duration_second(
								2.f
							)
						),
						sanguis::server::weapons::damage(
							5.f
						),
						sanguis::server::damage::make_array({
							sanguis::server::damage::ice =
								sanguis::server::damage::full
						})
					}
				)
			),
			sanguis::server::pickup_probability(
				0.1f
			),
			sanguis::server::exp(
				10.f
			),
			fcppt::container::make<
				sanguis::server::auras::container
			>(
				sanguis::server::auras::slow_create<
					ghost_slow
				>(
					sanguis::server::radius(
						200.f
					),
					sanguis::server::team::monsters,
					sanguis::server::buffs::slow_factor(
						0.1f
					)
				)
			)
		);
}
Пример #3
0
sanguis::server::entities::with_id_unique_ptr
sanguis::server::entities::enemies::factory::skeleton(
	sanguis::server::entities::enemies::factory::parameters const &_parameters
)
{
	SANGUIS_SERVER_BUFFS_DEFINE_SPECIAL(
		skeleton_burn,
		burn
	);

	return
		sanguis::server::entities::enemies::factory::make(
			_parameters,
			sanguis::server::damage::no_armor(),
			sanguis::server::mass{
				20.f
				*
				boost::units::si::kilogram
			},
			sanguis::server::health(
				12.f
				*
				std::sqrt(
					_parameters.difficulty().get()
				)
			),
			sanguis::server::entities::movement_speed(
				50.f
			),
			sanguis::server::ai::create_simple(
				_parameters.random_generator(),
				sanguis::server::ai::sight_range(
					1000.f
				)
			),
			fcppt::unique_ptr_to_base<
				sanguis::server::weapons::weapon
			>(
				fcppt::make_unique_ptr<
					sanguis::server::weapons::melee
				>(
					_parameters.weapon_parameters(),
					sanguis::server::weapons::melee_parameters{
						sanguis::server::weapons::range(
							100.f
						),
						sanguis::server::weapons::backswing_time(
							sanguis::duration_second(
								1.f
							)
						),
						sanguis::server::weapons::damage(
							10.f
						),
						sanguis::server::damage::make_array({
							sanguis::server::damage::normal =
								sanguis::server::damage::full
						})
					}
				)
			),
			sanguis::server::pickup_probability(
				0.75f
			),
			sanguis::server::exp(
				100.f
			),
			fcppt::assign::make_container<
				sanguis::server::auras::container
			>(
				sanguis::server::auras::burn_create<
					skeleton_burn
				>(
					sanguis::server::radius(
						300.f
					),
					sanguis::server::team::monsters,
					sanguis::server::buffs::burn_interval(
						sanguis::duration_second(
							1.f
						)
					),
					sanguis::server::damage::unit(
						1.f
						*
						std::sqrt(
							_parameters.difficulty().get()
						)
					)
				)
			)
		);
}