[project1dev] Combat stuff

  • From: Alan Wolfe <alan.wolfe@xxxxxxxxx>
  • To: project1dev@xxxxxxxxxxxxx
  • Date: Sun, 19 Apr 2009 16:51:16 -0700

Ok so first version of combat is in.

Currently it doesnt care if you run out of HP, and if you beat all the
enemies it stays there til you click Win (you can click win to skip a fight
too...)

The reason it doesnt handle you dying or winning is cause when i tried to
make it handle those cases, it crashed the game... so i'm going to code that
next.

details of combat!

1) /scripts/config.lua has a section called player stats, where you can set
the player's HP, Attack Strength, and round time.

Right now its set to 100HP, 5 seconds of round time, and 10 attack strength
(ie 10 damage per attack)

2) /Scripts/CombatEnemies/miner.lua is the logic for the miner enemy and
also is where the stats are set.

Right now each miner enemy has 25 HP, 5 to 7 seconds of round time (randomly
chosen between 5 and 7) and has 10 attack strength.

Also, the enemy randomly chooses between defending, attacking, or super
attacking.

3) /Scripts/Enemies/miner.lua which is the script for the miners walking
around in the world, that controls what is spawned when you bump into them.

Right now when you bump into a miner 1-4 miners will show up for you to
fight against

=========Combat flow=============

When you enter combat, you and all the enemies start with your maximum round
time.

when it's an enemy's turn, it pauses round time, tells you what the enemy is
going to do w/ a lil text box (on screen for 1.5 seconds) then it does the
action and round time unpauses.

When it's your turn, it pauses round time and a menu comes up where you can
choose to defend, attack, or super attack.

Defend - when you or the enemy is defending, you can't be hurt, and you have
normal round time.
Attack - You do your attack strength in damage to the enemy (or vice versa)
and have normal round time.
Super Attack - you do 1.5 times as much damage, but also have 1.5 times as
much round time (same for the enemy)

When you are fighting, on the left of the screen it shows your HP and round
time as well as the enemies.

Also there is a little icon shown to show what the last action of you and
each enemy was (so you can avoid attacking enemies who are defending etc).

That's about it!

I'm going to put in death / winning next so it'll feel more like a real
game.

Other related posts:

  • » [project1dev] Combat stuff - Alan Wolfe