Axe's Culling Blade

PauloHPBender

Delirious Storyteller
Veteran
Joined
Oct 16, 2015
Messages
92
Reaction score
23
First Language
Portuguese
Primarily Uses
N/A
Greetings, developers!


I'm trying to make a skill that deals damage against a Target and, if it's remaining hit poins are lesser than the damage taken, it dies instantly, but i don't know how to check, inside the skill effect itself, how much damage was dealt. Any help? I'm using Yanfly Engine Plugins, so it May be easier to be done.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
"it does intantly" what?


Somehow your topic is missing what you want it to do, so we can only give general help ;-)


That said, most probably it could be done by using javascript code inside the damage formula - there is a topic for this pinned in this forum, where examples of conditional damages and other options are given.


For more complex cases you might have to use javascript with Yanfly's "Lunatic code" options, or request a specified plugin if it goes even beyond that - without more details on what should happen in the case we can't point you to a ready solution.
 

PauloHPBender

Delirious Storyteller
Veteran
Joined
Oct 16, 2015
Messages
92
Reaction score
23
First Language
Portuguese
Primarily Uses
N/A
Sorry for the typo, i meant "dies instantly". Already edited the original Post.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
yes code in the damage formula is all you need.


Basically compare the current target HP with the planned damage and either add state #1 (death) or deal damage depending on result.


Sorry, I can't give you the required javascript code, but it should be in the topic I mentioned.
 

PauloHPBender

Delirious Storyteller
Veteran
Joined
Oct 16, 2015
Messages
92
Reaction score
23
First Language
Portuguese
Primarily Uses
N/A
Thanks for trying to help, but sadly planned damage != damage dealt, 'cause of damage variation and defense. What i'm trying to do is to check how much HP the Target has after the damage is dealt.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
How stringent are your timing requirements?


If it is enough to have the enemy die at the end of the battleturn, you can use damage code in combination with a common event, but that still requires creative coding and eventing.


If it needs to be done during the skill sequence, then you need to use the action sequence plugins from Yanfly, no way to do that without plugins.
 

PauloHPBender

Delirious Storyteller
Veteran
Joined
Oct 16, 2015
Messages
92
Reaction score
23
First Language
Portuguese
Primarily Uses
N/A
I've tried the following code:


<Post-Damage Eval>
var hp = target.hp;
var dmg = target.result().hpDamage;
if (hp > 0)
{
if (hp <= dmg)
{
target.startanimation(143);
target.addstate(1);
}
}
</Post-Damage Eval>


Everything seemed nice, but now i'm getting the problem in the attached image.


What's wrong with my code?

Captura de tela 2016-09-08 01.26.28.png
 

PauloHPBender

Delirious Storyteller
Veteran
Joined
Oct 16, 2015
Messages
92
Reaction score
23
First Language
Portuguese
Primarily Uses
N/A
Update: Through a little research, I sust discovered how to make it work. The following code is available for those interested in replicating the effect:

Code:
<Post-Damage Eval>
var hp = target.hp;
var dmg = target.result().hpDamage;
if (hp > 0)
  {
  if (hp <= dmg)
    {
    target.startAnimation(XXX); \\Replace XXX with the Animation ID or your desire
    target.setHp(0);
    if (target.isDead())
      {
      target.performCollapse();
      }
    }
  }
</Post-Damage Eval>
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,867
Messages
1,017,062
Members
137,575
Latest member
akekaphol101
Top