Combinaison

Poster un nouveau sujet   Répondre au sujet

Voir le sujet précédent Voir le sujet suivant Aller en bas

Combinaison

Message par Deidy le Dim 28 Oct - 6:42

Bonjour,
Je cherche un script, je sais pas s'il existe mais je le dit :

Je voudrais qu'en fait 2 personnage ayant 2 capacité différentes puissent combiné les 2 capacité en une

exemple :

Sophia a la magie Feu}
Combinaison : Feu des ténèbre (j'ai une anim pour ça)
Fayt à a magie ténebre }

Deidy

Nombre de messages: 100
Age: 16
Date d'inscription: 05/07/2007

Voir le profil de l'utilisateur

Revenir en haut Aller en bas

Re: Combinaison

Message par Keldak Miyano le Dim 28 Oct - 8:54

Je crois que Maker avait un script comme ça, il faudrait que lui demandes. (En fait, j'en suis sûr, je sais pas si c'est Events ou Scripts, mais dans son jeu, il y avait ça.)

Keldak Miyano
Mercenaire de foudre
Mercenaire de foudre

Nombre de messages: 230
Age: 15
Date d'inscription: 10/09/2007

Voir le profil de l'utilisateur http://zarok-rpgmaker.superforum.fr/index.htm Muhahahaha !

Revenir en haut Aller en bas

Re: Combinaison

Message par GabiLuci le Mer 12 Mar - 9:51

Salut et désolé pour le nécropost,
Mais tu as tout à fait raison Keldak Miyano, Maker a en effet utilisé un script de ce genre dans son jeu et justement le voici.
Spoiler:
Code:
# Cooperative Skills Ver 1.02 (04-16-2004)
# Distribution original support URL
# http://members.jcom.home.ne.jp/cogwheel/

