What I am trying to code is a modification of Yanfly's Enemy Thieves snippet that would work the following way:
* When enemy thieves steal your items, they are not added to the stealable item pool, they are added to droppable item pool with 100% probability.
What I wrote was:
As far as I understand, this should create a droppable item entry and push it into the array of droppable items for this enemy (referred to as "origin" because the code is executed via a state, using Yanfly's Buffs and States Core). However, this is not working. What is my error?
* When enemy thieves steal your items, they are not added to the stealable item pool, they are added to droppable item pool with 100% probability.
What I wrote was:
var dropableItem = {
kind: 1,
dataId: item.id,
denominator: 1
}
// Add the droppable item to the enemy's drop pool
origin._dropItems.push(dropableItem);
kind: 1,
dataId: item.id,
denominator: 1
}
// Add the droppable item to the enemy's drop pool
origin._dropItems.push(dropableItem);
As far as I understand, this should create a droppable item entry and push it into the array of droppable items for this enemy (referred to as "origin" because the code is executed via a state, using Yanfly's Buffs and States Core). However, this is not working. What is my error?