Szkielet
Kod: Zaznacz cały
class RPG::Clip
def initialize(id)
@id = id
initialize_general
initialize_damages
initialize_protection
initialize_params
initialize_immunities
end
def id
return @id
end
#Ogólne
def initialize_general
@name = ""
@icon_name = ""
@reload_time = 1
@turn_time = 1
@description = ""
@type = ""
@price = 0
@max_ammo_items = {}
for i in 1...$data_items.size
@max_ammo_items[i] = 0
end
@max_ammo_weapons = {}
for i in 1...$data_weapons.size
@max_ammo_weapons[i] = 0
end
end
def name=(text)
@name = text
end
def icon_name=(text)
@icon_name = text
end
def description=(string)
@description = string
end
def description
return @description
end
def type=(text)
@type = text
end
def type
return @type
end
def reload_time=(n)
@reload_time = n
end
def turn_time=(n)
@turn_time = n
end
def max_ammo_items=(value)
@max_ammo_items = value
end
def max_ammo_weapons=(value)
@max_ammo_weapons = value
end
def name
return @name
end
def icon_name
return @icon_name
end
def reload_time
return @reload_time
end
def turn_time
return @turn_time
end
def max_ammo_items
return @max_ammo_items
end
def max_ammo_weapons
return @max_ammo_weapons
end
def price=(n)
@price = n
end
def price
return @price
end
#/Ogólne
#Obrażenia
def initialize_damages
@damage_pierce = 0
@damage_slash = 0
@damage_bludgeon = 0
@damage_spirit = 0
@damage_poison = 0
@damage_fire = 0
@damage_wind = 0
@damage_lightning = 0
@damage_earth = 0
@damage_water = 0
@damage_plant = 0
@damage_ice = 0
@damage_metal = 0
@damage_light = 0
@damage_darkness = 0
end
def damage_pierce=(n)
@damage_pierce = n
end
def damage_slash=(n)
@damage_slash = n
end
def damage_bludgeon=(n)
@damage_bludgeon = n
end
def damage_poison=(n)
@damage_poison = n
end
def damage_spirit=(n)
@damage_spirit = n
end
def damage_fire=(n)
@damage_fire = n
end
def damage_wind=(n)
@damage_wind = n
end
def damage_lightning=(n)
@damage_lightning = n
end
def damage_earth=(n)
@damage_pierce = n
end
def damage_water=(n)
@damage_pierce = n
end
def damage_plant=(n)
@damage_pierce = n
end
def damage_ice=(n)
@damage_pierce = n
end
def damage_metal=(n)
@damage_pierce = n
end
def damage_light=(n)
@damage_pierce = n
end
def damage_darkness=(n)
@damage_pierce = n
end
def damage_pierce
return @damage_pierce
end
def damage_slash
return @damage_slash
end
def damage_bludgeon
return @damage_bludgeon
end
def damage_poison
return @damage_poison
end
def damage_spirit
return @damage_spirit
end
def damage_fire
return @damage_fire
end
def damage_wind
return @damage_wind
end
def damage_lightning
return @damage_lightning
end
def damage_earth
return @damage_earth
end
def damage_water
return @damage_water
end
def damage_plant
return @damage_plant
end
def damage_ice
return @damage_ice
end
def damage_metal
return @damage_metal
end
def damage_light
return @damage_light
end
def damage_darkness
return @damage_darkness
end
#/Obrażenia
#Ochrona
def initialize_protection
@protection_pierce = 0
@protection_slash = 0
@protection_bludgeon = 0
@protection_poison = 0
@protection_spirit = 0
@protection_fire = 0
@protection_wind = 0
@protection_lightning = 0
@protection_earth = 0
@protection_water = 0
@protection_ice = 0
@protection_plant = 0
@protection_metal = 0
@protection_light = 0
@protection_darkness = 0
end
def protection_pierce=(n)
@protection_pierce = n
end
def protection_slash=(n)
@protection_slash = n
end
def protection_bludgeon=(n)
@protection_bludgeon = n
end
def protection_poison=(n)
@protection_poison = n
end
def protection_spirit=(n)
@protection_spirit = n
end
def protection_fire=(n)
@protection_fire = n
end
def protection_wind=(n)
@protection_wind = n
end
def protection_lightning=(n)
@protection_lightning = n
end
def protection_earth=(n)
@protection_earth = n
end
def protection_water=(n)
@protection_water = n
end
def protection_ice=(n)
@protection_ice = n
end
def protection_plant=(n)
@protection_plant = n
end
def protection_metal=(n)
@protection_metal = n
end
def protection_light=(n)
@protection_light = n
end
def protection_darkness=(n)
@protection_darkness = n
end
def protection_pierce
return @protection_pierce
end
def protection_slash
return @protection_slash
end
def protection_bludgeon
return @protection_bludgeon
end
def protection_poison
return @protection_poison
end
def protection_spirit
return @protection_spirit
end
def protection_fire
return @protection_fire
end
def protection_wind
return @protection_wind
end
def protection_lightning
return @protection_lightning
end
def protection_earth
return @protection_earth
end
def protection_water
return @protection_water
end
def protection_ice
return @protection_ice
end
def protection_plant
return @protection_plant
end
def protection_metal
return @protection_metal
end
def protection_light
return @protection_light
end
def protection_darkness
return @protection_darkness
end
#/Ochrona
#Cechy
def initialize_params
@maxhp = 0
@maxsp = 0
@hp_rec = 0
@sp_rec = 0
@atk = 0
@pdef = 0
@mdef = 0
@eva = 0
@str = 0
@dex = 0
@agi = 0
@int = 0
@maxstamina = 0
@stamina_rec = 0
@abilities = {}
end
def maxhp=(n)
@maxhp = n
end
def maxsp=(n)
@maxsp = n
end
def hp_rec=(n)
@hp_rec = n
end
def sp_rec=(n)
@sp_rec = n
end
def atk=(n)
@atk = n
end
def pdef=(n)
@pdef = n
end
def mdef=(n)
@mdef = n
end
def eva=(n)
@eva = n
end
def str=(n)
@str = n
end
def dex=(n)
@dex = n
end
def agi=(n)
@agi = n
end
def int=(n)
@int = n
end
def maxstamina=(n)
@maxstamina = n
end
def stamina_rec=(n)
@stamina_rec = n
end
def maxhp
return @maxhp
end
def maxsp
return @maxsp
end
def hp_rec
return @hp_rec
end
def sp_rec
return @sp_rec
end
def atk
return @atk
end
def pdef
return @pdef
end
def mdef
return @mdef
end
def eva
return @eva
end
def str
return @str
end
def dex
return @dex
end
def agi
return @agi
end
def int
return @int
end
def maxstamina
return @maxstamina
end
def stamina_rec
return @stamina_rec
end
def abilities=(value)
@abilities = value
end
def abilities
return @abilities
end
#/Cechy
#Odporności
def initialize_immunities
@states = {}
@elements = {}
auto_state_id = 0
end
def auto_state_id=(id)
@auto_state_id = id
end
def auto_state_id
return @auto_state_id
end
def state_set=(value)
@states = value
end
def state_set
return @states
end
def element_set=(value)
@elements = value
end
def element_set
return @elements
end
#/Odporności
end
Kod: Zaznacz cały
def load_clip_general_data
rfile = File.open("Data/Base/clip.rb", "rb")
texts = rfile.readlines.clone
rfile.close
return if texts == nil
text = ""
for i in 0..texts.size
next if texts[i] == nil
text = text + texts[i]
next if texts[i+1] == nil
text = text + "\n"
end
eval(text)
end
def load_clips_data
$data_clips = []
ids = []
for i in 1..Clips
ids.push(i)
end
return if ids.empty?
for id in ids
$data_clips[id] = RPG::Clip.new(id)
load_clip_basic_data(id)
end
end
def load_clip_basic_data(id)
rfile = File.open("Data/Base/Clips/clip#{id}.rb", "rb")
texts = rfile.readlines
rfile.close
text = ""
for line in texts
text += line + "\n" unless line == nil
end
eval(text)
end
Kod: Zaznacz cały
id = 0
$data_clips[id].name = ""
$data_clips[id].icon_name = ""
$data_clips[id].description = ""
$data_clips[id].type = "quiver"
$data_clips[id].reload_time = 0
$data_clips[id].turn_time = 0
$data_clips[id].price = 0
$data_clips[id].max_ammo_items[1] = 0
$data_clips[id].max_ammo_weapons[1] = 0
$data_clips[id].damage_pierce = 0
$data_clips[id].damage_slash = 0
$data_clips[id].damage_bludgeon = 0
$data_clips[id].damage_poison = 0
$data_clips[id].damage_spirit = 0
$data_clips[id].damage_fire = 0
$data_clips[id].damage_wind = 0
$data_clips[id].damage_lightning = 0
$data_clips[id].damage_earth = 0
$data_clips[id].damage_water = 0
$data_clips[id].damage_plant = 0
$data_clips[id].damage_ice = 0
$data_clips[id].damage_metal = 0
$data_clips[id].damage_light = 0
$data_clips[id].damage_darkness = 0
$data_clips[id].protection_pierce = 0
$data_clips[id].protection_slash = 0
$data_clips[id].protection_bludgeon = 0
$data_clips[id].protection_poison = 0
$data_clips[id].protection_spirit = 0
$data_clips[id].protection_fire = 0
$data_clips[id].protection_wind = 0
$data_clips[id].protection_lightning = 0
$data_clips[id].protection_earth = 0
$data_clips[id].protection_water = 0
$data_clips[id].protection_ice = 0
$data_clips[id].protection_plant = 0
$data_clips[id].protection_metal = 0
$data_clips[id].protection_light = 0
$data_clips[id].protection_darkness = 0
$data_clips[id].maxhp = 0
$data_clips[id].maxsp = 0
$data_clips[id].hp_rec = 0
$data_clips[id].sp_rec = 0
$data_clips[id].atk = 0
$data_clips[id].pdef = 0
$data_clips[id].mdef = 0
$data_clips[id].eva = 0
$data_clips[id].str = 0
$data_clips[id].dex = 0
$data_clips[id].agi = 0
$data_clips[id].int = 0
$data_clips[id].maxstamina = 0
$data_clips[id].stamina_rec = 0
$data_clips[id].abilities[1] = 0
$data_clips[id].auto_state_id = 0
$data_clips[id].element_set[1] = 0
$data_clips[id].state_set[1] = 0