Login

Esqueci a minha senha

Últimos assuntos
» Skill Shop para RMVX Ver 3.1
Seg Mar 15, 2010 3:08 pm por Rodrigo Vernaschi

» Parar me no fim da batalha
Seg Mar 15, 2010 1:09 pm por Rodrigo Vernaschi

» Pause Script Version 1
Sab Fev 20, 2010 10:39 pm por Rodrigo Vernaschi

» Random Event Position 1.1
Sab Fev 20, 2010 10:35 pm por Rodrigo Vernaschi

» Char Terminator (Exterminador do Futuro)
Sab Fev 20, 2010 10:02 pm por Rodrigo Vernaschi

» Animais Variados
Sab Fev 20, 2010 9:56 pm por Rodrigo Vernaschi

» Tiles do Inquisitor para VX (sendo feito a conversão)
Sab Fev 20, 2010 9:51 pm por Rodrigo Vernaschi

» Sistema Monetário
Sab Fev 20, 2010 10:11 am por TAXD

» Desembarcar apenas no Porto
Sab Fev 20, 2010 10:11 am por TAXD

Parceiros



Overkill - Bônus de batalha

Ver o tópico anterior Ver o tópico seguinte Ir em baixo

Overkill - Bônus de batalha

Mensagem por Vingador o Ter Jan 05, 2010 12:33 pm

Overkill é acionada quando você mata um monstro cujo poder já foi superado por você.


###############################################################################
# script: Overkill
# Version: 1 (28/8/08)
# Author: uresk (AKA 332211)
###############################################################################
#==============================================================================
# ** Module Overkill
#------------------------------------------------------------------------------
# Configuration
#
# Overkill_HP = {enemy_id => negative hp for overkill, ...}
#
# Overkill_text = "message for overkill when enemy dies"
# apears only when you overkill one enemy
#
# Overkill_Bonus_End = "message shown in the battle end before Exp and Gol gain"
#==============================================================================

module Overkill

Overkill_HP = {1 => 500, 2 => 10}

Overkill_text = "OVERKILL!!!"

Overkill_Bonus_End = "Ganhou o dobro de Exp e %s por Overkill!!!"
# %s = game currency

end


#==============================================================================
# ** Game_Battler
#------------------------------------------------------------------------------
# This class deals with battlers. It's used as a superclass of the Game_Actor
# and Game_Enemy classes.
#==============================================================================

class Game_Battler
#--------------------------------------------------------------------------
# * aliasing Change HP method
#--------------------------------------------------------------------------
alias overkill_hp hp=
#--------------------------------------------------------------------------
# * Change HP
# hp : new HP
#--------------------------------------------------------------------------
def hp=(hp)
self.dying_hp = hp unless self.actor?
overkill_hp(hp)
end
end


#==============================================================================
# ** Game_Enemy
#------------------------------------------------------------------------------
# This class handles enemy characters. It's used within the Game_Troop class
# ($game_troop).
#==============================================================================

class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# * Public Instance Variables (new)
#--------------------------------------------------------------------------
attr_accessor:overkill
attr_accessor:dying_hp
#--------------------------------------------------------------------------
# * aliasing Object Initialization
#--------------------------------------------------------------------------
alias overkill_initialize initialize
#--------------------------------------------------------------------------
# * Object Initialization
# index : index in troop
# enemy_id : enemy ID
#--------------------------------------------------------------------------
def initialize(index, enemy_id)
overkill_initialize(index, enemy_id)
@overkill = false
@dying_hp = 0
end
end

#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
# This class performs battle screen processing.
#==============================================================================

class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# * include module Overkill
#--------------------------------------------------------------------------
include Overkill
#--------------------------------------------------------------------------
# * aliasing display_added_states method
#--------------------------------------------------------------------------
alias overkill_display_added_states display_added_states
#--------------------------------------------------------------------------
# * Show Added State
# target : Target
# obj : Skill or item
#--------------------------------------------------------------------------
def display_added_states(target, obj = nil)
overkill_display_added_states(target, obj = nil)
overkill(target) if target.actor? == false and target.dead?
end
#--------------------------------------------------------------------------
# * Overkill * checks for overkill
# target : Target
#--------------------------------------------------------------------------
def overkill(target)
if Overkill_HP[target.enemy_id] != nil # if there is a set Hp for overkill
dhp = 0
dhp -= target.dying_hp # get dying_hp
required_damage = Overkill_HP[target.enemy_id] # get required Hp for overkill
target.overkill = true if dhp >= required_damage # compare dying_hp with required hp
end
if target.overkill # show overkill in battle message
text = sprintf(Overkill::Overkill_text)
@message_window.add_instant_text(text)
end
end
#--------------------------------------------------------------------------
# * aliasing display_exp_and_gold method
#--------------------------------------------------------------------------
alias overkill_display_exp_and_gold display_exp_and_gold
#--------------------------------------------------------------------------
# * Display Gained Experience and Gold (overwriten)
#--------------------------------------------------------------------------
def display_exp_and_gold
exp = $game_troop.exp_total
gold = $game_troop.gold_total
for enemy in $game_troop.members # check all the enemies
next unless enemy.overkill # if one of the was overkilled
exp *= 2 # gain double exp
gold *= 2 # gain double gold
text = sprintf(Overkill::Overkill_Bonus_End,Vocab.gold) #show overkill
$game_message.texts.push('\\\\|' + text) # bonus message (battle end)
break
end
$game_party.gain_gold(gold)
text = sprintf(Vocab::Victory, $game_party.name)
$game_message.texts.push('\\\\|' + text)
if exp > 0
text = sprintf(Vocab::ObtainExp, exp)
$game_message.texts.push('\\\\.' + text)
end
if gold > 0
text = sprintf(Vocab::ObtainGold, gold, Vocab::gold)
$game_message.texts.push('\\\\.' + text)
end
wait_for_message
end
end

_________________


Em breve: GUARDIAN HEROES
The Legend of Fire

Vingador
Iniciante
Iniciante

Número de Mensagens: 17
Idade: 21
Localização: Araguari
Premios: <br>: 0 : 0 : 0
Reputação: 13
Pontos: 88
Data de inscrição: 04/01/2010

Ficha do personagem
Raça: Lich
Nível Maker: Mestre
Mensagem Pessoal: Me dê as suas armas mágicas!!!

Ver perfil do usuário http://www.orkut.com.br/Main#Profile?uid=4395857722134662547

Voltar ao Topo Ir em baixo

Ver o tópico anterior Ver o tópico seguinte Voltar ao Topo


Permissão deste fórum:
Você não pode responder aos tópicos neste fórum