lets-godot-roguelike
lets-godot-roguelike copied to clipboard
Bump Fighting
The standard method of performing a melee attack against an enemy in a roguelike is to "bump into" them; that is, attempt to step into the cell they occupy.
In Thing.step()
, we want to return any Things in the cell we're stepping into. If this Thing has a Fighter, and a Thing in the other cell has a Fighter (if extends Fighter
?), the stepper should execute an attack against that Thing.
For now, in such a case, we'll print out a statement saying who is attacking whom.