View previous topic :: View next topic |
Author |
Message |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Sun Oct 01, 2006 12:40 pm Post subject: Drain |
|
|
Is it possible to make an drain attack that:
- will not drain more than the caster's lost HP and
- will not drain more than the target's current HP? _________________
|
|
Back to top |
|
 |
msw188
Joined: 02 Jul 2003 Posts: 1041
|
Posted: Sun Oct 01, 2006 3:25 pm Post subject: |
|
|
Okay, I just had the entire idea typed out very nicely and (I thought) well-organized, and I accidently pushed TAB instead of CAPS LOCK and then Enter, and I was logged out. So I'm going to do a quick summary and if you think that this is how you want to go and you think you need help on the details, reply.
First off, my idea needs three stats (I'm going to call them STAT1, STAT2 and STAT3) plus the AIM stat plus the enemy's DODGE stat to be cleared out and used as variables, to be restored later. However, the only way I know of for restoring is to set to 100% of max, which will 'unalter' any battle-altered stats. If you are counting on battle stats being able to be altered in battle for the course of the whole battle, they can't be used for this. So you may not be able to even use this idea at all.
Okay, the basic thing is as follows. I want to take the Hero's lost HP, store in STAT1, and the enemy's remaining HP and store in STAT2. Then I want to use the following algorithm:
{
AIM:=STAT2-STAT1 (or zero if negative, doesn't really matter)
Attack with STAT1 (miss if STAT2 was bigger than STAT1)
Increase STAT3 by previous attack damage
}
Repeat {} brackets with STAT1 and STAT2 reversed
Heal hero using STAT3
Problems: a) (minor) might not finish chain if the attack kills the enemy. This can be remedied with some extended trickery
b) (major) This will use either the lost HP or the enemy's HP as the base attacking stat. I'm pretty sure that if you want to use some other base attacking stat (and just use these as bounds) it can be done, but it will need another variable (STAT4) and will be a real pain.
If this sounds like a viable solution for you, let me know and I can help with any and all of the attacks needed to pull this off. |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Sun Oct 01, 2006 4:00 pm Post subject: |
|
|
Actually, that sounds like a real pain. Can I feature request a an attack bitset "Damage cannot exceed current stat"? That's useful and stylish. _________________
|
|
Back to top |
|
 |
msw188
Joined: 02 Jul 2003 Posts: 1041
|
Posted: Sun Oct 01, 2006 6:39 pm Post subject: |
|
|
I guess that that is fairly stylish, but I'm not sure that that will be enough to get the maximum bound you want (with the Hero's lost HP). It might make the process take fewer steps, but I think that a more useful (for both you and other OHR users) and at least equally stylish feature request would be something like including a 'damage bounds' submenu for the attack editor, where each attack could be set to be bounded by constants AND statistics of both the attacker AND the target. Ideally, it would be something like:
(user chooses constant or disables) < Damage < (same)
(user chooses attacker's stat or disables) < Damage < (same)
(user chooses target's stat or disables) < Damage < (same)
All of these would be taken into account when damage is calculated, as well as the damage cap in the general game data. If the damage lies outside of one of the bounds, it is 'cropped' to fit in that bound. If it is cropped at all, it has to pass all three bounds again. If it cannot pass all three bounds after (I'm not sure how many tries it should take) tries around the block, it fails (this would mean that the bounds conflict). |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Mon Oct 02, 2006 7:25 am Post subject: |
|
|
Moogle1 wrote: | Actually, that sounds like a real pain. Can I feature request a an attack bitset "Damage cannot exceed current stat"? That's useful and stylish. |
Yes. A feature like that would take about 15 minutes to code and test. Put it here So we don't forget. :) |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Mon Oct 02, 2006 7:46 am Post subject: |
|
|
My way's easier to code
Request filed. _________________
|
|
Back to top |
|
 |
|