Save-Point
KPointsLotto XP - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Material Development (https://www.save-point.org/forum-8.html)
+--- Forum: Scripts Database (https://www.save-point.org/forum-39.html)
+---- Forum: RPGMaker XP (RGSS) Engine (https://www.save-point.org/forum-116.html)
+---- Thread: KPointsLotto XP (/thread-7563.html)



KPointsLotto XP - kyonides - 10-25-2019

KPointsLotto XP

by Kyonides


Introduction

This is a short script that will let you configure two kinds of twin skills, an HP or an SP alias MP regeneration skill. What's new here? It will let you set the points percent your hero might earn or lose! That's pretty much why I say it's a good skill for bosses! Laughing 

Vanilla XP Version
Code:
# * KPointsLotto XP
#   Scripter : Kyonides Arkanthes
#   2019-11-07

# This scriptlet will let you define skills that might heal or damage its
# target or recover or burn its mana depending on luck alone!
# It might be some good skills for boss battles...

module KPLotto
  LIFE_SKILL_ID = 3
  MANA_SKILL_ID = 4
  LIFE_RANGE = -40..25 # Percent you can lose or earn
  MANA_RANGE = -35..10 # Percent you can lose or earn
end

class Range
  def random() rand(4) % 2 == 0 ? -rand(self.first) : rand(self.last) end
end

class Game_Battler
  alias :kyon_plotto_gm_battler_se :skill_effect
  def skill_effect(user, skill)
    result = kyon_plotto_gm_battler_se(user, skill)
    if result
      if KPLotto::LIFE_SKILL_ID == skill.id
        @damage = @hp * KPLotto::LIFE_RANGE.random / 100
        self.hp += @damage
      elsif KPLotto::MANA_SKILL_ID == skill.id
        @damage = @sp * KPLotto::MANA_RANGE.random / 100
        self.sp += @damage
      end
    end
    result
  end
end

Terms & Conditions

You must include my nickname and the current website's URL in your game credits.
I don't know if this scriptlet should be 100% free or not so stay tune! Shocked
Give me a free copy of your completed game if you include at least 2 of my scripts! Laughing + Tongue sticking out


RE: KPointsLotto XP - kyonides - 10-26-2019

Update!

I have updated the script in order to let the player get a specific percent of HP or SP if you use any of its skills.


RE: KPointsLotto XP VX & ACE - kyonides - 11-07-2019

Just Another Update!

I have posted a modified version of KPointsLotto XP and published its ports to VX and VX Ace as well!! Shocked

Honestly, I'd appreciate if somebody cares to test the new versions of my script. Happy with a sweat

EDIT

I had to fix some minor bugs I had found in XP, VX and VX Ace versions of my lil script... Laughing