じ☆ve冰风 发表于 2026-7-9 10:09:37

KRiskPoints XP

KRiskPoints XP


by Kyonides Arkanthes​



Introduction

This is a quite simple scriptlet that lets you create a state that randomly changes your hero's life or mana points every turn till it wears off.

Nope, Aluxes, it won't revive you if a ghost or a lizard has killed you already!



Script

                Code:       
# * KRiskPoints XP - Default Battle System Version#   Scripter : Kyonides Arkanthes#   2020-07-31# This scriptlet will let you create a state with the ability to set an actor's# Life or Mana Points randomly every turn he or she is afflicted by that.# I think this is a great addition for bosses and mini bosses.# Add a state to the States DB and come back here to set the STATE_ID constant# to the chosen state ID. By the way, you may prefer to create a Skill that# inflicts this state to the hero.# A hero might even get afflicted by both kinds of states.# This state will not revive its target. My sympaties, Aluxes! XDmodule KRiskPointsLIFE_STATE_ID = 20MANA_STATE_ID = 21endclass Scene_Battlealias :kyon_hprisk_ups1 :update_phase4_step1def update_phase4_step1    if @active_battler and @active_battler.hp > 0      if @active_battler.state?(KRiskPoints::LIFE_STATE_ID)      @active_battler.hp = rand(@active_battler.maxhp + 1)      end      if @active_battler.state?(KRiskPoints::MANA_STATE_ID)      @active_battler.sp = rand(@active_battler.maxsp + 1)      end    end    kyon_hprisk_ups1endend



Terms & Conditions

Free for use in any non commercial games.
Don't forget to include my nickname in your game credits!
Include the forum's URL as well.
Give me a free copy of your completed game if you include at least 2 of my scripts!



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