Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 KNoRevive XP
#1
KNoRevive XP

by Kyonides Arkanthes


Introduction

This scriptlet will stop you from reviving certain heroes or mercenaries but it also provides a method to define exceptions.

Code:
# * KNoRevive XP
#   Scripter : Kyonides Arkanthes
#   2020-08-04

# Certain heroes or mercenaries cannot be revived anymore!
# You may define skills and items that might bypass this restriction.

module KNoRevive
  POPUP_LABEL = '' # Cannot be revived Popup Message
  # List of Actors that cannot be revived
  DEAD_ACTOR_IDS = []
  EXCEPTION_SKILL_IDS = []
  EXCEPTION_ITEM_IDS = []
  def self.dead_skill?(aid, sid)
    DEAD_ACTOR_IDS.include?(aid) and !EXCEPTION_SKILL_IDS.include?(sid)
  end

  def self.dead_item?(aid, iid)
    DEAD_ACTOR_IDS.include?(aid) and !EXCEPTION_ITEM_IDS.include?(iid)
  end
end

class Game_Battler
  alias :kyon_norevive_gm_battler_se :skill_effect
  alias :kyon_norevive_gm_battler_ie :item_effect
  def skill_effect(user, skill)
    if @hp == 0 and skill.power < 0 and KNoRevive.dead_skill?(self.id, skill.id)
      @damage = KNoRevive::POPUP_LABEL
      return false
    end
    kyon_norevive_gm_battler_se(user, skill)
  end

  def item_effect(item)
    if @hp == 0 and KNoRevive.dead_item?(self.id, item.id)
      @damage = KNoRevive::POPUP_LABEL if $game_temp.in_battle
      return false
    end
    kyon_norevive_gm_battler_ie(item)
  end
end

Terms & Conditions

Free for use in any game.
Include my nickname in your game credits.
Mention this board as well.
Give me a free copy of your completed game if you include at least 2 of my scripts! Laughing + Tongue sticking out
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9

Maranatha!

The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.

[Image: SP1-Scripter.png]
[Image: SP1-Writer.png]
[Image: SP1-Poet.png]
[Image: SP1-PixelArtist.png]
[Image: SP1-Reporter.png]

My Original Stories (available in English and Spanish)

List of Compiled Binary Executables I have published...
HiddenChest & Roole

Give me a free copy of your completed game if you include at least 3 of my scripts! Laughing + Tongue sticking out

Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
Reply }




Users browsing this thread: