Hello!
I want my priest's single target skill to deal light damage to Undead, or dark damage to living targets.
In order to do so, I added the Undead status, then I created a fake skill whose task is just to call a common event.
This common event has to check whether the skill is targeting an Undead.
Finally, if the target is Undead, the common event will force to priest to use the light version of the spell; otherwise, the dark one will be used.
So the question is: how to script this common event? I'm ignorant in Javascript, and although I found a similiar topic, it was about forcing statuses, not skills, and the request was uncertain.
This is what I managed to put together:
var targetIndex = BattleManager._action._targetIndex // finds the target
var target = $gameTroop.members()[targetIndex] //finds the target's object
var undeadSID = 25 //undead state ID is 25
if (target.isStateAffected(undeadSID)){ // if object is undead
// force party member #4 to use skill #164
}
else{
//the very same, but with skill #163
);
Can you please complete this?
Thank you in advance 😀
I want my priest's single target skill to deal light damage to Undead, or dark damage to living targets.
In order to do so, I added the Undead status, then I created a fake skill whose task is just to call a common event.
This common event has to check whether the skill is targeting an Undead.
Finally, if the target is Undead, the common event will force to priest to use the light version of the spell; otherwise, the dark one will be used.
So the question is: how to script this common event? I'm ignorant in Javascript, and although I found a similiar topic, it was about forcing statuses, not skills, and the request was uncertain.
This is what I managed to put together:
var targetIndex = BattleManager._action._targetIndex // finds the target
var target = $gameTroop.members()[targetIndex] //finds the target's object
var undeadSID = 25 //undead state ID is 25
if (target.isStateAffected(undeadSID)){ // if object is undead
// force party member #4 to use skill #164
}
else{
//the very same, but with skill #163
);
Can you please complete this?
Thank you in advance 😀