class Scene_Battle
  #--------------------------------------------------------------------------
  # * Synthesis skill distinction
  #--------------------------------------------------------------------------
  def synthe_spell(battler)
    if battler.is_a?(Game_Actor)
      @spell_p[battler] = $data_skills[battler.current_action.skill_id].name
    end
    if battler.is_a?(Game_Enemy)
      @spell_e[battler] = $data_skills[battler.current_action.skill_id].name
    end

    # synthe_s.push([["Skill A","Skill B"],"Skill C"]
    # Quand les skills A et B sont utilisés, Le skill C est utilisé.
    #
    # synthe_s.push([["Skill A","Skill B","Skill C"],"Skill D"]
    # Même chos, la commande est utilisable avec autant de skill possibles
    # Si vous avez 4 persos en combat, vous pouvez combiner 4 skills
    #
    # Note: noté que si les skills combiné ont des cibles différentes(1 ennemi,
    #tout les ennemis), le script choisira une cible au hasard parmi les ennemis

    synthe_s = []
    synthe_s.push([["Cross Cut","Wind"],"Hurricane"])
    synthe_s.push([["Leg Sweep","Thunder"],"Thunder Pierce"])
    synthe_s.push([["Leg Sweep","Hurricane"],"Spiral Blade"])
    synthe_s.push([["Cross Cut","Thunder Pierce"],"Screw Thrust"])
    synthe_s.push([["Cross Cut","Leg Sweep","Fire"],"Burning Shot"])
    synthe_s.push([["Water","Water"],"Greater Water"])
    synthe_s.push([["Water","Water"],"Greater Water"])
    synthe_s.push([["Water","Greater Water"],"Mass Water"])
    synthe_s.push([["Greater Water","Greater Water"],"Mass Water"])

    temp = [@spell_p, @spell_e]
    for spell in temp
      for spells in synthe_s
        magic = spells[1]
        spell_c = spell.clone
        for name in spells[0]
          if spell_c.has_value?(name)
            spell_c.delete(spell_c.index(name))
          else
            magic = nil
            break
          end
        end
        # Union magical decision
        if magic != nil
          for skill in $data_skills
            if magic == $data_skills[skill.id].name
              break
            end
          end
          if magic != $data_skills[skill.id].name
            p "Error:  The defined 'Cooperative Skill' is not found."
          end
          rt = 0
          synthe_b = []
          spell_c = spell.clone
          for name in spells[0]
            actor = spell_c.index(name)
            speller = synthe?(actor)
            if speller != nil
              for battlers in speller
                synthe_b.push(battlers)
                spell_c.delete(battlers)
              end
              rt += battlers.rt
            end
            unless synthe_b.include?(actor)
              synthe_b.push(actor)
              spell_c.delete(actor)
              rt += actor.rt
            end
          end
         
          # This set of routines determines the success of a Cooperative Skill
          # attack based on the individual skills being combined.
          #
          # spells = ["Skill Effect A","Skill Effect B"]
          # success = spell_effect(battler, synthe_b, spells)
          #
          # By specifying a Skill(when "Hurricane"), you can combine the success
          # rate of the skills (spells = ["Hurricane","Greater Wind"]) to gener-
          # ate an average.
          #
          # The last (else) IS necessary for "Non-Combined" skill attacks.
         
          case magic
          when "Hurricane"
            spells = ["Hurricane","Greater Wind"]
            success = spell_effect(battler, synthe_b, spells)
          when "Thunder Pierce"
            spells = ["Thunder Pierce","Greater Thunder"]
            success = spell_effect(battler, synthe_b, spells)
          when "Spiral Blade"
            spells = ["Beast Slayer","Hurricane","Greater Wind"]
            success = spell_effect(battler, synthe_b, spells)
          when "Screw Thrust"
            spells = ["Feint Attack","Thunder Pierce","Greater Thunder"]
            success = spell_effect(battler, synthe_b, spells)
          when "Burning Shot"
            spells = ["Hurricane","Thunder Pierce","Greater Fire"]
            success = spell_effect(battler, synthe_b, spells)
          else
            spells = [magic]
            success = spell_effect(battler, synthe_b, spells)
          end
          if success == true
            for actor in synthe_b
              speller = synthe?(actor)
              if speller != nil
                @synthe.delete(speller)
              end
              if battler != actor
                @action_battlers.delete(actor)
              end
              actor.spell = true
              if actor == synthe_b[0]
                spell[actor] = $data_skills[skill.id].name
              else
                spell.delete(actor)
              end
              actor.current_action.skill_id = skill.id
              recite_time(actor)
              actor.rtp = 1 if actor.rtp == 0
              # When a combination of skills that result in a combined skill at-
              # tack is formed, it results in the instantaneous delivery of the
              # "Cooperative Skill", regardless any ATB gauge.
              #
              # These "Cooperative Skills" cancels out the casting time required
              # by the "Skill Casting Time Counter" script WHEN the "Cooperative
              # Skill" is determined. 
              actor.rt = rt
            end
            @synthe.push(synthe_b)
          else
            for actor in synthe_b
              actor.current_action.spell_id = 0
            end
          end
        end
      end
    end
  end
  def spell_effect(battler, synthe, spells)
    spell_id = []
    for actor in synthe
      if spells.size != 0
        spell = spells.shift
      end
      for skill in $data_skills
        if spell == $data_skills[skill.id].name
          break
        end
      end
      if spell != $data_skills[skill.id].name
        p "Error: The defined 'Cooperative Skill' is not found."
      end
      if actor.skill_can_use?(skill.id) or
          battler.current_action.forcing == true
        spell_id.push(skill.id)
      else
        return false
      end
    end
    for actor in synthe
      actor.current_action.spell_id = spell_id.shift
    end
    return true
  end
end


Les explications sont de la ligne 17 à la ligne 25.

_________________

GabiLuci

Nombre de messages: 25
Age: 21
Date d'inscription: 07/03/2008

Voir le profil de l'utilisateur

Revenir en haut Aller en bas

Voir le sujet précédent Voir le sujet suivant Revenir en haut


Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum