Introduction: This script was made by request for Akkein (aka Akkrin) at http://forum.chaos-project.com/. Make sure to credit him and all others listed in the "Credits/Thanks" section below if you use this script. For detailed instructions on how to use this script, please see the section "Directions" below. For small mods that can be done, see the "Tips/Modifying this Script" section below.

Features: * Allows for the consumption of HP rather than SP for skills * Can be configured to set "Blood Mage" state based on class, actor, state, or by default on some skills * Can set behavior for when an actor has too little HP for a skill, and can set a minimum percentage of HP an actor must have to use skills * As of 1.8, no bug-free (hopefully! ;)) * Compatible with SP-cost add-ons and RTAB * Small code; less than 100 lines if you cut out all commeting and white space

Roadmap: 1.85: BlizzABS compatibility, enemies as blood mages, and "dryusers" (users who will never use blood skills)

Directions: You should place this script below all of the default RMXP scripts (these should end in Scene_Debug) and above any of Blizzard's scripts.

All of the instructions below are either referring to the code directly after this comment-block, or the code inside Game_System within this script.

- If you want to use RTAB with this script, change "WCW_BLOODMAGE_RTAB = false" to "WCW_BLOODMAGE_RTAB = true". This enables a small workaround for a quirk in RTAB (make_skill_action_result takes an argument, whereas it does not in the DBS) - To set an actor to be a bloodmage by default, add his ID between the brackets next to "@wcw_bloodusers =" below, and separate all IDs with commas. To remove a user from the group, simply delete their ID. To add a Blood-User in-game, use a Call Script event command with the code "$game_system.wcw_bloodusers.push <id>", replacing <id> with the actor's ID. To remove them, use "$game_system.wcw_bloodusers.delete <id>", likewise replacing <id> with the actor's ID. - To set a class to Blood Mage, add the ID between the brackets beside "@wcw_bloodmages =" below, once again separating them with commas. To remove a class, simply remove the ID. To add in-game, use Call Script with "$game_system.wcw_bloodmages.push <id>", replacing <id> with the ID. To remove a class, use "$game_system.wcw_bloodmages.delete <id>". - To add a Blood State, add the ID of the state between the brackets next to "@wcw_bloodstates =" below, separating each ID with a comma. To remove a state, simply remove the ID. To do the same in-game, use "$game_system.wcw_bloodstates.push <id>" and "$game_system.wcw_bloodstates.delete <id>". - To add a skill which always consumes HP rather than MP, add its ID between the brackets next to "@wcw_bloodskills = " below, separating each ID with commas. To remove the skill, remove the ID. To do the same in-game, use "$game_system.wcw_bloodskills.push <id>" and "$game_system.wcw_bloodskills.delete <id>". - To add a skill that will consume SP even when used by a Bloodmage, add its ID between the brackets next to "@wcw_dryskills =" below, separating each with a comma. To remove the skill, remove the ID. To do the same in-game, use "$game_system.wcw_dryskills.push <id>" and "$game_system.wcw_dryskills.delete <id>". - To allow a Blood Mage to die when they use a skill the require more HP than they have, replace "false" with "true" next to "@wcw_blood_die = " below. To reverse this, replace "true" with "false". TO do the same in-game, use "$game_system.wcw_blood_die = true" and "$game_system.wcw_blood_die = false". - To have a Bloodmage be left with 1 HP after they overcharge, replace "false" with "true" on the line with "@wcw_blood_overcharge". To do the same in-game, use "$game_system.wcw_blood_overcharge = true" or "$game_system.wcw_blood_overcharge = false". For this to work, the option above must be set to "false". - To set the minimum % HP a Blood Mage must have to use a Blood Skill, set the number between 0 and 1 next to "@wcw_blood_limit = " below. To do the same in-game, use "$game_system.wcw_blood_limit = <% in decimal>".

Tips/Modifying this Script: * To change how much a Blood Mage is left with after overcharging, replace the "battler.hp = 1" in make_skill_action_effect in Scene_Battle with "battler.hp = <expression>", and the "return @hp > 1" in skil_can_use? in Game_Battler with "return @hp > <expression>". * To make $game_system.wcw_blood_limit be a static amount rather than percentage, replace "(self.hp * $game_system.wcw_blood_limit).to_i" in skill_can_use? in Game_battler with "$game_system.wcw_blood_limit". * To check for Blood Mage, use "if $WCW_BLOOD_MAGE". To check the version, use "if $WCW_BLOOD_MAGE > <your_version>".

Compatibility: Tested with SP Cost Mod from Blizzard's Tons of Add-Ons and the Default Battle System. If you find any issues, please report them at http://forum.chaos-project.com/, in the Blood Mage thread, which will most likely be in the "RMXP Script Database" forum.

Credits: Blizzard, for helping me learn to script, pointing out a bug, and optimizing code Fantasist, for getting me to come back to RMXP Akkrin, for giving me the Blood Mage idea Myself, for scripting it Cid, for reporting two errors ;) omegapirate2000, for confirming Cid's error (more the merrier :P) game_guy, for giving me an idea (overcharging)

