#1Today i am working on a "Retreat" system (to flee from combat).
You only get the option to "retreat" during your "turn". You can NOT attack while trying to retreat.
It "costs" you at least 1 turn to retreat (the one turn where you choose to retreat).
At the beginning of your next turn a message will let you know if you managed to flee or not.
A random number between 1 and 100 will be generated. That number minus the amount of attackers and plus your total Dexterity will be checked. If that number is higher than 50 you manage to flee (you won´t gain experience,gold or items!) and the combat ends.
Otherwise you will have the option to flee again or fight normally.
You get the option to Retreat only during your turn.
(
finished the implementation by now, just need to fine tune the needed minimum number to flee).
#2Next thing on my list is the "dead player" scenario.
Right now players can´t "die" (when their hp drops below "1", nothing happens).
I really had to wait to implement this because the combat system was not always working. Since i can safely say that the basic combat should be bulletproof by now i can get into this (quite important) aspect of the game.
There are a few logical things i have to tell the game that are not obvious:
1)If the Players minimal hp drops below "1" the Player is dead. I need to change the player status as soon as that is happening, otherwise the player might "regenerate" or get healed before the check is being made.
(check)1a) The dead Players hp is "0". Otherwise the hp bar will throw error messages.
(check)1b) Dead players should not have mana (for spells etc. otherwise they might be able to cast spells etc.)
So instead of telling every single spell to watch out for the player status (dead/alive) i am going to handle it this way. Also after reviving the
Char should need some time to "
Regenerate" first. Just makes sense to me.
(check) 2)The player may not move while being dead.
(check)(control table will not be visible)
2a)The player may not fight / trade while being dead (this should be covered by 2.)
(check)(control table will not be visible)
2b)The Player may not cast spells (should be covered by 1b)
(check)(control table will not be visible)
2c)The Player may not use items (Healing Potions etc, not implemented yet)
(check) (control table will not be visible)
2d)The Player may not equip/unequip items (Currently there are no "bonuses" like +hp or +con implemented, sooner or later they will be)
(check)3)The Player may not
Regenerate hp/mp while being dead.
(check)4)The Player needs to know that he died (Messagebox)
(check)5)Dead Players may not be able to "log" into the game(optional)
(check)(You get a message and the game closes after "loading" the character.)
6)Save the location of the corpse
(check)(location will be saved at the playerlist.ini)
Those should be the first things i need to do.
Now i need to find a way to "do" something with the dead player.First i need to retrieve the corpse.
1)Other Players/Characters may find the dead Players corpse
(check)2)Other Players/Characters may revive the dead Player with a Spell / Scroll (not implemented)
3)Other Players/Characters may "carry" the dead Player to a nearby Town
(check)4)Other Players/Characters may hire "Rescuers" (in Town) to find the corpse and bring it to town (for gold)
(check) (you may send rescuers from any town if there is a corpse at the playerlist)
After that i need to implement ways to "revive" the dead Player.
1)
Revive at Town (for gold)
(check) (morgue is enabled at the town where the corpse was brought to)
2)
Revive by Spell: (need to implement spells first).
Whenever the corpse is "moved" i need to save that. Also when the Player is no longer dead i need to change their status again.
---
As you see this is actually a lot more complex than you might have thought in the first place.
I am sure that i haven´t even listed everything.