Advertisement
Guest User

Untitled

a guest
Jul 13th, 2015
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 52.20 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2. #--------------------------------------------------------------------------
  3. # * Quest System ~ V 1.0
  4.  
  5. #   Par Nuki
  6. #   Merci à Zangther, Hiino, Altor
  7. #--------------------------------------------------------------------------
  8.  
  9. #==============================================================================
  10. # ** Quest_Config
  11. #------------------------------------------------------------------------------
  12. #  Module de configuration du système
  13. #==============================================================================
  14.  
  15. module Quest_Config
  16.   #--------------------------------------------------------------------------
  17.   # * Message de succès par défaut
  18.   #--------------------------------------------------------------------------
  19.   DEFAULT_SUCESS = lambda{|name| "#{name} : réussie!"}
  20.   #--------------------------------------------------------------------------
  21.   # * Message d'échec par défaut
  22.   #--------------------------------------------------------------------------
  23.   DEFAULT_FAIL = lambda{|name| "#{name} : échouée!"}
  24.   #--------------------------------------------------------------------------
  25.   # * Ajouter le journal dans le menu
  26.   # * Ne fonctionne bien que s'il s'agit du menu de base. (ou correctemment codé)
  27.   # Cependant, je peux l'insérer dans d'autres menus à la demande.
  28.   #--------------------------------------------------------------------------
  29.   QUEST_IN_MENU = true
  30. end
  31.  
  32. #==============================================================================
  33. # ** Vocab
  34. #------------------------------------------------------------------------------
  35. # Vocabulaire utilisé pour la scene
  36. #==============================================================================
  37.  
  38. module Vocab
  39.   class << self
  40.     def quest_menu_name; "Quêtes";      end
  41.     def quest_incurse;   "En cours";    end
  42.     def quest_success;   "Validées";    end
  43.     def quest_fail;      "Echouées";    end
  44.     def quest_pended;    "Completées";  end
  45.     def quest_buy;       "Acheter";     end
  46.     def quest_confirm;   "Confirmer";   end
  47.     def quest_cancle;    "Retour";      end
  48.     def quest_gold;       "#{Vocab::currency_unit} donnés"; end
  49.     def quest_exp;        "Exp donnée"; end
  50.     def quest_items;      "Objets donnés"; end
  51.   end
  52. end
  53.  
  54.  
  55. #==============================================================================
  56. # ** Goal
  57. #------------------------------------------------------------------------------
  58. #  Module de description des objectifs
  59. #==============================================================================
  60.  
  61. module Goal
  62.   #--------------------------------------------------------------------------
  63.   # * Constantes
  64.   #--------------------------------------------------------------------------
  65.   ITEMS     = load_data("Data/Items.rvdata2")
  66.   WEAPONS   = load_data("Data/Weapons.rvdata2")
  67.   ARMORS    = load_data("Data/Armors.rvdata2")
  68.   #--------------------------------------------------------------------------
  69.   # * Singleton
  70.   #--------------------------------------------------------------------------
  71.   class << self
  72.     #--------------------------------------------------------------------------
  73.     # * Déclencheur personnalisé
  74.     #--------------------------------------------------------------------------
  75.     def trigger(tags = [], &block)
  76.       Goal::Simple.new(block, tags)
  77.     end
  78.     #--------------------------------------------------------------------------
  79.     # * Déclencheur des variables
  80.     #--------------------------------------------------------------------------
  81.     def variable(id, value, operator = :==)
  82.       trigger([:var]) do |*obj|
  83.         $game_variables[id].send(operator, value)
  84.       end
  85.     end
  86.     #--------------------------------------------------------------------------
  87.     # * Déclencheur des interrupteurs
  88.     #--------------------------------------------------------------------------
  89.     def switch(id, state = :active)
  90.       trigger([:switch]) do |*obj|
  91.           (state == :activated) ?
  92.             $game_switches[id] : !$game_switches[id]
  93.       end
  94.     end
  95.     #--------------------------------------------------------------------------
  96.     # * Déclencheur des Objets
  97.     #--------------------------------------------------------------------------
  98.     def get_abstract_item(item, count, tags)
  99.       trigger(tags) do |*obj|
  100.         $game_party.item_number(item) >= count
  101.       end
  102.     end
  103.     #--------------------------------------------------------------------------
  104.     # * Déclencheur des Objets simple
  105.     #--------------------------------------------------------------------------
  106.     def get_item(id, count)
  107.       get_abstract_item(ITEMS[id], count, [:object, :item])
  108.     end
  109.     #--------------------------------------------------------------------------
  110.     # * Déclencheur des Armes
  111.     #--------------------------------------------------------------------------
  112.     def get_weapon(id, count)
  113.       get_abstract_item(WEAPONS[id], count, [:object, :weapon])
  114.     end
  115.     #--------------------------------------------------------------------------
  116.     # * Déclencheur des Armures
  117.     #--------------------------------------------------------------------------
  118.     def get_armor(id, count)
  119.       get_abstract_item(ARMORS[id], count, [:object, :armor])
  120.     end
  121.     #--------------------------------------------------------------------------
  122.     # * Déclencheur des monstres
  123.     #--------------------------------------------------------------------------
  124.     def kill_monster(id, value)
  125.       g = trigger([:monster]) do |*obj|
  126.         storage = obj[0].storage
  127.         storage[id].finished?
  128.       end
  129.       g.storage[id] = Goal::Engagement.new(value)
  130.       return g
  131.     end
  132.   end
  133.  
  134.   #==============================================================================
  135.   # ** Engagement
  136.   #------------------------------------------------------------------------------
  137.   #  Contrat numeroté
  138.   #==============================================================================
  139.  
  140.   class Engagement < Struct.new(:current, :goal)
  141.     #--------------------------------------------------------------------------
  142.     # * Constructeur
  143.     #--------------------------------------------------------------------------
  144.     def initialize(g)
  145.       super(0, g)
  146.     end
  147.     #--------------------------------------------------------------------------
  148.     # * Etat
  149.     #--------------------------------------------------------------------------
  150.     def finished?
  151.       self.current >= self.goal
  152.     end
  153.     #--------------------------------------------------------------------------
  154.     # * Ajout d'un objectif
  155.     #--------------------------------------------------------------------------
  156.     def up(i = 1)
  157.       self.current += i
  158.     end
  159.     #--------------------------------------------------------------------------
  160.     # * Augmentation de l'objectif
  161.     #--------------------------------------------------------------------------
  162.     def increase(i)
  163.       self.goal += i
  164.       return self
  165.     end
  166.     #--------------------------------------------------------------------------
  167.     # * Restauration à zéro
  168.     #--------------------------------------------------------------------------
  169.     def to_zero
  170.       self.current = 0
  171.     end
  172.   end
  173.  
  174.   #==============================================================================
  175.   # ** Simple
  176.   #------------------------------------------------------------------------------
  177.   #  Objectif simple (et non composé)
  178.   #==============================================================================
  179.  
  180.   class Simple
  181.     #--------------------------------------------------------------------------
  182.     # * Variables d'instances
  183.     #--------------------------------------------------------------------------
  184.     attr_accessor :finished
  185.     attr_accessor :lambda
  186.     attr_accessor :tags
  187.     attr_accessor :storage
  188.     alias         :finished?  :finished
  189.     alias         :finish     :finished=
  190.     #--------------------------------------------------------------------------
  191.     # * Constructeur
  192.     #--------------------------------------------------------------------------
  193.     def initialize(lambda, tags = [])
  194.       @storage  = Hash.new
  195.       @tags     = tags
  196.       @lambda   = Proc.new(&lambda)
  197.       @finished = false
  198.     end
  199.     #--------------------------------------------------------------------------
  200.     # * Opérateurs ET
  201.     #--------------------------------------------------------------------------
  202.     def &(other)
  203.       @tags     = (@tags + other.tags).uniq
  204.       @finished = @finished && other.finished?
  205.       temp      = @lambda.clone
  206.       obj       = self
  207.       @lambda   = Proc.new{temp.call(obj) && other.lambda.clone.call(obj)}
  208.       @storage.merge!(other.storage){|k, o, n|o.increase(n.goal)}
  209.       self
  210.     end
  211.     #--------------------------------------------------------------------------
  212.     # * Opérateurs OU
  213.     #--------------------------------------------------------------------------
  214.     def |(other)
  215.       @tags     = (@tags + other.tags).uniq
  216.       @finished = @finished || other.finished?
  217.       temp      = @lambda.clone
  218.       obj       = self
  219.       @lambda   = Proc.new{temp.call(obj) || other.lambda.clone.call(obj)}
  220.       @storage.merge!(other.storage){|k, o, n|o.increase(n.goal)}
  221.       self
  222.     end
  223.     #--------------------------------------------------------------------------
  224.     # * Evaluation
  225.     #--------------------------------------------------------------------------
  226.     def eval
  227.       @finished = @lambda.call(self)
  228.       self
  229.     end
  230.  
  231.     #--------------------------------------------------------------------------
  232.     # * Clone
  233.     #--------------------------------------------------------------------------
  234.     def clone
  235.       child = super()
  236.       child.storage.each{|i, k| k.to_zero}
  237.       child
  238.     end
  239.   end
  240. end
  241.  
  242. #==============================================================================
  243. # ** Static_Quest
  244. #------------------------------------------------------------------------------
  245. #  Description d'une quête (statique)
  246. #==============================================================================
  247.  
  248. class Static_Quest < Static::Table
  249.   #--------------------------------------------------------------------------
  250.   # * Champ
  251.   #--------------------------------------------------------------------------
  252.   pk integer  :id
  253.   string      :name
  254.   string      :desc
  255.   integer     :gold
  256.   integer     :exp
  257.   integer     :cost
  258.   boolean     :repeatable
  259.   list        :integer, :items
  260.   list        :integer, :weapons
  261.   list        :integer, :armors
  262.   poly        :success
  263.   poly        :fail
  264.   string      :success_message
  265.   string      :fail_message
  266.   poly        :verify
  267.   poly        :end_action
  268.   boolean     :need_confirmation
  269.   poly        :label
  270.   poly        :preserved_success
  271.   poly        :preserved_fail
  272.   #--------------------------------------------------------------------------
  273.   # * Vérifie si une quête est lançable
  274.   #--------------------------------------------------------------------------
  275.   def launchable?
  276.     verify.call && !Game_Quest.all.has_key?(self.id)
  277.   end
  278.   #--------------------------------------------------------------------------
  279.   # * Singleton
  280.   #--------------------------------------------------------------------------
  281.   class << self
  282.     #--------------------------------------------------------------------------
  283.     # * Renvoi le plus gros ID
  284.     #--------------------------------------------------------------------------
  285.     def max_id
  286.       return 0 if Static_Quest.count == 0
  287.       Static_Quest.all.keys.max
  288.     end
  289.   end
  290. end
  291.  
  292. #==============================================================================
  293. # ** Game_Quest
  294. #------------------------------------------------------------------------------
  295. #  Description d'une quête (dynamique)
  296. #==============================================================================
  297.  
  298. class Game_Quest < Dynamic::Table
  299.   #--------------------------------------------------------------------------
  300.   # * Champs
  301.   #--------------------------------------------------------------------------
  302.   pk integer :quest_id
  303.   boolean :finished
  304.   boolean :successed
  305.   boolean :confirmed
  306.   #--------------------------------------------------------------------------
  307.   # * Renvoi la quête statique
  308.   #--------------------------------------------------------------------------
  309.   def static
  310.     Static_Quest[self.quest_id]
  311.   end
  312.   #--------------------------------------------------------------------------
  313.   # * Fini une quête avec succes
  314.   #--------------------------------------------------------------------------
  315.   def finish_with_success
  316.     self.finished = true
  317.     self.successed = true
  318.     self.static.end_action.call
  319.     if !self.static.need_confirmation
  320.       self.confirm
  321.       Game_Quest.delete(self.quest_id)  if self.static.repeatable
  322.     end
  323.   end
  324.   #--------------------------------------------------------------------------
  325.   # * Confirmation
  326.   #--------------------------------------------------------------------------
  327.   def confirm
  328.     return if !self.successed || self.confirmed
  329.     self.confirmed = true
  330.     $game_party.gain_gold(static.gold)
  331.     $game_party.members.each{|actor| actor.gain_exp(self.static.exp)}
  332.     self.static.items.each{|id| $game_party.gain_item($data_items[id], 1)}
  333.     self.static.armors.each{|id| $game_party.gain_item($data_armors[id], 1)}
  334.     self.static.weapons.each{|id| $game_party.gain_item($data_weapons[id], 1)}
  335.     if self.static.repeatable
  336.       Game_Quest.delete(self.quest_id)
  337.     end
  338.   end
  339.   #--------------------------------------------------------------------------
  340.   # * Fini une quête avec succes
  341.   #--------------------------------------------------------------------------
  342.   def finish_with_fail
  343.     self.finished = true
  344.     self.successed = false
  345.     self.static.end_action.call
  346.     if self.static.repeatable
  347.       Game_Quest.delete(self.quest_id)
  348.     end
  349.   end
  350.   #--------------------------------------------------------------------------
  351.   # * Evalue une quête
  352.   #--------------------------------------------------------------------------
  353.   def eval
  354.     return if self.finished
  355.     self.static.fail.eval
  356.     if self.static.fail.finished?
  357.       self.finish_with_fail
  358.       return
  359.     end
  360.     self.static.success.eval
  361.     if self.static.success.finished?
  362.       self.finish_with_success
  363.     end
  364.   end
  365.   #--------------------------------------------------------------------------
  366.   # * Alias
  367.   #--------------------------------------------------------------------------
  368.   alias :finished? :finished
  369.   alias :successed? :successed
  370. end
  371.  
  372. #==============================================================================
  373. # ** Quest
  374. #------------------------------------------------------------------------------
  375. #  Module de traitement des quêtes
  376. #==============================================================================
  377.  
  378. module Quest
  379.   #--------------------------------------------------------------------------
  380.   # * Ouverture des fonctions
  381.   #--------------------------------------------------------------------------
  382.   extend self
  383.   #--------------------------------------------------------------------------
  384.   # * Renvoi les quêtes correspondant à une couleur
  385.   #--------------------------------------------------------------------------
  386.   def find_by_tag(tag)
  387.     Game_Quest.all.select do |k, v|
  388.       v.static.success.tags.include?(tag) ||
  389.       v.static.fail.tags.include?(tag)
  390.     end
  391.   end
  392.   #--------------------------------------------------------------------------
  393.   # * Renvoi l'id d'une quête
  394.   #--------------------------------------------------------------------------
  395.   def idl(k)
  396.     return k if k.is_a?(Fixnum)
  397.     return Static_Quest.all.find{|q| q.label == k}.id
  398.   end
  399.   #--------------------------------------------------------------------------
  400.   # * Renvoi une quête
  401.   #--------------------------------------------------------------------------
  402.   def get(id)
  403.     Game_Quest[idl(id)]
  404.   end
  405.   #--------------------------------------------------------------------------
  406.   # * Crée une quête
  407.   #--------------------------------------------------------------------------
  408.   def create(hash)
  409.     id        = hash[:id]
  410.     name      = hash[:name]
  411.     desc      = hash[:desc]
  412.     gold      = hash[:gold]             || 0
  413.     exp       = hash[:exp]              || 0
  414.     items     = hash[:items]            || []
  415.     weapons   = hash[:weapons]          || []
  416.     armors    = hash[:armors]           || []
  417.     cost      = hash[:cost]             || -1
  418.     repeat    = hash[:repeatable]       || false
  419.     fail      = hash[:fail_trigger]     || Goal::trigger([:nothing]){|*o|false}
  420.     success   = hash[:success_trigger]  || Goal::trigger([:nothing]){|*o|false}
  421.     verify    = hash[:verify]           || lambda{|*o|true}
  422.     endt      = hash[:end_action]       || lambda{|*o|true}
  423.     confirm   = hash[:need_confirmation]|| false
  424.     s_m       = hash[:success_message]  || Quest_Config::DEFAULT_SUCESS.call(name)
  425.     s_f       = hash[:fail_message]     || Quest_Config::DEFAULT_FAIL.call(name)
  426.     label     = hash[:label]            || "quest_#{id}".to_sym
  427.  
  428.     Static_Quest.insert(
  429.       id, name, desc, gold, exp, cost, repeat, items, weapons,
  430.       armors, success, fail, s_m, s_f, verify, endt, confirm, label, success.clone, fail.clone)
  431.   end
  432.   #--------------------------------------------------------------------------
  433.   # * Démarre une quête
  434.   #--------------------------------------------------------------------------
  435.   def start(i)
  436.     id = idl(i)
  437.     if !Game_Quest.all.has_key?(id)
  438.       if Static_Quest[id].repeatable
  439.         Static_Quest[id].success = Static_Quest[id].preserved_success.clone
  440.         Static_Quest[id].fail = Static_Quest[id].preserved_fail.clone
  441.       end
  442.       Game_Quest.insert(id, false, false, false)
  443.       get(id).eval
  444.     end
  445.   end
  446.   #--------------------------------------------------------------------------
  447.   # * Vérifie si une quête est finie
  448.   #--------------------------------------------------------------------------
  449.   def finished?(i)
  450.     id = idl(i)
  451.     Game_Quest.all.has_key?(id) && get(id).finished
  452.   end
  453.   #--------------------------------------------------------------------------
  454.   # * Vérifie si une quête est finie avec succès
  455.   #--------------------------------------------------------------------------
  456.   def succeeded?(i)
  457.     id = idl(i)
  458.     return get(id).successed if Game_Quest.all.has_key?(id)
  459.     return false
  460.   end
  461.   #--------------------------------------------------------------------------
  462.   # * Vérifie si une quête est finie en échec
  463.   #--------------------------------------------------------------------------
  464.   def failed?(i)
  465.     id = idl(i)
  466.     return !get(id).successed if Game_Quest.all.has_key?(id)
  467.     return false
  468.   end
  469.   #--------------------------------------------------------------------------
  470.   # * Vérifie si une quête est en court
  471.   #--------------------------------------------------------------------------
  472.   def on_the_road?(i)
  473.     id = idl(i)
  474.     Game_Quest.all.has_key?(id) && !get(id).finished
  475.   end
  476.   alias :ongoing :on_the_road?
  477.   #--------------------------------------------------------------------------
  478.   # * Fini la quête lancée (avec succes)
  479.   #--------------------------------------------------------------------------
  480.   def finish(i)
  481.     id = idl(i)
  482.     get(id).finish_with_success if on_the_road?(id)
  483.   end
  484.   #--------------------------------------------------------------------------
  485.   # * Fini la quête lancée (avec échec)
  486.   #--------------------------------------------------------------------------
  487.   def fail(i)
  488.     id = idl(i)
  489.     get(id).finish_with_fail if on_the_road?(id)
  490.   end
  491.   #--------------------------------------------------------------------------
  492.   # * Requiert une confirmation
  493.   #--------------------------------------------------------------------------
  494.   def need_confirmation?(i)
  495.     id = idl(i)
  496.     succeeded?(id) && !get(id).confirmed
  497.   end
  498.   #--------------------------------------------------------------------------
  499.   # * Confirme une quête
  500.   #--------------------------------------------------------------------------
  501.   def confirm(i)
  502.     id = idl(i)
  503.     return unless need_confirmation?(id)
  504.     get(id).confirm
  505.   end
  506.   #--------------------------------------------------------------------------
  507.   # * Vérifie si une quête est lançable
  508.   #--------------------------------------------------------------------------
  509.   def launchable?(i)
  510.     id = idl(i)
  511.     Static_Quest[id].launchable?
  512.   end
  513. end
  514.  
  515. #==============================================================================
  516. # ** Game_Variables
  517. #------------------------------------------------------------------------------
  518. #  Ajout de la vérification statique des quêtes
  519. #==============================================================================
  520.  
  521. class Game_Variables
  522.   #--------------------------------------------------------------------------
  523.   # * alias
  524.   #--------------------------------------------------------------------------
  525.   alias :change_value :[]=
  526.   #--------------------------------------------------------------------------
  527.   # * Change la valeur d'une variable
  528.   #--------------------------------------------------------------------------
  529.   def []=(vid, value)
  530.     change_value(vid, value)
  531.     quests = Quest.find_by_tag(:var).select{|i, q|!q.finished}
  532.     quests.each{|i, q| q.eval}
  533.   end
  534. end
  535.  
  536. #==============================================================================
  537. # ** Game_Switches
  538. #------------------------------------------------------------------------------
  539. #  Ajout de la vérification statique des quêtes
  540. #==============================================================================
  541.  
  542. class Game_Switches
  543.   #--------------------------------------------------------------------------
  544.   # * alias
  545.   #--------------------------------------------------------------------------
  546.   alias :change_value :[]=
  547.   #--------------------------------------------------------------------------
  548.   # * Change la valeur d'un interrupteur
  549.   #--------------------------------------------------------------------------
  550.   def []=(vid, value)
  551.     change_value(vid, value)
  552.     quests = Quest.find_by_tag(:switch).select{|i, q|!q.finished}
  553.     quests.each{|i, q| q.eval}
  554.   end
  555. end
  556.  
  557. #==============================================================================
  558. # ** Game_Party
  559. #------------------------------------------------------------------------------
  560. #  Ajout de la vérification statique des quêtes
  561. #==============================================================================
  562.  
  563. class Game_Party
  564.   #--------------------------------------------------------------------------
  565.   # * alias
  566.   #--------------------------------------------------------------------------
  567.   alias :quest_gain_item :gain_item
  568.   #--------------------------------------------------------------------------
  569.   # * Increase/Decrease Items
  570.   #     include_equip : Include equipped items
  571.   #--------------------------------------------------------------------------
  572.   def gain_item(*args)
  573.     quest_gain_item(*args)
  574.     quests = Quest.find_by_tag(:object).select{|i, q|!q.finished}
  575.     quests.each{|i, q| q.eval}
  576.   end
  577. end
  578.  
  579. #==============================================================================
  580. # ** BattleManager
  581. #------------------------------------------------------------------------------
  582. #  Ajout de la vérification statique des quêtes
  583. #==============================================================================
  584.  
  585. module BattleManager
  586.   #--------------------------------------------------------------------------
  587.   # * Singleton
  588.   #--------------------------------------------------------------------------
  589.   class << self
  590.     #--------------------------------------------------------------------------
  591.     # * alias
  592.     #--------------------------------------------------------------------------
  593.     alias :quest_process_victory :process_victory
  594.     #--------------------------------------------------------------------------
  595.     # * Processus de victoire
  596.     #--------------------------------------------------------------------------
  597.     def process_victory
  598.       quest_process_victory
  599.       quests = Quest.find_by_tag(:monster).select{|i, q|!q.finished}
  600.       quests.each do |i, q|
  601.         $game_troop.members.each do |member|
  602.           id = member.enemy_id
  603.           if q.static.success.storage.has_key?(id)
  604.             q.static.success.storage[id].up
  605.           end
  606.           if q.static.fail.storage.has_key?(id)
  607.             q.static.fail.storage[id].up
  608.           end
  609.           q.eval
  610.         end
  611.       end
  612.     end
  613.   end
  614. end
  615.  
  616. #==============================================================================
  617. # ** Window_QuestCategory
  618. #------------------------------------------------------------------------------
  619. #  Catégorie des quêtes
  620. #==============================================================================
  621.  
  622. class Window_QuestCategory < Window_ItemCategory
  623.   #--------------------------------------------------------------------------
  624.   # * Largeur de la fenêtre
  625.   #--------------------------------------------------------------------------
  626.   def window_width
  627.     Graphics.width
  628.   end
  629.   #--------------------------------------------------------------------------
  630.   # * Nombre de colones
  631.   #--------------------------------------------------------------------------
  632.   def col_max
  633.     return 4
  634.   end
  635.   #--------------------------------------------------------------------------
  636.   # * Create Command List
  637.   #--------------------------------------------------------------------------
  638.   def make_command_list
  639.     add_command(Vocab::quest_incurse, :incurse)
  640.     add_command(Vocab::quest_pended,  :pended)
  641.     add_command(Vocab::quest_success, :success)
  642.     add_command(Vocab::quest_fail,    :fail)
  643.   end
  644.  
  645. end
  646.  
  647. #==============================================================================
  648. # ** Window_QuestList
  649. #------------------------------------------------------------------------------
  650. #  Affiche la fenêtre de listing des quêtes
  651. #==============================================================================
  652.  
  653. class Window_QuestList < Window_ItemList
  654.  
  655.   #--------------------------------------------------------------------------
  656.   # * Etat d'une quête
  657.   #--------------------------------------------------------------------------
  658.   def enable?(item)
  659.     return true
  660.  
  661.   end
  662.   #--------------------------------------------------------------------------
  663.   # * Cree la liste de quête
  664.   #--------------------------------------------------------------------------
  665.   def make_item_list
  666.     @data = case @category
  667.       when :incurse
  668.         Game_Quest.all.select{|i, q| !q.finished}.values
  669.       when :pended
  670.         Game_Quest.all.select{|i, q| q.finished && q.successed && !q.confirmed}.values
  671.       when :success
  672.         Game_Quest.all.select{|i, q| q.finished && q.successed && q.confirmed}.values
  673.       when :fail
  674.         Game_Quest.all.select{|i, q| q.finished && !q.successed}.values
  675.       end
  676.  
  677.   end
  678.   #--------------------------------------------------------------------------
  679.   # * Ecrit une quête
  680.   #--------------------------------------------------------------------------
  681.   def draw_item(index)
  682.     item = @data[index]
  683.     if item
  684.       rect = item_rect(index)
  685.       rect.width -= 4
  686.       draw_item_name(item, rect.x, rect.y)
  687.     end
  688.   end
  689.   #--------------------------------------------------------------------------
  690.   # * Ecrit le nom de la quête
  691.   #--------------------------------------------------------------------------
  692.   def draw_item_name(q, x, y)
  693.     return unless q
  694.     change_color(normal_color, true)
  695.     draw_text(x, y, width, line_height, q.static.name)
  696.   end
  697.   #--------------------------------------------------------------------------
  698.   # * Update Help Text
  699.   #--------------------------------------------------------------------------
  700.   def update_help
  701.     @help_window.set_text(item ? item.static.desc : "")
  702.   end
  703.   #--------------------------------------------------------------------------
  704.   # * Renvoi à la première quête
  705.   #--------------------------------------------------------------------------
  706.   def select_last
  707.     select(0)
  708.   end
  709. end
  710.  
  711. #==============================================================================
  712. # ** Scene_Quest
  713. #------------------------------------------------------------------------------
  714. #  Journal Scene_Quest
  715. #==============================================================================
  716.  
  717. class Scene_Quest < Scene_MenuBase
  718.   #--------------------------------------------------------------------------
  719.   # * Start
  720.   #--------------------------------------------------------------------------
  721.   def start
  722.     super
  723.     create_help_window
  724.     create_quest_category
  725.     create_quest_window
  726.   end
  727.   #--------------------------------------------------------------------------
  728.   # * Création de la fenêtre de catégorie
  729.   #--------------------------------------------------------------------------
  730.   def create_quest_category
  731.     @category_window = Window_QuestCategory.new
  732.     @category_window.viewport = @viewport
  733.     @category_window.help_window = @help_window
  734.     @category_window.y = @help_window.height
  735.     @category_window.set_handler(:ok,     method(:on_category_ok))
  736.     @category_window.set_handler(:cancel, method(:return_scene))
  737.   end
  738.   #--------------------------------------------------------------------------
  739.   # * Création de la liste
  740.   #--------------------------------------------------------------------------
  741.   def create_quest_window
  742.     wy = @category_window.y + @category_window.height
  743.     wh = Graphics.height - wy
  744.     @item_window = Window_QuestList.new(0, wy, Graphics.width, wh)
  745.     @item_window.viewport = @viewport
  746.     @item_window.help_window = @help_window
  747.     @item_window.set_handler(:cancel, method(:on_item_cancel))
  748.     @category_window.item_window = @item_window
  749.   end
  750.   #--------------------------------------------------------------------------
  751.   # * Update
  752.   #--------------------------------------------------------------------------
  753.   def update
  754.     super
  755.     return_scene if Input.trigger?(:B)
  756.   end
  757.   #--------------------------------------------------------------------------
  758.   # * Category [OK]
  759.   #--------------------------------------------------------------------------
  760.   def on_category_ok
  761.     @item_window.activate
  762.     @item_window.select_last
  763.   end
  764.   #--------------------------------------------------------------------------
  765.   # * Item [Cancel]
  766.   #--------------------------------------------------------------------------
  767.   def on_item_cancel
  768.     @item_window.unselect
  769.     @category_window.activate
  770.   end
  771. end
  772.  
  773. #==============================================================================
  774. # ** Window_ShopCommand
  775. #------------------------------------------------------------------------------
  776. #  This window is for selecting buy/sell on the shop screen.
  777. #==============================================================================
  778.  
  779. class Window_QuestCommand < Window_HorzCommand
  780.   #--------------------------------------------------------------------------
  781.   # * Object Initialization
  782.   #--------------------------------------------------------------------------
  783.   def initialize(window_width)
  784.     @window_width = window_width
  785.     super(0, 0)
  786.   end
  787.   #--------------------------------------------------------------------------
  788.   # * Get Window Width
  789.   #--------------------------------------------------------------------------
  790.   def window_width
  791.     @window_width
  792.   end
  793.   #--------------------------------------------------------------------------
  794.   # * Get Digit Count
  795.   #--------------------------------------------------------------------------
  796.   def col_max
  797.     return 3
  798.   end
  799.   #--------------------------------------------------------------------------
  800.   # * Create Command List
  801.   #--------------------------------------------------------------------------
  802.   def make_command_list
  803.     add_command(Vocab.quest_buy, :buy)
  804.     add_command(Vocab.quest_confirm, :sell)
  805.     add_command(Vocab.quest_cancle, :cancel)
  806.   end
  807. end
  808.  
  809. #==============================================================================
  810. # ** Window_QuestBuy
  811. #------------------------------------------------------------------------------
  812. #  Affiche la liste des quêtes achetables
  813. #==============================================================================
  814.  
  815. class Window_QuestBuy < Window_Selectable
  816.   #--------------------------------------------------------------------------
  817.   # * Public Instance Variables
  818.   #--------------------------------------------------------------------------
  819.   attr_reader   :status_window            # Status window
  820.   attr_accessor :shop_goods
  821.   #--------------------------------------------------------------------------
  822.   # * Object Initialization
  823.   #--------------------------------------------------------------------------
  824.   def initialize(x, y, height, shop_goods, f=true)
  825.     super(x, y, window_width, height)
  826.     @shop_goods = shop_goods
  827.     @money = 0
  828.     @f = f
  829.     refresh
  830.     select(0)
  831.   end
  832.   #--------------------------------------------------------------------------
  833.   # * Largeur de la fenêtre
  834.   #--------------------------------------------------------------------------
  835.   def window_width
  836.     return Graphics.width/2
  837.   end
  838.   #--------------------------------------------------------------------------
  839.   # * Donne le nombre d'objets
  840.   #--------------------------------------------------------------------------
  841.   def item_max
  842.     @data ? @data.size : 1
  843.   end
  844.   #--------------------------------------------------------------------------
  845.   # * Renvoi l'indice courant
  846.   #--------------------------------------------------------------------------
  847.   def item
  848.     @data[index]
  849.   end
  850.   #--------------------------------------------------------------------------
  851.   # * Attribue la monaie
  852.   #--------------------------------------------------------------------------
  853.   def money=(money)
  854.     @money = money
  855.     refresh
  856.   end
  857.   #--------------------------------------------------------------------------
  858.   # * Renvoi l'état d'activation d'un objet
  859.   #--------------------------------------------------------------------------
  860.   def current_item_enabled?
  861.     enable?(@data[index])
  862.   end
  863.   #--------------------------------------------------------------------------
  864.   # * Donne le prix d'un objet
  865.   #--------------------------------------------------------------------------
  866.   def price(item)
  867.     return 0 unless item
  868.     item.cost
  869.   end
  870.   #--------------------------------------------------------------------------
  871.   # * Affiche l'accès
  872.   #--------------------------------------------------------------------------
  873.   def enable?(item)
  874.     return item && item.cost <= @money && !Game_Quest.all.has_key?(item.id) if @f
  875.     true
  876.   end
  877.   #--------------------------------------------------------------------------
  878.   # * Rafraichis
  879.   #--------------------------------------------------------------------------
  880.   def refresh
  881.     make_item_list
  882.     create_contents
  883.     draw_all_items
  884.   end
  885.   #--------------------------------------------------------------------------
  886.   # * Crée la liste des quêtes
  887.   #--------------------------------------------------------------------------
  888.   def make_item_list
  889.     @data = []
  890.     @shop_goods.each do |goods|
  891.       @data.push(goods)
  892.     end
  893.   end
  894.   #--------------------------------------------------------------------------
  895.   # * Ecrit une quête
  896.   #--------------------------------------------------------------------------
  897.   def draw_item(index)
  898.     item = @data[index]
  899.     rect = item_rect(index)
  900.     draw_item_name(item, rect.x, rect.y, enable?(item))
  901.     rect.width -= 4
  902.     draw_text(rect, price(item), 2) if @f
  903.   end
  904.   #--------------------------------------------------------------------------
  905.   # * Ecrit le nom de la quête
  906.   #--------------------------------------------------------------------------
  907.   def draw_item_name(q, x, y, e)
  908.     return unless q
  909.     change_color(normal_color, e)
  910.     draw_text(x, y, width, line_height, (q.name.length >= 18) ?
  911.       q.name[0..15]+"..." : q.name)
  912.   end
  913.   #--------------------------------------------------------------------------
  914.   # * Change le status
  915.   #--------------------------------------------------------------------------
  916.   def status_window=(status_window)
  917.     @status_window = status_window
  918.     call_update_help
  919.   end
  920.   #--------------------------------------------------------------------------
  921.   # * Modifie le header
  922.   #--------------------------------------------------------------------------
  923.   def update_help
  924.     @help_window.set_text(item ?  item.desc : "")
  925.     @status_window.quest = item if @status_window
  926.   end
  927.   #--------------------------------------------------------------------------
  928.   # * Modifie la liste des quêtes
  929.   #--------------------------------------------------------------------------
  930.   def quests=(k)
  931.     @shop_goods = k
  932.     refresh
  933.   end
  934. end
  935.  
  936. #==============================================================================
  937. # ** Window_QuestStatus
  938. #------------------------------------------------------------------------------
  939. #  Fenêtre pour afficher les gains d'une quête
  940. #==============================================================================
  941.  
  942. class Window_QuestStatus < Window_Base
  943.   #--------------------------------------------------------------------------
  944.   # * Initialization
  945.   #--------------------------------------------------------------------------
  946.   def initialize(x, y, width, height)
  947.     super(x, y, width, height)
  948.     @quest = nil
  949.     @page_index = 0
  950.     refresh
  951.   end
  952.   #--------------------------------------------------------------------------
  953.   # * Refresh
  954.   #--------------------------------------------------------------------------
  955.   def refresh
  956.     contents.clear
  957.     draw_gold
  958.     draw_exp
  959.     draw_items
  960.   end
  961.   #--------------------------------------------------------------------------
  962.   # * accès a une propriété
  963.   #--------------------------------------------------------------------------
  964.   def get(meth, i = 0)
  965.     (@quest) ? @quest.send(meth) : i
  966.   end
  967.   #--------------------------------------------------------------------------
  968.   # * Ecrit l'or reçu
  969.   #--------------------------------------------------------------------------
  970.   def draw_gold
  971.     change_color(system_color)
  972.     draw_text(0, 0, contents.width - 4 , line_height, Vocab.quest_gold)
  973.     change_color(normal_color)
  974.     draw_text(0, 0, contents.width - 4 , line_height, get(:gold), 2)
  975.   end
  976.   #--------------------------------------------------------------------------
  977.   # * Ecrit l'exp reçu
  978.   #--------------------------------------------------------------------------
  979.   def draw_exp
  980.     change_color(system_color)
  981.     draw_text(0, 20, contents.width - 4 , line_height, Vocab.quest_exp)
  982.     change_color(normal_color)
  983.     draw_text(0, 20, contents.width - 4 , line_height, get(:exp), 2)
  984.   end
  985.   #--------------------------------------------------------------------------
  986.   # * Ecrit les objets reçus
  987.   #--------------------------------------------------------------------------
  988.   def draw_items
  989.     return unless @quest
  990.     it = get(:items).uniq
  991.     we = get(:weapons).uniq
  992.     ar = get(:armors).uniq
  993.     change_color(system_color)
  994.     draw_text(0, 40, contents.width - 4 , line_height, Vocab.quest_items)
  995.     change_color(normal_color)
  996.     y = 68
  997.     it.each do |i|
  998.       item = $data_items[i]
  999.       draw_item_name(item, 0, y, true, contents.width)
  1000.       r = Rect.new(0, y, contents.width - 4, 22)
  1001.       draw_text(r, sprintf("%2d", get(:items).count{|q|q == i}), 2)
  1002.       y += 22
  1003.     end
  1004.     we.each do |i|
  1005.       item = $data_weapons[i]
  1006.       draw_item_name(item, 0, y, true, contents.width)
  1007.       r = Rect.new(0, y, contents.width - 4, 22)
  1008.       draw_text(r, sprintf("%2d", get(:weapons).count{|q|q == i}), 2)
  1009.       y += 22
  1010.     end
  1011.     ar.each do |i|
  1012.       item = $data_armors[i]
  1013.       draw_item_name(item, 0, y, true, contents.width)
  1014.       r = Rect.new(0, y, contents.width - 4, 22)
  1015.       draw_text(r, sprintf("%2d", get(:armors).count{|q|q == i}), 2)
  1016.       y += 22
  1017.     end
  1018.   end
  1019.   #--------------------------------------------------------------------------
  1020.   # * Attribue une quête
  1021.   #--------------------------------------------------------------------------
  1022.   def quest=(item)
  1023.     @quest = item
  1024.     refresh
  1025.   end
  1026. end
  1027.  
  1028. #==============================================================================
  1029. # ** Scene_QuestShop
  1030. #------------------------------------------------------------------------------
  1031. #  Magasins de quêtes
  1032. #==============================================================================
  1033.  
  1034. class Scene_QuestShop < Scene_MenuBase
  1035.   #--------------------------------------------------------------------------
  1036.   # * Prepare
  1037.   #--------------------------------------------------------------------------
  1038.   def prepare(quests)
  1039.     @q = quests
  1040.     q = Array.new(quests.length + 1){|i|Static_Quest[Quest.idl(i)]}.compact
  1041.     @quests = q.select{|quest| quest.cost > 0}
  1042.   end
  1043.   #--------------------------------------------------------------------------
  1044.   # * Start
  1045.   #--------------------------------------------------------------------------
  1046.   def start
  1047.     super
  1048.     create_help_window
  1049.     create_gold_window
  1050.     create_command_window
  1051.     create_dummy_window
  1052.     create_status_window
  1053.     create_buy_window
  1054.     create_sell_window
  1055.   end
  1056.   #--------------------------------------------------------------------------
  1057.   # * Création de la fenêtre d'or
  1058.   #--------------------------------------------------------------------------
  1059.   def create_gold_window
  1060.     @gold_window = Window_Gold.new
  1061.     @gold_window.viewport = @viewport
  1062.     @gold_window.x = Graphics.width - @gold_window.width
  1063.     @gold_window.y = @help_window.height
  1064.   end
  1065.   #--------------------------------------------------------------------------
  1066.   # * Creation de la fenêtre de commande
  1067.   #--------------------------------------------------------------------------
  1068.   def create_command_window
  1069.     @command_window = Window_QuestCommand.new(@gold_window.x)
  1070.     @command_window.viewport = @viewport
  1071.     @command_window.y = @help_window.height
  1072.     @command_window.set_handler(:buy,    method(:command_buy))
  1073.     @command_window.set_handler(:sell,   method(:command_sell))
  1074.     @command_window.set_handler(:cancel, method(:return_scene))
  1075.   end
  1076.   #--------------------------------------------------------------------------
  1077.   # * Cree le fond
  1078.   #--------------------------------------------------------------------------
  1079.   def create_dummy_window
  1080.     wy = @command_window.y + @command_window.height
  1081.     wh = Graphics.height - wy
  1082.     @dummy_window = Window_Base.new(0, wy, Graphics.width, wh)
  1083.     @dummy_window.viewport = @viewport
  1084.   end
  1085.   #--------------------------------------------------------------------------
  1086.   # * Cree la fenêtre de status
  1087.   #--------------------------------------------------------------------------
  1088.   def create_status_window
  1089.     wx = Graphics.width/2
  1090.     wy = @dummy_window.y
  1091.     ww = Graphics.width - wx
  1092.     wh = @dummy_window.height
  1093.     @status_window = Window_QuestStatus.new(wx, wy, ww, wh)
  1094.     @status_window.viewport = @viewport
  1095.     @status_window.hide
  1096.   end
  1097.   #--------------------------------------------------------------------------
  1098.   # * Crée la fenêtre d'achat
  1099.   #--------------------------------------------------------------------------
  1100.   def create_buy_window
  1101.     wy = @dummy_window.y
  1102.     wh = @dummy_window.height
  1103.     @buy_window = Window_QuestBuy.new(0, wy, wh, @quests)
  1104.     @buy_window.viewport = @viewport
  1105.     @buy_window.help_window = @help_window
  1106.     @buy_window.status_window = @status_window
  1107.     @buy_window.hide
  1108.     @buy_window.set_handler(:ok,     method(:on_buy_ok))
  1109.     @buy_window.set_handler(:cancel, method(:on_buy_cancel))
  1110.   end
  1111.   #--------------------------------------------------------------------------
  1112.   # * Crée la fenêtre de confirmation
  1113.   #--------------------------------------------------------------------------
  1114.   def create_sell_window
  1115.     wy = @dummy_window.y
  1116.     wh = @dummy_window.height
  1117.     @sell_window = Window_QuestBuy.new(0, wy, wh, get_quests, false)
  1118.     @sell_window.viewport = @viewport
  1119.     @sell_window.help_window = @help_window
  1120.     @sell_window.status_window = @status_window
  1121.     @sell_window.hide
  1122.     @sell_window.set_handler(:ok,     method(:on_sell_ok))
  1123.     @sell_window.set_handler(:cancel, method(:on_sell_cancel))
  1124.   end
  1125.   #--------------------------------------------------------------------------
  1126.   # * Renvoi la liste des quêtes
  1127.   #--------------------------------------------------------------------------
  1128.   def get_quests
  1129.     quests = Game_Quest.all.select do |i, q|
  1130.       @q.include?(q.quest_id) && q.static.need_confirmation && !q.confirmed
  1131.     end.values
  1132.     return quests.collect{|k|k.static}
  1133.   end
  1134.   #--------------------------------------------------------------------------
  1135.   # * [Buy] Command
  1136.   #--------------------------------------------------------------------------
  1137.   def command_buy
  1138.     @dummy_window.hide
  1139.     @buy_window.money = money
  1140.     @buy_window.show.activate
  1141.     @status_window.show
  1142.   end
  1143.   #--------------------------------------------------------------------------
  1144.   # * [Sell] Command
  1145.   #--------------------------------------------------------------------------
  1146.   def command_sell
  1147.     @dummy_window.hide
  1148.     @sell_window.show
  1149.     @sell_window.unselect
  1150.     @sell_window.refresh
  1151.     @sell_window.show.activate
  1152.     @status_window.show
  1153.     @sell_window.select(0)
  1154.   end
  1155.   #--------------------------------------------------------------------------
  1156.   # * Buy [OK]
  1157.   #--------------------------------------------------------------------------
  1158.   def on_buy_ok
  1159.     q = @buy_window.item
  1160.     $game_party.lose_gold(q.cost)
  1161.     Quest.start(q.id)
  1162.     @gold_window.refresh
  1163.     @status_window.refresh
  1164.     Sound.play_shop
  1165.     on_buy_cancel
  1166.   end
  1167.   #--------------------------------------------------------------------------
  1168.   # * Buy [Cancel]
  1169.   #--------------------------------------------------------------------------
  1170.   def on_buy_cancel
  1171.     @command_window.activate
  1172.     @dummy_window.show
  1173.     @buy_window.hide
  1174.     @status_window.hide
  1175.     @status_window.quest = nil
  1176.     @help_window.clear
  1177.   end
  1178.   #--------------------------------------------------------------------------
  1179.   # * Sell [OK]
  1180.   #--------------------------------------------------------------------------
  1181.   def on_sell_ok
  1182.     q = @sell_window.item
  1183.     Quest.confirm(q.id)
  1184.     @gold_window.refresh
  1185.     @status_window.refresh
  1186.     Sound.play_shop
  1187.     @sell_window.quests = get_quests
  1188.     on_sell_cancel
  1189.   end
  1190.   #--------------------------------------------------------------------------
  1191.   # * Sell [Cancel]
  1192.   #--------------------------------------------------------------------------
  1193.   def on_sell_cancel
  1194.     @command_window.activate
  1195.     @dummy_window.show
  1196.     @sell_window.hide
  1197.     @status_window.hide
  1198.     @status_window.quest = nil
  1199.     @help_window.clear
  1200.   end
  1201.   #--------------------------------------------------------------------------
  1202.   # * Or
  1203.   #--------------------------------------------------------------------------
  1204.   def money
  1205.     @gold_window.value
  1206.   end
  1207. end
  1208.  
  1209.  
  1210. #==============================================================================
  1211. # ** Kernel
  1212. #------------------------------------------------------------------------------
  1213. #  Point d'entrée du script
  1214. #==============================================================================
  1215.  
  1216. module Kernel
  1217.   #--------------------------------------------------------------------------
  1218.   # * Déclencheur des variables
  1219.   #--------------------------------------------------------------------------
  1220.   def var_check(id, value, operator = :==)
  1221.     Goal::variable(id, value, operator)
  1222.   end
  1223.   #--------------------------------------------------------------------------
  1224.   # * Déclencheur des interrupteurs
  1225.   #--------------------------------------------------------------------------
  1226.   def switch_check(id, state = :active)
  1227.     Goal::switch(id, state)
  1228.   end
  1229.   #--------------------------------------------------------------------------
  1230.   # * Déclencheur des Objets simple
  1231.   #--------------------------------------------------------------------------
  1232.   def has_item(id, count)
  1233.     Goal::get_item(id, count)
  1234.   end
  1235.   #--------------------------------------------------------------------------
  1236.   # * Déclencheur des Armes
  1237.   #--------------------------------------------------------------------------
  1238.   def has_weapon(id, count)
  1239.     Goal::get_weapon(id, count)
  1240.   end
  1241.   #--------------------------------------------------------------------------
  1242.   # * Déclencheur des Armures
  1243.   #--------------------------------------------------------------------------
  1244.   def has_armor(id, count)
  1245.     Goal::get_armor(id, count)
  1246.   end
  1247.   #--------------------------------------------------------------------------
  1248.   # * Déclencheur des monstres
  1249.   #--------------------------------------------------------------------------
  1250.   def monster_killed(id, value)
  1251.     Goal::kill_monster(id, value)
  1252.   end
  1253.   #--------------------------------------------------------------------------
  1254.   # * Représente une action
  1255.   #--------------------------------------------------------------------------
  1256.   def action(&block)
  1257.     block
  1258.   end
  1259.   alias :check :action
  1260. end
  1261.  
  1262.  
  1263. # Insertion dans le menu de base
  1264.  
  1265. if Quest_Config::QUEST_IN_MENU
  1266.  
  1267.   #==============================================================================
  1268.   # ** Window_MenuCommand
  1269.   #------------------------------------------------------------------------------
  1270.   #  This command window appears on the menu screen.
  1271.   #==============================================================================
  1272.  
  1273.   class Window_MenuCommand
  1274.     #--------------------------------------------------------------------------
  1275.     # * Alias
  1276.     #--------------------------------------------------------------------------
  1277.     alias :quest_cmd :add_main_commands
  1278.     #--------------------------------------------------------------------------
  1279.     # * Ajout du journal de quêtes
  1280.     #--------------------------------------------------------------------------
  1281.     def add_main_commands
  1282.       quest_cmd
  1283.       add_command(Vocab::quest_menu_name, :quest, main_commands_enabled)
  1284.     end
  1285.   end
  1286.  
  1287.   #==============================================================================
  1288.   # ** Scene_Menu
  1289.   #------------------------------------------------------------------------------
  1290.   #  Ajout des quêtes dans le menu
  1291.   #==============================================================================
  1292.  
  1293.   class Scene_Menu
  1294.     #--------------------------------------------------------------------------
  1295.     # * Alias
  1296.     #--------------------------------------------------------------------------
  1297.     alias :quest_window :create_command_window
  1298.     #--------------------------------------------------------------------------
  1299.     # * Lance le menu des quêtes
  1300.     #--------------------------------------------------------------------------
  1301.     def command_quest
  1302.       SceneManager.call(Scene_Quest)
  1303.     end
  1304.     #--------------------------------------------------------------------------
  1305.     # * Create Command Window
  1306.     #--------------------------------------------------------------------------
  1307.     def create_command_window
  1308.       quest_window
  1309.       @command_window.set_handler(:quest, method(:command_quest))
  1310.     end
  1311.   end
  1312.  
  1313. end
  1314.  
  1315. #==============================================================================
  1316. # ** SceneManager
  1317. #------------------------------------------------------------------------------
  1318. #  Ajout du lancement du magasin de quêtes
  1319. #==============================================================================
  1320.  
  1321. module SceneManager
  1322.   #--------------------------------------------------------------------------
  1323.   # * Singleton
  1324.   #--------------------------------------------------------------------------
  1325.   class << self
  1326.     #--------------------------------------------------------------------------
  1327.     # * Lance un magasin de quête
  1328.     #--------------------------------------------------------------------------
  1329.     def questShop(ids)
  1330.       call(Scene_QuestShop)
  1331.       scene.prepare(ids)  
  1332.     end
  1333.   end
  1334. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement