public

Rpg Maker Developers Group

Simple enough for a child, powerful enough for a developer

2 Followers
Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.

Original Source

  • Original title: KEndure ACE
  • Original author: kyonides
  • Original date: August 5, 2020
  • Source thread: https://forums.rpgmakerweb.com/threads/kendure-ace.124924/
  • Source forum path: Game Development Engines > Ruby Game System (RGSS) Scripts > RGSS3 Scripts (RMVX Ace)

Summary

KEndure ACE by Kyonides Arkanthes​ Introduction Use note tags to implement some Endure or Sturdy kind of passive skill or state.

Archived First Post

KEndure ACE

by Kyonides Arkanthes


Introduction

Use note tags to implement some Endure or Sturdy kind of passive skill or state.
You're free to define how many HP the hero or monster will get in return for surviving.
Since it's a state, its effects will definitely wear off at some point.
You may only take advantage of this feature once per battle.
Please follow the script instructions and set STATE_ID constat to your chosen State ID.

Download the DEMO

Script Section

Code:
# * KEndure ACE
#   Scripter : Kyonides Arkanthes
#   2020-08-04

# This scriptlet allows you to set Endure like states in your games!
# Your hero will not die for n turns.
# If he's cursed, he won't be able to get healed.

# * Note Tags * #
# -endure 25-      # 25 will be the hero's new HP
# -endure 1 curse- # 1 HP and cannot heal

# * Toggle Hero's No Heal Curse In Game - Position 0 through MAX
# $game_party.members[Position].endure_no_heal = true # Or false

module KEndure
  STATE_ID = 26
  HEAL_REMOVE_ENDURE = true # Remove Endure after being healed?
end

class Game_Battler
  alias :kyon_endure_gm_battler_hp :hp=
  alias :kyon_endure_gm_battler_obe :on_battle_end
  def no_endure?(nhp) nhp > @endure_hp and KEndure::HEAL_REMOVE_ENDURE end
  def hp=(nhp)
    if nhp < 1
      return @hp if state?(KEndure::STATE_ID)
      if !@used_endure and @endure_hp != 0
        add_state(KEndure::STATE_ID)
        @used_endure = true
        return @hp = [@endure_hp, mhp].min
      end
    end
    return @hp if @endure_no_heal
    remove_state(KEndure::STATE_ID) if no_endure?(nhp)
    kyon_endure_gm_battler_hp(nhp)
  end

  def on_battle_end
    kyon_endure_gm_battler_obe
    @used_endure = nil
  end

  def parse_endure_note(note)
    note = note[/-endure \w+-/i] || ''
    @endure_hp = note.scan(/\d+/)[0].to_i
    @endure_no_heal = true if note[/curse/i]
  end
  attr_accessor :endure_hp, :used_endure, :endure_no_heal
end

class Game_Actor
  alias :kyon_endure_gm_actor_init :initialize
  def initialize(actor_id)
    kyon_endure_gm_actor_init(actor_id)
    parse_endure_note($data_actors[@actor_id].note)
  end
end

class Game_Enemy
  alias :kyon_endure_gm_enemy_init :initialize
  def initialize(index, enemy_id)
    kyon_endure_gm_enemy_init(index, enemy_id)
    parse_endure_note($data_enemies[enemy_id].note)
  end
end

Terms & Conditions

Free for use in any game.
Include my nickname in your game credits. Mention this forum as well.

Downloads / Referenced Files

Log in to download

Log in, then follow the RPG Maker Developers Group to see these download links.

Log in to download

License / Terms Note

Include my nickname in your game credits. Mention this forum as well.

Creator Claims / Removal

If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.

#rgss3#script-archive

Replies (0)

No replies yet.

0 replies 1 view

Log in to reply.

User Avatar