olistic / warriorjs

🏰 An exciting game of programming and Artificial Intelligence
https://warriorjs.com
MIT License
9.41k stars 488 forks source link

@warriorjs/tower-tick-tick-boom warrior haven't got the "pivot" ability and bashing 'backward' forcedly #242

Open dandgerson opened 5 years ago

dandgerson commented 5 years ago

Hey! WarriorJS,

When my JS Warrior attacking in 'backward' direction he takes only 3 points damage, while if he will be able pivot to the enemy face to face he will cuts 5 points for each attack. And this is not cheat, because it's normal, when you want to bash or slash the enemy's skull, you have to pivot yourself to face him))

and i was really puzzled when my Warrior was surrounded by the enemies on third level of the tower and my EAST - faced Warrior bashing 'backward' the Sludge, and he couldn't turn to face him with his "pivot" ability. warriorjs/packages/warriorjs-tower-tick-tick-boom/src/index.js

import {
  attack,
  bind,
  detonate,
  directionOf,
  directionOfStairs,
  distanceOf,
  feel,
  health,
  listen,
  look,
  maxHealth,
  pivot, //  add "pivot" ability 
  rescue,
  rest,
  think,
  walk,
} from '@warriorjs/abilities';
warrior: { // warrior of the third level
          ...Warrior,
          position: {
            x: 1,
            y: 1,
            facing: EAST,
          },
          abilities: {
            bind: bind(),
            pivot: pivot(), // i think it should be like this), but i assume that "pivot" must have on first level
            rescue: rescue(),
          },
        },