YeOldeDM / lets-godot-roguelike

A tutorials series on how to build a simple roguelike in the Godot Game Engine
MIT License
24 stars 5 forks source link

Fighter Stats: Attack & Defense #41

Open YeOldeDM opened 7 years ago

YeOldeDM commented 7 years ago

To make combat interesting, we can incorporate a couple variables into the damage factor of our attacks.

Fighter script gets:
export(int) var attack = 2
export(int) var defense = 2

In the attack() method, we can send our attack stat as the damage amount.
And in take_damage(), we can reduce damage taken by our defense stat.