Choco-sama Ancien staffeux
Messages postés : 3012 Date d'inscription : 19/10/2009 Jauge LPC :
| Sujet: Blue Magic Mar 6 Aoû 2013 - 1:19 | |
| Blue Magic Auteur: Fomar0153 Il existe deux versions pour la "magie bleue/ blue magic". L'un est complètement autonome et l'autre nécessite le script "Unique Classes". Les mages bleus sont des mages tiré de Final Fantasy qui apprennent traditionnellement une magie en étant frappé avec, par l'ennemi (ou un allié). Ce script permet d'imiter cela. Script Autonome: - Les instructions sont dans le script - - Code:
-
=begin Stand Alone Blue Mages Script by Fomar0153 Version 1.1 ---------------------- Notes ---------------------- No requirements Allows party members to learn skills by being hit by them. Commonly described as Blue Magic or Enemy Skills ---------------------- Instructions ---------------------- Set "BlueMages" to include all the id's of the party members who will be blue mages Set "BlueMagic" to include all the id's of Blue Magic skills ---------------------- 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 = [3] # Edit to include all the skill ids of the skills you want your # blue mages to learn BlueMagic = [3, 4]
#-------------------------------------------------------------------------- # ● 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 Script ayant besoin du script "Unique Classes" - Code:
-
=begin Blue Mage Class Script by Fomar0153 Version 1.1 ---------------------- Notes ---------------------- Requires the "Unique Classes Script" Allows party members to learn skills by being hit by them. Commonly described as Blue Magic or Enemy Skills ---------------------- Instructions ---------------------- Set "BlueMagic" to include all the id's of Blue Magic skills Follow the instructions in the Unique Classes Script
---------------------- Changle Log ---------------------- 1.0 -> 1.1 : Added notification when learning a new Skill ---------------------- Known bugs ---------------------- None =end class Game_BlueMage < Game_Actor
# Edit to include all the skill ids of the skills you want your # blue mages to learn BlueMagic = [3, 4]
#-------------------------------------------------------------------------- # ● 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 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 |
|
lidenvice Ancien staffeux
Messages postés : 1955 Date d'inscription : 18/10/2011 Jauge LPC :
| Sujet: Re: Blue Magic Mar 6 Aoû 2013 - 17:11 | |
| Merci choco pour le partage + points |
|
Zexion Administrateur
Messages postés : 6228 Date d'inscription : 04/01/2012 Jauge LPC :
| Sujet: Re: Blue Magic Mar 6 Aoû 2013 - 20:10 | |
| Tiens, un truc original. J'avais jamais entendu parler de ça, ça me semble être intéressant. Merci, Choco-sama. |
|