设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 135|回复: 0

[转载发布] Stat Raise Upon Debuff Script

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    9071

    主题

    864

    回帖

    6万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    58883
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    68848

    灌水之王

    发表于 2026-8-3 14:06:53 | 显示全部楼层 |阅读模式
    Competitive Stat Raise Passive
    By Axel FireForged & Blesstama



    INTRODUCTION:

    Have you played Pokémon and seen the ability Competitive?
    For those who don't know when a Pokémon with the ability Competitive is hit with a stat drop, their Sp. Attack will be raised.
    So now I have converted that ability into a passive for Actors to use with a small twist.
    Instead of it only boosting their MAT for 5 turns, you can specify what buff you want and for how long you want.
    This may get a update later for people to have a unique version for Battlers as well when I have time as if the tag is put in a battler's notebox it will copy the actor's version at the moment; this was ported from my main project and cleaned up a little.



    SETUP:

    You probably know how to install a script at this point if you're looking here.
    All you need to do is go into the script's customization and modify the numbers to how you see fit.
    Then all you need to do it put <Passive_Competitive> in the Actor's notebox.



    SCRIPT:

    When use please follow terms listed below, some terms may change depending on the script, but generally the script is free for both commercial and non commercial use.

    Spoiler: Script Itself:
                    Code:       
    1. #==============================================================================
    2. # * Title: Competitive Stat Raise Passive
    3. # * By: Axel FireForged & Blesstama
    4. #==============================================================================
    5. # Please provide credit to Axel FireForged & Blesstama if you use this!
    6. # Free for any use except porn games.
    7. #==============================================================================
    8. # What does this script do?
    9. #
    10. # This overwrites the (Debuff) Effect code in Game_Battler and adds new code.
    11. #
    12. # This allows an actor to raise a specific stat when debuffed, acts like
    13. # the ability Competitive from the Pokemon series.
    14. #
    15. # Not compatible with Debuff Counter
    16. #
    17. #==============================================================================
    18. # Setup:
    19. #
    20. # Actor's Notebox:
    21. #
    22. # For actors to gain this passive you need to put <Passive_Competitive>
    23. # in the notebox. Customization will be explained below.
    24. #
    25. # May update so you can also use for Battlers too.
    26. #
    27. #==============================================================================
    28. # This is the Actor's random chance's max for if their passive procs.
    29. RND_AC_COMP = 100
    30. # When the RND_AC_COMP is rolled, if it rolls under the RND_AC_COMP_CHANCE,
    31. # the proc is successful and the user gets a stat buff
    32. RND_AC_COMP_CHANCE = 100
    33. # When an Actor gets their boost they can play an animation, set this to an ID.
    34. AC_COMP_ANI_ID = 41
    35. # When an Actor's ability procs, you can add a log message!
    36. # Make sure it stays in the quotes!
    37. AC_COMP_TEXT = "But they felt competitive!"
    38. # What stat will be raised when they are hit with a debuff?
    39. # MHP = 0   MMP = 1   ATK = 2   DEF = 3
    40. # MAT = 4   MDF = 5   AGI = 6   LUK = 7
    41. RAISED_COMP_STAT = 2
    42. # How long will the buff last? I recommend making this last 1 turn longer than
    43. # you want it to last!
    44. COMP_STAT_DUARATION = 5
    45. #==============================================================================
    46.   #--------------------------------------------------------------------------
    47.   # * Ability to do log messages in battle/map - Blesstama's Code
    48.   #--------------------------------------------------------------------------
    49. class Scene_Battle < Scene_Base
    50.   attr_accessor:log_window
    51. end
    52. class Scene_Map < Scene_Base
    53.   attr_accessor:log_window
    54. end
    55. class Game_Enemy < Game_Battler
    56.   #--------------------------------------------------------------------------
    57.   # * Easy Note Grabbing - Blesstama's Code
    58.   #--------------------------------------------------------------------------
    59.   def note
    60.     enemy.note.to_s
    61.   end
    62.   
    63.   def get_all_notes(*args)
    64.     notes = ""
    65.     notes += note unless args.include?(:self)
    66.     states.compact.each { |state| notes += state.note } unless args.include?(:state)
    67.     notes
    68.   end
    69. end
    70. class Game_Actor < Game_Battler
    71.   def note
    72.     actor.note.to_s
    73.   end
    74.   def get_all_notes(*args)
    75.     notes = ""
    76.     notes += note unless args.include?(:self)
    77.     notes += self.class.note unless args.include?(:class)
    78.     equips.compact.each { |equip| notes += equip.note } unless args.include?(:equip)
    79.     states.compact.each { |state| notes += state.note } unless args.include?(:state)
    80.     notes
    81.   end
    82. end
    83. class Game_Battler < Game_BattlerBase
    84.   #--------------------------------------------------------------------------
    85.   # * [Debuff] Effect - Axel Code
    86.   #--------------------------------------------------------------------------
    87.   def item_effect_add_debuff(user, item, effect)
    88.     chance = debuff_rate(effect.data_id) * luk_effect_rate(user)
    89.     if rand < chance
    90.       comp = self.get_all_notes.include?("<Passive_Competitive>") && rand(RND_AC_COMP) <= RND_AC_COMP_CHANCE
    91.       user.add_debuff(effect.data_id, effect.value1) if comp
    92.       self.animation_id = AC_COMP_ANI_ID if comp
    93.       add_buff(RAISED_COMP_STAT, COMP_STAT_DUARATION) if comp
    94.       SceneManager.scene.log_window.add_text(AC_COMP_TEXT) if comp
    95.       add_debuff(effect.data_id, effect.value1)
    96.       @result.success = true
    97.     end
    98.   end
    99. end
    100. #==============================================================================
    101. # End of Script
    102. #==============================================================================
    复制代码




    本贴来自国际rpgmaker官方论坛作者:Axel_FireForged处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/stat-raise-upon-debuff-script.180796/
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-17 06:15 , Processed in 0.088850 second(s), 54 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表