08-20-2013, 06:28 AM
So i'm trying to create a blue mage character. I've got a script for that allows me to choose the id numbers for blue magic and choose the ids of the sctors that are blue mages. The blue mage will learn a skill when attacked only. To get around the issue of enemy's not using helping skills on the mage (such as white wind from final fantasy) i have a script for a skill that controls the enemy (actually they just become an ally and can't be controlled) and they will use the healling skill, but the Blue Mage wont learn it even though it's working on them. Looking at the blue mage script it looks like it only set up to learn on a "hit", but i don't know how to add it for other skills like healling or status changing ones. Here the script im using
Code:
=begin
Fomar0153's Blue Mages Script
Changle Log
----------------------
1.0 -> 1.1 : Added notification when learning a new Skill
----------------------
Known bugs
----------------------
None
=end
class Game_Actor < Game_Battler
# Edit to include the actor (character) id
BlueMages = [1]
# Edit to include all the skill ids of the skills you want your
# blue mages to learn
BlueMagic = [23, 26]
#--------------------------------------------------------------------------
# ● Aliased make_damage_value
#--------------------------------------------------------------------------
alias bluemagic_make_damage_value make_damage_value
def make_damage_value(user, item)
bluemagic_make_damage_value(user, item)
if @result.hit? and item.class == RPG::Skill
if BlueMages.include?(@actor_id) and BlueMagic.include?(item.id)
i = @skills.size
learn_skill(item.id)
if !(i == @skills.size)
SceneManager.scene.add_text(actor.name + " learns " + item.name + ".")
end
end
end
end
end
class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# ● New method add_text
#--------------------------------------------------------------------------
def add_text(text)
@log_window.add_text(text)
end
end