[2K3] CHARACTER PASSIVE ABILITIES

Posts

Pages: 1
So right now I'm currently working on giving passive abilities to characters, all 28 of them, as to make them more unique and flavorable. Right now though, I'm having a bit of a dilemma with one ability: Bonecrusher. For those of you who don't know, in Final Fantasy Tactics, Bonecrusher activated when a character in Critical status took damage and would inflict damage to its target as a counter equal to that user's Maximum HP. Same dealio here, in a way...essentially, the passive ability here is that while the character is in Critical (25% or less HP), and if she uses the Attack command, then there's a 10% chance of Bonecrusher going off, dealing damage equal to her Max HP, as well as a 90% accuracy on the attack itself.

That's fine and all...however, here's the problem. The character is meant to dual-wield, and I just have it set NOW to activate twice (I need to set 2 separate hit rates for them though). Why is this more of a problem? Because she comes with a secondary command named Focus, which increases the amount of times she can use the Attack command by 1, up to a maximum of 8 attacks. In essence, this means she can attack 16 times in one go, and if Bonecrusher was compatible with that (it's not compatible with any level of Focus), that'd be x16 Bonecrushers going off.

Now, here's the thing: Would this be a good idea to do? I mean yes, it takes 8 turns to build up 16x Attacks, and there's only a 10% chance of Bonecrusher happening when Attack is used, but at level 99, she has 9200 HP. If all 16 Bonecrushers hit, that's 165,600 damage.

And then that comes to if it is a good idea to do this (it's a risk-reward idea after all), how would I go about actually coding this? @_@:;



EDIT - Coding if you wanna see it. First column is the battle event for Bonecrusher when Attack is used, 2nd column is for the common event for Bonecrusher, and last column is the coding for the battle event for Focus (the Focus command increases the variable by one each time it's used).

Once a combo has started, the system doesn't count each attack in it a turn right?
So you won't be able to run any events in-between attacks during a combo if I'm correct.

The only thing I can think of is creating your own combo system, that way you can call your Bonecrusher event in-between attacks. There are probably more tutorials than this one, but here's one I found on creating a custom combo system:

http://icugigasoft.freeforums.org/rpg-maker-2003-combo-system-t372.html
I don't know if the RPG Maker's combo feature trigger the actual internal "battle action" to be executed multiple times or just deals multiple damage... But if the first is true and if this is 2k3, one could write a DynRPG plugin which checks for the character HP in onDoBattlerAction (if the action is BA_ATTACK) and if it's 25%, does the random check and if it succeeds (10%), it changes the action to AK_SKILL and sets it to a "Bonecrasher" skill which does nothing (just to show a nice animation) and in onBattlerActionDone the plugin would do the damage to the target manually.

Sample code (untested):

bool onDoBattlerAction(RPG::Battler *battler) {
if(
!battler->isMonster() &&
battler->id == 7 && // 7 is the ID of the hero with the ability
battler->action->kind == RPG::AK_BASIC &&
battler->action->basicActionKind = RPG::BA_ATTACK &&
battler->hp < battler->getMaxHp() / 4 && // <25% HP?
rand() % 10 == 0 // Only in 10% of cases
) {
battler->action->kind = RPG::AK_SKILL;
battler->action->skillId = 123; // 123 is the ID of the "Bonecrusher" skill which does no damage
}
}

bool onBattlerActionDone(RPG::Battler *battler, bool success) {
if(
success &&
!battler->isMonster() &&
battler->action->kind == RPG::AK_SKILL &&
battler->action->skillId == 123 // Again, the skill ID
) {
RPG::Monster *target = RPG::monsters[battler->action->targetId];
target->hp -= battler->getMaxHp(); // Deal damage
target->damagePopup(battler->getMaxHp(), 0); // Show damage popup
}
}
Just a question, maaaaaybe going a little offtopic:

When checking if the battler is not a monster I go:


if (!isMonster){
//Code
}


Is that wrong? I see you do it differently. Maybe I'm doing it wrong.
onDoBattlerAction/onBattlerActionDone has no isMonster parameter (onDrawBattler/onBattlerDrawn has - you are probably doing your check in one of these callbacks).

(No, I don't remember why I added an isMonster parameter to the latter in the first place. It's redundant because RPG::Battler has an isMonster method anyway, as I used the example.)
I am checking on onBattlerDrawn yeah, so it's correct. Good to know!
author=Cherry
But if the first is true and if this is 2k3...



Yes, it's for 2K3 *points at title* :V

I haven't tested to see if it works with the combo system at all. I could probably just force it to use the Bonecrusher coding X times, depending on the Focus value if need be. A bit of coding, but it could work. The only issue remaining (if that worked with Focus) is that this coding doesn't really work if the character only has one weapon equipped (again, don't know why anyone would ever have her with one weapon when she can dual-wield...).

So yeah, would it be wiser for me to just merge the Bonecrusher coding into the Focus coding, since that's based off of the Attack command anyways? The trigger is basically "If is above 0]; if Youmu uses the command" anyways so...
Pages: 1