Enjoy |:]=end

$WCW_BLOOD_MAGE = 1.8

#----------------------------------------------------------------------------# * CONFIG (redefinition of Game_System class)# Configuration section :)#----------------------------------------------------------------------------# To use with RTAB, change false in the line below to true.WCW_BLOODMAGE_RTAB = false

# Backs up the old initialize methodalias init_wcw_bloodmage_later initialize#------------------------------------------------------------------------# - initialize#First method called :P#------------------------------------------------------------------------def initialize# This variable stores the ID's of all classes which should consume #HP over MP.@wcw_bloodusers = [1]#This variable stores the ID's of all actors that act as#bloodmages, even though their class is not a bloodmage.@wcw_bloodmages = [] # This variable stores the IDs of all states which cause an actor to # consumer HP rather than MP. @wcw_bloodstates = []#This variable stores the ID's of all skills which will act as#bloodmage skills, even if the actor using it isn't a bloodmage@wcw_bloodskills = []#This variable stores the ID's of all skills which will not cause#a bloodmage to lose HP if they use them.@wcw_dryskills = [57]#If this variable is set to "true," bloodmages will be able to kill#themselves if they use to much HP (it will use more HP than the #actor has, even if it is not enough for the skill.) If it is#set to false, they will only be able to use the skills until it#would put them below $game_system.wcw_blood_limit.@wcw_blood_die = false#If this variable is set to "true," (and the one above is false),#then when an actor uses a blood skill that costs more HP than he#currently has, it will simply reduce his HP to one. (STILL IN#TESTING).@wcw_blood_overcharge = false#This number must be set from 0 to 1. It signifies the minimum#percent of HP an actor must have to use a skill if #$game_system.wcw_blood_die is set to "false. 0 is default,#and means the actor can use skills until his HP is 1.@wcw_blood_limit = 0 # Do everything else that is normally done :P return init_wcw_bloodmage_later

end

end

#----------------------------------------------------------------------------# * Bulk of the code (redefinition of some Game_Battler code)#----------------------------------------------------------------------------class Game_Battler#Backs up skill_can_use?(skill_id)alias skill_can_use_wcw_bloodmage_later skill_can_use? #lol, long name :P

#------------------------------------------------------------------------# - wcw_is_bloodmage?()#Checks to see if actor is a bloodmage.#------------------------------------------------------------------------def wcw_is_bloodmage?return self.is_a?(Game_Actor) && ($game_system.wcw_bloodusers.include?(self.class_id) ||$game_system.wcw_bloodmages.include?(self.id) || @states.any? {|s| $game_system.wcw_bloodstates.include?(s)})end#------------------------------------------------------------------------# - wcw_bloodmages_applies?(skill_id)#Checks to see whether a given skill is a bloodskill when used by#the actor.#------------------------------------------------------------------------def wcw_bloodmage_applies?(skill_id) return (wcw_is_bloodmage? && (! $game_system.wcw_dryskills.include?(skill_id))) ||$game_system.wcw_bloodskills.include?(skill_id)end

#------------------------------------------------------------------------# - skill_can_use?(skill_id)#Checks to see if a skill can be used#------------------------------------------------------------------------def skill_can_use?(skill_id)

#Go ahead and pass it on if the actor isn't a bloodmage or the #skill isn't a bloodskillunless wcw_bloodmage_applies?(skill_id)return skill_can_use_wcw_bloodmage_later(skill_id)end

#==============================================================================# Blood Mage Magic Script v 1.0.0# by WcW & Akkrin#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=# - code reviewed, optimized, integrated into Tons of Add-ons, freed from# potential bugs and beta tested by Blizzard# - compatible with RTAB and skill cost modifying scripts (by Blizzard)# - this add-on is part of Tons of Add-ons with full permission of the original# author(s)#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=# Introduction:# # I made this script for Akkein(Akkrin) at http://forum.chaos-project.com at# his request. If he has allowed you to use this, enjoy. If he has not, ask# him.# # Features:# # - Allows for certain classes to use up their HP instead of MP when using# spells.# - Lightweight.## Instructions:# # Add the IDs of all your "Blood Mage" classes to the [] thingy in the# CONFIG section.## Compatibility:# # This has no known compatibility issues. Might not be compatible with CBS-es.# If you find any problems, please post them at http://forum.chaos-project.com## WcW, Signing Off#==============================================================================

interestin.. skills that use HP instead of MP... maybe I'll use this for Tenia Mala... another game/novel/possible anime/possible manga I'm DEFINITELY going to do in the future, (the game version atleast) will definitely need HP usin skills, I may use this one.

I find it funny that while I was viewing this the ad had a picture of a Blood Elf from WoW...

Also, for the next update, I plan to add a slight aesthetical fix that makes it so that if a Blood Mage has 0 SP, it will show it as the regular color instead of red, an option that can make Blood Mages just display n/a for their SP during battle, and a a new option that lets you turn of HP consumption for certain skills.