Hello! I am trying to modify the Phoenix Ring to be a Hidden Item or Key Item that has the same effect as I don't want to tie up my characters accessory slot the whole game and would like them to be able to use it more then once in a battle.
I want characters to purchase or start with the ability to come back to life in battle. They can start the game with X amount of Resurrections type deal. If it's not possible to do that, I would like to tie it to an item they can keep in their inventory.
I took the Original Script and Created a Hidden A Item.
Then I tried plugging it into the Notes under state to generate this effect with no luck, the code works normally with the ring, so I have the proper plug ins running. I just don't know enough to modify it properly.
Original Yanfly Script.
<Custom Apply Effect>
if (target.isActor()) {
var ring = $dataArmors[1541];
if (target.hasArmor(ring)) {
target.discardEquip(ring);
target.startAnimation(42);
var hp = Math.floor(target.mhp * 0.25);
target.gainHp(hp);
target.startDamagePopup();
}
}
</Custom Apply Effect>
My Modifications
<Custom Apply Effect>
if (target.isActor()) {
var ring = $dataItems[0021];
if (target.hasItems(ring)) {
target.discardItems(ring);
target.startAnimation(42);
var hp = Math.floor(target.mhp * 1.00);
target.gainHp(hp);
target.startDamagePopup();
}
}
</Custom Apply Effect>
Any help would be appreciated!
I want characters to purchase or start with the ability to come back to life in battle. They can start the game with X amount of Resurrections type deal. If it's not possible to do that, I would like to tie it to an item they can keep in their inventory.
I took the Original Script and Created a Hidden A Item.
Then I tried plugging it into the Notes under state to generate this effect with no luck, the code works normally with the ring, so I have the proper plug ins running. I just don't know enough to modify it properly.
Original Yanfly Script.
<Custom Apply Effect>
if (target.isActor()) {
var ring = $dataArmors[1541];
if (target.hasArmor(ring)) {
target.discardEquip(ring);
target.startAnimation(42);
var hp = Math.floor(target.mhp * 0.25);
target.gainHp(hp);
target.startDamagePopup();
}
}
</Custom Apply Effect>
My Modifications
<Custom Apply Effect>
if (target.isActor()) {
var ring = $dataItems[0021];
if (target.hasItems(ring)) {
target.discardItems(ring);
target.startAnimation(42);
var hp = Math.floor(target.mhp * 1.00);
target.gainHp(hp);
target.startDamagePopup();
}
}
</Custom Apply Effect>
Any help would be appreciated!