Add chapter: 18

This commit is contained in:
2022-01-28 21:21:29 +01:00
parent 0e2c91dd12
commit cb17a9c356
12 changed files with 286 additions and 49 deletions

View File

@@ -9,7 +9,7 @@ use crate::rect::Rect;
use crate::{
AreaOfEffect, BlocksTile, CombatStats, Confusion, Consumable, DefenseBonus, EquipmentSlot,
Equippable, InflictsDamage, Item, MeleePowerBonus, Monster, Name, Player, Position,
ProvidesHealing, Ranged, Renderable, SerializeMe, Viewshed, MAP_WIDTH, MAX_MONSTER,
ProvidesHealing, Ranged, Renderable, SerializeMe, Viewshed, MAP_WIDTH, MAX_MONSTER,
};
pub fn player(ecs: &mut World, player_x: i32, player_y: i32) -> Entity {
@@ -249,7 +249,6 @@ fn dagger(ecs: &mut World, x: i32, y: i32) {
.build();
}
fn longsword(ecs: &mut World, x: i32, y: i32) {
ecs.create_entity()
.with(Position { x, y })
@@ -292,7 +291,6 @@ fn shield(ecs: &mut World, x: i32, y: i32) {
.build();
}
fn tower_shield(ecs: &mut World, x: i32, y: i32) {
ecs.create_entity()
.with(Position { x, y })