じ☆ve冰风 发表于 2026-7-28 21:38:47

Yanfly Battle AI Core extension: Buffs

Astfgl's YBAICExtension: Buffs​

Hi everyone!
This small plugin is an addon for Yanfly's battle AI core.

I make pretty extensive use of it for my current project, and noticed the ability to check the target for buffs or debuffs was missing, thus this plugin was born.

Features:

[*]Allows buffs/debuffs/neutral condition checks for enemy AI.
[*]Allow prioritizing Highest buffed target or Lowest debuffed Target
Requirements:

[*]Yanfly's Battle AI Core.
Download on pastebin:here

Instructions:
Plug and play, name doesn't matter. Just place it below battle AI core.

                Code:       
Allows to check the target for buffs
use: Buff >=0 Buff to check if target has a buff or neutral
use: Buff <=0 Buff to check it target has a debuff or neutral
use: Buff <0 Buff to check if target strictly has debuff
use: Buff >0 Buff to check if target strictly has buff
use: Buff ===0 Buff to check if target is strictly neutral
to check for buffs on the user use Eval (user._buffs )
Replace paramId with 0 -> MHP, 1 -> MMP, 2 -> ATK, 3 -> DEF, 4 -> MATK
5 -> MDF, 6 -> AGI, 7 -> LUK.


Ex: Buff >0 Buff 0: Skill 1
Will make the enemy target only actors that are max hp buffed.

IMPORTANT: there is a space between Buff and the parameter id here.

Also allows to use Buff condition for targeting:
Lowest Buff
Highest Buff

Replace with the parameter id as described above.
Ex: Buff0 : check for MHP, Buff1: check for MMP, Buff2: check for ATK

IMPORTANT: There is no space here between buff and the parameter id here.


Examples:
                Code:       
Ex: Buff <0 Buff 0: Skill 1, Lowest Buff0
Enemy will use skill 1 only on mhp debuffed actors, targeting the most
debuffed actor first.

Ex: Buff >0 Buff 2: Skill 1, Highest Buff2
Enemy will use skill 1 only on atk buffed actors, targeting the most buffed
actor first.

Ex: Buff ===0 Buff 3: Skill 1, Highest Def
Enemy will use skill 1 only on actors that aren't defense buffed or debuffed
targeting the highest defense actor first.


Terms of use:
They are inclulded in the script file for reference; pasted here:
                Code:       
Yanfly's terms of use apply, please credit me with any of the following
Astfgl66/Pierre MATEO/Pierre MATEO (Astfgl66).


Have a nice day, and happy making!


本贴来自国际rpgmaker官方论坛作者:Astfgl66处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/yanfly-battle-ai-core-extension-buffs.75810/
页: [1]
查看完整版本: Yanfly Battle AI Core extension: Buffs