So I just started using Gemini (I haven't really used it before) and I humored it by asking ”make me a plugin where it turns state #3 into reflecting 100% of damage back to the enemy" and it spat out this:
/*:
* @target MZ
* @plugindesc Reflects 100% of received damage back to the attacker if the target has State #3.
* @Author Gemini
*
* @Help ReflectDamage.js
*
* This plugin does not have any parameters. It specifically looks for
* State ID #3. If a battler has State #3 active, any HP damage they
* receive will be dealt back to the attacker.
*/
(() => {
const _Game_Action_executeDamage = Game_Action.prototype.executeDamage;
Game_Action.prototype.executeDamage = function(target, value) {
// Call the original damage function first
_Game_Action_executeDamage.apply(this, arguments);
// Check if damage is greater than 0 and target has State #3
// We also check 'this.subject()' to make sure there is an attacker to hit back
if (value > 0 && target.isStateAffected(3) && this.subject()) {
const attacker = this.subject();
// Execute damage on the attacker
// value is the amount of damage just dealt to the target
attacker.gainHp(-value);
// Show the damage popup on the attacker
attacker.startDamagePopup();
// Check if the attacker died from the reflection
if (attacker.isDead()) {
attacker.performCollapse();
}
}
};
})();
First of all- I have NO idea if it even functions (to my knowledge it doesn't work)
And second- I do not Wana use AI made plugins, as this was just to humor something I didn't think it would know about
Coders feel free to go nuts, as I have no idea if it even made something that works lol
/*:
* @target MZ
* @plugindesc Reflects 100% of received damage back to the attacker if the target has State #3.
* @Author Gemini
*
* @Help ReflectDamage.js
*
* This plugin does not have any parameters. It specifically looks for
* State ID #3. If a battler has State #3 active, any HP damage they
* receive will be dealt back to the attacker.
*/
(() => {
const _Game_Action_executeDamage = Game_Action.prototype.executeDamage;
Game_Action.prototype.executeDamage = function(target, value) {
// Call the original damage function first
_Game_Action_executeDamage.apply(this, arguments);
// Check if damage is greater than 0 and target has State #3
// We also check 'this.subject()' to make sure there is an attacker to hit back
if (value > 0 && target.isStateAffected(3) && this.subject()) {
const attacker = this.subject();
// Execute damage on the attacker
// value is the amount of damage just dealt to the target
attacker.gainHp(-value);
// Show the damage popup on the attacker
attacker.startDamagePopup();
// Check if the attacker died from the reflection
if (attacker.isDead()) {
attacker.performCollapse();
}
}
};
})();
First of all- I have NO idea if it even functions (to my knowledge it doesn't work)
And second- I do not Wana use AI made plugins, as this was just to humor something I didn't think it would know about
Coders feel free to go nuts, as I have no idea if it even made something that works lol