-
Notifications
You must be signed in to change notification settings - Fork 13
Bullets
AppCraft-LLC edited this page Feb 8, 2018
·
1 revision
Creatures use bullets to shoot their enemies or for healing. If a creature use bullet to heal itself, bullet disappears from game. Creatures can pick up bullets after shooting.
Bullet's data has the following structure:
* { id: 0, // Unique ID of an object
* position: { x: 10, y: 10 }, // position on the map
* velocity: { x: 10, y: 10 }, // direction of bullet's movement
* speed: 5, // speed of the bullet
* dangerous: false // true if the speed of the bullet is enough to hurt a creature
* };
Each bullet belongs to one of the following types:
-
Yellow bullet is regular one. It hurts with
bulletDamagedamage. -
Green bullet is poisoned one. It hurts creatures as a regular bullet, but besides that it poisons a creature. Poison can't kill a creature.
-
Blue bullet hurts creatures as a regular one, but besides that it freezes victims.
-
Orange bullet is made from rubber (guttapercha). It has the same damage as a regular bullet, but it slows down very slow.
