Cerca nel Forum
Showing results for tags 'Incontri in base alloggetto'.
Trovato 1 risultato
-
Nome Script: Incontri in base all'oggetto Versione: N/D Autore/i: Moon Informazioni: In base all'oggetto che abbiamo equipaggiato, gli incontri casuali saranno impostati in base al settaggio dei numeri dei passi inseriti nelle proprietà dell'oggetto. Istruzioni: Inserite lo script sotto material (che trovaerete anche all'interno della demo). Per settare i passi, nelle note dell'oggetto, armi o armature etc, inserite: <encounter [#numero]>Dove #numero va sostituito ovviamente con il numero dei passi. Script: #_______________________________________________________________________________ # $Encounter Items by Moon$ | #_______________________________________________________________________________ # | # How to use it? | # Its quite simple, just add <encounter [#number]> at the "Notes" box and it| # will increase the encounter step by the [#number]. | # Ex. | # <ecnounter 30> will increase the encounter steps by 30. | # Thats all | #_______________________________________________________________________________ module Moon module EI module Regexp module BaseItem EI = /<(?:ENCOUNTER|encounter)[ ]*(d+)>/i end end end end class RPG::BaseItem def encounter_items @__enc = 0 self.note.split(/[rn]+/).each { |line| case line when /<(?:ENCOUNTER|encounter)[ ]*(d+)>/i @__enc = $1.to_i end } end def enc encounter_items if @__enc == nil return @__enc end end class Game_Actor < Game_Battler def enc_inc p = 0 equips.compact.each { |item| next if item.enc == nil next if item.enc == 0 p = p + item.enc } return p if p != nil return 0 end def change_equip(equip_type, item, test = false) last_item = equips[equip_type] unless test return if $game_party.item_number(item) == 0 if item != nil $game_party.gain_item(last_item, 1) $game_party.lose_item(item, 1) end item_id = item == nil ? 0 : item.id case equip_type when 0 # Weapon @weapon_id = item_id unless two_hands_legal? # If two hands is not allowed change_equip(1, nil, test) # Unequip from other hand end when 1 # Shield @armor1_id = item_id unless two_hands_legal? # If two hands is not allowed change_equip(0, nil, test) # Unequip from other hand end when 2 # Head @armor2_id = item_id when 3 # Body @armor3_id = item_id when 4 # Accessory @armor4_id = item_id end $game_player.make_encounter_count end end class Game_Player < Game_Character def make_encounter_count if $game_map.map_id != 0 n = $game_map.encounter_step for member in $game_party.members n += $game_actors[member.id].enc_inc end @encounter_count = rand(n) + rand(n) + 1 # As if rolling 2 dice end end end Demo: http://www.mediafire.com/?sgmex4bidei