-
Posts
149 -
Joined
-
Last visited
Content Type
Profiles
Forums
Calendar
Posts posted by LastChaos
-
-
Il Main Menù Manager e/o Common Event Menù di Yanfly potrebbero servire al caso allora!
-
Si si, hai ragione! infatti ho aperto il post consapevole del fatto che per ora avrebbe attirato poco! :) Di solito ci perdo moltissimo tempo per aprire un topic per bene ma sono veramente impegnato con tante altre cose e il tempo é poco quindi ho deciso di farlo in maniera abbastanza rapida ieri notte per poi sistemarlo man mano che troveró tempo tra studi e lavoro! Hahaha
-
http://i.imgur.com/8XLbN08.jpg
LAST UPDATE 1-7-2016 ore 16:30
Cosa è Breath?
È un progetto nato circa a inizio Giugno e ancora in fase di sviluppo, ma l'idea ci sta e come al solito lavoro da solo, a tempo perso. :(
Dopo la megademo che ho rilasciato su VxAce (in firma) ho capito la realtà dei fatti e ho capito che non sarei stato in grado di portare avanti un progetto cosi complesso e immenso... da solo.
Dark Core è ancora li, ora morto, è vero, ma è stato bello passarci 2 intensi anni/1500 e passa ore! ... :(
Breath sarà un titolo un po' diverso da qualunque cosa abbia mai pensato di fare. Mi divertirò a giocare con la mente delle persone con un titolo abbastanza mind-fuck!
Sarà semplice ma allo stesso tempo complesso.La demo di circa 15 minuti che vi mostrerò sarà semplice dal punto di vista grafico ma completa per quanto riguarda l'esperienza che potrei offrire a gioco finito.
http://i.imgur.com/jBi1m9O.jpg
Plot? Characters? Locations?
Sto pensando ad un gioco talmente strano che sarebbe impossibile dirvi cosa succederà, dove succederà e con chi succederà!Quando vengono presentati nuovi titoli, nella maggioranza di essi non viene menzionata la storia poiché si rischia di rivelarne buona parte e di conseguenza verrebbero rovinati anche gli avvenimenti.
Altre volte invece il titolo viene capito solo nelle fasi finali di gioco, dove tutti i pezzi del puzzle prendono posto.
Breath è uno di quei titoli e si potrà capire solo giocando.http://i.imgur.com/1ziTJa6.jpg
(Demo)
- Breath sarà costituito al 90% da puzzle e verranno mischiate tra loro moltissime variabili per dare vita a enigmi sempre più complessi e spero originali.
- L'interazione con l'ambiente sarà fondamentale sia per risolvere puzzle sia per sopravvivere!
- Crafting
http://i.imgur.com/iEiPuZb.jpg
- Quello che troverete nella demo di seguito non farà parte del gioco finale (o almeno il 70% degli elementi presenti). La demo è stata realizzata ad-hoc per farvi capire la tipologia di gioco.
- Il progetto è nato da poco. Troverete eventi/battaglie/animazioni/Mappe/blablabla realizzati in maniera semplice e saranno migliorati più avanti.
- La demo può essere finita, lo giuro! Dura 15-20 minuti. Saprete di averla finita quando leggerete... un lungo messaggio!
http://i.imgur.com/HZQcpGV.jpg
http://i.imgur.com/awNSeV0.png
http://i.imgur.com/jNbw66e.png
http://i.imgur.com/DmldzPC.png
http://i.imgur.com/R4dbbee.jpg
http://i.imgur.com/a5AEoBR.jpg
- Tool: Rpg Maker MV
- Lingua: Inglese
- Risoluzione: 1280x720
- Genere: RPG/Puzzle/Horror (?)
- Piattaforma: Windows e Android (Forse)
http://i.imgur.com/nr3unDw.jpg
(Demo)
http://i.imgur.com/Ku8d8XZ.jpg
(108MB)
Storico:
V1.0.1 - Aggiunti nuovi dettagli e peso ridotto
- Please report me any bug which you found! Thankssss
-Demo offline per modifiche-
-
Perdonami, ma il 95% dei giochi vengono messi in pausa durante la fase "menù" e il tempo scorre comunque.
In ogni caso l'unica soluzione è chiedere direttamente al creatore del plugin di integrare una feature che blocchi il tempo quando si è nella Scene_Menù :) -
è strano che si fermino, non dovrebbero. A me RMMV non ha mai dato questo problema. L'unica cosa che mi viene da pensare è un'incompatibilità tra plugin :/
-
Quindi in pratica vorresti che il gioco continuasse nonostante il menù aperto?
Se è così allora ti consiglio di cercare un plugin che mostri il menù sotto forma di HUD fissa visibile durante il gioco, in mappa.dovrebbe funzionare :)
-
Non sono riuscito a farlo funzionare con l'evento comune ma stranamente ora sembra funzionare correttamente senza mettere codice. ho messo solo il nome del comando nel menù e il symbol. tutto ciò è strano... quanto la "Y" che mi appariva in alto a sinistra D: Meglio cosi!
Anyway, grazie! Sempre disponibilissimo! ;) -
Lo so che ci sta scritto, ma sono comandi plugin! il menù manager elabora le informazioni in maniera diversa e necessita di condizioni eval scritte in java.
Non funziona mettendoci i richiami pluginDi seguito un esempio di come dovrei scrivere e l'errore che mi da se metto i comandi plugin.
P.S. Sto provando a cambiare posto ai comandi plugin per vedere se l'errore cambia :)http://i.imgur.com/E975VPl.png
http://i.imgur.com/jC69B2q.png
-
D: Per chi usa Il Main Menù manager di Yanfly, come posso aggiungere alla lista il comando Sintesi dato dal plugin Item synthesis? Che codici devo aggiungere? Non lo riesco a capire :/
-
Strano, solitamente a quel modo tutto il codice del progetto viene riscritto... possibile che il tuo errore sia proprio lì nell'istallazione di rpg maker dove le cose le va a prendere? Prova a reinstallare il tool dopo le tue altre prove! ^ ^
Ho creato un progetto nuovo e copiandoci gli stessi file che avevo nel progetto "corrotto", tutto ha funzionato correttamente. Non me lo spiego. Maledetta "y" ! Vabbò, ora sto meglio, stavo già rosicando troppo...
Last Chaos! Sei vivooooooo :))))
Yes! ** Purtroppo dopo aver lasciato il mio immenso progetto su vxace non mi son messo a fare altro. Ora sto ricominciando con un gioco più semplice e abbastanza originale su MV ;) Appena posso posto una demo.
-
R: y XD XD
Credo tu abbia fatto qualche danno su qualcuno dei file di plugin o codice. Prova a sostituire la cartella js con quella di un nuovo progetto, ricorda che anche i plugin aggiuntivi stanno lì, fa sempre backup.
^ ^
purtroppo anche senza plugin mi da errore. ho provato a sostituire l'intera cartella js . Ora provo altre vie. (ho fatto i backup ;) )
-
D) Non so per quale cavolo di motivo ma improvvisamente non mi si avviano più i test del gioco ed appare una y nella schermata in alto a sinistra. Qualcuno sa illuminarmi?
http://i.imgur.com/ZibsCzq.png
-
-
Ragazzi, qualcuno riuscirebbe gentilmente a modificare lo script di Yanfly GabWindow in modo da poter disporre la finestra a partire anche da un punto X in mappa/Battaglia? Vi allego delle immagini.
Basterebbe aggiunger l'opzione "Map X location" . Non penso sia difficile per chi capisce di JS!
L'ho suggerito anche a Yanfly. Magari farà lei stessa l'update prima o poi!Grazie a tutti :)
http://i.imgur.com/kv0aU0O.jpg
http://i.imgur.com/9TsriUw.png
-
Una è quella che ti ho linkato nel post precedente.
L'altra demo, l'ho creata ora, ecco QUI! E non salva.. xD
Questo è un progetto creato ora da me in cui ho messo MANCO LE ANIMAZIONI, solo balloon, attesa e spostamento evento.
Se aggiungi sti eventi paralleli anche in altre demo di altra gente, otterrai lo stesso risultato. Non salva. -
Non saprei, ho saltato qualche update e da quelli che ho visto non mi pare ci fosse un riferimento a questo. Comunque prova a vedere: nel link ci sono tutti quandi gli update vecchi e cerca anche sul forum, magari qualcuno ha fatto qualche plugin utile al problema. Potrebbe anche essere stato fixato, prova a riscaricare il tool e vedere.
^ ^
Macchè guarda, non hanno risolto nulla, tutti che ipotizzano qualcosa ma qua non funziona niente. Ho seguito tutte le loro varie teorie. Ho la versione Stand Alone.
Ma davvero a voi funziona tutto? Non è possibile. Non ci credo che non vi sia capitato. Provate a creare un progetto nuovo. create un processo parallelo e buttateci dentro qualche balloon sul giocatore con attesa, poi aggiungete un po di attesa...60 frame va bene, poi cominciate a far partire animazioni per la mappa. Anche durante i test vi sarà impossibile salvare e a volte vi cancella i dati.
Anche il 90% delle demo che gli scripter rilasciano, se i plugin hanno a che fare con i processi paralleli, è impossibile salvare. vedi ad esempio: Galv's Animation effects
scusate lo sfogo, ma qua rilasciano tool ultrabuggati che manco la ubisoft. Ho pagato 70 euro e voglio un prodotto decente.
-
Ma hanno corretto quel maledetto bug che impedisce di salvare il gioco se si mettono processi paralleli in mappa con balloon e animazioni? Non ho trovato nessuna soluzione in 2000 topic .-. illuminatemi please! (poi eliminate pure il mio post, non dovevo pubblicarlo qui...)
-
Purtroppo il problema non si limita a quello.
Ho fatto diversi test e sono arrivato alla conclusione che tenendo premuto in una direzione (giu, su, destra, sinistra ..... pg avanti, pg indietro) l'evento va in pappa e si perde i comandi per strada causando numerosi problemi quando cambiamo direzione.Sono arrivato all'unico metodo funzionante che però visivamente non mi piace perché non è.... reale: Tra ogni movimento dovrà intercorrere del tempo. Quindi mettiamo semplicemente "ATTESA" a tutti gli spostamenti, colonna e PG.
Ecco la Demo con Editor finale.
Se ci sono altre idee, plugin... li provo volentieri, altrimenti mi tengo l'effetto visivo brutto :(
-
Vai sul muovi evento (o itinerario come si chiama su MV). Guarda in basso a sinistra. Spicca la seconda opzione (dovrebbe essere qualcosa come ignora movimenti impossibili). Fine.
^ ^
Ci avevo provato e all'inizio funzionava. Però funziona solo per un passo, se si ci risbaglia a premere il pulsante, il gioco si impalla in ogni caso.
Era un'ottima alternativa, peccato che non riesco ad applicarla.
Serve un qualcosa che dica: "Guarda, lo spazio davanti all'oggetto/dietro al giocatore è occupato, non puoi fare questa azione!". Di conseguenza mi basterebbe creare un semplice condizione IF per sganciarmi dall'oggetto.
-
Hello everyone!! (probabilmente dovevo mettere il post nello Sportello aiuti veloci, se così fosse, mi scuso per la disattenzione) :)
Sto cominciando un nuovo progettino cercando di creare Puzzle game con elementi RPG.
Ho in mente praticamente già tutto, e so come creare il tutto, ma sapevo che sarebbe arrivato il momento di chiedere aiuto proprio per questo banale enigma:http://i.imgur.com/Dono0Te.png
Ovviamente si tratta dell'enigma che si risolve spostando i massi, o in questo caso la prima cosa che mi è capitata. Un pezzo di colonna. Non badate al mapping, è una saletta di prova XD
QUI PUOI SCARICARE LA DEMO CON L'EDITOR! Così, chi vorrà, sperimenterà!
Ho creato ad eventi tutto quello che serve per spostare la colonna in tutte le direzioni (...anche all'indietro).
Ovviamente il problema si crea quando per sbaglio cerchiamo di spostare la colonna verso il muro oppure spostando la colonna verso di noi ed il PG non può proseguire perché dietro di lui c'è un ostacolo.. Il gioco ovviamente si impalla.
Devo trovare un modo per ovviare a questo problema cercando di far capire al gioco che l'evento non deve partire quando cerco di spostare la colonna verso un muro... O UN ALTRO QUALSIASI OGGETTO, ANCHE ALTRE COLONNE!
Le regioni purtroppo non risolvono il problema. Ci sarebbero forse altri metodi, con gli eventi, ma se la mente non m'inganna, ci metterei giorni per attuarlo...Secondo me, c'è bisogno di integrare un plugin.
Idee?
Vi voglio bene, grazie a tutti quelli che mi aiuteranno! (non badate a tutti i plugin del gioco, avevo altre idee in principio)
-
Meglio non giocare a schermo intero, il lag raddoppierebbe.
E.... non vorrei darti false speranze, ma se ti ha laggato ad inizio gioco, piu avanti ci sono mappe dove potrebbe laggarti molto di piu. (Ad esempio una vasta pianura con tempo atmosferico casuale). Anche se è divisa in 4 mappe ed ho ottimizzato il lag, potrebbe scattarti un po. Incrocio le dita. D:
Voglio provare a toccare lo script dell orario e impedire ad inizio gioco che premendo ALT si veda l orario. Penso di riuscirci tramite una condizione switch messa nello script. (L unica modifica che so apportare nel ruby hahahahah )EDIT: Ok, sono riuscito a mettere la condizione switch nello script e ora premendo ALT durante la prima parte del gioco non apparirà l'orologio.
Inviato dal mio GT-I9300 utilizzando Tapatalk -
Ah ecco... non potevi aver finito la demo dopo pochi minuti. Servono quasi 5 ore. XD
Allora, parto da questo presupposto:
Ho un PC che mi funge sia da workstation che da PC gaming... una belva in poche parole. E non ho nessun problema di lag.
Invece, Per rispondere alle tue domande e agli errori da te trovati:
1) perché ti si vede giorno e ora a inizio gioco? Hai premuto ALT accidentalmente vero? Hahahah l orario partirá circa a 40 minuti di gioco xD
2) correggerò quei due pezzi di terreno che mi sono sfuggiti
3) il menu a me si apre con 1 solo secondo di ritardo perché contiene molta grafica. Non è un errore, lo ha scritto anche lo stesso Galv. A te si apre in 5-6 secondi per colpa del pc probabilmente.
4) mi dispiace che ti lagghi molto. Il gioco contiene molti elementi ESSENZIALI, e si, uso un antilag. Ma come ti dicevo prima, serve un pc con molta ram se si vuole evitare il lag. Mi dispiace.
5) il menu cambia ad ogni location. Nella foresta Oshur il riquadro è quell'alone blu scuro (che non avevi visto). Se da problemi anche ad altri, cambierò colore.
6)il chara in battaglia è 1,5 volte piu grande del normale, per questo è poco poco sgranato. Per quanto riguarda la sua posizione, ho cercato un compromesso per non farlo stare troppo vicino ai nemici.
7) quando equipaggi le cose in casa, vanno obbligatoriamentr equipaggiati. Per questo si apre di continuo il menu se non li equipaggi.
Detto questo... spero che il lag non crei problemi a tutti. Non posso farci nulla. È giá ottimizzato :/
Inviato dal mio GT-I9300 utilizzando Tapatalk
-
Update alla versione 3.0
Ci sono stati notevoli cambiamenti e migliorie.
Se mai riuscirò a portare a termine il gioco, devo assolutamente ridurre la portata di features XD
In caso contrario comincerò a buttare giù dei concept per un nuovo gioco assai più semplice basato molto sullo storytelling ed enigmi.
V3.0:
NEW - Nuova missione temporaleNEW - Nuova missione della bachecaNEW - Interfaccia delle missioni completamente rinnovata per motivi tecniciNEW - Rinnovata la scena delle biografie degli eroiRimozione miniboss insieme a tutte le relative features :( (Guarda il progetto per ulteriori info)Aggiunti 3 mostri selvatici nuovi che sostituiranno l'ID dei miniboss attualiRimossi alcuni tipi di armi per motivi di tempo:-Lancia-Spadone-MazzaRimosse le abilità relative alle armi sopracitateNEW - Possibilità di Upgrade equipaggiamentoAggiunti altri crafting alchemiciCambiamento radicale nel sistema delle atmosfere orarie. Azzerata la possibilità di avere errori causati dall'orarioSemplificazione ed ottimizzazione eventi per minor lagMiglioramento dettagli grafici/sonori/tecniciNEW - Aggiunta del meteo "ventoso" nella Steppa JikaRandomizzazione altissima del meteo nella Steppa Jika (ogni tanto aggiungo/miglioro qualcosa... tanto per!)NEW - Nuova mappa accessibile... dal Vulcano Fajel -
Vado subito al punto poiché a parole è facile scriverlo.
Nel mio gioco si possono incastonare gemme nell'equipaggiamento per conferirgli ulteriori parametri (solo parametri). Per fare ciò, utilizzo lo script conosciutissimo di falcao (reperibile QUI).
Recentemente (purtroppo per me... dopo 3 anni -.-) ho conosciuto anche QUESTO script; che conferisce qualsiasi tipo di parametro/status/bonus/malus/echinehapiùnemetta... all'equipaggiamento. STRAFIGO! Purtroppo non va d'accordo con L'Equip Engine di Yanfly :( e quindi lo scarto.
Vorrei implementare nello script di falcao la possibilita di aggiungere alcune delle notetag presenti nello script "Dark Cloud 2 Weapons" poiché vengono caratterizzati entrambi dalla possibilità di aggiungere notetag a oggetti/armi/armature. (A me interesano solo gli oggetti in questo caso)
Mi servirebbe solamente poter aggiungere alle mie gemme (sono oggetti... per via dello script di falcao) quelle semplici notetag per conferire anche Elementi/Stati.Le notetag incriminate sono:
State plus = "x"
Element plus ="x"È possibile... e semplice?
Questo sottostante è lo script di xBrokenSin modificato dal nostro caro Kingartur2
Alla riga 41 e 45 ci sono le notetag che mi interessano.
Grazie per l'interesse, buona serata <3Lo script da modificare, ricordo, è ovviamente quello di Falcao :)
EDIT: Se è impossibile modificare lo script di falcao, allora è possibile creare la compatibilità dello script Dark Cloud 2 Weapons con Equip Engine di Yanfly? Non vanno d'accordo e mi da errore con il "sealed" e poi non mi fa equipaggiare armi. Dovreste vedere l'errore da voi per capire meglio di cosa parlo. Basta inserire nella demo Dark Cloud 2 Weapons lo script Equip Engine di Yanfly :)#==============================================================================
# ** Dark Cloud 2 Weapons - Ace
#------------------------------------------------------------------------------
# Author : xBrokenSin
# Version : 1.02
#
# ATTENZIONE :
# QUESTA E' UNA VERSIONE NON UFFICIALE MODIFICA AL SOLO SCOPO DI CORREGERE
# DEI BUG, PER QUALSIASI INFO CONTATTARE L'AUTORE.
# WARNING :
# THIS IS A UNOFFICIAL VERSION MADE TO CORRECT SOME BUG,
# PLEASE CONTACT THE AUTOR FOR ANY INFO.
#==============================================================================
# History:
#------------------------------------------------------------------------------
# 1.00
# - 4/15/12 - Script finished.
# 1.01
# - 4/19/12 - Fixed issue with atk/matk and def/mdef increases through items.
# 1.02
# - 4/30/12 - Fixed issue with equipment initializing which was causing
# problems with battle testing and dual wielding.
#==============================================================================
# Instructions:
#------------------------------------------------------------------------------
# SETTING UP WEAPONS
#
# Weapons are set up with the note box using the follows commands.
#
# : Base Exp =
# - Use this command to set the base exp used in the formula to create
# the exp trees for leveling.
#
# : Max Level =
# - Use this to set the maximum level a weapon can achieve.
#
# :Plus =
# - Use this to set the value which is added to the weapon's parameter each
# time it levels.
#
# : State Plus =
# - Use this to set the value which is added to the weapon's state each time
# it levels. is the id of the state in the database.
#
# : Element Plus =
# - Use this to set the value which is added to the weapon's element each
# time it levels. is the id of the element in the database.
#
# : SP Plus =
# - Use this to set the value which is added to the weapon's SP pool each
# time it levels.
#
# : Max=
# - Use this to set the maximum value a weapon's parameter can achieve.
#
# : Paths = , , , ...
# - Use this to set the weapons which the selected one can build into.
#
# : Req=
# - Use this in conjunction with the Paths function. Paths are set up in the
# note box of the weapon you wish to be the base. But Reqs must be set up
# in the note box of the "new" weapon--the one the old one becomes.
#
# The old weapon must meet the minimum requirement of this parameter before
# it can become the new weapon.
#
# : Req State =
# - The old weapon must meet the minimum requirement of this state before it
# can become the new weapon. is the id of the state in the database.
#
# : Req Element =
# - The old weapon must meet the minimum requirement of this element before
# it can become the new weapon. is the id of the element in the
# database.
#
# Params usable in note box:
#
# HP - Hit Points
# MP - Magic Points
# Atk - Attack
# Def - Defence
# MAtk - Magic Attack
# MDef - Magic Defence
# Agi - Agility
# Luk - Luck
#
# Note: Only the abbreviated names of the parameters are accepted.
#
#------------------------------------------------------------------------------
# SETTING UP ITEMS
#
# Items/Equipment are set up with the note box using the follows commands.
#
# :Plus =
# - Use this to set the value which is added to the item's parameter each
# time it levels.
#
# : State Plus =
# - Use this to set the value which is added to the item's state each time
# it levels. is the id of the state in the database.
#
# : Element Plus =
# - Use this to set the value which is added to the items's element each
# time it levels. is the id of the element in the database.
#
# : Cost =
# - Use this to set the cost of SP it takes to transmute an item.
#
# Params usable in note box:
#
# HP - Hit Points
# MP - Magic Points
# Atk - Attack
# Def - Defence
# MAtk - Magic Attack
# MDef - Magic Defence
# Agi - Agility
# Luk - Luck
#
# Note: Only the abbreviated names of the parameters are accepted.
#------------------------------------------------------------------------------
# SETTING UP ENEMIES
#
# : Weapon EXP =
# - Use this to set how much weapon exp an enemy rewards.
#
#==============================================================================
#==============================================================================
# ** Script Configuration
#==============================================================================
module DC2WeaponsAce_Setup
# Include armor in transmute item list
Include_Armor = false
# Default weapon settings
Default_BaseExp = 20
Default_MaxLevel = 10
Default_StartSP = 3
# Level needed to recieve maximum stat passovers for weapons
Passover_Level = 5
Passover_Unstable = 0.10
Passover_Stabalized = 0.50
# Price increase per level
PriceBump = 0.20
# Default battle settings
Default_EnemyWepExp = 10
# Default weapon gains on level up
Default_HPPlus = 0
Default_MPPlus = 0
Default_AtkPlus = 2
Default_DefPlus = 0
Default_MAtkPlus = 0
Default_MDefPlus = 0
Default_AgiPlus = 1
Default_LukPlus = 0
Default_SPPlus = 3
# Default weapon max values
Default_MaxHP = 100
Default_MaxMP = 100
Default_MaxAtk = 20
Default_MaxDef = 20
Default_MaxMAtk = 20
Default_MaxMDef = 20
Default_MaxAgi = 20
Default_MaxLuk = 20
Default_MaxElements = 100
Default_MinElements = -100
# Default item transmute cost
Default_ItemCost = 1
# States
Addable_States = [1, 2, 3, 4, 5, 6, 7, 8]
Default_StateRate = 0
# Elements
Addable_Elements = [3, 4, 5, 6, 7, 8, 9, 10]
Default_ElementRate = 0
Database_SetRate = 100
# Icons
Param_Icons = {
0 => 189, # HP
1 => 188, # MP
2 => 187, # Atk
3 => 186, # Def
4 => 191, # MAtk
5 => 184, # MDef
6 => 185, # Agi
7 => 190 # Luk
}
Element_Icons = {
3 => 104, # Fire
4 => 105, # Ice
5 => 106, # Thunder
6 => 107, # Water
7 => 108, # Earth
8 => 109, # Wind
9 => 110, # Holy
10 => 111 # Dark
}
# Colors
ParamColor_1 = Color.new(220, 0, 0)
ParamColor_2 = Color.new(60, 0, 0)
ExpColor_1 = Color.new(130, 0, 255)
ExpColor_2 = Color.new(60, 0, 120)
# Words
WordUpgrade = "Upgrade"
WordSynthesize = "Transmute"
WordBuildUp = "Build Up"
WordSP = "TP"
WordExp = "EXP"
WordMax = "-MAX-"
# Messages
ObtainWepExp = "%s Weapon EXP received!"
ActorWepLevel = "%s's %s increased to level %s!"
end
#==============================================================================
# ** RPG::BaseItem
#==============================================================================
class RPG::BaseItem
#--------------------------------------------------------------------------
# * Constants (Regexp)
#--------------------------------------------------------------------------
Regexp_HPPlus = /(?:HP\s*Plus)\s*=\s*([-]\d+|\d+)/i
Regexp_MPPlus = /(?:MP\s*Plus)\s*=\s*([-]\d+|\d+)/i
Regexp_AtkPlus = /^(?!:M)(?:Atk\s*Plus)\s*=\s*([-]\d+|\d+)/i
Regexp_DefPlus = /^(?!:M)(?:Def\s*Plus)\s*=\s*([-]\d+|\d+)/i
Regexp_MAtkPlus = /(?:MAtk\s*Plus)\s*=\s*([-]\d+|\d+)/i
Regexp_MDefPlus = /(?:MDef\s*Plus)\s*=\s*([-]\d+|\d+)/i
Regexp_AgiPlus = /(?:Agi\s*Plus)\s*=\s*([-]\d+|\d+)/i
Regexp_LukPlus = /(?:Luk\s*Plus)\s*=\s*([-]\d+|\d+)/i
Regexp_StatePlus = /(?:State\s*Plus)\s*(\d+)\s*=\s*([-]\d+|\d+)/i
Regexp_ElementPlus = /(?:Element\s*Plus)\s*(\d+)\s*=\s*([-]\d+|\d+)/i
Regexp_Cost = /(?:Cost)\s*=\s*([-]\d+|\d+)/i
#--------------------------------------------------------------------------
# * Bonuses
#--------------------------------------------------------------------------
def bonuses
bonuses = {}
bonuses[:params] = Array.new(8) { 0 }
bonuses[:states] = {}
DC2WeaponsAce_Setup::Addable_States.each do |id|
bonuses[:states][id] = DC2WeaponsAce_Setup::Default_StateRate
end
bonuses[:elements] = {}
DC2WeaponsAce_Setup::Addable_Elements.each do |id|
bonuses[:elements][id] = DC2WeaponsAce_Setup::Default_ElementRate
end
@note.each_line do |line|
case line
when Regexp_HPPlus
bonuses[:params][0] = $1.to_i
when Regexp_MPPlus
bonuses[:params][1] = $1.to_i
when Regexp_AtkPlus
bonuses[:params][2] = $1.to_i
when Regexp_DefPlus
bonuses[:params][3] = $1.to_i
when Regexp_MAtkPlus
bonuses[:params][4] = $1.to_i
when Regexp_MDefPlus
bonuses[:params][5] = $1.to_i
when Regexp_AgiPlus
bonuses[:params][6] = $1.to_i
when Regexp_LukPlus
bonuses[:params][7] = $1.to_i
when Regexp_StatePlus
bonuses[:states][$1.to_i] = $2.to_i
when Regexp_ElementPlus
bonuses[:elements][$1.to_i] = $2.to_i
end
end
bonuses
end
#--------------------------------------------------------------------------
# * Cost
#--------------------------------------------------------------------------
def cost
cost = DC2WeaponsAce_Setup::Default_ItemCost
@note.each_line do |line|
cost = $1.to_i if line =~ Regexp_Cost
end
cost
end
end
#==============================================================================
# ** RPG::Enemy
#==============================================================================
class RPG::Enemy < RPG::BaseItem
#--------------------------------------------------------------------------
# * Constants (Regexp)
#--------------------------------------------------------------------------
Regexp_WeaponExp = /(?:Weapon\s*Exp)\s*=\s*(\d+)/i
#--------------------------------------------------------------------------
# * Weapon Exp
#--------------------------------------------------------------------------
def weapon_exp
wexp = DC2WeaponsAce_Setup::Default_EnemyWepExp
@note.each_line do |line|
wexp = $1.to_i if line =~ Regexp_WeaponExp
end
wexp
end
end
#==============================================================================
# ** Vocab
#==============================================================================
module Vocab
# Elements
def self.elements(element_id)
$data_system.elements[element_id]
end
end
#==============================================================================
# ** BattleManager
#==============================================================================
module BattleManager
#--------------------------------------------------------------------------
# * Method Aliases
#--------------------------------------------------------------------------
class << self
alias :broken_dc2weapons_battlemanager_displayexp :display_exp
alias :broken_dc2weapons_battlemanager_gainexp :gain_exp
end
#--------------------------------------------------------------------------
# * Display EXP Earned
#--------------------------------------------------------------------------
def self.display_exp
broken_dc2weapons_battlemanager_displayexp
if $game_troop.weapon_exp_total > 0
string = DC2WeaponsAce_Setup::ObtainWepExp
text = sprintf(string, $game_troop.weapon_exp_total)
$game_message.add('\.' + text)
end
end
#--------------------------------------------------------------------------
# * EXP Acquisition and Level Up Display
#--------------------------------------------------------------------------
def self.gain_exp
broken_dc2weapons_battlemanager_gainexp
$game_party.all_members.each do |actor|
actor.gain_weapon_exp($game_troop.weapon_exp_total, true)
end
wait_for_message
end
end
#==============================================================================
# ** Game_BaseItem
#==============================================================================
class Game_BaseItem
#--------------------------------------------------------------------------
# * Get Item Object
#--------------------------------------------------------------------------
alias :broken_dc2weapons_gamebaseitem_object :object
def object
return @item_id if is_weapon? and @item_id.is_a?(Game_DC2Weapon)
broken_dc2weapons_gamebaseitem_object
end
#--------------------------------------------------------------------------
# * Set Item Object
#--------------------------------------------------------------------------
alias :broken_dc2weapons_gamebaseitem_objectequal :object=
def object=(item)
broken_dc2weapons_gamebaseitem_objectequal(item)
if item && @class == RPG::Weapon && !item.is_a?(Game_DC2Weapon)
item = Game_DC2Weapon.new(item)
end
@item_id = item ? @class == RPG::Weapon ? item : item.id : 0
end
#--------------------------------------------------------------------------
# * Set Equipment with ID
#--------------------------------------------------------------------------
alias :broken_dc2weapons_gamebaseitem_setequip :set_equip
def set_equip(is_weapon, item_id)
broken_dc2weapons_gamebaseitem_setequip(is_weapon, item_id)
if is_weapon && item_id != 0 && !item_id.is_a?(Game_DC2Weapon)
@item_id = Game_DC2Weapon.new($data_weapons[item_id])
end
end
end
#==============================================================================
# ** Game_Battler
#==============================================================================
class Game_Battler < Game_BattlerBase
#--------------------------------------------------------------------------
# * Calculate Damage
#--------------------------------------------------------------------------
def make_damage_value(user, item)
value = item.damage.eval(user, self, $game_variables)
value = apply_elements(value, user, item)
value *= pdr if item.physical?
value *= mdr if item.magical?
value *= rec if item.damage.recover?
value = apply_critical(value) if @result.critical
value = apply_variance(value, item.damage.variance)
value = apply_guard(value)
@result.make_damage(value.to_i, item)
end
#--------------------------------------------------------------------------
# * Apply Elemental Bonuses
#--------------------------------------------------------------------------
def apply_elements(value, user, item)
if user.actor?
if item.damage.element_id < 0
for id in user.atk_elements
atk_rate = user.atk_element_rate(id)
res_rate = element_rate(id)
next unless atk_rate > 0
value *= res_rate
if res_rate > 1 # Weak to element
value *= (atk_rate + 100) / 100
else # Resistant to element
value *= 2 - (atk_rate + 100) / 100
end
end
value
else
value * element_rate(item.damage.element_id)
end
else
value * item_element_rate(user, item)
end
end
end
#==============================================================================
# ** Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Get Attack States
#--------------------------------------------------------------------------
def atk_states
states = []
weapons.each do |wep|
wep.states.each_key { |id| states.push(id) if wep.states[id] > 0 }
end
states
end
#--------------------------------------------------------------------------
# * Get Attack State Rate
#--------------------------------------------------------------------------
def atk_states_rate(state_id)
rate = super
weapons.each { |wep| rate += wep.states[state_id].to_f / 100}
rate
end
#--------------------------------------------------------------------------
# * Get Attack Element
#--------------------------------------------------------------------------
def atk_elements
elements = []
weapons.each do |wep|
wep.elements.each_key { |id| elements.push(id) if wep.elements[id] > 0 }
end
elements
end
#--------------------------------------------------------------------------
# * Get Attack Element Rate
#--------------------------------------------------------------------------
def atk_element_rate(element_id)
rate = 0.0
weapons.each do |wep|
rate = wep.elements[element_id] if wep.elements[element_id] > rate
end
rate
end
end
#==============================================================================
# ** Game_DC2Weapon
#==============================================================================
class Game_DC2Weapon < RPG::Weapon
#--------------------------------------------------------------------------
# * Constants (Regexp)
#--------------------------------------------------------------------------
Regexp_BaseExp = /(?:Base\s*Exp)\s*=\s*(\d+)/i
Regexp_MaxLevel = /(?:Max\s*Level)\s*=\s*(\d+)/i
Regexp_SetElement = /(?:Set\s*Element)\s*(\d+)\s*=\s*([-]\d+|\d+)/i
Regexp_HPPlus = /(?:HP\s*Plus)\s*=\s*([-]\d+|\d+)/i
Regexp_MPPlus = /(?:MP\s*Plus)\s*=\s*([-]\d+|\d+)/i
Regexp_AtkPlus = /^(?!:M)(?:Atk\s*Plus)\s*=\s*([-]\d+|\d+)/i
Regexp_DefPlus = /^(?!:M)(?:Def\s*Plus)\s*=\s*([-]\d+|\d+)/i
Regexp_MAtkPlus = /(?:MAtk\s*Plus)\s*=\s*([-]\d+|\d+)/i
Regexp_MDefPlus = /(?:MDef\s*Plus)\s*=\s*([-]\d+|\d+)/i
Regexp_AgiPlus = /(?:Agi\s*Plus)\s*=\s*([-]\d+|\d+)/i
Regexp_LukPlus = /(?:Luk\s*Plus)\s*=\s*([-]\d+|\d+)/i
Regexp_StatePlus = /(?:State\s*Plus)\s*(\d+)\s*=\s*([-]\d+|\d+)/i
Regexp_ElementPlus = /(?:Element\s*Plus)\s*(\d+)\s*=\s*([-]\d+|\d+)/i
Regexp_SPPlus = /(?:SP\s*Plus)\s*=\s*(\d+)/i
Regexp_MaxHP = /(?:Max\s*HP)\s*=\s*(\d+)/i
Regexp_MaxMP = /(?:Max\s*MP)\s*=\s*(\d+)/i
Regexp_MaxAtk = /(?:Max\s*Atk)\s*=\s*(\d+)/i
Regexp_MaxDef = /(?:Max\s*Def)\s*=\s*(\d+)/i
Regexp_MaxMAtk = /(?:Max\s*MAtk)\s*=\s*(\d+)/i
Regexp_MaxMDef = /(?:Max\s*MDef)\s*=\s*(\d+)/i
Regexp_MaxAgi = /(?:Max\s*Agi)\s*=\s*(\d+)/i
Regexp_MaxLuk = /(?:Max\s*Luk)\s*=\s*(\d+)/i
Regexp_Paths = /(?:Paths)/i
Regexp_ReqHP = /(?:Req\s*HP)\s*=\s*(\d+)/i
Regexp_ReqMP = /(?:Req\s*MP)\s*=\s*(\d+)/i
Regexp_ReqAtk = /(?:Req\s*Atk)\s*=\s*(\d+)/i
Regexp_ReqDef = /(?:Req\s*Def)\s*=\s*(\d+)/i
Regexp_ReqMAtk = /(?:Req\s*MAtk)\s*=\s*(\d+)/i
Regexp_ReqMDef = /(?:Req\s*MDef)\s*=\s*(\d+)/i
Regexp_ReqAgi = /(?:Req\s*Agi)\s*=\s*(\d+)/i
Regexp_ReqLuk = /(?:Req\s*Luk)\s*=\s*(\d+)/i
Regexp_ReqState = /(?:Req\s*State)\s*(\d+)\s*=\s*(\d+)/i
Regexp_ReqElement = /(?:Req\s*Element)\s*(\d+)\s*=\s*([-]\d+|\d+)/i
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :level
attr_reader :exp
attr_reader :sp
attr_reader :states
attr_reader :elements
attr_reader :paths
attr_reader :requirements
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(weapon)
@base_weapon = weapon
@level = 0
@exp = 0
@base_exp = DC2WeaponsAce_Setup::Default_BaseExp
@max_level = DC2WeaponsAce_Setup::Default_MaxLevel
@sp = DC2WeaponsAce_Setup::Default_StartSP
@level_bonuses = {}
@level_bonuses[:params] = []
@level_bonuses[:states] = {}
@level_bonuses[:elements] = {}
@level_bonuses[:params][0] = DC2WeaponsAce_Setup::Default_HPPlus
@level_bonuses[:params][1] = DC2WeaponsAce_Setup::Default_MPPlus
@level_bonuses[:params][2] = DC2WeaponsAce_Setup::Default_AtkPlus
@level_bonuses[:params][3] = DC2WeaponsAce_Setup::Default_DefPlus
@level_bonuses[:params][4] = DC2WeaponsAce_Setup::Default_MAtkPlus
@level_bonuses[:params][5] = DC2WeaponsAce_Setup::Default_MDefPlus
@level_bonuses[:params][6] = DC2WeaponsAce_Setup::Default_AgiPlus
@level_bonuses[:params][7] = DC2WeaponsAce_Setup::Default_LukPlus
@level_bonuses[:sp] = DC2WeaponsAce_Setup::Default_SPPlus
@max_params = []
@max_params[0] = DC2WeaponsAce_Setup::Default_MaxHP
@max_params[1] = DC2WeaponsAce_Setup::Default_MaxMP
@max_params[2] = DC2WeaponsAce_Setup::Default_MaxAtk
@max_params[3] = DC2WeaponsAce_Setup::Default_MaxDef
@max_params[4] = DC2WeaponsAce_Setup::Default_MaxMAtk
@max_params[5] = DC2WeaponsAce_Setup::Default_MaxMDef
@max_params[6] = DC2WeaponsAce_Setup::Default_MaxAgi
@max_params[7] = DC2WeaponsAce_Setup::Default_MaxLuk
@paths = []
@requirements = {}
@requirements[:params] = Array.new(8) { nil }
@requirements[:states] = {}
@requirements[:elements] = {}
@states = {}
@elements = {}
@new_features = []
DC2WeaponsAce_Setup::Addable_States.each do |state_id|
@states[state_id] = DC2WeaponsAce_Setup::Default_StateRate
@requirements[:states][state_id] = nil
end
DC2WeaponsAce_Setup::Addable_Elements.each do |element_id|
@elements[element_id] = DC2WeaponsAce_Setup::Default_ElementRate
@requirements[:elements][element_id] = nil
end
unless base.nil?
scan_base
scan_notes
scan_features
end
end
#--------------------------------------------------------------------------
# * Class
#-------------------------------------------------------------------------
def class
RPG::Weapon
end
#--------------------------------------------------------------------------
# * Base
#--------------------------------------------------------------------------
def base
@base_weapon
end
#--------------------------------------------------------------------------
# * Scan Base
#--------------------------------------------------------------------------
def scan_base
@id = base.id
@name = base.name
@icon_index = base.icon_index
@description = base.description
@features = base.features
@note = base.note
@price = base.price
@etype_id = base.etype_id
@params = []
base.params.each_with_index { |n, i| @params = n }
@wtype_id = base.wtype_id
@animation_id = base.animation_id
end
#--------------------------------------------------------------------------
# * Scan Note
#--------------------------------------------------------------------------
def scan_notes
base.note.each_line do |line|
case line
when Regexp_BaseExp
@base_exp = $1.to_i
when Regexp_MaxLevel
@max_level = $1.to_i
when Regexp_SetElement
@elements[$1.to_i] = $2.to_i
when Regexp_HPPlus
@level_bonuses[:params][0] = $1.to_i
when Regexp_MPPlus
@level_bonuses[:params][1] = $1.to_i
when Regexp_AtkPlus
@level_bonuses[:params][2] = $1.to_i
when Regexp_DefPlus
@level_bonuses[:params][3] = $1.to_i
when Regexp_MAtkPlus
@level_bonuses[:params][4] = $1.to_i
when Regexp_MDefPlus
@level_bonuses[:params][5] = $1.to_i
when Regexp_AgiPlus
@level_bonuses[:params][6] = $1.to_i
when Regexp_LukPlus
@level_bonuses[:params][7] = $1.to_i
when Regexp_StatePlus
@level_bonuses[:states][$1.to_i] = $2.to_i
when Regexp_ElementPlus
@level_bonuses[:elements][$1.to_i] = $2.to_i
when Regexp_SPPlus
@level_bonuses[:sp] = $1.to_i
when Regexp_MaxHP
@max_params[0] = $1.to_i
when Regexp_MaxMP
@max_params[1] = $1.to_i
when Regexp_MaxAtk
@max_params[2] = $1.to_i
when Regexp_MaxDef
@max_params[3] = $1.to_i
when Regexp_MaxMAtk
@max_params[4] = $1.to_i
when Regexp_MaxMDef
@max_params[5] = $1.to_i
when Regexp_MaxAgi
@max_params[6] = $1.to_i
when Regexp_MaxLuk
@max_params[7] = $1.to_i
when Regexp_Paths
line.scan(/(\d+)/) { |n| @paths.push(n[0].to_i) }
when Regexp_ReqHP
@requirements[:params][0] = $1.to_i
when Regexp_ReqMP
@requirements[:params][1] = $1.to_i
when Regexp_ReqAtk
@requirements[:params][2] = $1.to_i
when Regexp_ReqDef
@requirements[:params][3] = $1.to_i
when Regexp_ReqMAtk
@requirements[:params][4] = $1.to_i
when Regexp_ReqMDef
@requirements[:params][5] = $1.to_i
when Regexp_ReqAgi
@requirements[:params][6] = $1.to_i
when Regexp_ReqLuk
@requirements[:params][7] = $1.to_i
when Regexp_ReqState
@requirements[:states][$1.to_i] = $2.to_i
when Regexp_ReqElement
@requirements[:elements][$1.to_i] = $2.to_i
end
end
end
#--------------------------------------------------------------------------
# * Scan Features
#--------------------------------------------------------------------------
def scan_features
for feature in @features
case feature.code
when Game_BattlerBase::FEATURE_ATK_STATE # Attack States
if DC2WeaponsAce_Setup::Addable_States.include?(feature.data_id)
@states[feature.data_id] = feature.value
@features.delete(feature)
end
when Game_BattlerBase::FEATURE_ATK_ELEMENT # Element States
if DC2WeaponsAce_Setup::Addable_Elements.include?(feature.data_id)
@elements[feature.data_id] = DC2WeaponsAce_Setup::Database_SetRate
@features.delete(feature)
end
end
end
end
#--------------------------------------------------------------------------
# * Name
#--------------------------------------------------------------------------
def name
@level > 0 ? "#{@name} +#{@level}" : orig_name
end
#--------------------------------------------------------------------------
# * Original Name
#--------------------------------------------------------------------------
def orig_name
@name
end
#--------------------------------------------------------------------------
# * Features
#--------------------------------------------------------------------------
def features
base.nil? ? [] : base.features
end
#--------------------------------------------------------------------------
# * Param Rate
#--------------------------------------------------------------------------
def param_rate(i)
@params / @max_params.to_f
end
#--------------------------------------------------------------------------
# * Exp Rate
#--------------------------------------------------------------------------
def exp_rate
@exp / next_level_exp.to_f
end
#--------------------------------------------------------------------------
# * Get Total EXP Required for Rising to Specified Level
#--------------------------------------------------------------------------
def exp_for_level(level)
(@base_exp + (level - 1) * @base_exp / 2) * level
end
#--------------------------------------------------------------------------
# * Get Minimum EXP for Current Level
#--------------------------------------------------------------------------
def current_level_exp
exp_for_level(@level)
end
#--------------------------------------------------------------------------
# * Get EXP for Next Level
#--------------------------------------------------------------------------
def next_level_exp
exp_for_level(@level + 1)
end
#--------------------------------------------------------------------------
# * Determine Maximum Level
#--------------------------------------------------------------------------
def max_level?
@level >= @max_level
end
#--------------------------------------------------------------------------
# * Gain Exp
#--------------------------------------------------------------------------
def gain_exp(amount)
@exp = [@exp + amount, 0].max
level_up while !max_level? && @exp >= next_level_exp
@exp = 0 if max_level?
end
#--------------------------------------------------------------------------
# * Lose Exp
#--------------------------------------------------------------------------
def lose_exp(amount)
@exp = [@exp - amount, 0].max
end
#--------------------------------------------------------------------------
# * Level Up
#--------------------------------------------------------------------------
def level_up
@exp -= next_level_exp
@level += 1
apply_level_bonuses
end
#--------------------------------------------------------------------------
# * Apply Level Bonuses
#--------------------------------------------------------------------------
def apply_level_bonuses
8.times do |i|
@params = [@params + @level_bonuses[:params], @max_params].min
end
@level_bonuses[:states].each do |id, n|
@states[id] = [[@states[id] + n, 100].min, 0].max
end
@level_bonuses[:elements].each do |id, n|
maxele = DC2WeaponsAce_Setup::Default_MaxElements
minele = DC2WeaponsAce_Setup::Default_MinElements
new_value = @elements[id] + n
@elements[id] = [[new_value, maxele].min, min_ele].max
end
@sp += @level_bonuses[:sp]
end
#--------------------------------------------------------------------------
# * Lose SP
#--------------------------------------------------------------------------
def lose_sp(amount)
@sp = [@sp - amount, 0].max
end
#--------------------------------------------------------------------------
# * Synchronize
#--------------------------------------------------------------------------
def synchronize(old_weapon)
@params.each_with_index do |params, i|
new = params > old_weapon.params ? params : old_weapon.params
@params = [new, @max_params].min
end
@states.each do |id, n|
new = n > old_weapon.states[id] ? n : old_weapon.states[id]
@states[id] = [new, 100].min
end
@elements.each do |id, n|
maxele = DC2WeaponsAce_Setup::Default_MaxElements
minele = DC2WeaponsAce_Setup::Default_MinElements
if n > old_weapon.elements[id]
new = (n - old_weapon.elements[id].abs) / 2
else
new = old_weapon.elements[id]
end
@elements[id] = [[new, maxele].min, minele].max
end
@sp = old_weapon.sp
end
#--------------------------------------------------------------------------
# * Stats Change?
#--------------------------------------------------------------------------
def change?(bonuses)
bonuses[:params].each_with_index do |bonus, i|
new_param = [@params + bonus, @max_params].min
return true if new_param != @params
end
bonuses[:states].each_key do |id|
new_state = [[@states[id] + bonuses[:states][id], 100].min, 0].max
return true if new_state != @states[id]
end
bonuses[:elements].each_key do |id|
maxele = DC2WeaponsAce_Setup::Default_MaxElements
minele = DC2WeaponsAce_Setup::Default_MinElements
new_element = @elements[id] + bonuses[:elements][id]
new_element = [[new_element, maxele].min, minele].max
return true if new_element != @elements[id]
end
return false
end
#--------------------------------------------------------------------------
# * Apply Item Bonuses
#--------------------------------------------------------------------------
def apply_item_bonuses(bonuses)
# Apply bonuses to parameters
@new_params = []
bonuses[:params].each_with_index do |bonus, i|
@new_params = [@params + bonus, @max_params].min
end
@params = @new_params
# Apply bonuses to states
@new_states = {}
bonuses[:states].each_key do |id|
@new_states[id] = [[@states[id] + bonuses[:states][id], 100].min, 0].max
end
@states = @new_states
# Apply bonuses to elements
@new_elements = {}
bonuses[:elements].each_key do |id|
maxele = DC2WeaponsAce_Setup::Default_MaxElements
minele = DC2WeaponsAce_Setup::Default_MinElements
new_value = @elements[id] + bonuses[:elements][id]
@new_elements[id] = [[new_value, maxele].min, minele].max
end
@elements = @new_elements
end
#--------------------------------------------------------------------------
# * Can Make? (New Weapon)
#--------------------------------------------------------------------------
def can_make?(weapon)
reqs = weapon.requirements
reqs[:params].each_with_index do |n, i|
next if n.nil?
return false if n > @params
end
reqs[:states].each do |id, n|
next if n.nil?
return false if n > @states[id]
end
reqs[:elements].each do |id, n|
next if n.nil?
return false if n > @elements[id]
end
return true
end
#--------------------------------------------------------------------------
# * Requirement Higher? (for color purposes)
#--------------------------------------------------------------------------
def req_higher?(weapon, type, key)
reqs = weapon.requirements
case type
when :params
value = @params[key]
when :states
value = @states[key]
when :elements
value = @elements[key]
end
return false if reqs[type][key].nil?
return reqs[type][key] > value
end
#--------------------------------------------------------------------------
# * Bonuses
#--------------------------------------------------------------------------
def bonuses
passlvl = DC2WeaponsAce_Setup::Passover_Level
ns = DC2WeaponsAce_Setup::Passover_Unstable
is = DC2WeaponsAce_Setup::Passover_Stabalized
bonuses = {}
bonuses[:params] = Array.new(8) { 0 }
bonuses[:states] = {}
bonuses[:elements] = {}
@params.each_with_index do |param, i|
amount = @level < passlvl ? (param * ns).floor : (param * is).floor
bonuses[:params] = amount
end
@states.each do |id, n|
amount = @level < passlvl ? (n * ns).floor : (n * is).floor
bonuses[:states][id] = amount
end
@elements.each do |id, n|
amount = @level < passlvl ? (n * ns).floor : (n * is).floor
amount = n if n < 0
bonuses[:elements][id] = amount
end
bonuses
end
#--------------------------------------------------------------------------
# * Cost
#--------------------------------------------------------------------------
def cost
@level + 1
end
#--------------------------------------------------------------------------
# * Price
#--------------------------------------------------------------------------
def price
super + (super * DC2WeaponsAce_Setup::PriceBump).round * @level
end
end
#==============================================================================
# ** Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Gain Weapon Exp
#--------------------------------------------------------------------------
def gain_weapon_exp(amount, show = false)
weapons.each do |weapon|
old_level = weapon.level
weapon.gain_exp(amount)
display_weapon_levelup(weapon) if weapon.level > old_level && show
end
end
#--------------------------------------------------------------------------
# * Show Weapon Level Up Message
#--------------------------------------------------------------------------
def display_weapon_levelup(weapon)
text = DC2WeaponsAce_Setup::ActorWepLevel
$game_message.new_page
$game_message.add(sprintf(text, @name, weapon.orig_name, weapon.level))
end
end
#==============================================================================
# ** Game_Enemy
#==============================================================================
class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# * Get Weapon Experience
#--------------------------------------------------------------------------
def weapon_exp
enemy.weapon_exp
end
end
#==============================================================================
# ** Game_Party
#==============================================================================
class Game_Party < Game_Unit
#--------------------------------------------------------------------------
# * Get Weapon Object Array
#--------------------------------------------------------------------------
def weapons
@weapons.keys.collect {|weapon| weapon }
end
#--------------------------------------------------------------------------
# * Get Number of Items Possessed
#--------------------------------------------------------------------------
alias :broken_dc2weapons_gameparty_itemnum :item_number
def item_number(item)
if item.is_a?(RPG::Weapon)
container = item_container(item.class)
container ? container[item] || 0 : 0
else
broken_dc2weapons_gameparty_itemnum(item)
end
end
#--------------------------------------------------------------------------
# * Increase/Decrease Items
#--------------------------------------------------------------------------
alias :broken_dc2weapons_gameparty_gainitem :gain_item
def gain_item(item, amount, include_equip = false)
if item.is_a?(RPG::Weapon)
item = Game_DC2Weapon.new(item) unless item.is_a?(Game_DC2Weapon)
container = item_container(item.class)
return unless container
last_number = item_number(item)
new_number = last_number + amount
container[item] = [[new_number, 0].max, max_item_number(item)].min
container.delete(item) if container[item] == 0
if include_equip && new_number < 0
discard_members_equip(item, -new_number)
end
$game_map.need_refresh = true
else
broken_dc2weapons_gameparty_gainitem(item, amount, include_equip)
end
end
end
#==============================================================================
# ** Game_Troop
#==============================================================================
class Game_Troop < Game_Unit
#--------------------------------------------------------------------------
# * Calculate Total Weapon Experience
#--------------------------------------------------------------------------
def weapon_exp_total
dead_members.inject(0) {|r, enemy| r += enemy.weapon_exp }
end
end
#==============================================================================
# ** Window_MenuCommand
#==============================================================================
class Window_MenuCommand < Window_Command
#--------------------------------------------------------------------------
# * For Adding Original Commands
#--------------------------------------------------------------------------
alias :broken_dc2weapons_windowmenucom_aoc :add_original_commands
def add_original_commands
broken_dc2weapons_windowmenucom_aoc
add_command(DC2WeaponsAce_Setup::WordUpgrade, :upgrade, upgrade_enabled)
end
#--------------------------------------------------------------------------
# * Upgrade Enabled
#--------------------------------------------------------------------------
def upgrade_enabled
$game_party.exists
end
end
#==============================================================================
# ** Window_ItemList
#==============================================================================
class Window_ItemList < Window_Selectable
#--------------------------------------------------------------------------
# * Get Activation State of Selection Item
#--------------------------------------------------------------------------
alias :broken_dc2weapons_windowitems_cie? :current_item_enabled?
def current_item_enabled?
if SceneManager.scene_is?(Scene_DC2WeaponUpgrade)
weapon = SceneManager.scene.weapon
item = SceneManager.scene.item
return false if item.nil?
return false unless weapon.sp > 0
return false if !item.nil? and weapon.sp < item.cost
return false unless weapon.change?(item.bonuses)
end
broken_dc2weapons_windowitems_cie?
end
#--------------------------------------------------------------------------
# * Include in Item List?
#--------------------------------------------------------------------------
alias :broken_dc2weapons_windowitems_include? :include?
def include?(item)
case @category
when :all
armor = DC2WeaponsAce_Setup::Include_Armor
return false if item.nil?
return false if item.is_a?(RPG::Item) && item.key_item?
return false if !armor && item.is_a?(RPG::Armor)
return true
else
broken_dc2weapons_windowitems_include?(item)
end
end
#--------------------------------------------------------------------------
# * Display in Enabled State?
#--------------------------------------------------------------------------
alias :broken_dc2weapons_windowitems_enable? :enable?
def enable?(item)
return true if !item.nil? && @category == :all
broken_dc2weapons_windowitems_enable?(item)
end
end
#==============================================================================
# ** Window_UpgradeCommand
#==============================================================================
class Window_UpgradeCommand < Window_HorzCommand
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(x, y, width)
@window_width = width
super(x, y)
end
#--------------------------------------------------------------------------
# * Get Window Width
#--------------------------------------------------------------------------
def window_width
@window_width
end
#--------------------------------------------------------------------------
# * Get Digit Count
#--------------------------------------------------------------------------
def col_max
return 2
end
#--------------------------------------------------------------------------
# * Create Command List
#--------------------------------------------------------------------------
def make_command_list
add_command(DC2WeaponsAce_Setup::WordSynthesize, :synthesize)
add_command(DC2WeaponsAce_Setup::WordBuildUp, :build_up)
end
#--------------------------------------------------------------------------
# * Disable Command
#--------------------------------------------------------------------------
def disable_command(index)
@list[index][:enabled] = false
end
end
#==============================================================================
# ** Window_UpgradeItemInfo
#==============================================================================
class Window_UpgradeItemInfo < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(y)
super(0, y, Graphics.width - Graphics.width / 3, fitting_height(1))
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh(item)
contents.clear
draw_item_name(item, 4, 0)
draw_item_exp(item, 212, 0)
end
#--------------------------------------------------------------------------
# * Draw Item Exp
#--------------------------------------------------------------------------
def draw_item_exp(item, x, y)
if item.nil?
item = Game_DC2Weapon.new(RPG::Weapon.new)
end
c1 = DC2WeaponsAce_Setup::ExpColor_1
c2 = DC2WeaponsAce_Setup::ExpColor_2
draw_gauge(x, y, 120, item.exp_rate, c1, c2)
change_color(system_color)
draw_text(x, y, 112, line_height, DC2WeaponsAce_Setup::WordExp)
if item.max_level?
change_color(normal_color)
draw_text(x + 60, y, 112, line_height, DC2WeaponsAce_Setup::WordMax)
else
draw_current_and_max_values(x, y, 120, item.exp, item.next_level_exp,
normal_color, normal_color)
end
end
end
#==============================================================================
# ** Window_UpgradeSP
#==============================================================================
class Window_UpgradeSP < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(y)
super(Graphics.width - Graphics.width / 3, y, Graphics.width / 3,
fitting_height(1))
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh(item, actor, cost_item = nil)
contents.clear
draw_actor_graphic(actor, 12, 30)
change_color(system_color)
draw_text(28, 0, 50, line_height, DC2WeaponsAce_Setup::WordSP)
change_color(normal_color)
if !item.nil?
draw_text(70, 0, 36, line_height, item.sp, 2)
else
draw_text(70, 0, 36, line_height, "0", 2)
end
unless cost_item.nil?
change_color(power_down_color)
text = "- #{cost_item.cost}"
draw_text(110, 0, 36, line_height, text, 2)
end
end
end
#==============================================================================
# ** Window_UpgradeItemStatus
#==============================================================================
class Window_UpgradeItemStatus < Window_Base
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :weapon
attr_accessor :req_weapon
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(y, weapon)
super(0, y, Graphics.width, fitting_height(12) + 8)
if weapon.nil?
weapon = Game_DC2Weapon.new(RPG::Weapon.new)
end
@weapon = weapon
@bonus_item = nil
@req_weapon = nil
end
#--------------------------------------------------------------------------
# * Bonus Item
#--------------------------------------------------------------------------
def bonus_item
@bonus_item
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh(apply_bonus = false)
contents.clear
if @weapon.nil?
@weapon = Game_DC2Weapon.new(RPG::Weapon.new)
end
draw_params(apply_bonus)
draw_states(apply_bonus)
draw_elements(apply_bonus)
end
#--------------------------------------------------------------------------
# * Draw Params
#--------------------------------------------------------------------------
def draw_params(apply_bonus)
@weapon.params.each_index do |i|
x = i % 4 * 130 + 2
y = i / 4 * line_height
draw_equip_param(x, y, i, apply_bonus)
end
end
#--------------------------------------------------------------------------
# * Draw Equipment Parameter
#--------------------------------------------------------------------------
def draw_equip_param(x, y, param_id, apply_bonus)
add_x = 24
draw_icon(DC2WeaponsAce_Setup::Param_Icons[param_id], x, y)
c1 = DC2WeaponsAce_Setup::ParamColor_1
c2 = DC2WeaponsAce_Setup::ParamColor_2
draw_gauge(x + add_x, y, 100, @weapon.param_rate(param_id), c1, c2)
change_color(system_color)
draw_text(x + add_x, y, 120, line_height, Vocab::param(param_id))
if apply_bonus
new_value = @new_weapon.params[param_id]
old_value = @old_weapon.params[param_id]
change_color(param_change_color(new_value - old_value))
else
change_color(normal_color)
unless @req_weapon.nil?
if @weapon.req_higher?(@req_weapon, :params, param_id)
change_color(power_down_color)
end
end
end
value = apply_bonus ? new_value : @weapon.params[param_id]
draw_text(x + 60 + add_x, y, 36, line_height, value, 2)
end
#--------------------------------------------------------------------------
# * Draw States
#--------------------------------------------------------------------------
def draw_states(apply_bonus)
DC2WeaponsAce_Setup::Addable_States.each_with_index do |id, i|
state = $data_states[id]
rate = 0
rate = @weapon.states[id] if @weapon.states.keys.include?(id)
x = i % 3 * 180
y = i / 3 * line_height + line_height * 3
draw_equip_state(state, x, y, rate, apply_bonus)
end
end
#--------------------------------------------------------------------------
# * Draw Equipment State
#--------------------------------------------------------------------------
def draw_equip_state(state, x, y, rate, apply_bonus)
add_x = 24
draw_icon(state.icon_index, x, y)
change_color(system_color)
draw_text(x + add_x, y, 120, line_height, state.name)
if apply_bonus
new_value = @new_weapon.states[state.id]
old_value = @old_weapon.states[state.id]
change_color(param_change_color(new_value - old_value))
else
change_color(normal_color)
unless @req_weapon.nil?
if @weapon.req_higher?(@req_weapon, :states, state.id)
change_color(power_down_color)
end
end
end
value = apply_bonus ? new_value : rate
draw_text(x + 82 + add_x, y, 50, line_height, "#{value}%", 2)
end
#--------------------------------------------------------------------------
# * Draw States
#--------------------------------------------------------------------------
def draw_elements(apply_bonus)
DC2WeaponsAce_Setup::Addable_Elements.each_with_index do |id, i|
rate = 0
rate = @weapon.elements[id] if @weapon.elements.keys.include?(id)
x = i % 3 * 180
y = i / 3 * line_height + line_height * 7
draw_equip_element(id, x, y, rate, apply_bonus)
end
end
#--------------------------------------------------------------------------
# * Draw Equipment Element
#--------------------------------------------------------------------------
def draw_equip_element(id, x, y, rate, apply_bonus)
add_x = 24
draw_icon(DC2WeaponsAce_Setup::Element_Icons[id], x, y)
change_color(system_color)
draw_text(x + add_x, y, 120, line_height, Vocab.elements(id))
if apply_bonus
new_value = @new_weapon.elements[id]
old_value = @old_weapon.elements[id]
change_color(param_change_color(new_value - old_value))
else
change_color(normal_color)
unless @req_weapon.nil?
if @weapon.req_higher?(@req_weapon, :elements, id)
change_color(power_down_color)
end
end
end
value = apply_bonus ? new_value : rate
draw_text(x + 82 + add_x, y, 50, line_height, "#{value}%", 2)
end
#--------------------------------------------------------------------------
# * Update Status
#--------------------------------------------------------------------------
def update_status(item = nil)
@bonus_item = item
@old_weapon = @weapon
@new_weapon = @weapon.clone
@new_weapon.apply_item_bonuses(@bonus_item.bonuses) unless @bonus_item.nil?
refresh(!@bonus_item.nil?)
end
end
#==============================================================================
# ** Window_WeaponPaths
#==============================================================================
class Window_WeaponPaths < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(weapon, x, y, width, height)
super(x, y, width, height)
weapon = Game_DC2Weapon.new(RPG::Weapon.new) if weapon.nil?
@weapon = weapon
@data = []
end
#--------------------------------------------------------------------------
# * Get Digit Count
#--------------------------------------------------------------------------
def col_max
return 2
end
#--------------------------------------------------------------------------
# * Get Number of Items
#--------------------------------------------------------------------------
def item_max
@data ? @data.size : 1
end
#--------------------------------------------------------------------------
# * Weapon
#--------------------------------------------------------------------------
def weapon
@data && index >= 0 ? @data[index] : nil
end
#--------------------------------------------------------------------------
# * Get Activation State of Selection Item
#--------------------------------------------------------------------------
def current_item_enabled?
enable?(@data[index])
end
#--------------------------------------------------------------------------
# * Display in Enabled State?
#--------------------------------------------------------------------------
def enable?(item)
@weapon.can_make?(item)
end
#--------------------------------------------------------------------------
# * Create Item List
#--------------------------------------------------------------------------
def make_item_list
@data = []
@weapon.paths.each {|id| @data.push(Game_DC2Weapon.new($data_weapons[id]))}
end
#--------------------------------------------------------------------------
# * Draw Item
#--------------------------------------------------------------------------
def draw_item(index)
item = @data[index]
if item
rect = item_rect(index)
rect.width -= 4
draw_item_name(item, rect.x, rect.y, enable?(item))
end
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
make_item_list
create_contents
draw_all_items
end
end
#==============================================================================
# ** Window_YesNo
#==============================================================================
class Window_YesNo < Window_Command
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y)
end
#--------------------------------------------------------------------------
# * Get Window Width
#--------------------------------------------------------------------------
def window_width
return 160
end
#--------------------------------------------------------------------------
# * Create Command List
#--------------------------------------------------------------------------
def make_command_list
add_command('Proceed', :ok, true)
add_command('Cancel', :cancel, true)
end
end
#==============================================================================
# ** Scene_Menu
#==============================================================================
class Scene_Menu < Scene_MenuBase
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
alias :broken_dc2weapons_scenemenu_ccw :create_command_window
def create_command_window
broken_dc2weapons_scenemenu_ccw
@command_window.set_handler(:upgrade, method(:command_personal))
end
#--------------------------------------------------------------------------
# * [OK] Personal Command
#--------------------------------------------------------------------------
alias :broken_dc2weapons_scenemenu_opok :on_personal_ok
def on_personal_ok
broken_dc2weapons_scenemenu_opok
case @command_window.current_symbol
when :upgrade
if @actor.weapons[0].nil?
@status_window.activate
else
SceneManager.call(Scene_DC2WeaponUpgrade)
end
end
end
end
#==============================================================================
# ** Scene_DC2WeaponUpgrade
#==============================================================================
class Scene_DC2WeaponUpgrade < Scene_MenuBase
#--------------------------------------------------------------------------
# * Start Processing
#--------------------------------------------------------------------------
def start
super
create_yesno_viewport
@weapon = @actor.weapons[0]
@active_window = nil
create_command_window
create_display_windows
create_item_windows
refresh_windows
end
#--------------------------------------------------------------------------
# * Weapon
#--------------------------------------------------------------------------
def weapon
@weapon
end
#--------------------------------------------------------------------------
# * Item
#--------------------------------------------------------------------------
def item
@item_window.item
end
#--------------------------------------------------------------------------
# * Update Frame (Basic)
#--------------------------------------------------------------------------
def update_basic
super
if @status_window.bonus_item != item
@status_window.update_status(item)
@sp_window.refresh(weapon, @actor, item)
end
if @paths_window.active && @status_window.req_weapon != @paths_window.weapon
@status_window.req_weapon = @paths_window.weapon
@status_window.refresh
end
update_info_viewport
update_yesno_viewport
end
#--------------------------------------------------------------------------
# * Update Information Display Viewport
#--------------------------------------------------------------------------
def update_info_viewport
move_info_viewport(0) if @command_window.active
move_info_viewport(46) if @item_window.active || @paths_window.active
if @command_window.active && @active_window != :command
update_window_heights
@active_window = :command
elsif @item_window.active && @active_window != :item
update_window_heights
@active_window = :item
elsif @paths_window.active && @active_window != :paths
update_window_heights
@active_window = :paths
end
end
#--------------------------------------------------------------------------
# * Update Yes/No Display Viewport
#--------------------------------------------------------------------------
def update_yesno_viewport
move_yesno_viewport(0) if !@okay_window.active
move_yesno_viewport(-240) if @okay_window.active
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
def terminate
super
dispose_yesno_viewport
end
#--------------------------------------------------------------------------
# * Create Yes/No Display Viewport
#--------------------------------------------------------------------------
def create_yesno_viewport
@viewport2 = Viewport.new
@viewport2.z = 250
end
#--------------------------------------------------------------------------
# * Dispose Yes/No Display Viewport
#--------------------------------------------------------------------------
def dispose_yesno_viewport
@viewport2.dispose
end
#--------------------------------------------------------------------------
# * Update Window Heights
#--------------------------------------------------------------------------
def update_window_heights
active = @command_window.active
height = active ? @command_window.fitting_height(12) + 8 : 0
height = !active ? @command_window.fitting_height(10) + 8 : height
@status_window.height = height
@status_window.create_contents
@status_window.update_status(item)
@sp_window.refresh(weapon, @actor, item)
wy = @status_window.y + @status_window.height
wh = @command_window.height + Graphics.height - wy
if active || @item_window.active
@item_window.height = wh
@item_window.y = wy
else
@item_window.y = wy + 96
end
if active || @paths_window.active
@paths_window.height = wh
@paths_window.y = wy
else
@paths_window.y = wy + 96
end
end
#--------------------------------------------------------------------------
# * Move Information Display Viewport
#--------------------------------------------------------------------------
def move_info_viewport(oy)
current_oy = @viewport.oy
@viewport.oy = [oy, current_oy + 12].min if current_oy < oy
@viewport.oy = [oy, current_oy - 12].max if current_oy > oy
end
#--------------------------------------------------------------------------
# * Move Yes/No Display Viewport
#--------------------------------------------------------------------------
def move_yesno_viewport(oy)
current_oy = @viewport2.oy
@viewport2.oy = [oy, current_oy + 20].min if current_oy < oy
@viewport2.oy = [oy, current_oy - 20].max if current_oy > oy
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_command_window
ww = Graphics.width
@command_window = Window_UpgradeCommand.new(0, 0, ww)
@command_window.viewport = @viewport
@command_window.set_handler(:synthesize, method(:start_synthesize))
@command_window.set_handler(:build_up, method(:start_buildup))
@command_window.set_handler(:cancel, method(:return_scene))
@command_window.set_handler(:pagedown, method(:next_actor))
@command_window.set_handler(:pageup, method(:prev_actor))
if weapon.nil?
@command_window.disable_command(0)
@command_window.redraw_item(0)
@command_window.disable_command(1)
@command_window.redraw_item(1)
elsif weapon.paths.empty?
@command_window.disable_command(1)
@command_window.redraw_item(1)
end
@okay_window = Window_YesNo.new(200, -80)
@okay_window.viewport = @viewport2
@okay_window.set_handler(:ok, method(:yesno_ok))
@okay_window.set_handler(:cancel, method(:yesno_cancel))
@okay_window.deactivate
end
#--------------------------------------------------------------------------
# * Create Display Windows
#--------------------------------------------------------------------------
def create_display_windows
wy = @command_window.height
@name_window = Window_UpgradeItemInfo.new(wy)
@name_window.viewport = @viewport
@sp_window = Window_UpgradeSP.new(wy)
@sp_window.viewport = @viewport
wy = wy + @name_window.height
@status_window = Window_UpgradeItemStatus.new(wy, weapon)
@status_window.viewport = @viewport
end
#--------------------------------------------------------------------------
# * Create Item Windows
#--------------------------------------------------------------------------
def create_item_windows
wy = @status_window.y + @status_window.height
wh = @name_window.height + @command_window.height + Graphics.height - wy
@item_window = Window_ItemList.new(0, wy, Graphics.width, wh)
@item_window.viewport = @viewport
@item_window.set_handler(:ok, method(:on_item_ok))
@item_window.set_handler(:cancel, method(:on_item_cancel))
@item_window.category = :all
@paths_window = Window_WeaponPaths.new(weapon, 0, wy, Graphics.width, wh)
@paths_window.viewport = @viewport
@paths_window.set_handler(:ok, method(:on_paths_ok))
@paths_window.set_handler(:cancel, method(:on_paths_cancel))
end
#--------------------------------------------------------------------------
# * Change Actors
#--------------------------------------------------------------------------
def on_actor_change
@weapon = @actor.weapons[0]
@status_window.weapon = weapon
@status_window.req_weapon = nil
redraw_windows
refresh_windows
end
#--------------------------------------------------------------------------
# * Redraw Windows
#--------------------------------------------------------------------------
def redraw_windows
@command_window.dispose
@item_window.dispose
@paths_window.dispose
create_command_window
create_item_windows
end
#--------------------------------------------------------------------------
# * Refresh Windows
#--------------------------------------------------------------------------
def refresh_windows
@name_window.refresh(weapon)
@sp_window.refresh(weapon, @actor)
@status_window.refresh
@item_window.refresh
@paths_window.refresh
end
#--------------------------------------------------------------------------
# * Synthesize
#--------------------------------------------------------------------------
def start_synthesize
@command_window.deactivate
@item_window.activate
@item_window.select(0)
end
#--------------------------------------------------------------------------
# * Build Up
#--------------------------------------------------------------------------
def start_buildup
@command_window.deactivate
@paths_window.activate
@paths_window.select(0)
end
#--------------------------------------------------------------------------
# * Yes / No [OK]
#--------------------------------------------------------------------------
def yesno_ok
case @active_window
when :item
@weapon.apply_item_bonuses(item.bonuses)
@weapon.lose_sp(item.cost)
$game_party.lose_item(item, 1)
refresh_windows
@item_window.activate
@status_window.update_status(item)
@sp_window.refresh(weapon, @actor, item)
when :paths
new_weapon = @paths_window.weapon
new_weapon.synchronize(weapon)
$game_party.gain_item(new_weapon, 1)
@actor.change_equip(0, new_weapon)
$game_party.lose_item(weapon, 1)
@weapon = new_weapon
@command_window.activate
@command_window.select(0)
@paths_window.unselect
@status_window.weapon = weapon
@status_window.req_weapon = nil
redraw_windows
refresh_windows
end
end
#--------------------------------------------------------------------------
# * Yes / No [Cancel]
#--------------------------------------------------------------------------
def yesno_cancel
case @active_window
when :item
@item_window.activate
when :paths
@paths_window.activate
end
end
#--------------------------------------------------------------------------
# * Item [OK]
#--------------------------------------------------------------------------
def on_item_ok
@okay_window.activate
@okay_window.show
end
#--------------------------------------------------------------------------
# * Item [Cancel]
#--------------------------------------------------------------------------
def on_item_cancel
@item_window.unselect
@command_window.activate
end
#--------------------------------------------------------------------------
# * Paths [OK]
#--------------------------------------------------------------------------
def on_paths_ok
@okay_window.activate
@okay_window.show
end
#--------------------------------------------------------------------------
# * Paths [Cancel]
#--------------------------------------------------------------------------
def on_paths_cancel
@paths_window.unselect
@status_window.req_weapon = nil
@status_window.refresh
@command_window.activate
end
end

Breath
in Progetti MV
Posted
Mi dispiace che tu non sia riuscito a superare il primo enigma, sto puntando molto sull'osservazione. Bisogna osservare gli elementi dell'ambiente per capire come procedere.
La mappa è grossa per un motivo che purtroppo non posso dire, però hai ragione, ho esagerato!
Sto cambiando il primo enigma per renderlo un pochino più intuitivo e la mappa è stata ridotta al minimo :)
(Subito dopo quella mappa avresti avuto modo di salvare) XD
Grazie del parere!